]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_links.php
Removed comment introduced by Profi-Concept, this comment should fine (in a much...
[mailer.git] / inc / modules / admin / what-list_links.php
index fbed1deafaa4537c5271b83ede7ed4ee01c3ee4e..394508fa856d1443ed1ae92348b8f4e247173f7d 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -65,18 +63,16 @@ if (isGetRequestParameterSet('userid')) {
                                array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
                }
 
-               // Get number of rows from the query
-               $nums = SQL_NUMROWS($result);
-
-               if ($nums > 0) {
+               // Do we have some entries?
+               if (SQL_NUMROWS($result) > 0) {
                        // Some unconfirmed mails left
-                       if (getRequestParameter('del') == "all") {
+                       if (getRequestParameter('delete') == "all") {
                                // Delete all unconfirmed mails by this user
                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s LIMIT %s",
-                                       array(bigintval(getRequestParameter('userid')), $nums), __FILE__, __LINE__);
+                                       array(bigintval(getRequestParameter('userid')), SQL_NUMROWS($result)), __FILE__, __LINE__);
 
                                // Prepare mail and send it away
-                               $message = loadEmailTemplate('admin-del_links', $nums, bigintval(getRequestParameter('userid')));
+                               $message = loadEmailTemplate('admin-del_links', SQL_NUMROWS($result), bigintval(getRequestParameter('userid')));
                                sendEmail(getUserData('email'), '{--ADMIN_DELETE_LINK_SUBJECT--}', $message);
 
                                // Display message
@@ -117,6 +113,7 @@ if (isGetRequestParameterSet('userid')) {
                                                        break;
                                        } // END - switch
 
+                                       // Do we have an entry?
                                        if (SQL_NUMROWS($result_data) == 1) {
                                                // Mail was found!
                                                $content = SQL_FETCHARRAY($result_data);
@@ -148,17 +145,17 @@ if (isGetRequestParameterSet('userid')) {
                                        SQL_FREERESULT($result_data);
                                } // END - while
 
-                               // Free memory
-                               SQL_FREERESULT($result);
-
                                // Remember list in constant for the template
                                $content['surname'] = getUserData('surname');
                                $content['family']  = getUserData('family');
                                $content['email']   = '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . getUserData('email') . '</a>';
                                $content['rows']    = $OUT;
-                               $content['nums']    = $nums;
+                               $content['nums']    = SQL_NUMROWS($result);
                                $content['userid']  = bigintval(getRequestParameter('userid'));
 
+                               // Free memory
+                               SQL_FREERESULT($result);
+
                                // Load final template
                                loadTemplate('admin_list_links', false, $content);
                        }