- if (getConfig('repay_deleted_mails') != 'SHRED') {
- //* DEBUG: */ echo $stats_id.':'.$totalPoints.'/'.$links.'/'.$price."<br />\n";
- if ($totalPoints > 0) {
- // Shall we payback to user or jackpot?
- if (getConfig('repay_deleted_mails') == 'JACKPOT') {
- // Set jackpot
- $sender = 0;
- } // END - if
-
- // Pay back points
- //* DEBUG: */ echo "PAYBACK:".$sender."<br />\n";
- ADD_POINTS_REFSYSTEM('mail_deleted', $sender, $totalPoints, true, '0', false,'direct');
-
- // Output message
- if (getConfig('repay_deleted_mails') == 'REPAY') {
- // Repayed
- LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
- translateComma($totalPoints)
- ));
- } else {
- // To jackpot
- LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
- translateComma($totalPoints)
- ));
- }
+ if ($totalPoints == 0) {
+ // No points repayed!
+ displayMessage('{--ADMIN_NO_POINTS_REPAYED--}');
+ } elseif (getConfig('repay_deleted_mails') != 'SHRED') {
+ //* DEBUG: */ debugOutput($stats_id . ':' . $totalPoints . '/' . $links . '/' . $content['price']);
+ // Shall we payback to user or jackpot?
+ if (getConfig('repay_deleted_mails') == 'JACKPOT') {
+ // Set jackpot
+ $content['sender'] = '0';
+ } // END - if
+
+ // Pay back points
+ initReferalSystem();
+ addPointsThroughReferalSystem('mail_deleted', $content['sender'], $totalPoints);
+
+ // Output message
+ if (getConfig('repay_deleted_mails') == 'REPAY') {
+ // Repayed
+ displayMessage('{%message,ADMIN_POINTS_REPAYED=' . $totalPoints . '%}');