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

@@ -26,9 +26,9 @@ function phpErrHandler($errno, $errstr, $errfile, $errline, $errcontext) {
$theme = "Sparkle";
}
// prevent possible file-path-disclosure
$errfile = str_replace(FROXLOR_INSTALL_DIR, "", $errfile);
$errfile = str_replace(\Froxlor\Froxlor::getInstallDir(), "", $errfile);
// if we're not on the shell, output a nicer error-message
$err_hint = file_get_contents(FROXLOR_INSTALL_DIR.'/templates/'.$theme.'/misc/phperrornice.tpl');
$err_hint = file_get_contents(\Froxlor\Froxlor::getInstallDir().'/templates/'.$theme.'/misc/phperrornice.tpl');
// replace values
$err_hint = str_replace("<TEXT>", '#'.$errno.' '.$errstr, $err_hint);
$err_hint = str_replace("<DEBUG>", $errfile.':'.$errline, $err_hint);