tell user if no change was detected

This commit is contained in:
cornernote 2015-08-11 20:54:09 +09:30
parent 650701e5bd
commit f4bc59df63

View File

@ -77,8 +77,10 @@ class ModController extends Controller
$model->harvestModInfo();
if ($model->getDirtyAttributes()) {
$model->save();
Yii::$app->getSession()->setFlash('success', Yii::t('app', 'Mod has been updated from remote repository.'));
} else {
Yii::$app->getSession()->setFlash('info', Yii::t('app', 'Mod has been updated from remote repository, however no change was detected.'));
}
Yii::$app->getSession()->setFlash('success', Yii::t('app', 'Mod has been updated from remote repository.'));
return $this->redirect(['view', 'name' => $model->name]);
}