swap in the sqgetGlobalVar function
authorebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 4 Jan 2003 04:15:37 +0000 (04:15 +0000)
committerebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 4 Jan 2003 04:15:37 +0000 (04:15 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4371 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/page_header.php
functions/prefs.php

index a040b265893e79a02e27d55e69c9d0a57e8fa2fc..00c26d4f2f728365ebd698d5f539b67a0830dc3b 100644 (file)
@@ -19,13 +19,7 @@ require_once(SM_PATH . 'functions/global.php');
 /* Always set up the language before calling these functions */
 function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
 
-    if ( !check_php_version(4,1) ) {
-            global $_SESSION;
-    }
-    if (isset($_SESSION['base_uri'])) {
-        $base_uri = $_SESSION['base_uri'];
-    }
-    else {
+    if ( !sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) {
         global $base_uri;
     }
     global $theme_css, $custom_css;
@@ -68,11 +62,7 @@ ECHO;
 
 
 function displayInternalLink($path, $text, $target='') {
-    if ( !check_php_version(4,1) ) {
-            global $_SESSION;
-    }
-
-    $base_uri = $_SESSION['base_uri']; 
+    sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
     if ($target != '') {
         $target = " target=\"$target\"";
     }
@@ -85,12 +75,8 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
            $compose_new_win, $compose_width, $compose_height,
            $attachemessages, $provider_name, $provider_uri;
 
-    if ( !check_php_version(4,1) ) {
-            global $_SESSION;
-    }
-
-    $base_uri = $_SESSION['base_uri'];
-    $delimiter = $_SESSION['delimiter'];
+    sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION );
+    sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION );
     $module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 );
     if ($qmark = strpos($module, '?')) {
         $module = substr($module, 0, $qmark);
index 63bae5ca749d652efd19f6d3ef4083b316fe42dd..47e854f2cd72dcb13f1bc7cd680b35812bf1e06b 100644 (file)
 
 require_once(SM_PATH . 'functions/global.php');
 
-if (isset($_SESSION['prefs_cache'])) {
-    $prefs_cache = $_SESSION['prefs_cache'];
-}
-if (isset($_SESSION['prefs_are_cached'])) {
-    $prefs_are_cached = $_SESSION['prefs_are_cached'];
-}
+sqgetGlobalVar('prefs_cache', $prefs_cache, SQ_SESSION );
+sqgetGlobalVar('prefs_are_cached', $prefs_are_cached, SQ_SESSION );
 
 $rg = ini_get('register_globals');