X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-themes.php;h=123d538d8da9221a8223b40b0e5ab0c0ef4d43c3;hb=c3db0c416433a946c25ea1ce8d9329c0912a1616;hp=033b686678e28175d3f3c1f9a4dd9d70f2fcf65f;hpb=cf1c0f69caf5dc2abc2c461ca97696a064456e30;p=mailer.git diff --git a/inc/loader/load-themes.php b/inc/loader/load-themes.php index 033b686678..123d538d8d 100644 --- a/inc/loader/load-themes.php +++ b/inc/loader/load-themes.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -38,17 +38,17 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); +} elseif (isInstallationPhase()) { + // Do not run in installation phase + return FALSE; } elseif (!isExtensionActive('theme')) { // Skip this loader - return false; + return FALSE; } -// Use this code if you don't want to run this cache loader on installation phase -if (isInstallationPhase()) return; - -// Next cached table is the referal system (themes)... +// Next cached table are the themes if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) { - // Load referal system from cache + // Load themes $cache = $GLOBALS['cache_instance']->getArrayFromCache(); // Restructure the array @@ -70,15 +70,15 @@ if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_in // Remove dummy array unset($cache); -} elseif (isHtmlOutputMode()) { +} elseif ((isHtmlOutputMode()) || (isRawOutputMode())) { // Create cache file here $GLOBALS['cache_instance']->init(); // Load all themes and their data if (isExtensionInstalledAndNewer('theme', '0.0.7')) { - $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__); + $result = SQL_QUERY('SELECT `id`, `theme_path`, `theme_active`, `theme_ver`, `theme_name` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC', __FILE__, __LINE__); } else { - $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id`', __FILE__, __LINE__); + $result = SQL_QUERY('SELECT `id`, `theme_path`, `theme_active`, `theme_ver` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC', __FILE__, __LINE__); } while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file