@@ -19,7 +19,7 @@ |
||
| 19 | 19 | // because the effect of forgetting a --test parameter can be worse |
| 20 | 20 | // than forgetting the --auto option in crontab. |
| 21 | 21 | return true; |
| 22 | - } elseif (@file_get_contents($opt['page']['absolute_http_url'] . 'api/ping.php') !== false) { |
|
| 22 | + } elseif (@file_get_contents($opt['page']['absolute_http_url'].'api/ping.php') !== false) { |
|
| 23 | 23 | // website is up and running |
| 24 | 24 | return true; |
| 25 | 25 | } else { |
@@ -11,8 +11,8 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | ***************************************************************************/ |
| 13 | 13 | |
| 14 | -$opt['rootpath'] = __DIR__ . '/../../'; |
|
| 15 | -require $opt['rootpath'] . 'lib2/cli.inc.php'; |
|
| 14 | +$opt['rootpath'] = __DIR__.'/../../'; |
|
| 15 | +require $opt['rootpath'].'lib2/cli.inc.php'; |
|
| 16 | 16 | |
| 17 | 17 | if (!Cronjobs::enabled()) { |
| 18 | 18 | exit; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | $processUser = posix_getpwuid(posix_geteuid()); |
| 23 | 23 | if ($processUser['name'] != $opt['cron']['username']) { |
| 24 | 24 | die( |
| 25 | - "ERROR: runcron must be run by '" . $opt['cron']['username'] |
|
| 26 | - . "' but was called by '" . $processUser['name'] . "'\n" . |
|
| 27 | - "Try something like 'sudo -u " . $opt['cron']['username'] . " php runcron.php'.\n" |
|
| 25 | + "ERROR: runcron must be run by '".$opt['cron']['username'] |
|
| 26 | + . "' but was called by '".$processUser['name']."'\n". |
|
| 27 | + "Try something like 'sudo -u ".$opt['cron']['username']." php runcron.php'.\n" |
|
| 28 | 28 | ); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -39,22 +39,22 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - $modules_dir = $opt['rootpath'] . 'util2/cron/modules/'; |
|
| 42 | + $modules_dir = $opt['rootpath'].'util2/cron/modules/'; |
|
| 43 | 43 | $param = count($argv) > 1 ? $argv[1] : ''; |
| 44 | 44 | |
| 45 | 45 | if ($param != '' && substr($param, 0, 1) != '-' && !strstr('/', $param)) { |
| 46 | 46 | // run one job manually for debugging purpose |
| 47 | 47 | $ignore_interval = true; |
| 48 | - require $modules_dir . $argv[1] . '.class.php'; |
|
| 48 | + require $modules_dir.$argv[1].'.class.php'; |
|
| 49 | 49 | } else { |
| 50 | 50 | $ignore_interval = false; |
| 51 | 51 | $hDir = opendir($modules_dir); |
| 52 | 52 | while (false !== ($file = readdir($hDir))) { |
| 53 | 53 | if (substr($file, -10) == '.class.php') { |
| 54 | 54 | if ($param == '--show') { |
| 55 | - echo 'running ' . $file . "\n"; |
|
| 55 | + echo 'running '.$file."\n"; |
|
| 56 | 56 | } |
| 57 | - require $modules_dir . $file; |
|
| 57 | + require $modules_dir.$file; |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | } |