X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fsponsor_functions.php;h=fac07ce8cad9b34676fd8cfd024998f98b6b109c;hp=6c5dc2fd3e2497da648b1856fc5b3bcb234a60fb;hb=c3b4eaf29946349ff058691db2dcb615a5379bb2;hpb=f34c00b4a31f6747e78c6cf88801888d1e84a123 diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 6c5dc2fd3e..fac07ce8ca 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -216,7 +216,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray=array(), return $ret; } -// +// Translate the account status function sponsorTranslateUserStatus ($status) { // Construct constant name $constantName = sprintf("ACCOUNT_STATUS_%s", $status); @@ -229,7 +229,7 @@ function sponsorTranslateUserStatus ($status) { // Not found! //* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); - $ret = getMaskedMessage('ACCOUNT_STATUS_UNKNOWN_STATUS', $status); + $ret = getMaskedMessage('ACCOUNT_STATUS_UNKNOWN', $status); } // Return status @@ -370,7 +370,7 @@ LIMIT 1", ), __FUNCTION__, __LINE__); // This update went fine? - $login = (SQL_AFFECTEDROWS() == 1); + $login = (!SQL_HASZEROAFFECTED()); } // END - if // Return status @@ -473,7 +473,7 @@ function saveSponsorData ($postData, $content) { } // END - switch // Has an entry updated? - if (SQL_AFFECTEDROWS() == 1) { + if (!SQL_HASZEROAFFECTED()) { // Template and subject are set? if (!empty($templ) && !empty($subj)) { // Run SQL command and check for success @@ -696,10 +696,10 @@ function fetchSponsorData ($sponsor_id, $column = 'id') { if (isset($GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure'])) { // Backup the raw one and zero it $GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure_raw'] = $GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure']; - $GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure'] = '0'; + $GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure'] = null; // Is it not zero? - if ($GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure_raw'] != '0000-00-00 00:00:00') { + if (!is_null($GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure_raw'])) { // Seperate data/time $array = explode(' ', $GLOBALS['sponsor_data'][getCurrentSponsorId()]['last_failure_raw']);