diff --git a/app/vars/app_languages.php b/app/vars/app_languages.php index a99e802bfe..a91e570988 100644 --- a/app/vars/app_languages.php +++ b/app/vars/app_languages.php @@ -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'] = "تبديل المتغيرات: متقدم"; diff --git a/app/vars/resources/classes/vars.php b/app/vars/resources/classes/vars.php index 9fe4e62827..3f137327d5 100644 --- a/app/vars/resources/classes/vars.php +++ b/app/vars/resources/classes/vars.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-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'].')'); } } diff --git a/app/vars/var_edit.php b/app/vars/var_edit.php index 13f9cec1b5..4824876469 100644 --- a/app/vars/var_edit.php +++ b/app/vars/var_edit.php @@ -98,7 +98,7 @@ //check for all required data $msg = ''; - //if (empty($var_category)) { $msg .= $text['message-required'].$text['label-category']."
\n"; } + if (empty($var_category)) { $msg .= $text['message-required'].$text['label-category']."
\n"; } if (empty($var_name)) { $msg .= $text['message-required'].$text['label-name']."
\n"; } //if (empty($var_value)) { $msg .= $text['message-required'].$text['label-value']."
\n"; } //if (empty($var_command)) { $msg .= $text['message-required'].$text['label-command']."
\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 "\n"; echo "\n"; @@ -238,7 +238,7 @@ echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo " ".$text['label-value']."\n"; echo "\n"; echo "\n";