Commit 38b2f003dbe77f69f29a67b87de76f3ca49065fb

Authored by Administrator
1 parent 114c7fb3

20.07.16

Showing 40 changed files with 38 additions and 13 deletions   Show diff stats
common/behaviors/NotifyBehavior.php 100644 → 100755
common/behaviors/RatingBehavior.php 100644 → 100755
common/models/ArticleToRating.php 100644 → 100755
common/modules/comment/behaviors/ParentBehavior.php 100644 → 100755
common/modules/comment/controllers/DefaultController.php 100644 → 100755
common/modules/comment/migrations/m160724_162347_artbox_comment.php 100644 → 100755
common/modules/comment/migrations/m160726_092634_add_entity_fields.php 100644 → 100755
common/modules/comment/migrations/m160726_211227_create_artbox_comment_rating.php 100644 → 100755
common/modules/comment/models/CommentModel.php 100644 → 100755
common/modules/comment/models/CommentModelSearch.php 100644 → 100755
common/modules/comment/models/LikeModel.php 100644 → 100755
common/modules/comment/models/interfaces/CommentInterface.php 100644 → 100755
common/modules/comment/resources/artbox_comment.css 100644 → 100755
common/modules/comment/resources/artbox_comment.js 100644 → 100755
common/modules/comment/resources/delete.gif 100644 → 100755

752 Bytes | W: | H:

752 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/modules/comment/resources/jquery.rateit.min.js 100644 → 100755
common/modules/comment/resources/rateit.css 100644 → 100755
common/modules/comment/resources/star.gif 100644 → 100755

2.4 KB | W: | H:

2.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/modules/comment/todo 100644 → 100755
common/modules/comment/views/artbox_comment_form.php 100644 → 100755
common/modules/comment/views/artbox_comment_item.php 100644 → 100755
common/modules/comment/views/artbox_comment_list.php 100644 → 100755
common/modules/comment/views/artbox_comment_reply.php 100644 → 100755
common/modules/comment/views/manage/index.php 100644 → 100755
common/modules/comment/views/manage/update.php 100644 → 100755
common/widgets/views/comment_notify.php 100644 → 100755
console/migrations/m160722_150101_remove_product_option_option_fkey.php 100644 → 100755
console/migrations/m160722_150611_remove_product_variant_option_id.php 100644 → 100755
console/migrations/m160722_150612_remove_option_product_variant_id.php 100644 → 100755
console/migrations/m160725_154511_remove_product_option_product_fkey.php 100644 → 100755
console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php 100644 → 100755
console/migrations/m160804_100209_create_article_to_rating.php 100644 → 100755
frontend/controllers/SiteController.php
@@ -49,8 +49,8 @@ class SiteController extends Controller @@ -49,8 +49,8 @@ class SiteController extends Controller
49 public function actionError(){ 49 public function actionError(){
50 50
51 return $this->render('error', [ 51 return $this->render('error', [
52 - 'code'=>Yii::$app->errorHandler->exception->statusCode,  
53 - 'message'=>Yii::$app->errorHandler->exception->getMessage(), 52 + 'code'=>'404',
  53 +// 'message'=>Yii::$app->errorHandler->exception->getMessage(),
54 ]); 54 ]);
55 } 55 }
56 56
frontend/web/css/comments.css 100644 → 100755
frontend/web/css/style.css 100644 → 100755
frontend/web/css/style.dev.css 100644 → 100755
frontend/web/img/icon_100_original_01.png 100644 → 100755

5.45 KB | W: | H:

5.45 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/icon_100_quaranty_01.png 100644 → 100755

5.39 KB | W: | H:

5.39 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/img/user-noimage.png 100644 → 100755

3.09 KB | W: | H:

