@@ -8,7 +8,6 @@ |
||
| 8 | 8 | namespace common\models\search; |
| 9 | 9 | |
| 10 | 10 | use common\models\PostComment as PostCommentModel; |
| 11 | -use Yii; |
|
| 12 | 11 | use yii\base\Model; |
| 13 | 12 | use yii\data\ActiveDataProvider; |
| 14 | 13 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $query = PostCommentModel::find(); |
| 55 | 55 | |
| 56 | 56 | $query->innerJoinWith([ |
| 57 | - 'commentPost' => function ($query) { |
|
| 57 | + 'commentPost' => function($query) { |
|
| 58 | 58 | /* @var $query \yii\db\ActiveQuery */ |
| 59 | 59 | return $query->from(['post' => Post::tableName()]); |
| 60 | 60 | }, |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | [ |
| 61 | 61 | 'actions' => ['signup'], |
| 62 | 62 | 'allow' => true, |
| 63 | - 'matchCallback' => function () { |
|
| 63 | + 'matchCallback' => function() { |
|
| 64 | 64 | return Option::get('allow_signup') && Yii::$app->user->isGuest; |
| 65 | 65 | }, |
| 66 | 66 | ], |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ] |
| 43 | 43 | ) ?> |
| 44 | 44 | |
| 45 | - <?php else: ?> |
|
| 45 | + <?php else : ?> |
|
| 46 | 46 | <?= Html::dropDownList( |
| 47 | 47 | 'termIds', |
| 48 | 48 | ArrayHelper::getColumn( |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | </div> |
| 93 | 93 | </div> |
| 94 | - <?php else: ?> |
|
| 94 | + <?php else : ?> |
|
| 95 | 95 | <?= Yii::t( |
| 96 | 96 | 'writesdown', 'Choose the {taxonomyName} above', |
| 97 | 97 | ['taxonomyName' => $taxonomy->singular_name] |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | [ |
| 60 | 60 | ['author', 'email'], |
| 61 | 61 | 'required', |
| 62 | - 'when' => function () { |
|
| 62 | + 'when' => function() { |
|
| 63 | 63 | return Option::get('require_name_email') && Yii::$app->user->isGuest ? true : false; |
| 64 | 64 | }, |
| 65 | 65 | ], |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | if ($sameTerm) { |
| 318 | 318 | $query->innerJoinWith([ |
| 319 | - 'terms' => function ($query) { |
|
| 319 | + 'terms' => function($query) { |
|
| 320 | 320 | /* @var $query \yii\db\ActiveQuery */ |
| 321 | 321 | $query->from(['term' => Term::tableName()])->andWhere([ |
| 322 | 322 | 'IN', |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | public function getNextPostLink($title = '{title}', $sameType = true, $sameTerm = false, $options = []) |
| 341 | 341 | { |
| 342 | 342 | if ($nextPost = $this->getNextPost($sameType, $sameTerm)) { |
| 343 | - $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($nextPost) { |
|
| 343 | + $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($nextPost) { |
|
| 344 | 344 | $attribute = $matches[1]; |
| 345 | 345 | |
| 346 | 346 | return $nextPost->{$attribute}; |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | |
| 373 | 373 | if ($sameTerm) { |
| 374 | 374 | $query->innerJoinWith([ |
| 375 | - 'terms' => function ($query) { |
|
| 375 | + 'terms' => function($query) { |
|
| 376 | 376 | /* @var $query \yii\db\ActiveQuery */ |
| 377 | 377 | $query->from(['term' => Term::tableName()])->andWhere([ |
| 378 | 378 | 'IN', |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | public function getPrevPostLink($title = '{title}', $sameType = true, $sameTerm = false, $options = []) |
| 397 | 397 | { |
| 398 | 398 | if ($prevPost = $this->getPrevPost($sameType, $sameTerm)) { |
| 399 | - $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($prevPost) { |
|
| 399 | + $title = preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($prevPost) { |
|
| 400 | 400 | $attribute = $matches[1]; |
| 401 | 401 | |
| 402 | 402 | return $prevPost->{$attribute}; |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | { |
| 67 | 67 | $query = MediaModel::find(); |
| 68 | 68 | $query->innerJoinWith([ |
| 69 | - 'mediaAuthor' => function ($query) { |
|
| 69 | + 'mediaAuthor' => function($query) { |
|
| 70 | 70 | /* @var $query \yii\db\ActiveQuery */ |
| 71 | 71 | return $query->from(['user' => User::tableName()]); |
| 72 | 72 | }, |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | { |
| 52 | 52 | $query = MediaCommentModel::find(); |
| 53 | 53 | $query->innerJoinWith([ |
| 54 | - 'commentMedia' => function ($query) { |
|
| 54 | + 'commentMedia' => function($query) { |
|
| 55 | 55 | /* @var $query \yii\db\ActiveQuery */ |
| 56 | 56 | return $query->from(['media' => Media::tableName()]); |
| 57 | 57 | }, |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | namespace common\models\search; |
| 9 | 9 | |
| 10 | 10 | use common\models\PostComment as PostCommentModel; |
| 11 | -use Yii; |
|
| 12 | 11 | use yii\base\Model; |
| 13 | 12 | use yii\data\ActiveDataProvider; |
| 14 | 13 | |
@@ -21,8 +21,7 @@ |
||
| 21 | 21 | <label> |
| 22 | 22 | <?php |
| 23 | 23 | $checked = isset($option['media']['enable']) && $option['media']['enable'] ? |
| 24 | - true : |
|
| 25 | - false; |
|
| 24 | + true : false; |
|
| 26 | 25 | ?> |
| 27 | 26 | <?= Html::checkbox("Option[option_value][media][enable]", $checked, ['value' => 1]) ?> |
| 28 | 27 | |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | namespace common\models\search; |
| 9 | 9 | |
| 10 | 10 | use common\models\PostComment as PostCommentModel; |
| 11 | -use Yii; |
|
| 12 | 11 | use yii\base\Model; |
| 13 | 12 | use yii\data\ActiveDataProvider; |
| 14 | 13 | |