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") {
// 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
// Initializes some variables
$cat = '';
$DATA = '';
- $PROBLEM = '{--GENERAL_MAIL_PROBLEM--}';
+ $PROBLEM = '{--ADMIN_GENERAL_MAIL_PROBLEM--}';
$result_data = false; // Closes Bug #58
// Load data from stats table...
break;
} // END - switch
+ // Do we have an entry?
if (SQL_NUMROWS($result_data) == 1) {
// Mail was found!
$content = SQL_FETCHARRAY($result_data);
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);
}