Commit e72b37ff5614b5e282ff50b0d054b85a93cb5f08

Authored by Administrator
1 parent 8bf0cf28

26.05.16 change image download (git strange error, pay attention for this)

Showing 138 changed files with 5 additions and 4 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 138 files are displayed.

backend/controllers/EventController.php 100644 → 100755
backend/controllers/PageController.php 100644 → 100755
backend/controllers/SeoCategoryController.php 100644 → 100755
backend/controllers/SeoController.php 100644 → 100755
backend/controllers/SeoDynamicController.php 100644 → 100755
backend/controllers/ServiceController.php 100644 → 100755
backend/views/event/_form.php 100644 → 100755
backend/views/event/_search.php 100644 → 100755
backend/views/event/create.php 100644 → 100755
backend/views/event/index.php 100644 → 100755
backend/views/event/update.php 100644 → 100755
backend/views/event/view.php 100644 → 100755
backend/views/page/_form.php 100644 → 100755
backend/views/page/_search.php 100644 → 100755
backend/views/page/create.php 100644 → 100755
backend/views/page/index.php 100644 → 100755
backend/views/page/update.php 100644 → 100755
backend/views/page/view.php 100644 → 100755
backend/views/seo-category/_form.php 100644 → 100755
backend/views/seo-category/_search.php 100644 → 100755
backend/views/seo-category/create.php 100644 → 100755
backend/views/seo-category/index.php 100644 → 100755
backend/views/seo-category/update.php 100644 → 100755
backend/views/seo-category/view.php 100644 → 100755
backend/views/seo-dynamic/_form.php 100644 → 100755
backend/views/seo-dynamic/_search.php 100644 → 100755
backend/views/seo-dynamic/create.php 100644 → 100755
backend/views/seo-dynamic/index.php 100644 → 100755
backend/views/seo-dynamic/update.php 100644 → 100755
backend/views/seo-dynamic/view.php 100644 → 100755
backend/views/seo/_form.php 100644 → 100755
backend/views/seo/_search.php 100644 → 100755
backend/views/seo/create.php 100644 → 100755
backend/views/seo/index.php 100644 → 100755
backend/views/seo/update.php 100644 → 100755
backend/views/seo/view.php 100644 → 100755
backend/views/service/_form.php 100644 → 100755
backend/views/service/_search.php 100644 → 100755
backend/views/service/create.php 100644 → 100755
backend/views/service/index.php 100644 → 100755
backend/views/service/update.php 100644 → 100755
backend/views/service/view.php 100644 → 100755
common/components/Mailer.php 100644 → 100755
common/components/artboximage/ArtboxImage.php 100644 → 100755
common/components/artboximage/ArtboxImageHelper.php 100644 → 100755
common/models/Banner.php 100644 → 100755
common/models/Event.php 100644 → 100755
common/models/EventSearch.php 100644 → 100755
common/models/Page.php 100644 → 100755
common/models/PageSearch.php 100644 → 100755
common/models/RemoteOrders.php 100644 → 100755
common/models/Seo.php 100644 → 100755
common/models/SeoCategory.php 100644 → 100755
common/models/SeoCategorySearch.php 100644 → 100755
common/models/SeoDynamic.php 100644 → 100755
common/models/SeoDynamicSearch.php 100644 → 100755
common/models/SeoSearch.php 100644 → 100755
common/models/Service.php 100644 → 100755
common/models/ServiceSearch.php 100644 → 100755
common/models/SliderImage.php 100644 → 100755
common/modules/artboxfile/Module.php 100644 → 100755
common/modules/artboxfile/config.php 100644 → 100755
common/modules/artboxfile/controllers/ActionController.php 100644 → 100755
common/modules/artboxfile/models/File.php 100644 → 100755
common/modules/comment/models/CommentProjectSearch.php 100644 → 100755
common/modules/comment/widgets/views/_review_comment_view.php 100644 → 100755
common/modules/comment/widgets/views/form-comment-review.php 100644 → 100755
common/modules/comment/widgets/views/list-comment-review.php 100644 → 100755
common/modules/product/CatalogUrlManager.php 100644 → 100755
common/modules/product/controllers/ProductUnitController.php 100644 → 100755
common/modules/product/models/Product.php
... ... @@ -240,12 +240,12 @@ class Product extends \yii\db\ActiveRecord
240 240 foreach ($this->imagesUpload as $image) {
241 241 $imageName = $image->baseName .'.'. $image->extension;
242 242 $i = 0;
243   - while(file_exists(Yii::getAlias('@storage/products/'. $imageName))) {
  243 + while(file_exists(Yii::getAlias('@frontend/web/images/products/' . $imageName))) {
244 244 $i++;
245 245 $imageName = $image->baseName .'_'. $i .'.'. $image->extension;
246 246 }
247 247  
248   - $image->saveAs(Yii::getAlias('@storage/products/'. $imageName));
  248 + $image->saveAs(Yii::getAlias('@frontend/web/images/products/' .$imageName));
249 249 $images[] = $imageName;
250 250 }
251 251 return $images;
... ...
common/modules/product/models/ProductImage.php
... ... @@ -97,7 +97,7 @@ class ProductImage extends \yii\db\ActiveRecord
97 97 */
98 98 public function getImageFile()
99 99 {
100   - return isset($this->image) ? Yii::getAlias('@storage/products/'. $this->image) : null;
  100 + return isset($this->image) ? '/images/products/' . $this->image : null;
101 101 }
102 102  
103 103 /**
... ... @@ -107,9 +107,10 @@ class ProductImage extends \yii\db\ActiveRecord
107 107 public function getImageUrl()
108 108 {
109 109 // return a default image placeholder if your source image is not found
110   - return isset($this->image) ? '/storage/products/'. $this->image : 'default.jpg';
  110 + return isset($this->image) ? '/images/products/'. $this->image : '/images/no_photo.png';
111 111 }
112 112  
  113 +
113 114 /**
114 115 * Process upload of image
115 116 *
... ...
common/modules/product/models/ProductUnitSearch.php 100644 → 100755
common/modules/product/models/ProductVariantSearch.php 100644 → 100755
common/modules/product/models/RemoteCategories.php 100644 → 100755
common/modules/product/models/RemoteCategoriesSearch.php 100644 → 100755
common/modules/product/models/RemoteProducts.php 100644 → 100755
common/modules/product/models/RemoteProductsSearch.php 100644 → 100755
common/modules/product/views/manage/import-stat.php 100644 → 100755
common/modules/product/views/manage/remote-products.php 100644 → 100755
common/modules/product/views/product-unit/_form.php 100644 → 100755
common/modules/product/views/product-unit/_search.php 100644 → 100755
common/modules/product/views/product-unit/create.php 100644 → 100755
common/modules/product/views/product-unit/index.php 100644 → 100755
common/modules/product/views/product-unit/update.php 100644 → 100755
common/modules/product/views/product-unit/view.php 100644 → 100755
common/translation/ru/product.php 100644 → 100755
common/translation/ru/rubrication.php 100644 → 100755
composer.json 100644 → 100755
console/controllers/ImportController.php 100644 → 100755
console/migrations/m160225_143331_comment_test.php 100644 → 100755
console/migrations/m160304_081817_rating_table.php 100644 → 100755
console/migrations/m160311_132124_rating_comment_restyle.php 100644 → 100755
console/migrations/m160406_221846_create_page.php 100644 → 100755
console/migrations/m160407_185510_create_event.php 100644 → 100755
console/migrations/m160411_211053_create_service.php 100644 → 100755
console/migrations/m160411_215739_create_seo.php 100644 → 100755
console/migrations/m160412_133944_create_seo_category.php 100644 → 100755
console/migrations/m160413_112158_create_seo_dynamic.php 100644 → 100755
console/migrations/m160414_101644_add_param_to_seo_dynamic.php 100644 → 100755