X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsponsor_functions.php;h=ea4a23b0396445742a888cdf416938ff935b412e;hb=62d8f6d89c35bebe15b8f716a5629f14d95f3078;hp=6a5dce2f34d0aaa4a47aa0510950de779e3edc6a;hpb=c9f84db108bccc6368d658a74a9f9c43d2851286;p=mailer.git diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 6a5dce2f34..ea4a23b039 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -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 * @@ -229,7 +227,7 @@ function sponsorTranslateUserStatus ($status) { $ret = getMessage($constantName); } else { // Not found! - /* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); + //* 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); } @@ -372,7 +370,7 @@ LIMIT 1", ), __FUNCTION__, __LINE__); // This update went fine? - $login = (SQL_AFFECTEDROWS() == 1); + $login = (!SQL_HASZEROAFFECTED()); } // END - if // Return status @@ -385,8 +383,8 @@ function saveSponsorData ($postData, $content) { // Unsecure data which we don't want $UNSAFE = array('password', 'id', 'remote_addr', 'sponsor_created', 'last_online', 'status', 'ref_count', - 'points_amount', 'points_used', 'refid', 'hash', 'last_pay', 'last_curr', 'pass_old', - 'ok', 'pass1', 'pass2'); + 'points_amount', 'points_used', 'refid', 'hash', 'last_payment', 'last_currency', + 'pass_old', 'ok', 'pass1', 'pass2'); // Set default message ("not saved") $message = '{--SPONSOR_ACCOUNT_DATA_NOT_SAVED--}'; @@ -475,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 @@ -610,7 +608,7 @@ function doProcessSponsorFormRequest ($messageArray = array()) { $message = getMaskedMessage('SPONSOR_UNKNOWN_STATUS', $status); } break; - } + } // END - switch // Return message return $message; @@ -837,7 +835,14 @@ function determineSponsorCountry ($sponsor_id) { // Destroy sponsor session function destroySponsorSession () { // Remove all user data from session - return ((setSession('sponsor_id', '')) && (setSession('sponsor_pass', ''))); + return ( + (setSession('sponsor_id', '')) && + (setSession('sponsor_pass', '')) && + ( + ((isExtensionActive('theme')) && (setTheme(''))) || + (!isExtensionActive('theme')) + ) + ); } // Getter for sponsor_min_points