]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-themes.php
Fixes for chk_login when no ext-theme is installed
[mailer.git] / inc / modules / member / what-themes.php
index 51ffcb580bae907891930b97176501c946bc00fc..45194c5b2fae095abc0010cebb8ed172b7983de2 100644 (file)
@@ -53,7 +53,7 @@ ADD_DESCR('member', __FILE__);
 if (REQUEST_ISSET_POST(('member_theme'))) {
        // Save theme to member's profile
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
-       array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__);
+               array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__);
 
        // Set new theme for guests
        $newTheme = SQL_ESCAPE(REQUEST_POST('member_theme'));
@@ -95,6 +95,9 @@ while ($entry = readdir($handle)) {
        } // END - if
 } // END - while
 
+// Remove last theme data
+unset($GLOBALS['theme_data']);
+
 // Close directory
 closedir($handle);
 
@@ -122,7 +125,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) {
   <td class=\"switch_sw".$SW." bottom2\" align=\"center\">v".$THEMES['theme_ver'][$key]."</td>
 </tr>\n";
        $SW = 3 - $SW;
-}
+} // END - foreach
 
 if (empty($OUT)) {
        // No themes found???
@@ -131,7 +134,7 @@ if (empty($OUT)) {
     ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_THEMES_FOUND'))."
   </td>
 </tr>\n";
-}
+} // END - if
 define('__THEME_LIST', $OUT);
 
 // Load template