Fixed issues with themes
[mailer.git] / inc / modules / guest / action-themes.php
index 00b6bf45f5685e14790427b412cc5ecbbdfaa10c..28c50740610b686d6fcb250e4c547149ec44b1c1 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        die();
 } elseif (!isBlockModeEnabled()) {
-       // Block mode detected
+       // Non-block mode detected
        return;
 }
 
@@ -51,11 +51,11 @@ if ((!isExtensionActive('theme')) && (!isAdmin())) {
 
 // Get total num
 if (isAdmin()) {
-       // Load only active designs for user
-       $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true);
-} else {
        // Load all themes for admin
        $num_themes = countSumTotalData('', 'themes', 'id', '', true);
+} else {
+       // Load only active designs for user
+       $num_themes = countSumTotalData('Y', 'themes', 'id', 'theme_active', true);
 }
 
 $OUT = '';
@@ -67,7 +67,7 @@ if ($num_themes > 1) {
        $OUT = loadTemplate('theme_one', true, getCurrentThemeName());
 } elseif (isAdmin()) {
        // If there is no theme installed and there's an admin notify him!
-       $OUT = loadTemplate('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
+       $OUT = '{--ADMIN_NO_THEME_INSTALLED_WARNING--}';
 }
 
 // Load final box template