The usual asset of bugfixes/improvements:
[mailer.git] / inc / modules / admin / what-del_email.php
index 5ebc2b96db36ded4bdf84bd07ac9bd467105d73b..f90e1abd31f634a93e06021037b643ea88875d30 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Bonus- / Normal-Mail loeschen                    *
  * -------------------------------------------------------------------- *
- *                                                                      *
- *  Module by Robert Niedziela, Megacomputing                           *
- *          web : http://mc-p.mcserver.de                               *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -57,7 +57,7 @@ if (isGetRequestParameterSet('mid')) {
                $content = SQL_FETCHARRAY($result);
 
                // Get points we shall pay back per mail
-               // @TODO Unused: $price = getPaymentPoints($content['payment_id'], 'price');
+               $content['price'] = getPaymentPoints($content['payment_id'], 'price');
                // @TODO Unused: cat_id, payment_id
 
                // Prepare data for the template
@@ -67,8 +67,8 @@ if (isGetRequestParameterSet('mid')) {
                loadTemplate('admin_delete_email_normal', false, $content);
 
                // Load email template and send the email away
-               $message_user = loadEmailTemplate('order-deleted', $content, $sender);
-               sendEmail($sender, '{--MEMBER_ORDER_DELETED--}', $message_user);
+               $message_user = loadEmailTemplate('order-deleted', $content, $content['sender']);
+               sendEmail($content['sender'], '{--MEMBER_ORDER_DELETED--}', $message_user);
 
                // Fetch right stats_id from pool
                $result_pool = SQL_QUERY_ESC("SELECT
@@ -94,23 +94,23 @@ LIMIT 1",
                        reduceRecipientReceivedMails('stats_id', getRequestParameter('mid'), $links);
 
                        // Calc total points and pay them back
-                       $totalPoints = $links * $price;
+                       $totalPoints = $links * $content['price'];
 
                        // Shall we pay the points back to the user?
                        if ($totalPoints == 0) {
                                // No points repayed!
                                loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_POINTS_REPAYED--}');
                        } elseif (getConfig('repay_deleted_mails') != 'SHRED') {
-                               //* DEBUG: */ debugOutput($stats_id.':'.$totalPoints.'/'.$links.'/'.$price);
+                               //* DEBUG: */ debugOutput($stats_id.':'.$totalPoints.'/'.$links.'/'.$content['price']);
                                // Shall we payback to user or jackpot?
                                if (getConfig('repay_deleted_mails') == 'JACKPOT') {
                                        // Set jackpot
-                                       $sender = '0';
+                                       $content['sender'] = '0';
                                } // END - if
 
                                // Pay back points
-                               //* DEBUG: */ debugOutput('PAYBACK:'.$sender);
-                               addPointsDirectly('mail_deleted', $sender, $totalPoints);
+                               //* DEBUG: */ debugOutput('PAYBACK:'.$content['sender']);
+                               addPointsDirectly('mail_deleted', $content['sender'], $totalPoints);
 
                                // Output message
                                if (getConfig('repay_deleted_mails') == 'REPAY') {