]> git.mxchange.org Git - mailer.git/commitdiff
Minor rewrites/fixes
authorRoland Häder <roland@mxchange.org>
Thu, 16 Sep 2010 22:26:05 +0000 (22:26 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Sep 2010 22:26:05 +0000 (22:26 +0000)
inc/libs/sponsor_functions.php
inc/libs/theme_functions.php
inc/modules/sponsor/logout.php
inc/modules/sponsor/welcome.php
templates/de/html/sponsor/sponsor_welcome.tpl

index cd3c7922cc29e3b87a79d846f6e89566ebb8d651..6c5dc2fd3e2497da648b1856fc5b3bcb234a60fb 100644 (file)
@@ -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
index 2a342d0146c93d50facd59eff070e69630fc0b97..01339ea1d06165f5cd149570d664086bdc6f0d05 100644 (file)
@@ -264,9 +264,12 @@ function getActualTheme () {
        return $ret;
 }
 
-// Setter for theme in session
+/**
+ * Setter for theme in session (This setter does return the success of
+ * setSession() which is required e.g. for destroySponsorSession().
+ */
 function setTheme ($newTheme) {
-       setSession('mxchange_theme', $newTheme);
+       return setSession('mxchange_theme', $newTheme);
 }
 
 // Get id from theme
index cc3745ce1e1404d09d881e54de9460d6fee7b646..55f14157751af067c57165d4ff5e04b4cd0006da 100644 (file)
@@ -50,9 +50,6 @@ if (!defined('__SECURITY')) {
 $url = 'modules.php?module=index&amp;code=';
 
 if (destroySponsorSession()) {
-       // Remove theme cookie as well
-       if (isExtensionActive('theme')) setTheme('');
-
        // Logout completed
        $url .= getCode('LOGOUT_DONE');
 } else {
index b0f6d7f6098d68f2b7ff9ddf1c6d77373fe2143b..35765de3ecce751b5bf5b2c7d959ac9d9d95a3dd 100644 (file)
@@ -53,12 +53,10 @@ $result = SQL_QUERY_ESC("SELECT
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
 WHERE
-       `id`=%s AND
-       `password`='%s'
+       `id`=%s
 LIMIT 1",
        array(
-               bigintval(getSession('sponsor_id')),
-               getSession('sponsorpass')
+               bigintval(getSession('sponsor_id'))
        ), __FILE__, __LINE__);
 
 // Fetch data
index dc214fed8fb38e75e579f49c60cd2665e2d4a275..365a5c00b19d35351912159190c35e01768b91e4 100644 (file)
@@ -3,7 +3,7 @@
 </div>
 
 <div class="para">
-       Sch&ouml;n, dass wir Sie wieder in unserem Sponsorenbereich begr&uuml;ssen d&uuml;rfen!
+       Sch&ouml;n, dass wir Sie in unserem Sponsorenbereich begr&uuml;ssen d&uuml;rfen!
 </div>
 
 <div class="para">