[*] CORE : Throw Exception when no theme selected only in front office

This commit is contained in:
gRoussac
2013-11-28 16:14:30 +01:00
parent 7261490381
commit d46feffcf1
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -93,14 +93,13 @@ $context = Context::getContext();
try
{
$context->shop = Shop::initialize();
if (Tools::isEmpty($theme_name = $context->shop->getTheme()) || !file_exists(_PS_ALL_THEMES_DIR_.$theme_name))
throw new PrestaShopException('No theme selected');
if (Tools::isEmpty($theme_name = $context->shop->getTheme()) && !defined('_PS_ADMIN_DIR_'))
throw new PrestaShopException(Tools::displayError('Current theme unselected. Please check your theme configuration.'));
}
catch (PrestaShopException $e)
{
$e->displayMessage();
}
define('_THEME_NAME_', $theme_name);
define('__PS_BASE_URI__', $context->shop->getBaseURI());