[-] BO: Modified treatment. now the limit of upload can be modified in the "preferences" tab

This commit is contained in:
aNiassy
2011-12-22 18:32:30 +00:00
parent 686312c802
commit 810797de6d
5 changed files with 1706 additions and 1687 deletions
@@ -27,12 +27,12 @@
class AdminProductsControllerCore extends AdminController
{
protected $max_file_size = 20000000;
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
**/
protected $max_image_size;
protected $max_image_size = NULL;
private $_category;
/**
@@ -90,7 +90,9 @@ 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);
$categoriesArray = array();
$categories = Category::getSimpleCategories($this->context->language->id);