summaryrefslogtreecommitdiffstats
path: root/inc/trigger.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-24 16:30:07 +0100
committerSimon Rettberg2015-02-24 16:30:07 +0100
commitbb6432a6158b97cd5b92ab316d9d8b52bca2044d (patch)
treee64f4d92458d2fb501eb0af13c6dc37adc731747 /inc/trigger.inc.php
parentMiniLinux download with version selection (diff)
downloadslx-admin-bb6432a6158b97cd5b92ab316d9d8b52bca2044d.tar.gz
slx-admin-bb6432a6158b97cd5b92ab316d9d8b52bca2044d.tar.xz
slx-admin-bb6432a6158b97cd5b92ab316d9d8b52bca2044d.zip
Various fixes
Diffstat (limited to 'inc/trigger.inc.php')
-rw-r--r--inc/trigger.inc.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/trigger.inc.php b/inc/trigger.inc.php
index 0410b2be..0b1f00c5 100644
--- a/inc/trigger.inc.php
+++ b/inc/trigger.inc.php
@@ -78,10 +78,11 @@ class Trigger
/**
* Launch all ldadp instances that need to be running.
*
+ * @param int $exclude if not NULL, id of config module NOT to start
* @param string $parent if not NULL, this will be the parent task of the launch-task
* @return boolean|string false on error, id of task otherwise
*/
- public static function ldadp($parent = NULL)
+ 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"
@@ -92,7 +93,9 @@ class Trigger
$id = array();
while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
if (readlink('/srv/openslx/www/boot/default/config.tgz') === $row['filepath']) {
- $id[] = (int) $row['moduleid'];
+ if (!is_null($exclude) && (int)$row['moduleid'] === (int)$exclude)
+ continue;
+ $id[] = (int)$row['moduleid'];
break;
}
}
@@ -133,6 +136,8 @@ class Trigger
/**
* Check and process all callbacks.
+ *
+ * @return boolean Whether there are still callbacks pending
*/
public static function checkCallbacks()
{
@@ -150,8 +155,7 @@ class Trigger
else
$tasksLeft = true;
}
- if (!$tasksLeft)
- Property::setNeedsCallback(0);
+ return $tasksLeft;
}
private static function triggerDaemons($action, $parent, &$taskids)