inc/session.php is no longer needed.
authorRoland Haeder <roland@mxchange.org>
Thu, 17 Apr 2014 21:59:21 +0000 (23:59 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 17 Apr 2014 21:59:21 +0000 (23:59 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/filter-functions.php
inc/filters.php
inc/mysql-connect.php
inc/session-functions.php
inc/session.php

index c8e7458..939cd84 100644 (file)
@@ -101,6 +101,7 @@ ORDER BY
        registerFilter(__FUNCTION__, __LINE__, 'init', 'LOAD_CONFIGURATION');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_RANDOMIZER');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'LOAD_RUNTIME_INCLUDES');
+       registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_LANGUAGE');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_EXTENSIONS');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'INIT_SESSION');
        registerFilter(__FUNCTION__, __LINE__, 'init', 'SET_CURRENT_DATE');
index 5b3c05c..0cd2a06 100644 (file)
@@ -880,12 +880,18 @@ function FILTER_RUN_YEARLY_RESET () {
 // Filter for loading more runtime includes (not for installation)
 function FILTER_LOAD_RUNTIME_INCLUDES () {
        // Load more includes
-       foreach (array('databases', 'session') as $inc) {
+       foreach (array('databases') as $inc) {
                // Load the include
                loadIncludeOnce('inc/' . $inc . '.php');
        } // END - foreach
 }
 
+// Filter for initializing language by loading the language file
+function FILTER_INIT_LANGUAGE () {
+       // Load language file(s)
+       loadLanguageFile();
+}
+
 // Filter for checking admin ACL
 function FILTER_CHECK_ADMIN_ACL () {
        // Extension not installed so it's always allowed to access everywhere!
index 4a63618..3514b82 100644 (file)
@@ -132,8 +132,11 @@ if ((!isInstaller()) && (isInstalled())) {
        // Init message system
        initMessages();
 
+       // Init session
+       initSession();
+
        // Include more
-       foreach (array('databases', 'session', 'install-functions', 'load_config', 'load_cache') as $inc) {
+       foreach (array('databases', 'install-functions', 'load_config', 'load_cache') as $inc) {
                // Load include file
                loadIncludeOnce('inc/' . $inc . '.php');
        } // END - foreach
index 954d233..8f2ec9e 100644 (file)
@@ -184,5 +184,28 @@ function isSessionDataSet ($sessionData) {
        return $isset;
 }
 
+// Initializes session
+function initSession () {
+       //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CALLED!');
+
+       // Is ext-sql_patches there and newer?
+       if (isExtensionInstalledAndNewer('sql_patches', '0.5.3')) {
+               // Set session save path if set
+               if ((isConfigEntrySet('session_save_path')) && (getConfig('session_save_path') != '')) {
+                       // Please make sure this valid!
+                       session_save_path(getConfig('session_save_path'));
+               } // END - if
+       } // END - if
+
+       // Is a session id there?
+       if (!isValidSession()) {
+               // Start the session
+               $GLOBALS['valid_session']  = session_start();
+               $GLOBALS['isValidSession'] = TRUE;
+       } // END - if
+
+       //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'EXIT!');
+}
+
 // [EOF]
 ?>
index 355d773..f551ef4 100644 (file)
@@ -1,63 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/16/2004 *
- * ===================                          Last change: 11/23/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : session.php                                      *
- * -------------------------------------------------------------------- *
- * Short description : Session management                               *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Sitzungs-Management                              *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
- * For more information visit: http://mxchange.org                      *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       exit();
-} // END - if
-
-// Is ext-sql_patches there and newer?
-if (isExtensionInstalledAndNewer('sql_patches', '0.5.3')) {
-       // Set session save path if set
-       if ((isConfigEntrySet('session_save_path')) && (getConfig('session_save_path') != '')) {
-               // Please make sure this valid!
-               session_save_path(getConfig('session_save_path'));
-       } // END - if
-} // END - if
-
-// Is a session id there?
-if (!isValidSession()) {
-       // Start the session
-       $GLOBALS['valid_session']  = session_start();
-       $GLOBALS['isValidSession'] = TRUE;
-} // END - if
-
-// Load language file(s)
-loadLanguageFile();
-
-// [EOF]
+// @DEPRECATED
 ?>