From 1ab207f484fdd79792cd3b432f61e21e1af0eb09 Mon Sep 17 00:00:00 2001 From: Pimpys Date: Mon, 11 Dec 2017 11:43:57 +0300 Subject: [PATCH 1/2] Fix models/image line 55 --- models/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Image.php b/models/Image.php index 2948333..ab41db6 100755 --- a/models/Image.php +++ b/models/Image.php @@ -52,7 +52,7 @@ public function getExtension(){ public function getUrl($size = false){ $urlSize = ($size) ? '_'.$size : ''; $url = Url::toRoute([ - '/'.$this->getPrimaryKey().'/images/image-by-item-and-alias', + '/'.$this->getModule()->id.'/images/image-by-item-and-alias', 'item' => $this->modelName.$this->itemId, 'dirtyAlias' => $this->urlAlias.$urlSize.'.'.$this->getExtension() ]); From 5e130dcb01a29c30c633c93ba231d118c51c4a66 Mon Sep 17 00:00:00 2001 From: Pimpys Date: Tue, 12 Dec 2017 21:10:02 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D1=80=D0=B0=D1=81=D1=88=D0=B8=D1=80=D0=B5=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?,=20=D0=B4=D0=BB=D1=8F=20JQ=20=D0=B3=D0=B0=D0=BB=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- behaviors/ImageBehave.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/behaviors/ImageBehave.php b/behaviors/ImageBehave.php index 12acb29..1936f2f 100755 --- a/behaviors/ImageBehave.php +++ b/behaviors/ImageBehave.php @@ -51,7 +51,7 @@ public function attachImage($absolutePath, $isMain = false, $name = '') $pictureFileName = substr(md5(microtime(true) . $absolutePath), 4, 6) - . '.' . + . '.jpg' . pathinfo($absolutePath, PATHINFO_EXTENSION); $pictureSubDir = $this->getModule()->getModelSubDir($this->owner); $storePath = $this->getModule()->getStorePath($this->owner);