X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Floader%2Fload-refdepths.php;h=f30616e5932bc085a4ae695489aaa82c5cc4c216;hb=f6014bce7255a915872f2f463247440c0d58f9a9;hp=d0109672e5c6da2bdaabb660175dc04557a6f740;hpb=2e715eb7f3f8ca8d259aacb4cbbddde7d9d18e01;p=mailer.git diff --git a/inc/loader/load-refdepths.php b/inc/loader/load-refdepths.php index d0109672e5..f30616e593 100644 --- a/inc/loader/load-refdepths.php +++ b/inc/loader/load-refdepths.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * 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,21 +38,23 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); +} elseif (isInstallationPhase()) { + // Use this code if you don't want to run this cache loader on installation phase + return; } -// 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 (refdepths)... +// Next cached table is the referral system (refdepths)... if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) { - // Load referal system from cache + // Load referral system from cache $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache(); } elseif (isHtmlOutputMode()) { // Create cache file here $GLOBALS['cache_instance']->init(); - // Load all modules and their data - $result = SQL_QUERY('SELECT id, level, percents FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level', __FILE__, __LINE__); + // Query for all referral depths + $result = SQL_QUERY('SELECT `id`,`level`,`percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY `level` ASC', __FILE__, __LINE__); + + // ... and load them while ($content = SQL_FETCHARRAY($result)) { // Add row to cache file $GLOBALS['cache_instance']->addRow($content);