X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-themes.php;h=a349240e19cb57f696ddb9c849882e588bdf47b0;hb=155492a5b96cec674846973a8524238b0365a848;hp=f2322765ca7b7972b088ccb3688bae3b62a0fad5;hpb=20741b93fd58620af677a7f1039ffd16ea6ec689;p=mailer.git diff --git a/inc/loader/load-themes.php b/inc/loader/load-themes.php index f2322765ca..a349240e19 100644 --- a/inc/loader/load-themes.php +++ b/inc/loader/load-themes.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -39,16 +39,16 @@ if (!defined('__SECURITY')) { die(); } elseif (isInstallationPhase()) { - // Use this code if you don't want to run this cache loader on installation phase - return; + // Do not run in installation phase + return FALSE; } elseif (!isExtensionActive('theme')) { // Skip this loader - return false; + return FALSE; } -// 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,23 +70,23 @@ 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` ASC', __FILE__, __LINE__); + $result = sqlQuery('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` ASC', __FILE__, __LINE__); + $result = sqlQuery('SELECT `id`, `theme_path`, `theme_active`, `theme_ver` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC', __FILE__, __LINE__); } - while ($content = SQL_FETCHARRAY($result)) { + while ($content = sqlFetchArray($result)) { // Add row to cache file $GLOBALS['cache_instance']->addRow($content); } // END - while // Free memory - SQL_FREERESULT($result); + sqlFreeResult($result); // Close the cache $GLOBALS['cache_instance']->storeExtensionVersion('theme');