diff --git a/common/behaviors/ShowImage.php b/common/behaviors/ShowImage.php index 4960eea..0198027 100644 --- a/common/behaviors/ShowImage.php +++ b/common/behaviors/ShowImage.php @@ -15,14 +15,20 @@ class ShowImage extends Behavior if($width=='original'){ $preg = '/\/(.[^\/]*)$/'; preg_match('/\.(.[^.]*)$/', $dir, $type); - $row = preg_replace( $preg, '/original.'.$type[1], $dir); + if(isset($type[1])){ + $dir = preg_replace( $preg, '/original.'.$type[1], $dir); + } + } else { $preg = '/\/(.[^\/]*)$/'; preg_match('/\.(.[^.]*)$/', $dir, $type); - $row = preg_replace( $preg, '/'.$width.'x'.$height.'.'.$type[1], $dir); + if(isset($type[1])){ + $dir = preg_replace( $preg, '/'.$width.'x'.$height.'.'.$type[1], $dir); + } + } - return $row; + return $dir; } diff --git a/common/models/GallerySearch.php b/common/models/GallerySearch.php index bc36c82..58b4284 100644 --- a/common/models/GallerySearch.php +++ b/common/models/GallerySearch.php @@ -110,10 +110,12 @@ (new \DateTime($this->date_add_to))->modify('+1 day')->format('Y-m-d') ]); + $query->andFilterWhere([ 'like', - 'name', - $this->name, + 'LOWER(name)', + mb_strtolower($this->name, 'UTF-8') + ]) ->andFilterWhere([ 'like', diff --git a/common/models/Portfolio.php b/common/models/Portfolio.php index d778ea9..e3b245a 100644 --- a/common/models/Portfolio.php +++ b/common/models/Portfolio.php @@ -71,6 +71,7 @@ 'name', 'preview', 'link', + 'cover' ], 'required', ], diff --git a/common/modules/file/behaviors/ShowImage.php b/common/modules/file/behaviors/ShowImage.php deleted file mode 100644 index 4960eea..0000000 --- a/common/modules/file/behaviors/ShowImage.php +++ /dev/null @@ -1,43 +0,0 @@ -
@@ -9,7 +11,7 @@ use yii\helpers\Html; '+ ''+ '
'; -// console.log(block); block.append(sub_block); }); diff --git a/frontend/views/company/portfolio-view.php b/frontend/views/company/portfolio-view.php index 3e45d4f..ab09b66 100644 --- a/frontend/views/company/portfolio-view.php +++ b/frontend/views/company/portfolio-view.php @@ -138,186 +138,186 @@ ?> -
-
Комментарии: 3
-
+ /* + ?> +
+
Комментарии: 3
+
-
-
- - -
-
+ +
+ + +
+
- - -
-
- - -
-
- -
- + + +
+
+ + +
+
+ +
+ -
+
-
-
-
-
- -
-
- -
-
- - - - -
-
-