From 5a76136d3ab00e158fc9d0ee1b867bc06f9a8fbb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 4 Mar 2009 04:13:25 +0000 Subject: [PATCH] Typos fixed, function IS_SQLS_INITIALIZED() added --- inc/databases.php | 2 +- inc/modules/admin/what-del_email.php | 4 ++-- inc/mysql-manager.php | 18 +++++++++++------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index c234f873ff..0921116be7 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -98,7 +98,7 @@ define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision //define('CURR_SVN_REVISION', getActualVersion(0)); -define('CURR_SVN_REVISION', "808"); +define('CURR_SVN_REVISION', "809"); define('CURR_SVN_DATE' , getActualVersion(1)); define('CURR_SVN_VERSION' , getActualVersion(2)); diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index 3b2e9fe47d..899eaeefa3 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -91,7 +91,7 @@ WHERE s.pool_id=%s LIMIT 1", $links = GET_TOTAL_DATA($stats_id, "user_links", "userid", "stats_id", true); // Reset sent mails for recipient(s) - REDUCT_RECIPIENT_RECEIVED_MAILS("stats_id", REQUEST_GET('mid'), $links); + REDUCED_RECIPIENT_RECEIVED_MAILS("stats_id", REQUEST_GET('mid'), $links); // Calc total points and pay them back $totalPoints = $links * $price; @@ -172,7 +172,7 @@ WHERE s.pool_id=%s LIMIT 1", list ($id, $subject, $url, $timestamp, $sent) = SQL_FETCHROW($result); // Reset sent mails for recipient(s) - REDUCT_RECIPIENT_RECEIVED_MAILS ("bonus_id", REQUEST_GET('bid'), $sent); + REDUCED_RECIPIENT_RECEIVED_MAILS("bonus_id", REQUEST_GET('bid'), $sent); // Init counter for deleted mails $cnt = 0; diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 781acb611c..f4f85cbc21 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -2085,7 +2085,7 @@ ORDER BY ur.refid ASC", } // Recuced the amount of received emails for the receipients for given email -function REDUCT_RECIPIENT_RECEIVED_MAILS ($column, $id, $count) { +function REDUCED_RECIPIENT_RECEIVED_MAILS ($column, $id, $count) { // Search for mail in database $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `%s`=%s ORDER BY `userid` ASC LIMIT %s", array($column, bigintval($id), $count), __FUNCTION__, __LINE__); @@ -2112,6 +2112,11 @@ function INIT_SQLS () { SET_SQLS(array()); } +// Checks wether the sqls array is initialized +function IS_SQLS_INITIALIZED () { + return ((isset($GLOBALS['sqls'])) && (is_array($GLOBALS['sqls']))); +} + // Setter for SQLs array function SET_SQLS ($SQLs) { $GLOBALS['sqls'] = (array) $SQLs; @@ -2138,9 +2143,9 @@ function COUNT_SQLS () { $count = false; // Is the array there? - if (isset($GLOBALS['sqls'])) { + if (IS_SQLS_INITIALIZED()) { // Then count it - $count = count($GLOBALS['sql']); + $count = count($GLOBALS['sqls']); } // END - if // Return it @@ -2150,10 +2155,9 @@ function COUNT_SQLS () { // Checks wether the SQLs array is filled function IS_SQLS_VALID () { return ( - (isset($GLOBALS['sqls'])) && - (is_array($GLOBALS['sqls'])) && - (COUNT_SQL() > 0) && - (!empty($GLOBALS['sqls'])) + (IS_SQLS_INITIALIZED()) && + (COUNT_SQLS() > 0) && + (!empty($GLOBALS['sqls'][0])) ); } -- 2.39.5