diff --git a/module/cron/control.php b/module/cron/control.php index 333c021906..0bd99db7a2 100644 --- a/module/cron/control.php +++ b/module/cron/control.php @@ -159,6 +159,7 @@ class cron extends control while(true) { dao::$cache = array(); + /* When cron is null then die. */ if(empty($crons)) break; if(empty($parsedCrons)) break; @@ -170,10 +171,12 @@ class cron extends control /* Run crons. */ $now = new datetime('now'); + unset($_SESSION['company']); + unset($this->app->company); + $this->common->setCompany(); $this->common->loadConfigFromDB(); foreach($parsedCrons as $id => $cron) { - $cronInfo = $this->cron->getById($id); /* Skip empty and stop cron.*/ if(empty($cronInfo) or $cronInfo->status == 'stop') continue; @@ -211,6 +214,7 @@ class cron extends control $log = ''; $time = $now->format('G:i:s'); $log = "$time task " . $id . " executed,\ncommand: $cron[command].\nreturn : $return.\noutput : $output\n"; + $log .= $this->app->company->name . "\n"; $this->cron->logCron($log); unset($log); } diff --git a/module/group/model.php b/module/group/model.php index 3565b60128..1e28da57ce 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -422,7 +422,6 @@ class groupModel extends model $action = strtolower($action); if($action == 'manageview' and $group->role == 'limited') return false; - if($action == 'edit' and $group->role == 'limited') return false; if($action == 'copy' and $group->role == 'limited') return false; return true;