Completed
Branch master (bf31fb)
by Александр
77:38 queued 37:39
created
src/components/storage/Cluster.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public $priority = 100;
31 31
 
32 32
     public $publicBaseUrl; //   http://c1.s.skeeks.com/uploads/
33
-    public $rootBasePath;  //   /var/www/sites/test.ru/frontend/web/uploads/
33
+    public $rootBasePath; //   /var/www/sites/test.ru/frontend/web/uploads/
34 34
 
35 35
     /**
36 36
      * @var integer the level of sub-directories to store uploaded files. Defaults to 1.
Please login to merge, or discard this patch.
src/components/urlRules/UrlRuleTree.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
 
247 247
         if (!$pathInfo) //главная страница
248 248
         {
249
-            $treeNode = Tree::getDb()->cache(function ($db) {
249
+            $treeNode = Tree::getDb()->cache(function($db) {
250 250
                 return Tree::find()->where([
251 251
                     "cms_site_id" => \Yii::$app->cms->site->id,
252 252
                     "level" => 0,
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -244,13 +244,15 @@
 block discarded – undo
244 244
         ]);
245 245
 
246 246
 
247
-        if (!$pathInfo) //главная страница
247
+        if (!$pathInfo) {
248
+            //главная страница
248 249
         {
249 250
             $treeNode = Tree::getDb()->cache(function ($db) {
250 251
                 return Tree::find()->where([
251 252
                     "cms_site_id" => \Yii::$app->cms->site->id,
252 253
                     "level" => 0,
253 254
                 ])->one();
255
+        }
254 256
             }, null, $dependency);
255 257
 
256 258
         } else //второстепенная страница
Please login to merge, or discard this patch.
src/components/Cms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                 $this->noImageUrl = CmsAsset::getAssetUrl('img/image-not-found.jpg');
251 251
             }
252 252
 
253
-            \Yii::$app->view->on(View::EVENT_BEGIN_PAGE, function (Event $e) {
253
+            \Yii::$app->view->on(View::EVENT_BEGIN_PAGE, function(Event $e) {
254 254
                 if (!\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) {
255 255
                     \Yii::$app->response->getHeaders()->setDefault('X-Powered-CMS',
256 256
                         $this->descriptor->name . " {$this->descriptor->homepage}");
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
                 }
276 276
             });
277 277
 
278
-            \Yii::$app->user->on(\yii\web\User::EVENT_AFTER_LOGIN, function (UserEvent $e) {
278
+            \Yii::$app->user->on(\yii\web\User::EVENT_AFTER_LOGIN, function(UserEvent $e) {
279 279
                 $e->identity->logged_at = \Yii::$app->formatter->asTimestamp(time());
280 280
                 $e->identity->save(false);
281 281
 
Please login to merge, or discard this patch.
src/components/CurrentSite.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 ]);
46 46
 
47 47
 
48
-                $cmsDomain = CmsSiteDomain::getDb()->cache(function ($db) {
48
+                $cmsDomain = CmsSiteDomain::getDb()->cache(function($db) {
49 49
                     return CmsSiteDomain::find()->where(['domain' => $this->_serverName])->one();
50 50
                 }, null, $dependencySiteDomain);
51 51
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                     $this->_site = $cmsDomain->cmsSite;
57 57
                 } else {
58 58
 
59
-                    $this->_site = CmsSiteDomain::getDb()->cache(function ($db) {
59
+                    $this->_site = CmsSiteDomain::getDb()->cache(function($db) {
60 60
                         return CmsSite::find()->active()->andWhere(['def' => Cms::BOOL_Y])->one();
61 61
                     },
62 62
                         null,
Please login to merge, or discard this patch.
src/controllers/UserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
                             [
79 79
                                 [
80 80
                                     'allow' => true,
81
-                                    'matchCallback' => function ($rule, $action) {
81
+                                    'matchCallback' => function($rule, $action) {
82 82
                                         return $this->isOwner;
83 83
                                     }
84 84
                                 ]
Please login to merge, or discard this patch.
src/controllers/AdminCmsContentElementController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
                         ],
397 397
                 ]);
398 398
 
399
-                $this->_content = CmsContent::getDb()->cache(function ($db) use ($content_id) {
399
+                $this->_content = CmsContent::getDb()->cache(function($db) use ($content_id) {
400 400
                     return CmsContent::find()->where([
401 401
                         "id" => $content_id,
402 402
                     ])->one();
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
                     'visible' => false,
511 511
                     'format' => 'raw',
512 512
                     'class' => \yii\grid\DataColumn::class,
513
-                    'value' => function ($model, $key, $index) use ($name) {
513
+                    'value' => function($model, $key, $index) use ($name) {
514 514
                         if (is_array($model->{$name})) {
515 515
                             return implode(",", $model->{$name});
516 516
                         } else {
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
             [
575 575
                 'class' => \yii\grid\DataColumn::class,
576
-                'value' => function (\skeeks\cms\models\CmsContentElement $model) {
576
+                'value' => function(\skeeks\cms\models\CmsContentElement $model) {
577 577
                     if (!$model->cmsTree) {
578 578
                         return null;
579 579
                     }
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 
601 601
             'additionalSections' => [
602 602
                 'class' => \yii\grid\DataColumn::class,
603
-                'value' => function (\skeeks\cms\models\CmsContentElement $model) {
603
+                'value' => function(\skeeks\cms\models\CmsContentElement $model) {
604 604
                     $result = [];
605 605
 
606 606
                     if ($model->cmsContentElementTrees) {
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
             [
629 629
                 'class' => \yii\grid\DataColumn::class,
630 630
                 'label' => "Смотреть",
631
-                'value' => function (\skeeks\cms\models\CmsContentElement $model) {
631
+                'value' => function(\skeeks\cms\models\CmsContentElement $model) {
632 632
 
633 633
                     return \yii\helpers\Html::a('<i class="glyphicon glyphicon-arrow-right"></i>', $model->absoluteUrl,
634 634
                         [
Please login to merge, or discard this patch.
src/controllers/AuthController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
                 if ($ref = UrlHelper::getCurrent()->getRef()) {
156 156
                     $rr->redirect = $ref;
157 157
                 } else {
158
-                    $rr->redirect = Yii::$app->getUser()->getReturnUrl();;
158
+                    $rr->redirect = Yii::$app->getUser()->getReturnUrl(); ;
159 159
                 }
160 160
             } else {
161 161
                 $rr->message = 'Не удалось авторизоваться';
Please login to merge, or discard this patch.
src/controllers/ContentElementController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
                         [
64 64
                             [
65 65
                                 'allow' => true,
66
-                                'matchCallback' => function ($rule, $action) {
66
+                                'matchCallback' => function($rule, $action) {
67 67
                                     if ($this->model->cmsContent && $this->model->cmsContent->access_check_element == 'Y') {
68 68
                                         //Если такая привилегия заведена, нужно ее проверять.
69 69
                                         if ($permission = \Yii::$app->authManager->getPermission($this->model->permissionName)) {
Please login to merge, or discard this patch.
src/models/CmsContent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
             [
169 169
                 'code',
170 170
                 'default',
171
-                'value' => function ($model, $attribute) {
171
+                'value' => function($model, $attribute) {
172 172
                     return "sxauto" . md5(rand(1, 10) . time());
173 173
                 }
174 174
             ],
Please login to merge, or discard this patch.