diff --git a/bl-kernel/admin/views/themes.php b/bl-kernel/admin/views/themes.php
index 0d41a54a..ec99140a 100644
--- a/bl-kernel/admin/views/themes.php
+++ b/bl-kernel/admin/views/themes.php
@@ -2,12 +2,6 @@
echo Bootstrap::pageTitle(array('title'=>$L->g('Themes'), 'icon'=>'eye'));
-echo Bootstrap::link(array(
- 'title'=>$L->g('Configure Blocks'),
- 'href'=>HTML_PATH_ADMIN_ROOT.'blocks',
- 'icon'=>'box'
-));
-
echo '
@@ -31,6 +25,10 @@ foreach ($themes as $theme) {
if ($theme['dirname']!=$site->theme()) {
echo ''.$L->g('Activate').'';
+ } else {
+ if (Sanitize::pathFile(PATH_THEMES.$theme['dirname'].DS.'blocks.php')) {
+ echo ''.$L->g('Configure Blocks').'';
+ }
}
echo '
diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php
index 019874c9..9cc56fcb 100644
--- a/bl-kernel/functions.php
+++ b/bl-kernel/functions.php
@@ -794,7 +794,7 @@ function getTag($key) {
function activateTheme($themeDirectory) {
global $site;
global $syslog;
- global $L;
+ global $L, $language;
global $blocks;
if (Sanitize::pathFile(PATH_THEMES.$themeDirectory)) {