[-] BO : admin does not crash anymore when custom BO theme is not available #PSCFV-5492

This commit is contained in:
DamienMetzger
2012-11-23 11:28:31 +01:00
parent ea436c5eb8
commit 28a75f89c3
+3
View File
@@ -277,6 +277,9 @@ class AdminControllerCore extends Controller
$this->multishop_context = Shop::CONTEXT_ALL | Shop::CONTEXT_GROUP | Shop::CONTEXT_SHOP;
$this->bo_theme = ((Validate::isLoadedObject($this->context->employee) && $this->context->employee->bo_theme) ? $this->context->employee->bo_theme : 'default');
if (!file_exists(_PS_BO_ALL_THEMES_DIR_.$this->bo_theme.DIRECTORY_SEPARATOR.'template'))
$this->bo_theme = 'default';
$this->context->smarty->setTemplateDir(array(
_PS_BO_ALL_THEMES_DIR_.$this->bo_theme.DIRECTORY_SEPARATOR.'template',
_PS_OVERRIDE_DIR_.'controllers'.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'templates'