Merge pull request #27537 from libremaster/develop
NEW: cronjob: deny to launch a method from a deactivated module
This commit is contained in:
commit
941dbbde78
1 changed files with 10 additions and 0 deletions
|
|
@ -1223,6 +1223,16 @@ class Cronjob extends CommonObject
|
|||
|
||||
// Run a method
|
||||
if ($this->jobtype == 'method') {
|
||||
// Deny to launch a method from a deactivated module
|
||||
if (!empty($this->module_name) && !isModEnabled(strtolower($this->module_name))) {
|
||||
$this->error = $langs->transnoentitiesnoconv('CronMethodNotAllowed', $this->methodename, $this->objectname);
|
||||
dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR);
|
||||
$this->lastoutput = $this->error;
|
||||
$this->lastresult = -1;
|
||||
$retval = $this->lastresult;
|
||||
$error++;
|
||||
}
|
||||
|
||||
// load classes
|
||||
if (!$error) {
|
||||
$ret = dol_include_once($this->classesname);
|
||||
|
|
|
|||
Loading…
Reference in a new issue