php 8.1 changes (#6741)

* Update dashboard_edit.php

* Update dashboard_edit.php

* Update dialplan_inbound_add.php

* Update dialplan_outbound_add.php

* Update dialplan_inbound_add.php

* Update modules.php

* Update sip_profile_edit.php
This commit is contained in:
Alex
2023-06-02 17:01:15 -06:00
committed by GitHub
parent d5a4146c57
commit 93f85e6ea4
5 changed files with 34 additions and 9 deletions
@@ -48,10 +48,15 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//set the defaults
$dialplan_name = '';
$dialplan_description = '';
$limit = '';
//get the http get values and set them as php variables //get the http get values and set them as php variables
$order_by = $_GET["order_by"]; $order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"]; $order = $_GET["order"] ?? '';
$action = $_GET["action"]; $action = $_GET["action"] ?? '';
//initialize the destinations object //initialize the destinations object
$destination = new destinations; $destination = new destinations;
@@ -710,7 +715,7 @@
} }
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo $destination->select('dialplan', 'action_1', $action_1); echo $destination->select('dialplan', 'action_1', $action_1 ?? null);
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@@ -50,6 +50,13 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//set the defaults
$prefix_number = '';
$dialplan_description = '';
$limit = '';
$accountcode = '';
$toll_allow = '';
//get the http post values and set theme as php variables //get the http post values and set theme as php variables
if (!empty($_POST)) { if (!empty($_POST)) {
//set the variables //set the variables
@@ -1270,7 +1277,7 @@ function type_onchange(dialplan_detail_type) {
echo " <option value='false' selected='true'>".$text['label-false']."</option>\n"; echo " <option value='false' selected='true'>".$text['label-false']."</option>\n";
echo " </select>\n"; echo " </select>\n";
echo "<br />\n"; echo "<br />\n";
echo $text['description-enable-pin_numbers']."\n"; //echo $text['description-enable-pin_numbers']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
} }
@@ -1337,7 +1344,7 @@ function type_onchange(dialplan_detail_type) {
echo "</table>"; echo "</table>";
echo "<br><br>"; echo "<br><br>";
if ($action == "update") { if (!empty($action) && $action == "update") {
echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n"; echo "<input type='hidden' name='dialplan_uuid' value='".escape($dialplan_uuid)."'>\n";
} }
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n"; echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
+1 -1
View File
@@ -244,7 +244,7 @@
} }
else { else {
echo " <td class='hide-xs'>\n"; echo " <td class='hide-xs'>\n";
echo $row['module_enabled'] == 'true' ? "<strong style='color: red;'>".$text['label-stopped']."</strong>" : $text['label-stopped']." ".escape($notice); echo $row['module_enabled'] == 'true' ? "<strong style='color: red;'>".$text['label-stopped']."</strong>" : $text['label-stopped']." ".escape($notice ?? null);
echo " </td>\n"; echo " </td>\n";
if (permission_exists('module_edit')) { if (permission_exists('module_edit')) {
echo " <td class='no-link center'>"; echo " <td class='no-link center'>";
+2
View File
@@ -305,6 +305,7 @@
$parameters['sip_profile_uuid'] = $sip_profile_uuid; $parameters['sip_profile_uuid'] = $sip_profile_uuid;
$database = new database; $database = new database;
$sip_profile_settings = $database->select($sql, $parameters, 'all'); $sip_profile_settings = $database->select($sql, $parameters, 'all');
if (empty($sip_profile_settings)) { $sip_profile_settings = []; }
unset($sql, $parameters); unset($sql, $parameters);
//add an empty row //add an empty row
@@ -324,6 +325,7 @@
$parameters['sip_profile_uuid'] = $sip_profile_uuid; $parameters['sip_profile_uuid'] = $sip_profile_uuid;
$database = new database; $database = new database;
$sip_profile_domains = $database->select($sql, $parameters, 'all'); $sip_profile_domains = $database->select($sql, $parameters, 'all');
if (empty($sip_profile_domains)) { $sip_profile_domains = []; }
unset($sql, $parameters); unset($sql, $parameters);
//add an empty row //add an empty row
+13 -2
View File
@@ -43,6 +43,17 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//set the defaults
$dashboard_name = '';
$dashboard_path = '';
$dashboard_groups = [];
$dashboard_column_span = '';
$dashboard_details_state = '';
$dashboard_order = '';
$dashboard_enabled = 'false';
$dashboard_description = '';
$dashboard_uuid = '';
//action add or update //action add or update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) { if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update"; $action = "update";
@@ -224,7 +235,7 @@
} }
//get the child data //get the child data
if (is_uuid($dashboard_uuid)) { if (!empty($dashboard_uuid) && is_uuid($dashboard_uuid)) {
$sql = "select "; $sql = "select ";
$sql .= " dashboard_group_uuid, "; $sql .= " dashboard_group_uuid, ";
$sql .= " group_uuid "; $sql .= " group_uuid ";
@@ -264,7 +275,7 @@
$sql = "select * from v_dashboard_groups as x, v_groups as g "; $sql = "select * from v_dashboard_groups as x, v_groups as g ";
$sql .= "where x.dashboard_uuid = :dashboard_uuid "; $sql .= "where x.dashboard_uuid = :dashboard_uuid ";
$sql .= "and x.group_uuid = g.group_uuid "; $sql .= "and x.group_uuid = g.group_uuid ";
$parameters['dashboard_uuid'] = $dashboard_uuid; $parameters['dashboard_uuid'] = $dashboard_uuid ?? '';
$database = new database; $database = new database;
$dashboard_groups = $database->select($sql, $parameters, 'all'); $dashboard_groups = $database->select($sql, $parameters, 'all');
unset ($sql, $parameters); unset ($sql, $parameters);