make cronjobs also classes and began to refactor the whole cronjob stuff

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-19 08:55:23 +01:00
parent a25150babf
commit 903b775f79
52 changed files with 460 additions and 523 deletions

View File

@@ -360,8 +360,8 @@ class ConfigDaemon {
} elseif (preg_match('/^sql\.(.*)$/', $matches[1], $match)) {
if (is_null($this->_sqldata_cache)) {
// read in sql-data (if exists)
if (file_exists(FROXLOR_INSTALL_DIR."/lib/userdata.inc.php")) {
require FROXLOR_INSTALL_DIR."/lib/userdata.inc.php";
if (file_exists(\Froxlor\Froxlor::getInstallDir()."/lib/userdata.inc.php")) {
require \Froxlor\Froxlor::getInstallDir()."/lib/userdata.inc.php";
unset($sql_root);
$this->_sqldata_cache = $sql;
}

View File

@@ -60,7 +60,7 @@ class ConfigIO
private function _cleanErrLogs()
{
$err_dir = makeCorrectDir(FROXLOR_INSTALL_DIR . "/logs/");
$err_dir = makeCorrectDir(\Froxlor\Froxlor::getInstallDir() . "/logs/");
if (@is_dir($err_dir)) {
// now get rid of old stuff
// (but append /*.log so we don't delete the directory)