Skip to content

Commit 24b60e9

Browse files
author
Marius Burkard
committed
- fixed problem when running cron_debug.php
- fixed php warning on awstats cron
1 parent 4666bfe commit 24b60e9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

server/lib/classes/cron.d/150-awstats.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ public function onRunJob() {
148148
}
149149

150150
$statsdirold = $statsdir."/".$awyear."-".$awmonth."/";
151-
mkdir($statsdirold);
151+
if(!is_dir($statsdirold)) {
152+
mkdir($statsdirold);
153+
}
152154
$files = scandir($statsdir);
153155
foreach ($files as $file) {
154156
if (substr($file, 0, 1) != "." && !is_dir("$statsdir"."/"."$file") && substr($file, 0, 1) != "w" && substr($file, 0, 1) != "i") copy("$statsdir"."/"."$file", "$statsdirold"."$file");

server/lib/classes/cronjob.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected function onAfterRun() {
174174
}
175175

176176
// child classes may NOT override this!
177-
private function onCompleted() {
177+
protected function onCompleted() {
178178
global $app, $conf;
179179

180180
if($conf['log_priority'] <= LOGLEVEL_DEBUG) print "Called onCompleted() for class " . get_class($this) . "\n";

0 commit comments

Comments
 (0)