|
From: MW <jo...@us...> - 2008-02-09 12:48:20
|
Update of /cvsroot/mxbb/core/install In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28355/install Modified Files: mx_install.php Log Message: part of project wide change of using request_vars wrapper class instead of explicite and unfiltered $HTML_*_VARS Index: mx_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/mx_install.php,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** mx_install.php 9 Feb 2008 00:35:52 -0000 1.87 --- mx_install.php 9 Feb 2008 12:48:16 -0000 1.88 *************** *** 398,402 **** // Send file -------------------------------------------------- // ! if ( isset($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1 ) { header( "Content-Type: text/x-delimtext; name=\"config.$phpEx\"" ); --- 398,402 ---- // Send file -------------------------------------------------- // ! if ($mx_request_vars->post('send_file', MX_TYPE_INT) == 1 ) { header( "Content-Type: text/x-delimtext; name=\"config.$phpEx\"" ); *************** *** 405,412 **** // We need to stripslashes no matter what the setting of magic_quotes_gpc is // because we add slahes at the top if its off, and they are added automaticlly ! // if it is on. ! $HTTP_POST_VARS['config_data'] = stripslashes( $HTTP_POST_VARS['config_data'] ); ! echo $HTTP_POST_VARS['config_data']; exit; } --- 405,411 ---- // We need to stripslashes no matter what the setting of magic_quotes_gpc is // because we add slahes at the top if its off, and they are added automaticlly ! // if it is on. $mx_request_vars->post strips slashes ! echo $mx_request_vars->post('config_data', MX_TYPE_NO_TAGS); exit; } *************** *** 415,419 **** // phpInfo -------------------------------------------------- // ! if ( isset($HTTP_GET_VARS['phpinfo']) ) { show_phpinfo(); --- 414,418 ---- // phpInfo -------------------------------------------------- // ! if ($mx_request_vars->is_get('phpinfo') ) { show_phpinfo(); *************** *** 424,428 **** // Load the installation language // ! $language = ( isset($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : ( isset($HTTP_GET_VARS['language']) ? $HTTP_GET_VARS['language'] : '' ) ); $language = ( preg_match('#^[a-z_]+$#', $language) ? strip_tags($language) : '' ); --- 423,427 ---- // Load the installation language // ! $language = $mx_request_vars->request('language', MX_TYPE_NO_TAGS); $language = ( preg_match('#^[a-z_]+$#', $language) ? strip_tags($language) : '' ); *************** *** 480,489 **** } ! $board_email = (!empty($HTTP_POST_VARS['board_email'])) ? $HTTP_POST_VARS['board_email'] : ''; ! $script_path = (!empty($HTTP_POST_VARS['script_path'])) ? $HTTP_POST_VARS['script_path'] : str_replace('install', '', dirname($HTTP_SERVER_VARS['PHP_SELF'])); ! if (!empty($HTTP_POST_VARS['server_name'])) { ! $server_name = $HTTP_POST_VARS['server_name']; } else --- 479,488 ---- } ! $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')) { ! $server_name = $mx_request_vars->post('server_name', MX_TYPE_NO_TAGS); } else *************** *** 504,510 **** } ! if (!empty($HTTP_POST_VARS['server_port'])) { ! $server_port = $HTTP_POST_VARS['server_port']; } else --- 503,509 ---- } ! if (!$mx_request_vars->is_empty_post('server_port')) { ! $server_port = $mx_request_vars->post('server_port', MX_TYPE_NO_TAGS); } else *************** *** 523,531 **** // Do install -------------------------------------------------- // ! $confirm = ( isset($HTTP_POST_VARS['confirm']) || isset($HTTP_GET_VARS['confirm']) ) && !isset($HTTP_POST_VARS['debug']); if( $confirm ) { ! $install_mode = ( isset($HTTP_POST_VARS['install_mode']) ? $HTTP_POST_VARS['install_mode'] : ( isset($HTTP_GET_VARS['install_mode']) ? $HTTP_GET_VARS['install_mode'] : '' ) ); $install_mode = ( preg_match('#^[a-z_]+$#', $install_mode) ? strip_tags($install_mode) : '' ); --- 522,530 ---- // Do install -------------------------------------------------- // ! $confirm = $mx_request_vars->is_request('confirm') && !$mx_request_vars->is_post('debug'); if( $confirm ) { ! $install_mode = $mx_request_vars->request('install_mode', MX_TYPE_NO_TAGS); $install_mode = ( preg_match('#^[a-z_]+$#', $install_mode) ? strip_tags($install_mode) : '' ); *************** *** 536,552 **** case 'install': ! if ($HTTP_POST_VARS['mxbb']) { ! $portal_url = ( !empty($HTTP_POST_VARS['portal_url']) ? $HTTP_POST_VARS['portal_url'] : '' ); ! $phpbb_path = ( !empty($HTTP_POST_VARS['phpbb_path']) ? $HTTP_POST_VARS['phpbb_path'] : '' ); ! //$phpbb_url = ( !empty($HTTP_POST_VARS['phpbb_url']) ? $HTTP_POST_VARS['phpbb_url'] : '' ); ! $dbms = ( isset($HTTP_POST_VARS['dbms_mxbb']) ? $HTTP_POST_VARS['dbms_mxbb'] : '' ); ! $dbhost = ( !empty($HTTP_POST_VARS['dbhost_mxbb']) ? $HTTP_POST_VARS['dbhost_mxbb'] : '' ); ! $dbname = ( !empty($HTTP_POST_VARS['dbname_mxbb']) ? $HTTP_POST_VARS['dbname_mxbb'] : '' ); ! $dbuser = ( !empty($HTTP_POST_VARS['dbuser_mxbb']) ? $HTTP_POST_VARS['dbuser_mxbb'] : '' ); ! $dbpasswd = ( !empty($HTTP_POST_VARS['dbpasswd_mxbb']) ? $HTTP_POST_VARS['dbpasswd_mxbb'] : '' ); ! //$table_prefix = ( !empty($HTTP_POST_VARS['prefix']) ? $HTTP_POST_VARS['prefix'] : '' ); ! $mx_table_prefix = ( !empty($HTTP_POST_VARS['mx_prefix']) ? $HTTP_POST_VARS['mx_prefix'] : '' ); ! //$acm_type = ( isset($HTTP_POST_VARS['acm_type']) ? $HTTP_POST_VARS['acm_type'] : '' ); $portal_backend = 'internal'; --- 535,551 ---- case 'install': ! if ($mx_request_vars->is_post('mxbb')) { ! $portal_url = $mx_request_vars->post('portal_url', MX_TYPE_NO_TAGS); ! $phpbb_path = $mx_request_vars->post('phpbb_path', MX_TYPE_NO_TAGS); ! //$phpbb_url = $mx_request_vars->post('phpbb_url', MX_TYPE_NO_TAGS); ! $dbms = $mx_request_vars->post('dbms_mxbb', MX_TYPE_NO_TAGS); ! $dbhost = $mx_request_vars->post('dbhost_mxbb', MX_TYPE_NO_TAGS); ! $dbname = $mx_request_vars->post('dbname_mxbb',MX_TYPE_NO_TAGS); ! $dbuser = $mx_request_vars->post('dbuser_mxbb', MX_TYPE_NO_TAGS); ! $dbpasswd = $mx_request_vars->post('dbpasswd_mxbb', MX_TYPE_NO_TAGS); ! //$table_prefix = $mx_request_vars->post('prefix', MX_TYPE_NO_TAGS); ! $mx_table_prefix = $mx_request_vars->post('mx_prefix', MX_TYPE_NO_TAGS); ! //$acm_type = $mx_request_vars->post('acm_type', MX_TYPE_NO_TAGS); $portal_backend = 'internal'; *************** *** 554,568 **** else { ! $portal_url = ( !empty($HTTP_POST_VARS['portal_url']) ? $HTTP_POST_VARS['portal_url'] : '' ); ! $phpbb_path = ( !empty($HTTP_POST_VARS['phpbb_path']) ? $HTTP_POST_VARS['phpbb_path'] : '' ); ! //$phpbb_url = ( !empty($HTTP_POST_VARS['phpbb_url']) ? $HTTP_POST_VARS['phpbb_url'] : '' ); ! $dbms = ( isset($HTTP_POST_VARS['dbms']) ? $HTTP_POST_VARS['dbms'] : '' ); ! $dbhost = ( !empty($HTTP_POST_VARS['dbhost']) ? $HTTP_POST_VARS['dbhost'] : '' ); ! $dbname = ( !empty($HTTP_POST_VARS['dbname']) ? $HTTP_POST_VARS['dbname'] : '' ); ! $dbuser = ( !empty($HTTP_POST_VARS['dbuser']) ? $HTTP_POST_VARS['dbuser'] : '' ); ! $dbpasswd = ( !empty($HTTP_POST_VARS['dbpasswd']) ? $HTTP_POST_VARS['dbpasswd'] : '' ); ! $table_prefix = ( !empty($HTTP_POST_VARS['prefix']) ? $HTTP_POST_VARS['prefix'] : '' ); ! $mx_table_prefix = ( !empty($HTTP_POST_VARS['mx_prefix']) ? $HTTP_POST_VARS['mx_prefix'] : '' ); ! //$acm_type = ( isset($HTTP_POST_VARS['acm_type']) ? $HTTP_POST_VARS['acm_type'] : '' ); $portal_backend = file_exists($mx_root_path . $phpbb_path . "modcp.$phpEx") ? 'phpbb2' : 'phpbb3'; --- 553,567 ---- else { ! $portal_url = $mx_request_vars->post('portal_url', MX_TYPE_NO_TAGS); ! $phpbb_path = $mx_request_vars->post('phpbb_path', MX_TYPE_NO_TAGS); ! //$phpbb_url = $mx_request_vars->post('phpbb_url', MX_TYPE_NO_TAGS); ! $dbms = $mx_request_vars->post('dbms', MX_TYPE_NO_TAGS); ! $dbhost = $mx_request_vars->post('dbhost', MX_TYPE_NO_TAGS); ! $dbname = $mx_request_vars->post('dbname', MX_TYPE_NO_TAGS); ! $dbuser = $mx_request_vars->post('dbuser', MX_TYPE_NO_TAGS); ! $dbpasswd = $mx_request_vars->post('dbpasswd', MX_TYPE_NO_TAGS); ! $table_prefix = $mx_request_vars->post('prefix', MX_TYPE_NO_TAGS); ! $mx_table_prefix = $mx_request_vars->post('mx_prefix', MX_TYPE_NO_TAGS); ! //$acm_type = $mx_request_vars->post('acm_type', MX_TYPE_NO_TAGS); $portal_backend = file_exists($mx_root_path . $phpbb_path . "modcp.$phpEx") ? 'phpbb2' : 'phpbb3'; *************** *** 579,583 **** // If they entered the information manually, we need to verify they did it correctly ;-) // ! if ($HTTP_POST_VARS['phpbb']) { $phpbb_info = get_phpbb_info($mx_root_path . $phpbb_path . "config.$phpEx"); --- 578,582 ---- // If they entered the information manually, we need to verify they did it correctly ;-) // ! if ($mx_request_vars->is_post('phpbb')) { $phpbb_info = get_phpbb_info($mx_root_path . $phpbb_path . "config.$phpEx"); *************** *** 789,793 **** ); ! if ($HTTP_POST_VARS['mxbb']) // Internal install { $portal_table['default_style'] = "'1'"; --- 788,792 ---- ); ! if ($mx_request_vars->is_post('mxbb')) // Internal install { $portal_table['default_style'] = "'1'"; *************** *** 1187,1191 **** // DEBUG ONLY ;-) // ! if (isset($HTTP_POST_VARS['debug'])) { $phpbb_found = false; --- 1186,1190 ---- // DEBUG ONLY ;-) // ! if ($mx_request_vars->is_post('debug')) { $phpbb_found = false; |