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:
Alex
2025-10-22 16:14:22 -07:00
committed by GitHub
parent 0ab13ffc31
commit 126779190f
30 changed files with 485 additions and 51 deletions

View File

@@ -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) 2021-2023
Portions created by the Initial Developer are Copyright (C) 2021-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -128,8 +128,8 @@
//execute delete
$this->database->delete($array);
unset($array);
//clear the cache
//clear the cache
$sql = "select extension, number_alias, user_context from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$parameters['extension_uuid'] = $this->extension_uuid;
@@ -204,8 +204,8 @@
$this->database->save($array);
unset($array);
//clear the cache
//clear the cache
$sql = "select extension, number_alias, user_context from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$parameters['extension_uuid'] = $extension_uuid;
@@ -261,6 +261,14 @@
foreach ($rows as $x => $row) {
// var_dump($row); exit;
//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;