]> 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 a400f4916f1eda92f12b9bee6cca19d76e143bfa..420a0852c41cbb42d6ceec3076a51158223770f1 100644 (file)
@@ -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