[-] BO : #PSFV-646 - Fix problem with button save & preview

// Replace some "else if" by "elseif"
This commit is contained in:
mDeflotte
2012-03-12 10:32:07 +00:00
parent 94fa94e572
commit 6281b4dbbc
2 changed files with 62 additions and 51 deletions
+12 -1
View File
@@ -29,7 +29,7 @@ class AdminProductsControllerCore extends AdminController
{ {
/** @var integer Max image size for upload /** @var integer Max image size for upload
* As of 1.5 it is recommended to not set a limit to max image size * As of 1.5 it is recommended to not set a limit to max image size
**/ */
protected $max_file_size = null; protected $max_file_size = null;
protected $max_image_size = null; protected $max_image_size = null;
@@ -924,6 +924,17 @@ class AdminProductsControllerCore extends AdminController
else else
$this->errors[] = Tools::displayError('You do not have permission to delete here.'); $this->errors[] = Tools::displayError('You do not have permission to delete here.');
} }
// Product preview
elseif (Tools::isSubmit('submitAddProductAndPreview'))
{
$this->display = 'edit';
$this->action = 'save';
if (Tools::getValue('id_product'))
{
$this->id_object = Tools::getValue('id_product');
$this->object = new Product((int)Tools::getValue('id_product'));
}
}
// Update attachments // Update attachments
elseif (Tools::isSubmit('submitAddAttachments')) elseif (Tools::isSubmit('submitAddAttachments'))
{ {