X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ftheme-manager.php;h=44b82d17ddaae68eac654c5f3efdb598ce073d55;hp=b568553745125e188a0e6f76d11ecc4ba15873eb;hb=64ac34f8ebcfef05d9b273dd2be693717483ba16;hpb=e6e3183f794b385f5acc38b371c220cc35cdac38 diff --git a/inc/theme-manager.php b/inc/theme-manager.php index b568553745..44b82d17dd 100644 --- a/inc/theme-manager.php +++ b/inc/theme-manager.php @@ -63,7 +63,7 @@ function GET_CURR_THEME() { // Fix it to default $ret = "default"; } // END - if - } elseif ((!defined('mxchange_installed')) && ((isBooleanConstantAndTrue('mxchange_installing')) || ($CSS == true)) && ((!empty($_GET['theme'])) || (!empty($_POST['theme'])))) { + } elseif ((!isBooleanConstantAndTrue('mxchange_installed')) && ((isBooleanConstantAndTrue('mxchange_installing')) || ($CSS == true)) && ((!empty($_GET['theme'])) || (!empty($_POST['theme'])))) { // Prepare FQFN for checking $theme = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_GET['theme'])); @@ -148,7 +148,7 @@ function THEME_GET_VERSION ($name) { $cver = $cacheArray['themes']['theme_ver'][$name]; // Count up - $_CONFIG['cache_hits']++; + if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Load version from database $result = SQL_QUERY_ESC("SELECT theme_ver FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1", @@ -181,7 +181,7 @@ function THEME_GET_ID ($name) { $id = $cacheArray['themes']['id'][$name]; // Count up - $_CONFIG['cache_hits']++; + if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Check if current theme is already imported or not $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1", @@ -220,7 +220,7 @@ function THEME_IS_ACTIVE ($name) { $active = ($cacheArray['themes']['theme_active'][$name] == "Y"); // Count up - $_CONFIG['cache_hits']++; + if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Check if current theme is already imported or not $result = SQL_QUERY_ESC("SELECT theme_active FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_active='Y' LIMIT 1", @@ -250,10 +250,10 @@ function GET_CURR_THEME_NAME () { $name = $cacheArray['themes']['theme_name'][$name]; // Count up - $_CONFIG['cache_hits']++; + if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; } } elseif (GET_EXT_VERSION("cache") != "0.1.8") { // Check if current theme is already imported or not - $result = SQL_QUERY_ESC("SELECT theme_name FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_name='Y' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT theme_name FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_active='Y' LIMIT 1", array($name), __FILE__, __LINE__); // Is the theme active and installed?