Variables: Updates for PHP 8.1

This commit is contained in:
fusionate 2023-06-09 17:27:55 +00:00
parent 39cb1c3588
commit e016d3d39c
No known key found for this signature in database
3 changed files with 30 additions and 6 deletions

View File

@ -192,6 +192,30 @@ $text['label-codec_information']['zh-cn'] = "编解码器信息";
$text['label-codec_information']['ja-jp'] = "コーデック情報";
$text['label-codec_information']['ko-kr'] = "코덱 정보";
$text['label-other']['en-us'] = "Other...";
$text['label-other']['en-gb'] = "Other...";
$text['label-other']['ar-eg'] = "أخرى";
$text['label-other']['de-at'] = "Andere...";
$text['label-other']['de-ch'] = "Andere...";
$text['label-other']['de-de'] = "Andere...";
$text['label-other']['es-cl'] = "Otro...";
$text['label-other']['es-mx'] = "Otro...";
$text['label-other']['fr-ca'] = "Autre...";
$text['label-other']['fr-fr'] = "Autre...";
$text['label-other']['he-il'] = "אחר";
$text['label-other']['it-it'] = "Altro...";
$text['label-other']['nl-nl'] = "Andere...";
$text['label-other']['pl-pl'] = "Inne...";
$text['label-other']['pt-br'] = "Outro...";
$text['label-other']['pt-pt'] = "Outro...";
$text['label-other']['ro-ro'] = "Alte...";
$text['label-other']['ru-ru'] = "Другие";
$text['label-other']['sv-se'] = "Annat...";
$text['label-other']['uk-ua'] = "Інше";
$text['label-other']['zh-cn'] = "其他";
$text['label-other']['ja-jp'] = "その他";
$text['label-other']['ko-kr'] = "다른";
$text['header-variables_advanced']['en-us'] = "Switch Variables: Advanced";
$text['header-variables_advanced']['en-gb'] = "Switch Variables: Advanced";
$text['header-variables_advanced']['ar-eg'] = "تبديل المتغيرات: متقدم";

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) 2008-2019
Portions created by the Initial Developer are Copyright (C) 2008-2023
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -224,7 +224,7 @@ if (!class_exists('vars')) {
//overwrite
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = uuid();
$array[$this->table][$x]['var_description'] = trim($row['var_description']).' ('.$text['label-copy'].')';
$array[$this->table][$x]['var_description'] = trim($row['var_description'] ?? '').trim(' ('.$text['label-copy'].')');
}
}

View File

@ -98,7 +98,7 @@
//check for all required data
$msg = '';
//if (empty($var_category)) { $msg .= $text['message-required'].$text['label-category']."<br>\n"; }
if (empty($var_category)) { $msg .= $text['message-required'].$text['label-category']."<br>\n"; }
if (empty($var_name)) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
//if (empty($var_value)) { $msg .= $text['message-required'].$text['label-value']."<br>\n"; }
//if (empty($var_command)) { $msg .= $text['message-required'].$text['label-command']."<br>\n"; }
@ -118,7 +118,7 @@
}
//add or update the database
if ($_POST["persistformvar"] != "true") {
if (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true") {
if ($action == "add" && permission_exists('var_add')) {
//begin insert array
$var_uuid = uuid();
@ -221,7 +221,7 @@
$field_name = 'var_category';
$sql_where_optional = "";
$field_current_value = $var_category;
echo html_select_other($table_name, $field_name, $sql_where_optional, $field_current_value);
echo html_select_other($table_name, $field_name, $sql_where_optional, $field_current_value, $field_name.' asc', $text['label-other']);
echo $text['description-category']."\n";
echo "</td>\n";
echo "</tr>\n";
@ -238,7 +238,7 @@
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-value']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";