From 7d1462af2e29923caeef8b27903e672df395b42c Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 1 Nov 2016 12:59:56 +0200 Subject: [PATCH] 14.09.16 --- frontend/widgets/Seo.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index b77f974..53b790d 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -186,24 +186,23 @@ class Seo extends Widget case self::DESCRIPTION: $description = $this->selectSeoData(self::DESCRIPTION); - if (!empty($description)) { + $filter = \Yii::$app->request->get('filters', []); + + if(!empty($filter) && $description == $this->{self::DESCRIPTION}){ + $array = $this->arrayBuilder($filter); $this->getView()->registerMetaTag([ 'name' => 'description', - 'content' => $description + 'content' => $this->getDescriptionString($array) ]); + } - } else { - - $filter = \Yii::$app->request->get('filters', []); + if (!empty($description)) { - if(!empty($filter)){ - $array = $this->arrayBuilder($filter); - $this->getView()->registerMetaTag([ - 'name' => 'description', - 'content' => $this->getDescriptionString($array) - ]); - } + $this->getView()->registerMetaTag([ + 'name' => 'description', + 'content' => $description + ]); } @@ -396,7 +395,6 @@ class Seo extends Widget } - $row = substr($row, 0,-2 ); $row .= " по самой лучшей цене с гарантией от производителя - Ruzkachok.com.ua"; return $row; -- libgit2 0.21.4