From 5d42aed996007f17bee06e4aca942687f72a25ad Mon Sep 17 00:00:00 2001 From: Semenov Date: Fri, 17 Apr 2020 17:23:47 +0300 Subject: [PATCH] dev --- src/CmsSeoComponent.php | 8 ++++---- src/controllers/SitemapController.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CmsSeoComponent.php b/src/CmsSeoComponent.php index bb8b2a6..265f2e1 100644 --- a/src/CmsSeoComponent.php +++ b/src/CmsSeoComponent.php @@ -444,8 +444,8 @@ protected function _initDefaultCanUrl() * Хост может быть не указан, тогда будет взят из запроса */ if ($this->canUrl->host == self::CANURL_DATA_FROM_MAIN_DOMAIN) { - if (\Yii::$app->cms->site && \Yii::$app->cms->site->cmsSiteMainDomain) { - $this->canUrl->host = \Yii::$app->cms->site->cmsSiteMainDomain->domain; + if (\Yii::$app->skeeks->site && \Yii::$app->skeeks->site->cmsSiteMainDomain) { + $this->canUrl->host = \Yii::$app->skeeks->site->cmsSiteMainDomain->domain; } else { $this->canUrl->host = null; } @@ -459,8 +459,8 @@ protected function _initDefaultCanUrl() * Аналогично со схемой */ if ($this->canUrl->scheme == self::CANURL_DATA_FROM_MAIN_DOMAIN) { - if (\Yii::$app->cms->site && \Yii::$app->cms->site->cmsSiteMainDomain) { - $this->canUrl->scheme = \Yii::$app->cms->site->cmsSiteMainDomain->is_https ? "https" : "http"; + if (\Yii::$app->skeeks->site && \Yii::$app->skeeks->site->cmsSiteMainDomain) { + $this->canUrl->scheme = \Yii::$app->skeeks->site->cmsSiteMainDomain->is_https ? "https" : "http"; } else { $this->canUrl->scheme = null; } diff --git a/src/controllers/SitemapController.php b/src/controllers/SitemapController.php index d690745..275485e 100644 --- a/src/controllers/SitemapController.php +++ b/src/controllers/SitemapController.php @@ -50,7 +50,7 @@ public function actionOnRequest() */ protected function _addTrees(&$data = []) { - $query = Tree::find()->where(['cms_site_id' => \Yii::$app->cms->site->id]); + $query = Tree::find()->where(['cms_site_id' => \Yii::$app->skeeks->site->id]); if (\Yii::$app->seo->activeTree) { $query->andWhere(['active' => 'Y']); @@ -103,7 +103,7 @@ protected function _addElements(&$data = []) { $query = CmsContentElement::find() ->joinWith('cmsTree') - ->andWhere([Tree::tableName() . '.cms_site_id' => \Yii::$app->cms->site->id]); + ->andWhere([Tree::tableName() . '.cms_site_id' => \Yii::$app->skeeks->site->id]); if (\Yii::$app->seo->activeContentElem) {