diff --git a/admin-dev/themes/template/products/shipping.tpl b/admin-dev/themes/template/products/shipping.tpl
index b3e3ab852..cac4b817d 100644
--- a/admin-dev/themes/template/products/shipping.tpl
+++ b/admin-dev/themes/template/products/shipping.tpl
@@ -79,10 +79,10 @@
- |
diff --git a/classes/FileUploader.php b/classes/FileUploader.php
index 5b054c543..5e4816cb8 100755
--- a/classes/FileUploader.php
+++ b/classes/FileUploader.php
@@ -87,7 +87,6 @@ class FileUploaderCore
if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions))
return array('error' => Tools::displayError('File has an invalid extension, it should be one of '). $these . '.');
-
return $this->file->save();
}
diff --git a/classes/helper/Helper.php b/classes/helper/Helper.php
index b7efd2b75..dfed77ebb 100755
--- a/classes/helper/Helper.php
+++ b/classes/helper/Helper.php
@@ -314,7 +314,7 @@ class HelperCore
*/
public function renderAssoShop($type = 'shop')
{
- if (!Shop::isFeatureActive() || (!$this->id && $this->context->shop->getContextType() != Shop::CONTEXT_ALL))
+ if (!Shop::isFeatureActive())
return;
if ($type != 'shop' && $type != 'group_shop')
diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php
index 1ed743c19..b2f740677 100644
--- a/controllers/admin/AdminProductsController.php
+++ b/controllers/admin/AdminProductsController.php
@@ -27,8 +27,6 @@
class AdminProductsControllerCore extends AdminController
{
- protected $max_file_size = NULL;
-
/** @var integer Max image size for upload
* As of 1.5 it is recommended to not set a limit to max image size
**/
@@ -90,8 +88,7 @@ class AdminProductsControllerCore extends AdminController
$this->imageType = 'jpg';
$this->context = Context::getContext();
$this->_defaultOrderBy = 'position';
- $this->max_file_size = (Configuration::get('PS_LIMIT_UPLOAD_IMAGE_VALUE') * 1000000);
- $this->max_image_size = (Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1000000);
+ $this->max_image_size = (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE');
$categoriesArray = array();
$categories = Category::getSimpleCategories($this->context->language->id);
@@ -1041,8 +1038,7 @@ class AdminProductsControllerCore extends AdminController
self::$currentIndex = 'index.php?tab=AdminProducts';
$allowedExtensions = array("jpeg", "gif", "png", "jpg");
// max file size in bytes
- $sizeLimit = $this->max_file_size == 0 ? 10485760 : $this->max_file_size;
- $uploader = new FileUploader($allowedExtensions, $sizeLimit);
+ $uploader = new FileUploader($allowedExtensions, $this->max_image_size);
$result = $uploader->handleUpload();
if (isset($result['success']))
{
@@ -1270,7 +1266,7 @@ class AdminProductsControllerCore extends AdminController
$this->status = 'ok';
}
-
+
protected function _validateSpecificPrice($id_shop, $id_currency, $id_country, $id_group, $id_customer, $price, $from_quantity, $reduction, $reduction_type, $from, $to)
{
if (!Validate::isUnsignedId($id_shop) || !Validate::isUnsignedId($id_currency) || !Validate::isUnsignedId($id_country) || !Validate::isUnsignedId($id_group) || !Validate::isUnsignedId($id_customer))
@@ -2698,7 +2694,7 @@ class AdminProductsControllerCore extends AdminController
$input_namepack_items = Tools::getValue('namePackItems');
else
foreach ($product->packItems as $pack_item)
- $input_namepack_items .= $pack_item->pack_quantity.' x '.$pack_item->name.'¤';
+ $input_namepack_items .= $pack_item->pack_quantity.' x '.$pack_item->name.'¤';
$data->assign(array(
'product' => $product,
@@ -2980,7 +2976,7 @@ class AdminProductsControllerCore extends AdminController
$j = 0;
for ($i = $alreadyGenerated[Product::CUSTOMIZE_TEXTFIELD]; $i < (int)($this->getFieldValue($obj, 'text_fields')); $i++)
$customizableFieldIds[] = 'newLabel_'.Product::CUSTOMIZE_TEXTFIELD.'_'.$j++;
- return implode('¤', $customizableFieldIds);
+ return implode('¤', $customizableFieldIds);
}
private function _displayLabelField(&$label, $languages, $default_language, $type, $fieldIds, $id_customization_field)
@@ -3240,7 +3236,7 @@ class AdminProductsControllerCore extends AdminController
$data->assign('token', $this->token);
$data->assign('table', $this->table);
- $data->assign('max_image_size', (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE') / 1000);
+ $data->assign('max_image_size', $this->max_image_size / 1000);
$data->assign('up_filename', strval(Tools::getValue('virtual_product_filename_attribute')));
$data->assign('currency', $this->context->currency);
@@ -3834,7 +3830,7 @@ class AdminProductsControllerCore extends AdminController
$input_namepack_items = Tools::getValue('namePackItems');
else
foreach ($product->packItems as $pack_item)
- $input_namepack_items .= $pack_item->pack_quantity.' x '.$pack_item->name.'¤';
+ $input_namepack_items .= $pack_item->pack_quantity.' x '.$pack_item->name.'¤';
$this->tpl_form_vars['input_namepack_items'] = $input_namepack_items;
}