3.09 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/widgets/Seo.php
@@ -2,13 +2,15 @@ @@ -2,13 +2,15 @@
2 namespace frontend\widgets; 2 namespace frontend\widgets;
3 3
4 use common\models\SeoDynamic; 4 use common\models\SeoDynamic;
5 - 5 +use Yii;
6 use common\modules\product\models\Brand; 6 use common\modules\product\models\Brand;
7 use common\modules\rubrication\models\TaxGroup; 7 use common\modules\rubrication\models\TaxGroup;
8 use common\modules\rubrication\models\TaxOption; 8 use common\modules\rubrication\models\TaxOption;
9 use yii\base\Widget; 9 use yii\base\Widget;
10 use yii\helpers\ArrayHelper; 10 use yii\helpers\ArrayHelper;
11 use yii\helpers\Html; 11 use yii\helpers\Html;
  12 +use yii\helpers\Url;
  13 +use yii\web\HttpException;
12 14
13 class Seo extends Widget 15 class Seo extends Widget
14 { 16 {
@@ -101,25 +103,37 @@ class Seo extends Widget @@ -101,25 +103,37 @@ class Seo extends Widget
101 if (isset($filter['brands']) && count($filter['brands']) == 1) { 103 if (isset($filter['brands']) && count($filter['brands']) == 1) {
102 104
103 $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); 105 $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one();
  106 + if(!$model instanceof Brand){
104 107
105 - if($this->selectSeoData(self::H1) == $this->category_name) { 108 + \Yii::$app->response->redirect(['/site/error'],404);
  109 + } else {
  110 + if($this->selectSeoData(self::H1) == $this->category_name) {
106 111
107 - return $this->selectSeoData(self::H1) . ' ' . $model->name;  
108 - }else { 112 + return $this->selectSeoData(self::H1) . ' ' . $model->name;
  113 + }else {
109 114
110 - return $this->selectSeoData(self::H1); 115 + return $this->selectSeoData(self::H1);
111 116
  117 + }
112 } 118 }
113 119
  120 +
  121 +
114 } else if (isset($filter["naznacenie"]) && count($filter["naznacenie"]) == 1) { 122 } else if (isset($filter["naznacenie"]) && count($filter["naznacenie"]) == 1) {
115 123
116 $model = TaxOption::find()->where(['alias' => $filter["naznacenie"]])->one(); 124 $model = TaxOption::find()->where(['alias' => $filter["naznacenie"]])->one();
117 - if($this->selectSeoData(self::H1) == $this->category_name) { 125 + if(!$model instanceof TaxOption){
  126 +
  127 + \Yii::$app->response->redirect(['/site/error'],404);
  128 + } else {
  129 + if($this->selectSeoData(self::H1) == $this->category_name) {
118 130
119 - return $this->selectSeoData(self::H1) . ' ' . $model->value->value;  
120 - }else { 131 + return $this->selectSeoData(self::H1) . ' ' . $model->value->value;
  132 + }else {
121 133
122 - return $this->selectSeoData(self::H1); 134 + return $this->selectSeoData(self::H1);
  135 +
  136 + }
123 137
124 } 138 }
125 139
@@ -146,8 +160,13 @@ class Seo extends Widget @@ -146,8 +160,13 @@ class Seo extends Widget
146 160
147 if (isset($filter['brands']) && count($filter['brands']) == 1) { 161 if (isset($filter['brands']) && count($filter['brands']) == 1) {
148 $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); 162 $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one();
  163 + if(!$model instanceof Brand){
  164 +
  165 + \Yii::$app->response->redirect(['/site/error'],404);
  166 + } else {
  167 + $array['brand'] = $model->name;
  168 + }
149 169
150 - $array['brand'] = $model->name;  
151 } 170 }
152 171
153 172
@@ -160,7 +179,13 @@ class Seo extends Widget @@ -160,7 +179,13 @@ class Seo extends Widget
160 if (isset($filter[$optionList]) && count($filter[$optionList]) == 1) { 179 if (isset($filter[$optionList]) && count($filter[$optionList]) == 1) {
161 180
162 $model = TaxOption::find()->where(['alias' =>$filter[$optionList]])->one(); 181 $model = TaxOption::find()->where(['alias' =>$filter[$optionList]])->one();
163 - $array[$optionList] = $model->value->value; 182 + if(!$model instanceof TaxOption){
  183 +
  184 + \Yii::$app->response->redirect(['site/error'],404);
  185 + } else {
  186 + $array[$optionList] = $model->value->value;
  187 + }
  188 +
164 189
165 190
166 } 191 }