SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Geoffrey T. D. <da...@us...> - 2001年10月29日 21:08:11
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv21829/lib
Modified Files:
	config.php 
Log Message:
Fixes based on SF Patch #471014. Detect when protocol is https rather than
http, and adjust SERVER_URL appropriately.
Index: config.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** config.php	2001年09月19日 19:16:27	1.43
--- config.php	2001年10月29日 21:08:09	1.44
***************
*** 145,152 ****
 if (!defined('SERVER_NAME')) define('SERVER_NAME', $HTTP_SERVER_VARS['SERVER_NAME']);
 if (!defined('SERVER_PORT')) define('SERVER_PORT', $HTTP_SERVER_VARS['SERVER_PORT']);
 if (!defined('SCRIPT_NAME')) define('SCRIPT_NAME', $HTTP_SERVER_VARS['SCRIPT_NAME']);
! if (!defined('DATA_PATH'))
! define('DATA_PATH', dirname(SCRIPT_NAME));
! if (!defined('USE_PATH_INFO'))
 {
 /*
--- 145,160 ----
 if (!defined('SERVER_NAME')) define('SERVER_NAME', $HTTP_SERVER_VARS['SERVER_NAME']);
 if (!defined('SERVER_PORT')) define('SERVER_PORT', $HTTP_SERVER_VARS['SERVER_PORT']);
+ if (!defined('SERVER_PROTOCOL')) {
+ if (empty($HTTP_SERVER_VARS['HTTPS']) || $HTTP_SERVER_VARS['HTTPS'] == 'off')
+ define('SERVER_PROTOCOL', 'http');
+ else
+ define('SERVER_PROTOCOL', 'https');
+ }
+ 
 if (!defined('SCRIPT_NAME')) define('SCRIPT_NAME', $HTTP_SERVER_VARS['SCRIPT_NAME']);
! 
! if (!defined('DATA_PATH')) define('DATA_PATH', dirname(SCRIPT_NAME));
! 
! if (!defined('USE_PATH_INFO'))
 {
 /*
***************
*** 218,227 ****
 }
 
! if (SERVER_PORT && SERVER_PORT != 80)
! define('SERVER_URL',
! "http://" . SERVER_NAME . ':' . SERVER_PORT);
! else
! define('SERVER_URL',
! "http://" . SERVER_NAME);
 
 if (VIRTUAL_PATH != SCRIPT_NAME)
--- 226,238 ----
 }
 
! if (SERVER_PORT
! && SERVER_PORT != (SERVER_PROTOCOL == 'https' ? 443 : 80)) {
! define('SERVER_URL',
! SERVER_PROTOCOL . "://" . SERVER_NAME . ':' . SERVER_PORT);
! }
! else {
! define('SERVER_URL',
! SERVER_PROTOCOL . "://" . SERVER_NAME);
! }
 
 if (VIRTUAL_PATH != SCRIPT_NAME)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /