diff options
author | Simon Rettberg | 2015-09-30 11:52:18 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-09-30 11:52:18 +0200 |
commit | 5e7a5cac3221a2adbd6e02ed3abadd33d2b358dd (patch) | |
tree | 817c39bd0a35b4348433b1cadabe7b53ac46e42a /inc | |
parent | Make file input look more consistent across browsers (diff) | |
download | slx-admin-5e7a5cac3221a2adbd6e02ed3abadd33d2b358dd.tar.gz slx-admin-5e7a5cac3221a2adbd6e02ed3abadd33d2b358dd.tar.xz slx-admin-5e7a5cac3221a2adbd6e02ed3abadd33d2b358dd.zip |
Trigger server ip changed for all module types
Diffstat (limited to 'inc')
-rw-r--r-- | inc/configmodule.inc.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/inc/configmodule.inc.php b/inc/configmodule.inc.php index 5c613f1b..909136ee 100644 --- a/inc/configmodule.inc.php +++ b/inc/configmodule.inc.php @@ -120,10 +120,14 @@ abstract class ConfigModule * @param int $moduleType module type to get * @return array The requested modules from DB, or false on error */ - public static function getAll($moduleType) + public static function getAll($moduleType = false) { - $ret = Database::simpleQuery("SELECT moduleid, title, moduletype, filepath, contents, version FROM configtgz_module " - . " WHERE moduletype = :moduletype", array('moduletype' => $moduleType)); + if ($moduleType === false) { + $ret = Database::simpleQuery("SELECT moduleid, title, moduletype, filepath, contents, version FROM configtgz_module"); + } else { + $ret = Database::simpleQuery("SELECT moduleid, title, moduletype, filepath, contents, version FROM configtgz_module " + . " WHERE moduletype = :moduletype", array('moduletype' => $moduleType)); + } if ($ret === false) return false; $list = array(); @@ -448,17 +452,11 @@ abstract class ConfigModule */ public static function serverIpChanged() { - self::loadDb(); // Quick hack: Hard code AdAuth, should be a property of the config module class.... - $list = self::getAll('AdAuth'); + self::loadDb(); + $list = self::getAll(); foreach ($list as $mod) { $mod->event_serverIpChanged(); } - /* // TODO: Make this work - foreach (self::$moduleTypes as $module) { - $instance = new $module['moduleClass']; - $instance->event_serverIpChanged(); - } - */ } /** |