@@ -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 | }, |
@@ -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 | }, |
@@ -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 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -$this->title = Html::encode($post->title . ' - ' . Option::get('sitetitle')); |
|
41 | +$this->title = Html::encode($post->title.' - '.Option::get('sitetitle')); |
|
42 | 42 | $this->params['breadcrumbs'][] = [ |
43 | 43 | 'label' => Html::encode($post->postType->singular_name), |
44 | 44 | 'url' => ['/post/index', 'id' => $post->postType->id], |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $category = $post->getTerms() |
48 | 48 | ->innerJoinWith([ |
49 | - 'taxonomy' => function ($query) { |
|
49 | + 'taxonomy' => function($query) { |
|
50 | 50 | /* @var $query \yii\db\ActiveQuery */ |
51 | 51 | $query->from(['taxonomy' => Taxonomy::tableName()]); |
52 | 52 | }, |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | <footer class="footer-meta"> |
102 | 102 | <?php $tags = $post->getTerms() |
103 | 103 | ->innerJoinWith([ |
104 | - 'taxonomy' => function ($query) { |
|
104 | + 'taxonomy' => function($query) { |
|
105 | 105 | /** @var $query \yii\db\ActiveQuery */ |
106 | 106 | return $query->from(['taxonomy' => Taxonomy::tableName()]); |
107 | 107 | }, |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | <?php if ($tags): ?> |
113 | 113 | <h3> |
114 | 114 | <?php foreach ($tags as $tag): ?> |
115 | - <?= Html::a($tag->name, $tag->url, ['class' => 'badge']) . "\n" ?> |
|
115 | + <?= Html::a($tag->name, $tag->url, ['class' => 'badge'])."\n" ?> |
|
116 | 116 | <?php endforeach ?> |
117 | 117 | </h3> |
118 | 118 | <?php endif ?> |