diff --git a/app/modules/app_languages.php b/app/modules/app_languages.php
index 5253dc1feb..748dd792a6 100644
--- a/app/modules/app_languages.php
+++ b/app/modules/app_languages.php
@@ -400,6 +400,30 @@ $text['label-action']['zh-cn'] = "行动";
$text['label-action']['ja-jp'] = "アクション";
$text['label-action']['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-modules']['en-us'] = "Modules";
$text['header-modules']['en-gb'] = "Modules";
$text['header-modules']['ar-eg'] = "الوحدات";
diff --git a/app/modules/module_edit.php b/app/modules/module_edit.php
index 812909f1d5..163618b97d 100644
--- a/app/modules/module_edit.php
+++ b/app/modules/module_edit.php
@@ -247,7 +247,7 @@
$field_name = 'module_category';
$sql_where_optional = '';
$field_current_value = $module_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 "\n";
echo "\n";
diff --git a/app/modules/resources/classes/modules.php b/app/modules/resources/classes/modules.php
index a6d4018e31..62c8e6c1b0 100644
--- a/app/modules/resources/classes/modules.php
+++ b/app/modules/resources/classes/modules.php
@@ -860,8 +860,8 @@ if (!class_exists('modules')) {
if (is_array($records) && @sizeof($records) != 0) {
//filter out unchecked modules, build where clause for below
- foreach($records as $record) {
- if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
+ foreach ($records as $record) {
+ if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -871,7 +871,7 @@ if (!class_exists('modules')) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, module_name as module, module_enabled as enabled from v_".$this->table." ";
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$database = new database;
- $rows = $database->select($sql, $parameters, 'all');
+ $rows = $database->select($sql, $parameters ?? null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$modules[$row['uuid']]['name'] = $row['module'];
@@ -936,8 +936,8 @@ if (!class_exists('modules')) {
if (is_array($records) && @sizeof($records) != 0) {
//filter out unchecked modules, build where clause for below
- foreach($records as $record) {
- if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
+ foreach ($records as $record) {
+ if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -947,7 +947,7 @@ if (!class_exists('modules')) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, module_name as module from v_".$this->table." ";
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$database = new database;
- $rows = $database->select($sql, $parameters, 'all');
+ $rows = $database->select($sql, $parameters ?? null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$modules[$row['uuid']]['name'] = $row['module'];
@@ -994,7 +994,7 @@ if (!class_exists('modules')) {
//set message
$message = $text['message-delete'];
- if (is_array($responses) && @sizeof($responses) != 0) {
+ if (!empty($responses) && is_array($responses) && @sizeof($responses) != 0) {
foreach ($responses as $response) {
$message .= "
".$response['module'].": ".$response['message'];
}
@@ -1029,8 +1029,8 @@ if (!class_exists('modules')) {
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
- foreach($records as $x => $record) {
- if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
+ foreach ($records as $x => $record) {
+ if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
$uuids[] = "'".$record['uuid']."'";
}
}
@@ -1038,7 +1038,7 @@ if (!class_exists('modules')) {
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as state, module_name as name from v_".$this->table." ";
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
$database = new database;
- $rows = $database->select($sql, $parameters, 'all');
+ $rows = $database->select($sql, $parameters ?? null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$modules[$row['uuid']]['state'] = $row['state'];
@@ -1087,7 +1087,7 @@ if (!class_exists('modules')) {
//set message
$message = $text['message-toggle'];
- if (is_array($responses) && @sizeof($responses) != 0) {
+ if (!empty($responses) && is_array($responses) && @sizeof($responses) != 0) {
foreach ($responses as $response) {
$message .= "
".$response['module'].": ".$response['message'];
}