Commit 7d1462af2e29923caeef8b27903e672df395b42c

Authored by Administrator
1 parent b161c194

14.09.16

Showing 1 changed file with 11 additions and 13 deletions   Show diff stats
frontend/widgets/Seo.php
@@ -186,24 +186,23 @@ class Seo extends Widget @@ -186,24 +186,23 @@ class Seo extends Widget
186 case self::DESCRIPTION: 186 case self::DESCRIPTION:
187 $description = $this->selectSeoData(self::DESCRIPTION); 187 $description = $this->selectSeoData(self::DESCRIPTION);
188 188
189 - if (!empty($description)) {  
190 189
  190 + $filter = \Yii::$app->request->get('filters', []);
  191 +
  192 + if(!empty($filter) && $description == $this->{self::DESCRIPTION}){
  193 + $array = $this->arrayBuilder($filter);
191 $this->getView()->registerMetaTag([ 194 $this->getView()->registerMetaTag([
192 'name' => 'description', 195 'name' => 'description',
193 - 'content' => $description 196 + 'content' => $this->getDescriptionString($array)
194 ]); 197 ]);
  198 + }
195 199
196 - } else {  
197 -  
198 - $filter = \Yii::$app->request->get('filters', []); 200 + if (!empty($description)) {
199 201
200 - if(!empty($filter)){  
201 - $array = $this->arrayBuilder($filter);  
202 - $this->getView()->registerMetaTag([  
203 - 'name' => 'description',  
204 - 'content' => $this->getDescriptionString($array)  
205 - ]);  
206 - } 202 + $this->getView()->registerMetaTag([
  203 + 'name' => 'description',
  204 + 'content' => $description
  205 + ]);
207 206
208 } 207 }
209 208
@@ -396,7 +395,6 @@ class Seo extends Widget @@ -396,7 +395,6 @@ class Seo extends Widget
396 395
397 396
398 } 397 }
399 - $row = substr($row, 0,-2 );  
400 $row .= " по самой лучшей цене с гарантией от производителя - Ruzkachok.com.ua"; 398 $row .= " по самой лучшей цене с гарантией от производителя - Ruzkachok.com.ua";
401 return $row; 399 return $row;
402 400