mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
Another small fix for BIT24 casting for the LDAP driver...
This commit is contained in:
parent
4a934c57b0
commit
a4ddc7a6c9
@ -533,12 +533,18 @@ class Principal {
|
||||
foreach( self::updateableFields() AS $k ) {
|
||||
if ( !isset($field_values->{$k}) && !isset($this->{$k}) ) continue;
|
||||
if ( $inserting ) {
|
||||
$param_names[] = ':'.$k;
|
||||
$insert_fields[] = $k;
|
||||
$param_names[] = ':'.$k . ($k == 'default_privileges' ? '::BIT(24)' : '');
|
||||
}
|
||||
else {
|
||||
$update_list[] = $k.'=:'.($k == 'default_privileges' ? '::BIT(24)' : '');
|
||||
if ($k == 'default_privileges') {
|
||||
$update_list[] = $k.'=cast(:'.$k.' as text)::BIT(24)';
|
||||
}
|
||||
else {
|
||||
$update_list[] = $k.'=:'.$k;
|
||||
}
|
||||
}
|
||||
|
||||
$sql_params[':'.$k] = (isset($field_values->{$k}) ? $field_values->{$k} : $this->{$k});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user