summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-07-02 14:46:41 +0200
committerSimon Rettberg2024-07-02 14:46:41 +0200
commit40159048ec29362c2f8bc2c9c43c4afdd4f72324 (patch)
tree9dbe163ab43fb8d40a32bc9739847b1ee767bff9
parent[sysconfig] New module type: ShibAuth (diff)
downloadslx-admin-40159048ec29362c2f8bc2c9c43c4afdd4f72324.tar.gz
slx-admin-40159048ec29362c2f8bc2c9c43c4afdd4f72324.tar.xz
slx-admin-40159048ec29362c2f8bc2c9c43c4afdd4f72324.zip
[sysconfig] Minor code cleanup/fixes
-rw-r--r--modules-available/sysconfig/addmodule_screensaver.inc.php2
-rw-r--r--modules-available/sysconfig/inc/configmodule/adauth.inc.php6
-rw-r--r--modules-available/sysconfig/inc/configmodule/branding.inc.php6
-rw-r--r--modules-available/sysconfig/inc/configmodule/customodule.inc.php6
-rw-r--r--modules-available/sysconfig/inc/configmodule/ldapauth.inc.php6
-rw-r--r--modules-available/sysconfig/inc/configmodule/screensaver.inc.php6
-rw-r--r--modules-available/sysconfig/inc/configmodule/sshconfig.inc.php6
-rw-r--r--modules-available/sysconfig/inc/configmodule/sshkey.inc.php6
-rw-r--r--modules-available/sysconfig/install.inc.php2
9 files changed, 23 insertions, 23 deletions
diff --git a/modules-available/sysconfig/addmodule_screensaver.inc.php b/modules-available/sysconfig/addmodule_screensaver.inc.php
index c84f021e..36353c33 100644
--- a/modules-available/sysconfig/addmodule_screensaver.inc.php
+++ b/modules-available/sysconfig/addmodule_screensaver.inc.php
@@ -174,6 +174,7 @@ class Screensaver_Finish extends AddModule_Base
$task = $module->generate($this->edit === null);
// Yay
+ Session::set(Screensaver_Helper::SESSION_KEY, false);
if ($task !== false && $this->edit !== null)
Message::addSuccess('module-edited');
elseif ($task !== false) {
@@ -181,7 +182,6 @@ class Screensaver_Finish extends AddModule_Base
AddModule_Base::setStep('AddModule_Assign', $module->id());
return;
}
- Session::set(Screensaver_Helper::SESSION_KEY, false);
Util::redirect('?do=SysConfig');
}
}
diff --git a/modules-available/sysconfig/inc/configmodule/adauth.inc.php b/modules-available/sysconfig/inc/configmodule/adauth.inc.php
index 5e68f48c..6d645cc2 100644
--- a/modules-available/sysconfig/inc/configmodule/adauth.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/adauth.inc.php
@@ -9,9 +9,9 @@ class ConfigModule_AdAuth extends ConfigModuleBaseLdap
ConfigModule::registerModule(
ConfigModule_AdAuth::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'adAuth_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'adAuth_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_authentication'), // Group
+ Dictionary::translateFile('config-module', 'adAuth_title'), // Title
+ Dictionary::translateFile('config-module', 'adAuth_description'), // Description
+ Dictionary::translateFile('config-module', 'group_authentication'), // Group
false, // Only one per config?
300
);
diff --git a/modules-available/sysconfig/inc/configmodule/branding.inc.php b/modules-available/sysconfig/inc/configmodule/branding.inc.php
index 7013e3ae..e1fe46d3 100644
--- a/modules-available/sysconfig/inc/configmodule/branding.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/branding.inc.php
@@ -2,9 +2,9 @@
ConfigModule::registerModule(
ConfigModule_Branding::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'branding_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'branding_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_branding'), // Group
+ Dictionary::translateFile('config-module', 'branding_title'), // Title
+ Dictionary::translateFile('config-module', 'branding_description'), // Description
+ Dictionary::translateFile('config-module', 'group_branding'), // Group
true, // Only one per config?
600
);
diff --git a/modules-available/sysconfig/inc/configmodule/customodule.inc.php b/modules-available/sysconfig/inc/configmodule/customodule.inc.php
index 0b8e38d2..d963ae29 100644
--- a/modules-available/sysconfig/inc/configmodule/customodule.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/customodule.inc.php
@@ -2,9 +2,9 @@
ConfigModule::registerModule(
ConfigModule_CustomModule::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'custom_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'custom_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_generic'), // Group
+ Dictionary::translateFile('config-module', 'custom_title'), // Title
+ Dictionary::translateFile('config-module', 'custom_description'), // Description
+ Dictionary::translateFile('config-module', 'group_generic'), // Group
false, // Only one per config?
900 // Sort order
);
diff --git a/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php b/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php
index 64af4c0e..aa2c8257 100644
--- a/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/ldapauth.inc.php
@@ -16,9 +16,9 @@ class ConfigModule_LdapAuth extends ConfigModuleBaseLdap
ConfigModule::registerModule(
ConfigModule_LdapAuth::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'ldapAuth_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'ldapAuth_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_authentication'), // Group
+ Dictionary::translateFile('config-module', 'ldapAuth_title'), // Title
+ Dictionary::translateFile('config-module', 'ldapAuth_description'), // Description
+ Dictionary::translateFile('config-module', 'group_authentication'), // Group
false, // Only one per config?
300
);
diff --git a/modules-available/sysconfig/inc/configmodule/screensaver.inc.php b/modules-available/sysconfig/inc/configmodule/screensaver.inc.php
index 66f8d41c..03719f64 100644
--- a/modules-available/sysconfig/inc/configmodule/screensaver.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/screensaver.inc.php
@@ -2,9 +2,9 @@
ConfigModule::registerModule(
ConfigModule_Screensaver::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'screensaver_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'screensaver_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_screensaver'), // Group
+ Dictionary::translateFile('config-module', 'screensaver_title'), // Title
+ Dictionary::translateFile('config-module', 'screensaver_description'), // Description
+ Dictionary::translateFile('config-module', 'group_screensaver'), // Group
true, // Only one per config?
700 // Sort order
);
diff --git a/modules-available/sysconfig/inc/configmodule/sshconfig.inc.php b/modules-available/sysconfig/inc/configmodule/sshconfig.inc.php
index b6fae967..57a2fb52 100644
--- a/modules-available/sysconfig/inc/configmodule/sshconfig.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/sshconfig.inc.php
@@ -2,9 +2,9 @@
ConfigModule::registerModule(
ConfigModule_SshConfig::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'sshconfig_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'sshconfig_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_sshconfig'), // Group
+ Dictionary::translateFile('config-module', 'sshconfig_title'), // Title
+ Dictionary::translateFile('config-module', 'sshconfig_description'), // Description
+ Dictionary::translateFile('config-module', 'group_sshconfig'), // Group
true, // Only one per config?
500
);
diff --git a/modules-available/sysconfig/inc/configmodule/sshkey.inc.php b/modules-available/sysconfig/inc/configmodule/sshkey.inc.php
index 91df47d3..7ef546db 100644
--- a/modules-available/sysconfig/inc/configmodule/sshkey.inc.php
+++ b/modules-available/sysconfig/inc/configmodule/sshkey.inc.php
@@ -2,9 +2,9 @@
ConfigModule::registerModule(
ConfigModule_SshKey::MODID, // ID
- Dictionary::translateFileModule('sysconfig', 'config-module', 'sshkey_title'), // Title
- Dictionary::translateFileModule('sysconfig', 'config-module', 'sshkey_description'), // Description
- Dictionary::translateFileModule('sysconfig', 'config-module', 'group_sshkey'), // Group
+ Dictionary::translateFile('config-module', 'sshkey_title'), // Title
+ Dictionary::translateFile('config-module', 'sshkey_description'), // Description
+ Dictionary::translateFile('config-module', 'group_sshkey'), // Group
false, // Only one per config?
510
);
diff --git a/modules-available/sysconfig/install.inc.php b/modules-available/sysconfig/install.inc.php
index 53882882..4af019b1 100644
--- a/modules-available/sysconfig/install.inc.php
+++ b/modules-available/sysconfig/install.inc.php
@@ -152,7 +152,7 @@ if ($list === null) {
$new = array_merge($config->getModuleIds(), [$key->id()]);
error_log(implode(',', $config->getModuleIds()) . ' -> ' . implode(',', $new));
$config->update('', $new);
- $configList[] = $config;
+ $configList[$config->id()] = $config;
}
}
}