diff options
author | Bart van Bragt <bartvb@users.sourceforge.net> | 2001-11-27 17:59:27 +0000 |
---|---|---|
committer | Bart van Bragt <bartvb@users.sourceforge.net> | 2001-11-27 17:59:27 +0000 |
commit | fee3b81b60f8ce637e5d870e367eef4ee3009ec3 (patch) | |
tree | f3f70e6e7d213caceeeeba190af986c9ac6b301d | |
parent | 22dce9ec94f2b71b97ab05f9de1832f9e1b0096a (diff) | |
download | forums-fee3b81b60f8ce637e5d870e367eef4ee3009ec3.tar forums-fee3b81b60f8ce637e5d870e367eef4ee3009ec3.tar.gz forums-fee3b81b60f8ce637e5d870e367eef4ee3009ec3.tar.bz2 forums-fee3b81b60f8ce637e5d870e367eef4ee3009ec3.tar.xz forums-fee3b81b60f8ce637e5d870e367eef4ee3009ec3.zip |
Some mindboggeling ternary operators removed :D
git-svn-id: file:///svn/phpbb/trunk@1462 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/posting.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 05a17b4f08..7236e24de6 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1323,7 +1323,30 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error ) $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; - $path = ( isset($HTTP_SERVER_VARS['PATH_INFO']) ) ? ( dirname($HTTP_SERVER_VARS['PATH_INFO']) == "/") ? "" : dirname($HTTP_SERVER_VARS['PATH_INFO']) ) : ( (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") ? "" : dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) ); + if( isset($HTTP_SERVER_VARS['PATH_INFO'])) + { + if( dirname($HTTP_SERVER_VARS['PATH_INFO']) == "/") + { + $path = ""; + } + else + { + $path = dirname($HTTP_SERVER_VARS['PATH_INFO']); + } + } + else + { + if (dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) == "/") + { + $path = ""; + } + else + { + $path = dirname($HTTP_SERVER_VARS['SCRIPT_NAME']); + } + } + + $server_name = ( isset($HTTP_SERVER_VARS['HTTP_HOST']) ) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_SERVER_VARS['SERVER_NAME']; $protocol = ( !empty($HTTP_SERVER_VARS['HTTPS']) ) ? ( ( $HTTP_SERVER_VARS['HTTPS'] == "on" ) ? "https://" : "http://" ) : "http://"; |