]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Dependencies added (required)
[mailer.git] / inc / libs / sponsor_functions.php
index cd3c7922cc29e3b87a79d846f6e89566ebb8d651..ea4a23b0396445742a888cdf416938ff935b412e 100644 (file)
@@ -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
@@ -835,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