-
-
-
-
-
-
-
-
- z_xlt('Registered Modules'); ?>
- |
-
-
- z_xlt('ID'); ?> |
- z_xlt('Module'); ?> |
- z_xlt('Status'); ?> |
- z_xlt('Menu Text'); ?> |
- z_xlt('Nick Name'); ?> |
- z_xlt('Type'); ?> |
- z_xlt('Dependency Modules'); ?> |
- z_xlt('Action'); ?> |
- z_xlt('Config'); ?> |
-
-
- 0)
- foreach ($InstallersAll as $moduleResult) {
- if ($moduleResult->modName == 'Acl') continue;
- $count++;
- ?>
-
- escapeHtml($count); ?> |
- escapeHtml($moduleResult->modName); ?> |
-
- sqlRun == 0) {
- ?>
- z_xlt('Not Installed'); ?>
- modActive == 1) { ?>
- z_xlt('Active'); ?>
-
- z_xlt('Inactive'); ?>
-
+
+
+
-
-
-
-
-
-
-
- |
+
+
+
+
+
+
+
+ z_xlt('Manage Laminas Modules'); ?>
+ |
+
+
+ z_xlt('ID'); ?> |
+ z_xlt('Module'); ?> |
+ z_xlt('Status'); ?> |
+ z_xlt('Menu Text'); ?> |
+ z_xlt('Nick Name'); ?> |
+ z_xlt('Type'); ?> |
+ z_xlt('Dependency Modules'); ?> |
+ z_xlt('Action'); ?> |
+ z_xlt('Config'); ?> |
+
+
+
+
+
0) {
- ?>
+/*if ($slno > 0) {
+ */ ?>
diff --git a/interface/modules/zend_modules/public/js/installer/action.js b/interface/modules/zend_modules/public/js/installer/action.js
index 86b12d7f167..bff38c80f32 100644
--- a/interface/modules/zend_modules/public/js/installer/action.js
+++ b/interface/modules/zend_modules/public/js/installer/action.js
@@ -19,7 +19,7 @@ function register(status, title, name, method, type) {
if (data == "Success") {
window.location.reload();
} else {
- var resultTranslated = js_xl(data);
+ const resultTranslated = js_xl(data);
$('#err').html(resultTranslated.msg).fadeIn().delay(2000).fadeOut();
}
}
diff --git a/src/Core/AbstractModuleActionListener.php b/src/Core/AbstractModuleActionListener.php
index df9d52fe35d..cd869f25d4f 100644
--- a/src/Core/AbstractModuleActionListener.php
+++ b/src/Core/AbstractModuleActionListener.php
@@ -155,4 +155,23 @@ function getModuleRegistry($modId, $col = '*'): array
return $registry;
}
+
+ /**
+ * Set enable/disable module state.
+ * If the mod_ui_active flag is set to 1, then the module config button
+ * is allowed in modules disabled state. In this state calling the config
+ * script will be in the Laminas namespace and not the module namespace.
+ * So remember to set namespace in the config script.
+ *
+ * @param $modId string|int module id or directory name
+ * @param $flag string|int 1 or 0 to activate or deactivate module.
+ * @param $flag_ui string|int custom flag to activate or deactivate Manager UI button states.
+ * @return array|bool|null
+ */
+ public static function setModuleActiveState($modId, $flag, $flag_ui): array|bool|null
+ {
+ // set module state.
+ $sql = "UPDATE `modules` SET `mod_active` = ?, `mod_ui_active` = ? WHERE `mod_id` = ? OR `mod_directory` = ?";
+ return sqlQuery($sql, array($flag, $flag_ui, $modId, $modId));
+ }
}
diff --git a/src/Core/ModulesApplication.php b/src/Core/ModulesApplication.php
index 22744a53c03..c671d3e107a 100644
--- a/src/Core/ModulesApplication.php
+++ b/src/Core/ModulesApplication.php
@@ -92,7 +92,7 @@ public static function checkModuleScriptPathForEnabledModule($modType, $webRootP
$folderName = strtok($truncatedPath, '/');
if ($folderName !== false) {
$resultSet = sqlStatementNoLog($statement = "SELECT mod_name, mod_directory FROM modules "
- . " WHERE mod_active = 1 AND type = ? AND mod_directory = ? ", [$type, $folderName]);
+ . " WHERE (mod_active = 1 OR mod_ui_active = 1) AND type = ? AND mod_directory = ? ", [$type, $folderName]);
$row = sqlFetchArray($resultSet);
if (empty($row)) {
throw new AccessDeniedException("admin", "super", "Access to module path for disabled module is denied");