Skip to content

Commit

Permalink
Fixed standalone action to use updated api
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Feb 2, 2016
1 parent 033ba81 commit 5db921b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/controllers/ServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ public function actions()
],
'reinstall' => [
'class' => SmartUpdateAction::class,
'beforeSave' => function ($action) {
'on beforeSave' => function (Event $event) {
/** @var Action $action */
$action = $event->sender;
foreach ($action->collection->models as $model) {
$model->osmage = Yii::$app->request->post('osimage');
$model->panel = Yii::$app->request->post('panel');
Expand All @@ -194,7 +196,9 @@ public function actions()
],
'boot-live' => [
'class' => SmartUpdateAction::class,
'beforeSave' => function ($action) {
'on beforeSave' => function (Event $event) {
/** @var Action $action */
$action = $event->sender;
foreach ($action->collection->models as $model) {
$model->osmage = Yii::$app->request->post('osimage');
}
Expand Down

0 comments on commit 5db921b

Please sign in to comment.