From dcb27f27031991668afafeffe5ea6dc04035a663 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 6 Jul 2016 11:55:35 +0200 Subject: [sysconfig] Refactor ldapauth and adauth classes; show mainpage warning; improve config module handling --- inc/trigger.inc.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'inc') diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php index 353d6d69..db4a2148 100644 --- a/inc/trigger.inc.php +++ b/inc/trigger.inc.php @@ -86,19 +86,16 @@ class Trigger public static function ldadp($exclude = NULL, $parent = NULL) { // TODO: Fetch list from ConfigModule_AdAuth (call loadDb first) - $res = Database::simpleQuery("SELECT moduleid, configtgz.filepath FROM configtgz_module" + $res = Database::simpleQuery("SELECT DISTINCT moduleid FROM configtgz_module" . " INNER JOIN configtgz_x_module USING (moduleid)" . " INNER JOIN configtgz USING (configid)" + . " INNER JOIN configtgz_location USING (configid)" . " WHERE moduletype IN ('AdAuth', 'LdapAuth')"); - // TODO: Multiconfig support $id = array(); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - if (readlink('/srv/openslx/www/boot/default/config.tgz') === $row['filepath']) { - if (!is_null($exclude) && (int)$row['moduleid'] === (int)$exclude) - continue; - $id[] = (int)$row['moduleid']; - break; - } + if (!is_null($exclude) && (int)$row['moduleid'] === (int)$exclude) + continue; + $id[] = (int)$row['moduleid']; } $task = Taskmanager::submit('LdadpLauncher', array( 'ids' => $id, -- cgit v1.2.3-55-g7522