Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv16260/lib
Modified Files:
Tag: release-1_2-branch
config.php
Log Message:
Fixes based on SF patch #479769:
Sse https: rather than http: in the autogenerated $ScriptUrl when
mod_ssl is in use.
Index: config.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v
retrieving revision 1.24.2.4
retrieving revision 1.24.2.5
diff -C2 -r1.24.2.4 -r1.24.2.5
*** config.php 2001/11/07 03:23:20 1.24.2.4
--- config.php 2001/11/08 22:39:26 1.24.2.5
***************
*** 248,255 ****
//////////////////////////////////////////////////////////////////////
// you shouldn't have to edit anyting below this line
if (empty($ScriptUrl)) {
! $port = ($SERVER_PORT == 80) ? '' : ":$SERVER_PORT";
! $ScriptUrl = "http://$SERVER_NAME$port$SCRIPT_NAME";
}
if (defined('WIKI_ADMIN') && !empty($AdminUrl))
--- 248,267 ----
//////////////////////////////////////////////////////////////////////
// you shouldn't have to edit anyting below this line
+ function compute_default_scripturl() {
+ global $SERVER_PORT, $SERVER_NAME, $SCRIPT_NAME, $HTTPS;
+ if (!empty($HTTPS) && $HTTPS != 'off') {
+ $proto = 'https';
+ $dflt_port = 443;
+ }
+ else {
+ $proto = 'http';
+ $dflt_port = 80;
+ }
+ $port = ($SERVER_PORT == $dflt_port) ? '' : ":$SERVER_PORT";
+ return $proto . '://' . $SERVER_NAME . $port . $SCRIPT_NAME;
+ }
if (empty($ScriptUrl)) {
! $ScriptUrl = compute_default_scripturl();
}
if (defined('WIKI_ADMIN') && !empty($AdminUrl))
|