Heacy rewrite/cleanup:
[mailer.git] / inc / loader / load-payments.php
index de1647c1374f65cc3f082746c1d77e706686fe02..3d72aec7f24790a39ea745edc733c62ddca1b175 100644 (file)
@@ -38,8 +38,9 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif (isInstallationPhase()) {
+} elseif (isInstaller()) {
        // Do not run in installation phase
+       //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Run from installation phase.');
        return FALSE;
 }
 
@@ -66,15 +67,15 @@ if (($GLOBALS['cache_instance']->loadCacheFile('payments')) && ($GLOBALS['cache_
        // Set the array back and remove temporary
        $GLOBALS['cache_array']['payments'] = $paymentsData;
        unset($paymentsData);
-} elseif ((isHtmlOutputMode()) || (isRawOutputMode())) {
+} elseif ((isHtmlOutputMode()) || (isAjaxOutputMode()) || (isRawOutputMode())) {
        // Create cache file
        $GLOBALS['cache_instance']->init();
 
        // Query the database about this
        $result = sqlQuery('SELECT * FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `id` ASC', __FILE__, __LINE__);
-       while ($dummy = sqlFetchArray($result)) {
+       while ($data = sqlFetchArray($result)) {
                // Save row
-               $GLOBALS['cache_instance']->addRow($dummy);
+               $GLOBALS['cache_instance']->addRow($data);
        } // END - while
 
        // Free memory