[-] CORE : fixed bug #PSCFV-8723 - PSCFV-8656 live edit 404

This commit is contained in:
vAugagneur
2013-04-25 10:59:18 +02:00
parent 50d52baa7b
commit ac9a5c5a41
@@ -301,9 +301,11 @@ class AdminModulesPositionsControllerCore extends AdminController
public function getLiveEditUrl($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'))
$url = str_replace('index.php', ((count(Language::getLanguages(true)) > 1)? Language::getIsoById($this->context->employee->id_lang).'/' : ''), $url);
$lang = '';
if (Configuration::get('PS_REWRITING_SETTINGS') && count(Language::getLanguages(true)) > 1)
$lang = Language::getIsoById($this->context->employee->id_lang).'/';
$url = $this->context->shop->getBaseURL().$lang.Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
return $url;
}