- if (getConfig('repay_deleted_mails') != 'SHRED') {
- //* DEBUG: */ outputHtml($stats_id.':'.$totalPoints.'/'.$links.'/'.$price."<br />");
- 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: */ outputHtml("PAYBACK:".$sender."<br />");
- addPointsThroughReferalSystem('mail_deleted', $sender, $totalPoints, true, 0, false,'direct');
-
- // Output message
- if (getConfig('repay_deleted_mails') == 'REPAY') {
- // Repayed
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
- translateComma($totalPoints)
- ));
- } else {
- // To jackpot
- loadTemplate('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
+ //* DEBUG: */ debugOutput('PAYBACK:'.$content['sender']);
+ addPointsDirectly('mail_deleted', $content['sender'], $totalPoints);
+
+ // Output message
+ if (getConfig('repay_deleted_mails') == 'REPAY') {
+ // Repayed
+ displayMessage(getMaskedMessage('ADMIN_POINTS_REPAYED',
+ '{%pipe,translateComma=' . $totalPoints . '%}'
+ ));