+// 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
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Initializing session ...');
+ $GLOBALS['valid_session'] = session_start();
+ $GLOBALS['isValidSession'] = TRUE;
+
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'session_id=' . session_id());
+ } // END - if
+
+ //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'EXIT!');
+}
+