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;
}
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('payments')) && ($GLOBALS['cache_instance']->extensionVersionMatches('payments'))) {
// Load cache
$GLOBALS['cache_array']['payments'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (isHtmlOutputMode()) {
+
+ // Init temporary array
+ $paymentsData = array();
+
+ // Rewrite all to id
+ foreach ($GLOBALS['cache_array']['payments']['id'] as $key => $id) {
+ // Re-add key with id
+ foreach ($GLOBALS['cache_array']['payments'] as $key2 => $array) {
+ // Is key2 not 'id'?
+ if ($key2 != 'id') {
+ // Then Add it
+ $paymentsData[$id][$key2] = $GLOBALS['cache_array']['payments'][$key2][$key];
+ } // END - if
+ } // END - foreach
+ } // END - foreach
+
+ // Set the array back and remove temporary
+ $GLOBALS['cache_array']['payments'] = $paymentsData;
+ unset($paymentsData);
+} elseif ((isHtmlOutputMode()) || (isRawOutputMode())) {
// Create cache file
$GLOBALS['cache_instance']->init();