Skip to content

Commit d185a31

Browse files
committedNov 13, 2017
double fix
1 parent e812233 commit d185a31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎controllers/backend/BlogPostController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function actionCreate()
9292
$model->banner->saveAs(Yii::getAlias('@frontend/web') . DIRECTORY_SEPARATOR . $bannerName);
9393
$model->banner = $bannerName;
9494
}
95-
$model->amount *= 100;
95+
$model->donated *= 100;
9696
$model->save(false);
9797

9898
return $this->redirect(['view', 'id' => $model->id]);
@@ -120,7 +120,7 @@ public function actionUpdate($id)
120120

121121
$model = $this->findModel($id);
122122
$oldBanner = $model->banner;
123-
$model->amount = $model->amount / 100;
123+
$model->donated = $model->donated / 100;
124124

125125
if ($model->load(Yii::$app->request->post())) {
126126
$model->banner = UploadedFile::getInstance($model, 'banner');
@@ -132,7 +132,7 @@ public function actionUpdate($id)
132132
} else {
133133
$model->banner = $oldBanner;
134134
}
135-
$model->amount = $model->amount * 100;
135+
$model->donated = $model->donated * 100;
136136
$model->save(false);
137137
return $this->redirect(['view', 'id' => $model->id]);
138138
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.