|
From: Jon O. <jon...@us...> - 2006-09-17 11:08:21
|
Update of /cvsroot/mxbb/core/install In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17433/install Modified Files: mx_install.php Log Message: register globals fixes Index: mx_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install.php,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** mx_install.php 14 Sep 2006 20:08:15 -0000 1.72 --- mx_install.php 17 Sep 2006 11:08:17 -0000 1.73 *************** *** 73,76 **** --- 73,79 ---- include($mx_root_path . 'modules/mx_shared/ErrorHandler/prepend.php'); // For nice error output + // ================================================================================ + // The following code is based on common.php from phpBB + // ================================================================================ set_magic_quotes_runtime(0); // Disable magic_quotes_runtime *************** *** 79,83 **** // PHP5 with register_long_arrays off? ! if (@phpversion() >= '5.0.0' && (!ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; --- 82,86 ---- // PHP5 with register_long_arrays off? ! if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; *************** *** 115,119 **** // is not an array, it will actually fail. So we check if // HTTP_SESSION_VARS has been initialised. ! if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS)) { $HTTP_SESSION_VARS = array(); --- 118,122 ---- // is not an array, it will actually fail. So we check if // HTTP_SESSION_VARS has been initialised. ! if (!isset($HTTP_SESSION_VARS) || !is_array($HTTP_SESSION_VARS)) { $HTTP_SESSION_VARS = array(); *************** *** 125,130 **** // Note! Since array_merge() destroys numerical keys - if the array is numerically indexed, the keys get reindexed in a continuous way - we use the + operator instead // ! //$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! $input = $HTTP_GET_VARS + $HTTP_POST_VARS + $HTTP_COOKIE_VARS + $HTTP_SERVER_VARS + $HTTP_SESSION_VARS + $HTTP_ENV_VARS + $HTTP_POST_FILES; unset($input['input']); --- 128,133 ---- // Note! Since array_merge() destroys numerical keys - if the array is numerically indexed, the keys get reindexed in a continuous way - we use the + operator instead // ! $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! //$input = $HTTP_GET_VARS + $HTTP_POST_VARS + $HTTP_COOKIE_VARS + $HTTP_SERVER_VARS + $HTTP_SESSION_VARS + $HTTP_ENV_VARS + $HTTP_POST_FILES; unset($input['input']); *************** *** 139,143 **** unset($$var); } - unset($input); } --- 142,145 ---- *************** *** 274,282 **** // ------------------------------ - // ================================================================================ // HERE BEGINS THE PARTY... // ================================================================================ - $phpEx = substr(strrchr(__FILE__, '.'), 1); --- 276,282 ---- *************** *** 289,293 **** $process_errors = 0; - // // Send file -------------------------------------------------- --- 289,292 ---- *************** *** 307,311 **** } - // // phpInfo -------------------------------------------------- --- 306,309 ---- *************** *** 364,368 **** include($mx_root_path . "language/lang_$language/lang_admin.$phpEx"); - // // Do install -------------------------------------------------- --- 362,365 ---- |