@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | <?= Html::hiddenInput('Widget[config][class]', $config['class']) ?> |
17 | 17 | |
18 | 18 | <div class="form-group"> |
19 | - <?= Html::label('Title', 'title-' . $widget->id, ['class' => 'form-label']) ?> |
|
19 | + <?= Html::label('Title', 'title-'.$widget->id, ['class' => 'form-label']) ?> |
|
20 | 20 | |
21 | 21 | <?= Html::textInput( |
22 | 22 | 'Widget[config][title]', |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | |
27 | 27 | </div> |
28 | 28 | <div class="form-group"> |
29 | - <?= Html::label('Title', 'text-' . $widget->id, ['class' => 'form-label']) ?> |
|
29 | + <?= Html::label('Title', 'text-'.$widget->id, ['class' => 'form-label']) ?> |
|
30 | 30 | |
31 | 31 | <?= Html::textarea('Widget[config][text]', $config['text'], [ |
32 | - 'id' => 'text-' . $widget->id, |
|
32 | + 'id' => 'text-'.$widget->id, |
|
33 | 33 | 'class' => 'form-control', |
34 | 34 | 'rows' => '5', |
35 | 35 | ]) ?> |
@@ -14,5 +14,5 @@ |
||
14 | 14 | 'text' => '', |
15 | 15 | ], |
16 | 16 | 'description' => 'Simple widget to show text or HTML.', |
17 | - 'page' => __DIR__ . '/../views/option.php', |
|
17 | + 'page' => __DIR__.'/../views/option.php', |
|
18 | 18 | ]; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | echo $this->beforeWidget; |
28 | 28 | |
29 | 29 | if ($this->title) { |
30 | - echo $this->beforeTitle . $this->title . $this->afterTitle; |
|
30 | + echo $this->beforeTitle.$this->title.$this->afterTitle; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | echo Menu::widget([ |
@@ -11,16 +11,16 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // you may need to adjust this path to the correct Yii framework path |
14 | -$frameworkPath = dirname(__FILE__) . '/vendor/yiisoft/yii2'; |
|
14 | +$frameworkPath = dirname(__FILE__).'/vendor/yiisoft/yii2'; |
|
15 | 15 | |
16 | 16 | if (!is_dir($frameworkPath)) { |
17 | 17 | echo '<h1>Error</h1>'; |
18 | 18 | echo '<p><strong>The path to yii framework seems to be incorrect.</strong></p>'; |
19 | - echo '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="' . __FILE__ . '">' . basename(__FILE__) . '</abbr>.</p>'; |
|
20 | - echo '<p>Please refer to the <abbr title="' . dirname(__FILE__) . '/README.md">README</abbr> on how to install Yii.</p>'; |
|
19 | + echo '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="'.__FILE__.'">'.basename(__FILE__).'</abbr>.</p>'; |
|
20 | + echo '<p>Please refer to the <abbr title="'.dirname(__FILE__).'/README.md">README</abbr> on how to install Yii.</p>'; |
|
21 | 21 | } |
22 | 22 | |
23 | -require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); |
|
23 | +require_once($frameworkPath.'/requirements/YiiRequirementChecker.php'); |
|
24 | 24 | $requirementsChecker = new YiiRequirementChecker(); |
25 | 25 | |
26 | 26 | $gdMemo = $imagickMemo = 'Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.'; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | [ |
46 | 46 | 'actions' => ['index', 'style', 'view'], |
47 | 47 | 'allow' => true, |
48 | - 'matchCallback' => function () { |
|
48 | + 'matchCallback' => function() { |
|
49 | 49 | $option = Option::get('sitemap'); |
50 | 50 | |
51 | 51 | return $option['enable_sitemap']; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $post = Post::find() |
113 | 113 | ->from(['post' => Post::tableName()]) |
114 | 114 | ->innerJoinWith([ |
115 | - 'terms' => function ($query) { |
|
115 | + 'terms' => function($query) { |
|
116 | 116 | /* @var $query \yii\db\ActiveQuery */ |
117 | 117 | $query->from(['term' => Term::tableName()]); |
118 | 118 | }, |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $response->headers->set('Content-Type', 'text/xml; charset=UTF-8'); |
203 | 203 | $response->format = $response::FORMAT_RAW; |
204 | 204 | if ($type === 'h') { |
205 | - $item['loc'] = Yii::$app->urlManager->hostInfo . Yii::$app->urlManager->baseUrl . '/'; |
|
205 | + $item['loc'] = Yii::$app->urlManager->hostInfo.Yii::$app->urlManager->baseUrl.'/'; |
|
206 | 206 | $item['changefreq'] = $this->_option['home']['changefreq']; |
207 | 207 | $item['priority'] = $this->_option['home']['priority']; |
208 | 208 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /* @var $items array */ |
12 | 12 | ?> |
13 | 13 | <?= '<?xml version="1.0" encoding="UTF-8"?>' ?> |
14 | -<?= '<?xml-stylesheet type="text/xsl" href="' . Url::to(['style']) . '"?>' ?> |
|
14 | +<?= '<?xml-stylesheet type="text/xsl" href="'.Url::to(['style']).'"?>' ?> |
|
15 | 15 | <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
16 | 16 | xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" |
17 | 17 | xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | <?php foreach ($item['image'] as $image): ?> |
27 | 27 | <?= '<image:image>' ?> |
28 | 28 | |
29 | - <?= '<image:loc><![CDATA[' . $image['loc'] . ']]></image:loc>' ?> |
|
29 | + <?= '<image:loc><![CDATA['.$image['loc'].']]></image:loc>' ?> |
|
30 | 30 | |
31 | - <?= isset($image['title']) ? '<image:title><![CDATA[' . $image['title'] . ']]></image:title>' : '' ?> |
|
31 | + <?= isset($image['title']) ? '<image:title><![CDATA['.$image['title'].']]></image:title>' : '' ?> |
|
32 | 32 | |
33 | - <?= isset($image['caption']) ? ' <image:caption><![CDATA[' . $image['caption'] . ']]></image:caption>' : '' ?> |
|
33 | + <?= isset($image['caption']) ? ' <image:caption><![CDATA['.$image['caption'].']]></image:caption>' : '' ?> |
|
34 | 34 | |
35 | 35 | <?= '</image:image>' ?> |
36 | 36 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <xsl:template match="/"> |
21 | 21 | <html xmlns="http://www.w3.org/1999/xhtml"> |
22 | 22 | <head> |
23 | - <title><?= Option::get('sitetitle') . ' - ' . Yii::t('writesdown', 'XML Sitemap'); ?></title> |
|
23 | + <title><?= Option::get('sitetitle').' - '.Yii::t('writesdown', 'XML Sitemap'); ?></title> |
|
24 | 24 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
25 | 25 | <style type="text/css"> |
26 | 26 | body { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | </p> |
136 | 136 | |
137 | 137 | <p class="expl"><?= Html::a(Yii::t('writesdown', '↑ Sitemap Index'), |
138 | - Yii::$app->urlManager->hostInfo . Url::to(['index'])) ?></p> |
|
138 | + Yii::$app->urlManager->hostInfo.Url::to(['index'])) ?></p> |
|
139 | 139 | <table id="sitemap" cellpadding="3"> |
140 | 140 | <thead> |
141 | 141 | <tr> |
@@ -11,7 +11,7 @@ |
||
11 | 11 | /* @var $items array */ |
12 | 12 | ?> |
13 | 13 | <?= '<?xml version="1.0" encoding="UTF-8"?>' ?> |
14 | -<?= '<?xml-stylesheet type="text/xsl" href="' . Url::to(['style']) . '"?>' ?> |
|
14 | +<?= '<?xml-stylesheet type="text/xsl" href="'.Url::to(['style']).'"?>' ?> |
|
15 | 15 | <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
16 | 16 | xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" |
17 | 17 | xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /* @var $items array */ |
12 | 12 | ?> |
13 | 13 | <?= '<?xml version="1.0" encoding="UTF-8"?>' ?> |
14 | -<?= '<?xml-stylesheet type="text/xsl" href="' . Url::to(['style']) . '"?>' ?> |
|
14 | +<?= '<?xml-stylesheet type="text/xsl" href="'.Url::to(['style']).'"?>' ?> |
|
15 | 15 | <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
16 | 16 | <sitemap> |
17 | 17 | <loc><![CDATA[<?= Yii::$app->urlManager->hostInfo |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | </sitemap> |
27 | 27 | <?php foreach ($items as $item): ?> |
28 | 28 | <?= '<sitemap>' ?> |
29 | - <?= '<loc><![CDATA[' . $item['loc'] . ']]></loc>' ?> |
|
30 | - <?= '<lastmod>' . $item['lastmod'] . '</lastmod>' ?> |
|
29 | + <?= '<loc><![CDATA['.$item['loc'].']]></loc>' ?> |
|
30 | + <?= '<lastmod>'.$item['lastmod'].'</lastmod>' ?> |
|
31 | 31 | <?= '</sitemap>' ?> |
32 | 32 | <?php endforeach ?> |
33 | 33 | </sitemapindex> |