frontend/controllers/MediaController.php 1 location
|
@@ 44-51 (lines=8) @@
|
| 41 |
|
throw new NotFoundHttpException(Yii::t('writesdown', 'The requested page does not exist.')); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
if ($comment->load(Yii::$app->request->post()) && $comment->save()) { |
| 45 |
|
if (!$comment->parent) { |
| 46 |
|
$model->comment_count++; |
| 47 |
|
} |
| 48 |
|
if ($model->save()) { |
| 49 |
|
$this->refresh(); |
| 50 |
|
} |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
if ($model->password && $model->password !== Yii::$app->request->post('password')) { |
| 54 |
|
return $this->render('protected', ['media' => $model]); |
frontend/controllers/PostController.php 1 location
|
@@ 93-100 (lines=8) @@
|
| 90 |
|
throw new NotFoundHttpException(Yii::t('writesdown', 'The requested page does not exist.')); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
if ($comment->load(Yii::$app->request->post()) && $comment->save()) { |
| 94 |
|
if (!$comment->parent) { |
| 95 |
|
$model->comment_count++; |
| 96 |
|
} |
| 97 |
|
if ($model->save()) { |
| 98 |
|
$this->refresh(); |
| 99 |
|
} |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
if ($model->password && $model->password !== Yii::$app->request->post('password')) { |
| 103 |
|
return $this->render('protected', ['post' => $model]); |