|
From: MW <jo...@us...> - 2008-02-09 19:46:07
|
Update of /cvsroot/mxbb/core/install In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11661/install Modified Files: mx_install.php Log Message: Upgrading old type $HTML_*_VARS Index: mx_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install.php,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** mx_install.php 9 Feb 2008 12:48:16 -0000 1.88 --- mx_install.php 9 Feb 2008 19:46:04 -0000 1.89 *************** *** 195,199 **** // Protect against GLOBALS tricks ! if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS'])) { die("Hacking attempt"); --- 195,199 ---- // Protect against GLOBALS tricks ! if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($_COOKIE['GLOBALS'])) { die("Hacking attempt"); *************** *** 480,484 **** $board_email = $mx_request_vars->post('board_email', MX_TYPE_NO_TAGS); ! $script_path = !$mx_request_vars->is_empty_post('script_path') ? $mx_request_vars->post('script_path', MX_TYPE_NO_TAGS) : str_replace('install', '', dirname($HTTP_SERVER_VARS['PHP_SELF'])); if (!$mx_request_vars->is_empty_post('server_name')) --- 480,484 ---- $board_email = $mx_request_vars->post('board_email', MX_TYPE_NO_TAGS); ! $script_path = !$mx_request_vars->is_empty_post('script_path') ? $mx_request_vars->post('script_path', MX_TYPE_NO_TAGS) : str_replace('install', '', dirname($_SERVER['PHP_SELF'])); if (!$mx_request_vars->is_empty_post('server_name')) *************** *** 489,499 **** { // Guess at some basic info used for install.. ! if (!empty($HTTP_SERVER_VARS['SERVER_NAME']) || !empty($HTTP_ENV_VARS['SERVER_NAME'])) { ! $server_name = (!empty($HTTP_SERVER_VARS['SERVER_NAME'])) ? $HTTP_SERVER_VARS['SERVER_NAME'] : $HTTP_ENV_VARS['SERVER_NAME']; } ! else if (!empty($HTTP_SERVER_VARS['HTTP_HOST']) || !empty($HTTP_ENV_VARS['HTTP_HOST'])) { ! $server_name = (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : $HTTP_ENV_VARS['HTTP_HOST']; } else --- 489,499 ---- { // Guess at some basic info used for install.. ! if (!empty($_SERVER['SERVER_NAME']) || !empty($_ENV['SERVER_NAME'])) { ! $server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $_ENV['SERVER_NAME']; } ! else if (!empty($_SERVER['HTTP_HOST']) || !empty($_ENV['HTTP_HOST'])) { ! $server_name = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : $_ENV['HTTP_HOST']; } else *************** *** 509,515 **** else { ! if (!empty($HTTP_SERVER_VARS['SERVER_PORT']) || !empty($HTTP_ENV_VARS['SERVER_PORT'])) { ! $server_port = (!empty($HTTP_SERVER_VARS['SERVER_PORT'])) ? $HTTP_SERVER_VARS['SERVER_PORT'] : $HTTP_ENV_VARS['SERVER_PORT']; } else --- 509,515 ---- else { ! if (!empty($_SERVER['SERVER_PORT']) || !empty($_ENV['SERVER_PORT'])) { ! $server_port = (!empty($_SERVER['SERVER_PORT'])) ? $_SERVER['SERVER_PORT'] : $_ENV['SERVER_PORT']; } else *************** *** 952,958 **** // Get the current document root. // ! if( isset($HTTP_SERVER_VARS['DOCUMENT_ROOT']) ) { ! $document_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; } elseif( isset($DOCUMENT_ROOT) ) --- 952,958 ---- // Get the current document root. // ! if( isset($_SERVER['DOCUMENT_ROOT']) ) { ! $document_root = $_SERVER['DOCUMENT_ROOT']; } elseif( isset($DOCUMENT_ROOT) ) *************** *** 1034,1043 **** // Get the current Server URL. // ! $server_url = ( $HTTP_SERVER_VARS['SERVER_PORT'] == 443 ? 'https' : 'http' ) . '://' . $HTTP_SERVER_VARS['HTTP_HOST']; // // Get the MX-Publisher Path in the URL (this might not be the same as the base path when using aliases). // ! $mx_self_path = substr($HTTP_SERVER_VARS['PHP_SELF'], 0, -strlen('install/'.basename(__FILE__))); // --- 1034,1043 ---- // Get the current Server URL. // ! $server_url = ( $_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http' ) . '://' . $_SERVER['HTTP_HOST']; // // Get the MX-Publisher Path in the URL (this might not be the same as the base path when using aliases). // ! $mx_self_path = substr($_SERVER['PHP_SELF'], 0, -strlen('install/'.basename(__FILE__))); // *************** *** 1055,1059 **** array('mxBB Root Path', $mx_base_path), array('Website URL', $server_url), ! array('PHP SELF', $HTTP_SERVER_VARS['PHP_SELF']), array('mxBB URL Path', $mx_self_path), array('Portal URL', $portal_url), --- 1055,1059 ---- array('mxBB Root Path', $mx_base_path), array('Website URL', $server_url), ! array('PHP SELF', $_SERVER['PHP_SELF']), array('mxBB URL Path', $mx_self_path), array('Portal URL', $portal_url), |