diff --git a/app/devices/resources/dashboard/device_keys.php b/app/devices/resources/dashboard/device_keys.php index b01d1f32b7..cfc6e15014 100644 --- a/app/devices/resources/dashboard/device_keys.php +++ b/app/devices/resources/dashboard/device_keys.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2016-2022 + Portions created by the Initial Developer are Copyright (C) 2016-2023 the Initial Developer. All Rights Reserved. */ @@ -69,7 +69,7 @@ if (count($_POST) > 0 && empty($_POST["persistformvar"])) { //add or update the database - if ($_POST["persistformvar"] != "true") { + if (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true") { //validate the token $token = new token; diff --git a/app/pin_numbers/pin_number_edit.php b/app/pin_numbers/pin_number_edit.php index 7799fa4d6f..eb6ca72608 100644 --- a/app/pin_numbers/pin_number_edit.php +++ b/app/pin_numbers/pin_number_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2016-2020 + Portions created by the Initial Developer are Copyright (C) 2016-2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -96,7 +96,7 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) { } //add or update the database - if ($_POST["persistformvar"] != "true") { + if (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true") { if ($action == "add" && permission_exists('pin_number_add')) { //begin array $pin_number_uuid = uuid(); @@ -134,7 +134,7 @@ if (count($_POST)>0 && empty($_POST["persistformvar"])) { } //pre-populate the form - if (count($_GET) > 0 && $_POST["persistformvar"] != "true") { + if (count($_GET) > 0 && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) { $pin_number_uuid = $_GET["id"]; $sql = "select * from v_pin_numbers "; $sql .= "where domain_uuid = :domain_uuid "; diff --git a/app/sip_profiles/sip_profile_copy.php b/app/sip_profiles/sip_profile_copy.php index 19f0a43d17..d4a6e65a86 100644 --- a/app/sip_profiles/sip_profile_copy.php +++ b/app/sip_profiles/sip_profile_copy.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2020 + Portions created by the Initial Developer are Copyright (C) 2008-2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -69,7 +69,7 @@ if (is_uuid($sip_profile_uuid) && $sip_profile_name != '') { if (!in_array($sip_profile_name, $sip_profile_names)) { //get the sip profile data - if (count($_GET) > 0 && $_POST["persistformvar"] != "true") { + if (count($_GET) > 0 && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) { $sql = "select sip_profile_hostname, sip_profile_enabled, sip_profile_description from v_sip_profiles "; $sql .= "where sip_profile_uuid = :sip_profile_uuid "; $parameters['sip_profile_uuid'] = $sip_profile_uuid; diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index ee04542f37..86f9080f55 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -95,7 +95,7 @@ } //process the http post - if (!empty($_POST) && empty($_POST["persistformvar"])) { + if (!empty($_POST) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) { //set the default_setting_uuid if ($action == "update") { @@ -136,7 +136,7 @@ } //add or update the database - if (empty($_POST["persistformvar"])) { + if (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true") { // fix null $default_setting_order = ($default_setting_order != '') ? $default_setting_order : 'null'; @@ -236,8 +236,8 @@ header("Location: default_settings.php?".$query_string."#anchor_".$default_setting_category); return; } - } //if ($_POST["persistformvar"] != "true") - } //(count($_POST)>0 && empty($_POST["persistformvar"])) + } + } //pre-populate the form if (count($_GET) > 0 && empty($_POST["persistformvar"])) { diff --git a/core/user_logs/user_log_edit.php b/core/user_logs/user_log_edit.php index 400b8c3cf5..cd49d09c9c 100644 --- a/core/user_logs/user_log_edit.php +++ b/core/user_logs/user_log_edit.php @@ -25,7 +25,7 @@ $user_log_uuid = $_GET['id']; //pre-populate the form - if (is_array($_GET) && $_POST["persistformvar"] != "true") { + if (!empty($_GET) && is_array($_GET) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) { $sql = "select * from v_user_logs "; $sql .= "where user_log_uuid = :user_log_uuid "; //$sql .= "and domain_uuid = :domain_uuid ";