mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Convert boolean values to a string before being copied (#7591)
* Convert boolean values to a string before being copied * Update access_controls.php * Update copyright year and handle boolean values Updated copyright year from 2019 to 2025 and added conversion of boolean values to strings in the database result processing. * Update call_block.php * Update call_center.php * Update call_flows.php * Update conference_controls.php * Update conference_profiles.php * Update conferences.php * Update device.php * Update dialplan.php * Update event_guard.php * Update extension_settings.php * Update fax.php * Update fax_queue.php * Update gateways.php * Update ivr_menu.php * Update number_translations.php * Update phrases.php * Update pin_numbers.php * Update ring_groups.php * Update streams.php * Update time_conditions.php * Update vars.php * Update email_templates.php * Update users.php * Update domains.php * Update groups.php * Update extension_copy.php * Update device_copy.php
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -109,7 +109,7 @@
|
||||
$this->permission_prefix = 'ivr_menu_';
|
||||
$this->table = 'ivr_menus';
|
||||
$this->uuid_prefix = 'ivr_menu_';
|
||||
|
||||
|
||||
//return if permission does not exist
|
||||
if (!permission_exists($this->permission_prefix.'delete')) {
|
||||
return false;
|
||||
@@ -412,6 +412,14 @@
|
||||
$new_ivr_menu_uuid = uuid();
|
||||
$new_dialplan_uuid = uuid();
|
||||
|
||||
//convert boolean values to a string
|
||||
foreach($row as $key => $value) {
|
||||
if (gettype($value) == 'boolean') {
|
||||
$value = $value ? 'true' : 'false';
|
||||
$row[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//copy data
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
@@ -426,6 +434,13 @@
|
||||
$rows_2 = $this->database->select($sql_2, $parameters_2, 'all');
|
||||
if (!empty($rows_2)) {
|
||||
foreach ($rows_2 as $row_2) {
|
||||
//convert boolean values to a string
|
||||
foreach($row_2 as $key => $value) {
|
||||
if (gettype($value) == 'boolean') {
|
||||
$value = $value ? 'true' : 'false';
|
||||
$row_2[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//copy data
|
||||
$array['ivr_menu_options'][$y] = $row_2;
|
||||
@@ -446,6 +461,13 @@
|
||||
$parameters_3['dialplan_uuid'] = $row['dialplan_uuid'];
|
||||
$dialplan = $this->database->select($sql_3, $parameters_3, 'row');
|
||||
if (!empty($dialplan)) {
|
||||
//convert boolean values to a string
|
||||
foreach($dialplan as $key => $value) {
|
||||
if (gettype($value) == 'boolean') {
|
||||
$value = $value ? 'true' : 'false';
|
||||
$dialplan[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//copy data
|
||||
$array['dialplans'][$z] = $dialplan;
|
||||
|
||||
Reference in New Issue
Block a user