// 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));
$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;
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;
}
// 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__);
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;
$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
// 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]))
);
}