- removed some undefined variables

- fixed function openRootDB
- fixed realtime-function (it's now a tcp connection), fixes #24
- fixed missing $-sign befor variable in makePathfield
This commit is contained in:
Michael Kaufmann (d00p)
2010-02-21 21:09:48 +00:00
parent c192d19d7e
commit e8de3d45e5
13 changed files with 64 additions and 34 deletions

View File

@@ -60,16 +60,17 @@ function getNextCronjobs()
function includeCronjobs($debugHandler, $pathtophpfiles)
{
global $settings;
$cronjobs = getNextCronjobs();
$jobs_to_run = array();
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
if($cronjobs !== false
&& is_array($cronjobs)
&& isset($cronjobs[0]))
{
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
foreach($cronjobs as $cronjob)
{
$cron_file = makeCorrectFile($cron_path.$cronjob);
@@ -77,6 +78,17 @@ function includeCronjobs($debugHandler, $pathtophpfiles)
}
}
/**
* if we're on realtime and cron_tasks is not one
* of the jobs to run, we add it so the changes are being applied
*/
if ($settings['system']['realtime_port'] !== 0) {
$cron_file = makeCorrectFile($cron_path.'/cron_tasks.php');
if (!in_array($cron_file, $jobs_to_run)) {
$jobs_to_run[] = $cron_file;
}
}
return $jobs_to_run;
}