[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/functions strings.php,1.189,1.190
From:       "Seth E. Randall" <indiri69 () users ! sourceforge ! net>
Date:       2003-07-29 21:29:40
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv16703

Modified Files:
	strings.php 
Log Message:
A forward slash can appear in query of a string, so find the start of a query first.

Index: strings.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/strings.php,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -w -r1.189 -r1.190
--- strings.php	23 Jul 2003 11:23:53 -0000	1.189
+++ strings.php	29 Jul 2003 21:29:38 -0000	1.190
@@ -12,7 +12,6 @@
  * $Id$
  */
 
-
 /**
  * SquirrelMail version number -- DO NOT CHANGE
  */
@@ -26,7 +25,6 @@
 global $SQM_INTERNAL_VERSION;
 $SQM_INTERNAL_VERSION = array(1,5,0);
 
-
 /**
  * There can be a circular issue with includes, where the $version string is
  * referenced by the include of global.php, etc. before it's defined.
@@ -178,8 +176,12 @@
     global $imap_server_type;
 
     /* Get the path, handle virtual directories */
-    $path = substr(php_self(), 0, strrpos(php_self(), '/'));
-
+    if(strpos(php_self(), '?')) {
+        $path = substr(php_self(), 0, strpos(php_self(), '?'));
+    } else {
+        $path = php_self();
+    }
+    $path = substr($path, 0, strrpos($path, '/'));
     if ( sqgetGlobalVar('sq_base_url', $full_url, SQ_SESSION) ) {
       return $full_url . $path;
     }
@@ -453,11 +455,10 @@
     }
     $buffer = ob_get_contents(); // Grab the print_r output
     ob_end_clean();  // Silently discard the output & stop buffering
-    print "<pre>";
+    print '<pre>';
     print htmlentities($buffer);
-    print "</pre>";
+    print '</pre>';
 }
 
 $PHP_SELF = php_self();
-
 ?>



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic