]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
Renamed function so it might be more understandable
[mailer.git] / inc / libs / theme_functions.php
index a6f61c9a37c86015b5dbd4c8d1d098cb76fe45e8..01339ea1d06165f5cd149570d664086bdc6f0d05 100644 (file)
@@ -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                    *
@@ -66,13 +64,13 @@ function generateThemeSelectionBox () {
        if (isAdmin()) $add = '';
 
        // Select all themes we want
-       $result = SQL_QUERY("SELECT
+       $result = SQL_QUERY('SELECT
        `theme_path`, `theme_name`
 FROM
        `{?_MYSQL_PREFIX?}_themes`
-".$add."
+' . $add . '
 ORDER BY
-       `theme_name` ASC", __FUNCTION__, __LINE__);
+       `theme_name` ASC', __FUNCTION__, __LINE__);
 
        // Load all themes
        while ($content = SQL_FETCHARRAY($result)) {
@@ -242,7 +240,7 @@ function getActualTheme () {
                        // Fix it to default
                        $ret = 'default';
                } // END - if
-       } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) {
+       } elseif ((!isInstalled()) && ((isInstalling()) || (isHtmlOutputMode())) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) {
                // Prepare filename for checking
                $themeFile = sprintf("theme/%s/theme.php", getRequestParameter('theme'));
 
@@ -266,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
@@ -302,9 +303,9 @@ function getThemeId ($name) {
        return $id;
 }
 
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
 //                              Only filter functions
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
 
 // Filter for generic handling of theme change
 function FILTER_HANDLE_THEME_CHANGE () {