Browse Source

A fix for my fix of src/src. Now all basename-deriving code is located in
functions/display_messages.php, so only one edit is needed.

graf25 23 years ago
parent
commit
32fc57c9ad
4 changed files with 16 additions and 4 deletions
  1. 4 1
      src/login.php
  2. 4 1
      src/redirect.php
  3. 4 1
      src/signout.php
  4. 4 1
      src/webmail.php

+ 4 - 1
src/login.php

@@ -69,7 +69,10 @@ set_up_language($squirrelmail_language, TRUE);
 /**
  * Find out the base URI to set cookies.
  */
-$base_uri = dirname(dirname($PHP_SELF)) . "/";
+if (!function_exists('sqm_baseuri')){
+    require_once('../functions/display_messages.php');
+}
+$base_uri = sqm_baseuri();
 @session_destroy();
 
 /*

+ 4 - 1
src/redirect.php

@@ -36,7 +36,10 @@ if (get_magic_quotes_gpc()) {
 
 /* Before starting the session, the base URI must be known. Assuming */
 /* that this file is in the src/ subdirectory (or something).        */
-$base_uri = dirname(dirname($PHP_SELF)) . "/";
+if (!function_exists('sqm_baseuri')){
+    require_once('../functions/display_messages.php');
+}
+$base_uri = sqm_baseuri();
 
 header('Pragma: no-cache');
 $location = get_location();

+ 4 - 1
src/signout.php

@@ -35,7 +35,10 @@ if (!isset($frame_top)) {
 /* If a user hits reload on the last page, $base_uri isn't set
  * because it was deleted with the session. */
 if (!isset($base_uri)) {
-    $base_uri = dirname(dirname($PHP_SELF)) . "/";
+    if (!function_exists('sqm_baseuri')){
+        require_once('../functions/display_messages.php');
+    }
+    $base_uri = sqm_baseuri();
 }
 
 do_hook('logout');

+ 4 - 1
src/webmail.php

@@ -21,7 +21,10 @@ require_once('../functions/plugin.php');
 require_once('../functions/i18n.php');
 require_once('../functions/auth.php');
 
-$base_uri = dirname(dirname($PHP_SELF)) . "/";
+if (!function_exists('sqm_baseuri')){
+    require_once('../functions/display_messages.php');
+}
+$base_uri = sqm_baseuri();
 
 session_start();
 is_logged_in();