mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 02:46:30 +00:00
Found a more efficient way to force lower case on boolean values.
Helpful for supporting multiple databases. Make the import safer for users where the value is expected in lower case. Best solution for PostgreSQL is boolean data type but that would still not be a good solution for alternative databases.
This commit is contained in:
@@ -276,17 +276,16 @@
|
||||
$result[$key] = preg_replace('{\D}', '', $result[$key]);
|
||||
}
|
||||
|
||||
//set the voicemail_local_after_email, voicemail_tutorial, and voicemail_enabled to lower case
|
||||
if ($field_name == 'voicemail_local_after_email' || $field_name == 'voicemail_tutorial' || $field_name == 'voicemail_enabled') {
|
||||
$result[$key] = strtolower($result[$key]);
|
||||
}
|
||||
|
||||
//build the data array
|
||||
if (strlen($table_name) > 0) {
|
||||
if (strlen($parent) == 0) {
|
||||
$array[$table_name][$row_id]['domain_uuid'] = $domain_uuid;
|
||||
if ($field_name == 'voicemail_local_after_email' || $field_name == 'voicemail_tutorial' || $field_name == 'voicemail_enabled') {
|
||||
$field_value = strtolower($result[$key]);
|
||||
}
|
||||
else {
|
||||
$field_value = $result[$key];
|
||||
}
|
||||
$array[$table_name][$row_id][$field_name] = $field_value;
|
||||
$array[$table_name][$row_id][$field_name] = $result[$key];
|
||||
}
|
||||
else {
|
||||
$array[$parent][$row_id][$table_name][$y]['domain_uuid'] = $domain_uuid;
|
||||
|
||||
Reference in New Issue
Block a user