From 97a0f7dcfdcf4a5263c1cc6c19160a0868abb5f2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 12 Dec 2014 18:28:38 +0100 Subject: Rework config module class structure. Still some TODOs though.... --- inc/trigger.inc.php | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'inc/trigger.inc.php') diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php index a5a149c8..38b25540 100644 --- a/inc/trigger.inc.php +++ b/inc/trigger.inc.php @@ -83,10 +83,11 @@ class Trigger */ public static function ldadp($parent = NULL) { + // TODO: Fetch list from ConfigModule_AdAuth (call loadDb first) $res = Database::simpleQuery("SELECT moduleid, configtgz.filepath FROM configtgz_module" . " INNER JOIN configtgz_x_module USING (moduleid)" . " INNER JOIN configtgz USING (configid)" - . " WHERE moduletype = 'AD_AUTH'"); + . " WHERE moduletype = 'AdAuth'"); // TODO: Multiconfig support $id = array(); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { @@ -105,35 +106,6 @@ class Trigger return $task['id']; } - /** - * To be called if the server ip changes, as it's embedded in the AD module configs. - * This will then recreate all AD tgz modules. - */ - public static function rebuildAdModules($parent = NULL) - { - $task = Taskmanager::submit('LdadpLauncher', array( - 'parentTask' => $parent, - 'failOnParentFail' => false, - 'ids' => array() - )); // Stop all running instances - $ads = ConfigModule::getAdConfigs(); - if (empty($ads)) - return false; - - if (isset($task['id'])) - $parent = $task['id']; - foreach ($ads as $ad) { - $ad['parentTask'] = $parent; - $ad['failOnParentFail'] = false; - $ad['proxyip'] = Property::getServerIp(); - $task = Taskmanager::submit('CreateAdConfig', $ad); - if (isset($task['id'])) - $parent = $task['id']; - } - Trigger::ldadp($parent); - return $parent; - } - /** * Mount the VM store into the server. * -- cgit v1.2.3-55-g7522