X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Floader%2Fload-payments.php;h=b4a9375b2fc8fbce310329f0712b5ca6c7505c68;hb=789cf95597c589b22a0ee01b771b8986e2b0b451;hp=c11c58f63f11391e85e8d20d47763e0f9952baaa;hpb=e255180539a9fdfac8a8b51d1aefc6f4909d8e07;p=mailer.git diff --git a/inc/loader/load-payments.php b/inc/loader/load-payments.php index c11c58f63f..b4a9375b2f 100644 --- a/inc/loader/load-payments.php +++ b/inc/loader/load-payments.php @@ -47,6 +47,25 @@ if (!defined('__SECURITY')) { if (($GLOBALS['cache_instance']->loadCacheFile('payments')) && ($GLOBALS['cache_instance']->extensionVersionMatches('payments'))) { // Load cache $GLOBALS['cache_array']['payments'] = $GLOBALS['cache_instance']->getArrayFromCache(); + + // 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()) { // Create cache file $GLOBALS['cache_instance']->init();