Naming convention applied, ext-network menu resorted:
[mailer.git] / inc / modules / admin / what-list_unconfirmed.php
index 4a587650fef264db9ac372ae78d4a9823add474f..2049183e5b4ec41219d41602944e1ddeca1d2e8b 100644 (file)
@@ -135,10 +135,8 @@ LIMIT %s",
                                bigintval($poolData['max_rec'])
                        ),__FILE__, __LINE__);
 
-               // Total number of unconfirmed mails
-               $unconfirmed = SQL_NUMROWS($result);
-
-               if ($unconfirmed > 0) {
+               // Do we have entries?
+               if (SQL_NUMROWS($result) > 0) {
                        // At least one link left to confirm
                        $OUT = '';
                        while ($content = SQL_FETCHARRAY($result)) {
@@ -163,19 +161,19 @@ LIMIT %s",
 
                        // Render it in our new listing
                        $OUT = loadTemplate('admin_list_unconfirmed_list', true, $OUT);
-
-                       // Free memory
-                       SQL_FREERESULT($result);
                } else {
                        // All links are confirmed... strange, you shall normally not get a link to this place in this scenario... hmmm.
                        $OUT = loadTemplate('admin_settings_saved', true, '{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}');
                }
 
                // Prepare content
-               $content['unconfirmed'] = $unconfirmed;
+               $content['unconfirmed'] = SQL_NUMROWS($result);
                $content['timestamp']   = generateDateTime($poolData['timestamp'], 2);
                $content['rows']        = $OUT;
 
+               // Free memory
+               SQL_FREERESULT($result);
+
                // Load final template
                loadTemplate('admin_list_unconfirmed', false, $content);
        } elseif (getRequestParameter('mid') > 0) {