// Fix multishop association on CMS tab

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10297 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-20 16:47:34 +00:00
parent 8fdcb10f78
commit d57b3cbcd7
+6 -2
View File
@@ -272,7 +272,9 @@ class AdminCMSControllerCore extends AdminController
$this->copyFromPost($cms, 'cms');
if (!$cms->add())
$this->_errors[] = Tools::displayError('An error occurred while creating object.').' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
elseif (Tools::isSubmit('submitAddcmsAndPreview'))
else
$this->updateAssoShop($cms->id);
if (Tools::isSubmit('submitAddcmsAndPreview'))
{
$preview_url = $this->context->link->getCMSLink($cms, $this->getFieldValue($cms, 'link_rewrite', $this->context->language->id), $this->context->language->id);
@@ -295,7 +297,9 @@ class AdminCMSControllerCore extends AdminController
$this->copyFromPost($cms, 'cms');
if (!$cms->update())
$this->_errors[] = Tools::displayError('An error occurred while updating object.').' <b>'.$this->table.' ('.Db::getInstance()->getMsgError().')</b>';
elseif (Tools::isSubmit('submitAddcmsAndPreview'))
else
$this->updateAssoShop($cms->id);
if (Tools::isSubmit('submitAddcmsAndPreview'))
{
$preview_url = $this->context->link->getCMSLink($cms, $this->getFieldValue($object, 'link_rewrite', $this->context->language->id), $this->context->language->id);
if (!$cms->active)