]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_unconfirmed.php
Several code-cleanups:
[mailer.git] / inc / modules / admin / what-list_unconfirmed.php
index 068e0cf8da6c370061894fb7e54d113e2d59d846..420a0852c41cbb42d6ceec3076a51158223770f1 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -107,12 +107,18 @@ if (($listed === true) && (!empty($sql))) {
 
        // Do we have an entry?
        if (SQL_NUMROWS($result_master) == 1) {
-               // Mail order / bonus mail found!
+               // Mail order / bonus mail found
                $poolData = SQL_FETCHARRAY($result_master);
 
-               // Transfer data to constants for the template
-               if (($poolData['id'] > 0) && ($ID == '-1')) $ID = $poolData['id'];
-               if ($col == 'bonus_id') $poolData['sender'] = '0';
+               // If there is a pool id and $ID is not set, we take it
+               if (($poolData['id'] > 0) && ($ID == '-1')) {
+                       $ID = $poolData['id'];
+               } // END - if
+
+               // Bonus mails do always have a sender 'NULL'
+               if ($col == 'bonus_id') {
+                       $poolData['sender'] = null;
+               } // END - if
 
                // Load unconfirmed mail links. Hmmm, this select query is pretty cool
                // but it does only show unconfirmed mail links from existing user