Marius Cramer
2014-02-18 0a02ee3d2c7f18221dbfbe3a8e9440c0002df4a3
server/plugins-available/cron_plugin.inc.php
@@ -205,15 +205,20 @@
            if($job['type'] == 'url') {
               $command .= "\t{$cron_config['wget']} -q -t 1 -T 7200 -O /dev/null " . escapeshellarg($job['command']) . " >/dev/null 2>&1";
            } else {
               $web_root = '';
               if($job['type'] == 'chrooted') {
                  if(substr($job['command'], 0, strlen($this->parent_domain['document_root'])) == $this->parent_domain['document_root']) {
                     //* delete the unneeded path part
                     $job['command'] = substr($job['command'], strlen($this->parent_domain['document_root']));
                  }
               } else {
                  $web_root = $this->parent_domain['document_root'];
               }
               $web_root .= '/web';
               $job['command'] = str_replace('[web_root]', $web_root, $job['command']);
               $command .= "\t";
               if($job['type'] == 'chrooted' && substr($job['command'], 0, 1) != "/") $command .= $this->parent_domain['document_root'].'/';
               if($job['type'] != 'chrooted' && substr($job['command'], 0, 1) != "/") $command .= $this->parent_domain['document_root'].'/';
               $command .= $job['command'];
            }