[-] BO : fix #PSCFV-2369 - post data is lost if there is an error while saving

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15332 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-05-16 09:38:59 +00:00
parent 7ef60cd5d4
commit af8fee03db
@@ -2242,6 +2242,10 @@ class AdminProductsControllerCore extends AdminController
{
$this->_displayDraftWarning($this->object->active);
// if there was an error while saving, we don't want to lose posted data
if (!empty($this->errors))
$this->copyFromPost($this->object, $this->table);
$this->initPack($this->object);
$this->{'initForm'.$this->tab_display}($this->object);
$this->tpl_form_vars['product'] = $this->object;