[-] BO : admin does not crash anymore when custom BO theme is not available #PSCFV-5492
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user