Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28378/modules/mx_coreblocks Modified Files: mx_site_log.php mx_blockcp.php mx_includex.php mx_search.php mx_theme.php mx_language.php Log Message: part of project wide change of using request_vars wrapper class instead of explicite and unfiltered $HTML_*_VARS Index: mx_language.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_language.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mx_language.php 4 Feb 2008 16:04:31 -0000 1.20 --- mx_language.php 9 Feb 2008 12:48:51 -0000 1.21 *************** *** 18,24 **** // Updating language and theme - mx_laguage.php and mx_theme.php coreblocks // ! if ( isset($HTTP_POST_VARS['default_lang']) && preg_match('#^[a-z_]+$#', $HTTP_POST_VARS['default_lang']) && $userdata['user_level'] == ADMIN ) { ! $mx_language = strip_tags($HTTP_POST_VARS['default_lang']); $board_config['default_lang'] = $mx_language; --- 18,24 ---- // Updating language and theme - mx_laguage.php and mx_theme.php coreblocks // ! if ($mx_request_vars->is_post('default_lang') && preg_match('#^[a-z_]+$#', $mx_request_vars->post('default_lang', MX_TYPE_NO_TAGS)) && $userdata['user_level'] == ADMIN ) { ! $mx_language = $mx_request_vars->post('default_lang', MX_TYPE_NO_TAGS); $board_config['default_lang'] = $mx_language; *************** *** 33,39 **** } ! if ( isset($HTTP_POST_VARS['user_lang']) && preg_match('#^[a-z_]+$#', $HTTP_POST_VARS['user_lang']) && $userdata['session_logged_in'] ) { ! $mx_language = strip_tags($HTTP_POST_VARS['user_lang']); $userdata['user_lang'] = $mx_language; --- 33,39 ---- } ! if ($mx_request_vars->is_post('user_lang') && preg_match('#^[a-z_]+$#', $mx_request_vars->post('user_lang', MX_TYPE_NO_TAGS)) && $userdata['session_logged_in'] ) { ! $mx_language = $mx_request_vars->post('user_lang', MX_TYPE_NO_TAGS); $userdata['user_lang'] = $mx_language; Index: mx_site_log.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_site_log.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mx_site_log.php 4 Feb 2008 16:04:30 -0000 1.18 --- mx_site_log.php 9 Feb 2008 12:48:51 -0000 1.19 *************** *** 38,42 **** $log_filter_time = $mx_block->get_parameters( 'log_filter_date' ); // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, ! $log_start = ( isset( $HTTP_GET_VARS['log_start'] ) ) ? intval( $HTTP_GET_VARS['log_start'] ) : 0; $start_prev = ( $log_start == 0 ) ? 0 : $log_start - $log_numberOfEvents; --- 38,42 ---- $log_filter_time = $mx_block->get_parameters( 'log_filter_date' ); // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, ! $log_start = $mx_request_vars->get('log_start', MX_TYPE_INT, 0); $start_prev = ( $log_start == 0 ) ? 0 : $log_start - $log_numberOfEvents; Index: mx_includex.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_includex.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mx_includex.php 4 Feb 2008 16:04:30 -0000 1.13 --- mx_includex.php 9 Feb 2008 12:48:51 -0000 1.14 *************** *** 22,30 **** $iframe_mode = $mx_block->get_parameters( 'x_mode' ); ! $x_mode = ( $iframe_mode == 'x_listen' && !empty($HTTP_GET_VARS['x_mode']) ? $HTTP_GET_VARS['x_mode'] : $iframe_mode ); ! $x_1 = ( $iframe_mode == 'x_listen' && !empty($HTTP_GET_VARS['x_1']) ? $HTTP_GET_VARS['x_1'] : $mx_block->get_parameters( 'x_1' ) ); ! $x_2 = ( $iframe_mode == 'x_listen' && !empty($HTTP_GET_VARS['x_2']) ? $HTTP_GET_VARS['x_2'] : $mx_block->get_parameters( 'x_2' ) ); ! $x_3 = ( $iframe_mode == 'x_listen' && !empty($HTTP_GET_VARS['x_3']) ? $HTTP_GET_VARS['x_3'] : $mx_block->get_parameters( 'x_3' ) ); // --- 22,30 ---- $iframe_mode = $mx_block->get_parameters( 'x_mode' ); ! $x_mode = ( $iframe_mode == 'x_listen' && $mx_request_vars->get('x_mode', MX_TYPE_NO_TAGS, $iframe_mode) ); ! $x_1 = ( $iframe_mode == 'x_listen' && $mx_request_vars->get('x_1', MX_TYPE_NO_TAGS, $mx_block->get_parameters('x_1'))); ! $x_2 = ( $iframe_mode == 'x_listen' && $mx_request_vars->get('x_2', MX_TYPE_NO_TAGS, $mx_block->get_parameters('x_2'))); ! $x_3 = ( $iframe_mode == 'x_listen' && $mx_request_vars->get('x_3', MX_TYPE_NO_TAGS, $mx_block->get_parameters('x_3'))); // Index: mx_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_blockcp.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mx_blockcp.php 4 Feb 2008 16:04:30 -0000 1.20 --- mx_blockcp.php 9 Feb 2008 12:48:51 -0000 1.21 *************** *** 90,97 **** // Parameters // ! $submit = ( isset($HTTP_POST_VARS['submit']) ) ? true : false; ! $submit_pars = ( isset($HTTP_POST_VARS['submit_pars']) ) ? true : false; ! $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? true : false; ! $preview = ( isset($HTTP_POST_VARS['preview']) ) ? true : false; $refresh = $preview || $submit_search; --- 90,97 ---- // Parameters // ! $submit = $mx_request_vars->is_post('submit'); ! $submit_pars = $mx_request_vars->is_post('submit_pars'); ! $cancel = $mx_request_vars->is_post('cancel'); ! $preview = $mx_request_vars->is_post('preview'); $refresh = $preview || $submit_search; Index: mx_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_search.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mx_search.php 4 Feb 2008 16:04:30 -0000 1.23 --- mx_search.php 9 Feb 2008 12:48:51 -0000 1.24 *************** *** 29,35 **** $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); ! if ( isset( $HTTP_POST_VARS['search_keywords'] ) || isset( $HTTP_GET_VARS['search_keywords'] ) ) { ! $search_keywords = ( isset( $HTTP_POST_VARS['search_keywords'] ) ) ? $HTTP_POST_VARS['search_keywords'] : $HTTP_GET_VARS['search_keywords']; } else --- 29,35 ---- $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); ! if ($mx_request_vars->is_request('search_keywords')) { ! $search_keywords = $mx_request_vars->request('search_keywords', MX_TYPE_NO_TAGS); } else *************** *** 50,58 **** } ! $show_results = ( isset( $HTTP_POST_VARS['show_results'] ) ) ? $HTTP_POST_VARS['show_results'] : 'posts'; ! if ( isset( $HTTP_POST_VARS['search_terms'] ) ) { ! $search_terms = ( $HTTP_POST_VARS['search_terms'] == 'all' ) ? 1 : 0; } else --- 50,58 ---- } ! $show_results = $mx_request_vars->post('show_results', MX_TYPE_NO_TAGS, 'posts'); ! if ($mx_request_vars->is_post('search_terms')) { ! $search_terms = ( $mx_request_vars->post('search_terms',MX_TYPE_NO_TAGS) == 'all' ) ? 1 : 0; } else *************** *** 61,67 **** } ! if ( isset( $HTTP_POST_VARS['search_fields'] ) ) { ! $search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : 0; } else --- 61,67 ---- } ! if ( $mx_request_vars->is_post('search_fields')) { ! $search_fields = ($mx_request_vars->post('search_fields', MX_TYPE_NO_TAGS) == 'all' ) ? 1 : 0; } else *************** *** 70,78 **** } ! $sort_by = ( isset( $HTTP_POST_VARS['sort_by'] ) ) ? intval( $HTTP_POST_VARS['sort_by'] ) : 0; ! if ( isset( $HTTP_POST_VARS['sort_dir'] ) ) { ! $sort_dir = ( $HTTP_POST_VARS['sort_dir'] == 'DESC' ) ? 'DESC' : 'ASC'; } else --- 70,78 ---- } ! $sort_by = $mx_request_vars->post('sort_by', MX_TYPE_INT, 0); ! if ($mx_request_vars->is_post('sort_dir')) { ! $sort_dir = ($mx_request_vars->post('sort_dir', MX_TYPE_NO_TAGS) == 'DESC' ) ? 'DESC' : 'ASC'; } else *************** *** 81,85 **** } ! $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; $per_page = $board_config['topics_per_page']; --- 81,85 ---- } ! $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $per_page = $board_config['topics_per_page']; Index: mx_theme.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_theme.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mx_theme.php 4 Feb 2008 16:04:30 -0000 1.20 --- mx_theme.php 9 Feb 2008 12:48:51 -0000 1.21 *************** *** 15,21 **** } ! if ( isset($HTTP_POST_VARS['default_style']) && $userdata['user_level'] == ADMIN ) { ! $mx_default_style = intval($HTTP_POST_VARS['default_style']); $board_config['default_style'] = $mx_default_style; --- 15,21 ---- } ! if ($mx_request_vars->is_post('default_style') && $userdata['user_level'] == ADMIN ) { ! $mx_default_style = $mx_request_vars->post('default_style', MX_TYPE_INT); $board_config['default_style'] = $mx_default_style; *************** *** 31,37 **** } ! if ( isset($HTTP_POST_VARS['user_style']) && $userdata['session_logged_in'] ) { ! $mx_user_style = intval($HTTP_POST_VARS['user_style']); $userdata['user_style'] = $mx_user_style; --- 31,37 ---- } ! if ($mx_request_vars->is_post('user_style') && $userdata['session_logged_in'] ) { ! $mx_user_style = $mx_request_vars->post('user_style', MX_TYPE_INT); $userdata['user_style'] = $mx_user_style; |