fix một số bug nhỏ
This commit is contained in:
@@ -21,7 +21,7 @@ class AreaController extends Controller {
|
||||
parent::init();
|
||||
if (time() > Yii::$app->params["time"])
|
||||
$this->redirect(["/dashboard"]);
|
||||
|
||||
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
@@ -89,7 +89,8 @@ class AreaController extends Controller {
|
||||
$oldCode = $model->code;
|
||||
$model->name = $data["Name"];
|
||||
$model->code = $data["Code"];
|
||||
$model->pid = $data["Pid"];
|
||||
if ($model->pid != 0)
|
||||
$model->pid = $data["Pid"];
|
||||
$model->description = $data["Description"];
|
||||
$model->modified_at = time();
|
||||
if ($model->save()) {
|
||||
|
||||
Reference in New Issue
Block a user