[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] CVS: squirrelmail/functions strings.php, 1.184.2.54,
From: Thijs Kinkhorst <kink () users ! sourceforge ! net>
Date: 2006-07-25 9:16:27
Message-ID: E1G5J1f-0004D8-Fo () sc8-pr-cvs8 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15728/functions
Modified Files:
Tag: SM-1_4-STABLE
strings.php
Log Message:
Make the base for the SquirrelMail URL configurable. Adds a new variable
config_base_location to config.php and a new option to conf.pl. This is
to prevent problems in installs where our heuristic doesn't work
correctly (#1521299, #1460675, #1110064, #1000850, #1113791).
This is a bugfix from devel.
Index: strings.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/strings.php,v
retrieving revision 1.184.2.54
retrieving revision 1.184.2.55
diff -u -w -r1.184.2.54 -r1.184.2.55
--- strings.php 4 Jul 2006 22:18:21 -0000 1.184.2.54
+++ strings.php 25 Jul 2006 09:16:24 -0000 1.184.2.55
@@ -258,17 +258,15 @@
*
* Determines the location to forward to, relative to your server.
* This is used in HTTP Location: redirects.
- * If this doesnt work correctly for you (although it should), you can
- * remove all this code except the last two lines, and have it return
- * the right URL for your site, something like:
- *
- * http://www.example.com/squirrelmail/
+ * If set, it uses $config_location_base as the first part of the URL,
+ * specifically, the protocol, hostname and port parts. The path is
+ * always autodetected.
*
* @return string the base url for this SquirrelMail installation
*/
function get_location () {
- global $imap_server_type;
+ global $imap_server_type, $config_location_base;
/* Get the path, handle virtual directories */
if(strpos(php_self(), '?')) {
@@ -277,9 +275,18 @@
$path = php_self();
}
$path = substr($path, 0, strrpos($path, '/'));
+
+ // proto+host+port are already set in config:
+ if ( !empty($config_location_base) ) {
+ // register it in the session just in case some plugin depends on this
+ sqsession_register($config_location_base . $path, 'sq_base_url');
+ return $config_location_base . $path ;
+ }
+ // we computed it before, get it from the session:
if ( sqgetGlobalVar('sq_base_url', $full_url, SQ_SESSION) ) {
return $full_url . $path;
}
+ // else: autodetect
/* Check if this is a HTTPS or regular HTTP request. */
$proto = 'http://';
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
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