summaryrefslogtreecommitdiffstats
path: root/inc/trigger.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-12-12 18:28:38 +0100
committerSimon Rettberg2014-12-12 18:28:38 +0100
commit97a0f7dcfdcf4a5263c1cc6c19160a0868abb5f2 (patch)
treecf735055cfb785ac64e60ab477e215f5f50ad767 /inc/trigger.inc.php
parent[news] fix xml tags of news api (diff)
downloadslx-admin-97a0f7dcfdcf4a5263c1cc6c19160a0868abb5f2.tar.gz
slx-admin-97a0f7dcfdcf4a5263c1cc6c19160a0868abb5f2.tar.xz
slx-admin-97a0f7dcfdcf4a5263c1cc6c19160a0868abb5f2.zip
Rework config module class structure. Still some TODOs though....
Diffstat (limited to 'inc/trigger.inc.php')
-rw-r--r--inc/trigger.inc.php32
1 files changed, 2 insertions, 30 deletions
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)) {
@@ -106,35 +107,6 @@ class Trigger
}
/**
- * 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.
*
* @return array task status of mount procedure, or false on error