tell user if no change was detected
This commit is contained in:
parent
650701e5bd
commit
f4bc59df63
@ -77,8 +77,10 @@ class ModController extends Controller
|
|||||||
$model->harvestModInfo();
|
$model->harvestModInfo();
|
||||||
if ($model->getDirtyAttributes()) {
|
if ($model->getDirtyAttributes()) {
|
||||||
$model->save();
|
$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]);
|
return $this->redirect(['view', 'name' => $model->name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user