From c3943f3687773d442318a46e07d652019f0d178e Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 4 Nov 2007 11:25:45 +1300 Subject: [PATCH] Slightly tweak the protocol_server_port to account for / --- inc/always.php | 4 +++- inc/always.php.in | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/always.php b/inc/always.php index ec84dc08..4225ac4e 100644 --- a/inc/always.php +++ b/inc/always.php @@ -49,7 +49,9 @@ $c->protocol_server_port_script = sprintf( "%s://%s%s%s", (isset($_SERVER['HTTPS ? '' : ':'.$_SERVER['SERVER_PORT'] ), - $_SERVER['SCRIPT_NAME'] ); + ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']) ); + +$c->protocol_server_port_script = ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']); init_gettext( 'rscds', '../locale' ); diff --git a/inc/always.php.in b/inc/always.php.in index 75d207fd..588a5fa8 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -49,7 +49,9 @@ $c->protocol_server_port_script = sprintf( "%s://%s%s%s", (isset($_SERVER['HTTPS ? '' : ':'.$_SERVER['SERVER_PORT'] ), - $_SERVER['SCRIPT_NAME'] ); + ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']) ); + +$c->protocol_server_port_script = ($_SERVER['SCRIPT_NAME'] == '/index.php' ? '' : $_SERVER['SCRIPT_NAME']); init_gettext( 'rscds', '../locale' );