prepare for more cronjob-mess :)
This commit is contained in:
28
lib/functions/filedir/function.getNextCronjobs.php
Normal file
28
lib/functions/filedir/function.getNextCronjobs.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Functions
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function getNextCronjobs
|
||||
*
|
||||
* checks which cronjobs have to be executed
|
||||
*
|
||||
* @return array array of cron-files which are to be executed
|
||||
*/
|
||||
function getNextCronjobs()
|
||||
{
|
||||
// SELECT `interval`, `lastrun` FROM `".PANEL_TABLE_CRONRUNS."`
|
||||
}
|
||||
@@ -15,30 +15,12 @@
|
||||
* @version $Id: $
|
||||
*/
|
||||
|
||||
function includeCronjobs($path, $debugHandler)
|
||||
function includeCronjobs($debugHandler)
|
||||
{
|
||||
$cronbasedir = makeCorrectDir($path);
|
||||
$crondir = new DirectoryIterator($cronbasedir);
|
||||
|
||||
foreach($crondir as $file)
|
||||
$cronjobs = getNextCronjobs();
|
||||
|
||||
if($cronjobs !== false)
|
||||
{
|
||||
if($file->isDot()) continue;
|
||||
|
||||
if($file->isFile())
|
||||
{
|
||||
if(fileowner(__FILE__) == $file->getOwner()
|
||||
&& filegroup(__FILE__) == $file->getGroup()
|
||||
&& $file->isReadable())
|
||||
{
|
||||
fwrite($debugHandler, 'Including ...' . $file->getPathname() . "\n");
|
||||
include_once($file->getPathname());
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($debugHandler, 'WARNING! uid and/or gid of "' . __FILE__ . '" and "' . $file->getPathname() . '" don\'t match! Execution aborted!' . "\n");
|
||||
fclose($debugHandler);
|
||||
die('WARNING! uid and/or gid of "' . __FILE__ . '" and "' . $file->getPathname() . '" don\'t match! Execution aborted!');
|
||||
}
|
||||
}
|
||||
// [...]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9-r3';
|
||||
$version = '0.9-r4';
|
||||
$dbversion = '2';
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user