[-] BO : Fix bug #PSCFV-8481 no live edit on index when one language is active only

This commit is contained in:
gRoussac committed 2013-03-29 11:37:08 +01:00
1 parent 7b93630595
commit 02e7a8ca00
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -398,7 +398,7 @@ class FrontControllerCore extends Controller
$this->displayRestrictedCountryPage(); $this->displayRestrictedCountryPage();
if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess()) if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess())
die(Tools::displayError()); Tools::redirect('index.php?controller=404');
$this->iso = $iso; $this->iso = $iso;
@@ -303,7 +303,7 @@ class AdminModulesPositionsControllerCore extends AdminController
{ {
$url = $this->context->shop->getBaseURL().Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params); $url = $this->context->shop->getBaseURL().Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
if (Configuration::get('PS_REWRITING_SETTINGS')) if (Configuration::get('PS_REWRITING_SETTINGS'))
$url = str_replace('index.php', Language::getIsoById($this->context->employee->id_lang).'/', $url); $url = str_replace('index.php', ((count(Language::getLanguages(true)) > 1)? Language::getIsoById($this->context->employee->id_lang).'/' : ''), $url);
return $url; return $url;
} }