3
0
Fork 0
This commit is contained in:
Александр Рыбкин 2021-04-26 17:46:44 +03:00
parent 0d5bfe59a1
commit 99dd41be05
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,8 @@ class MoleTask extends \yii\db\ActiveRecord
$model->dateAdd = $dateAdd ?: date('Y-m-d H:i:s');
$model->project = $project ?: Yii::$app->getModule('cron')->project;
$model->module = $module;
$model->type = stripos($controller, '.') ? $controller : ($model->project . '.' . $model->controller); // для совместимости
$model->type = ((empty($model->module) ? $model->project : $model->module) . '.' . $model->controller); // для совместимости
$model->isReady = 1;
return $model->save();
}