Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23865/includes Modified Files: mx_functions_blockcp.php mx_functions_admincp.php mx_functions.php page_header.php template.php Log Message: part of project wide change of using request_vars wrapper class instead of explicite and unfiltered $HTML_*_VARS Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** template.php 7 Feb 2008 16:16:59 -0000 1.24 --- template.php 9 Feb 2008 12:37:24 -0000 1.25 *************** *** 474,478 **** function subtemplates_make_filename($filename) { ! global $HTTP_GET_VARS, $HTTP_POST_VARS, $db, $board_config, $images, $theme; global $sub_template_key_image, $sub_templates; global $tree; --- 474,478 ---- function subtemplates_make_filename($filename) { ! global $mx_request_vars, $db, $board_config, $images, $theme; global $sub_template_key_image, $sub_templates; global $tree; *************** *** 499,525 **** $post_id = 0; ! if ( !defined('IN_PRIVMSG') && ( isset($HTTP_GET_VARS[POST_POST_URL]) || isset($HTTP_POST_VARS[POST_POST_URL]) ) ) { ! $post_id = isset($HTTP_GET_VARS[POST_POST_URL]) ? intval($HTTP_GET_VARS[POST_POST_URL]) : intval($HTTP_POST_VARS[POST_POST_URL]); } ! if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) || isset($HTTP_POST_VARS[POST_TOPIC_URL]) ) { ! $topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]) ? intval($HTTP_GET_VARS[POST_TOPIC_URL]) : intval($HTTP_POST_VARS[POST_TOPIC_URL]); } ! if ( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) ) { ! $forum_id = isset($HTTP_GET_VARS[POST_FORUM_URL]) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]); } ! if ( isset($HTTP_GET_VARS[POST_CAT_URL]) || isset($HTTP_POST_VARS[POST_CAT_URL]) ) { ! $cat_id = isset($HTTP_GET_VARS[POST_CAT_URL]) ? intval($HTTP_GET_VARS[POST_CAT_URL]) : intval($HTTP_POST_VARS[POST_CAT_URL]); } ! if ( isset($HTTP_GET_VARS['selected_id']) || isset($HTTP_POST_VARS['selected_id']) ) { ! $selected_id = isset($HTTP_GET_VARS['selected_id']) ? $HTTP_GET_VARS['selected_id'] : $HTTP_POST_VARS['selected_id']; $type = substr($selected_id, 0, 1); $id = intval(substr($selected_id, 1)); --- 499,525 ---- $post_id = 0; ! if ( !defined('IN_PRIVMSG') && $mx_request_vars->is_request(POST_POST_URL)) { ! $post_id = $mx_request_vars->request(POST_POST_URL, MX_TYPE_INT); } ! if ($mx_request_vars->is_request(POST_TOPIC_URL) ) { ! $topic_id = $mx_request_vars->request(POST_TOPIC_URL, MX_TYPE_INT); } ! if ($mx_request_vars->is_request(POST_FORUM_URL)) { ! $forum_id = $mx_request_vars->request(POST_FORUM_URL, MX_TYPE_INT); } ! if ($mx_request_vars->is_request(POST_CAT_URL)) { ! $cat_id = $mx_request_vars->request(POST_CAT_URL, MX_TYPE_INT); } ! if ($mx_request_vars->is_request('selected_id')) { ! $selected_id = $mx_request_vars->request('selected_id', MX_TYPE_NO_TAGS); $type = substr($selected_id, 0, 1); $id = intval(substr($selected_id, 1)); *************** *** 1551,1555 **** // remove keyword $keyword_str = substr($line, $pos1, $pos2 - $pos1 + 4); ! $params_str = $pos2 == $pos3 ? '' : trim(substr($line, $pos3 + 1, $pos2 - $pos3 - 1)); $code_lines[$i] = substr($line, $pos2 + 4); $i--; --- 1551,1555 ---- // remove keyword $keyword_str = substr($line, $pos1, $pos2 - $pos1 + 4); ! $params_str = ($pos2 == $pos3) ? '' : substr($line, $pos3 + 1, $pos2 - $pos3 - 1); $code_lines[$i] = substr($line, $pos2 + 4); $i--; Index: mx_functions_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_blockcp.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mx_functions_blockcp.php 8 Feb 2008 23:35:57 -0000 1.23 --- mx_functions_blockcp.php 9 Feb 2008 12:37:24 -0000 1.24 *************** *** 62,66 **** function _controlpanel( $id, $new_block = false ) { ! global $blockcptemplate, $lang, $db, $board_config, $theme, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $phpEx, $mx_root_path, $s_hidden_fields, $userdata, $cookie_states, $module_nav_icon_url, $portalpage, $mx_request_vars, $images; $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; --- 62,66 ---- function _controlpanel( $id, $new_block = false ) { ! global $blockcptemplate, $lang, $db, $board_config, $theme, $HTTP_COOKIE_VARS, $phpEx, $mx_root_path, $s_hidden_fields, $userdata, $cookie_states, $module_nav_icon_url, $portalpage, $mx_request_vars, $images; $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; *************** *** 112,120 **** $buttonvalue = $lang['Update']; ! $block_title = ( isset($HTTP_POST_VARS[$block_keys['block_title']]) ) ? stripslashes(htmlspecialchars($HTTP_POST_VARS[$block_keys['block_title']])) : $this->$block_keys['block_title']; ! $block_desc = ( isset($HTTP_POST_VARS[$block_keys['block_desc']]) ) ? stripslashes(htmlspecialchars($HTTP_POST_VARS[$block_keys['block_desc']])) : $this->$block_keys['block_desc']; ! $show_block = ( isset($HTTP_POST_VARS[$block_keys['show_block']]) ) ? intval($HTTP_POST_VARS[$block_keys['show_block']]) : intval($this->$block_keys['show_block']); ! $show_title = ( isset($HTTP_POST_VARS[$block_keys['show_title']]) ) ? intval($HTTP_POST_VARS[$block_keys['show_title']]) : intval($this->$block_keys['show_title']); ! $show_stats = ( isset($HTTP_POST_VARS[$block_keys['show_stats']]) ) ? intval($HTTP_POST_VARS[$block_keys['show_stats']]) : intval($this->$block_keys['show_stats']); // --- 112,120 ---- $buttonvalue = $lang['Update']; ! $block_title = $mx_request_vars->post($block_keys['block_title'], MX_TYPE_NO_TAGS, $this->$block_keys['block_title']); ! $block_desc = $mx_request_vars->post($block_keys['block_desc'], MX_TYPE_NO_TAGS, $this->$block_keys['block_desc']); ! $show_block = $mx_request_vars->post($block_keys['show_block'], MX_TYPE_INT, $this->$block_keys['show_block']); ! $show_title = $mx_request_vars->post($block_keys['show_title'],MX_TYPE_INT, $this->$block_keys['show_title']); ! $show_stats = $mx_request_vars->post($block_keys['show_stats'], MX_TYPE_INT, $this->$block_keys['show_stats']); // Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** page_header.php 4 Feb 2008 15:56:43 -0000 1.50 --- page_header.php 9 Feb 2008 12:37:24 -0000 1.51 *************** *** 575,579 **** // Do NOT set basedir when in EDIT mode // ! if ( !(isset($HTTP_POST_VARS['portalpage']) || isset($HTTP_GET_VARS['portalpage'])) ) { $layouttemplate->assign_block_vars('switch_set_base', array()); --- 575,579 ---- // Do NOT set basedir when in EDIT mode // ! if ( !$mx_request_vars->is_request('portalpage')) { $layouttemplate->assign_block_vars('switch_set_base', array()); Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** mx_functions_admincp.php 8 Feb 2008 23:35:57 -0000 1.47 --- mx_functions_admincp.php 9 Feb 2008 12:37:24 -0000 1.48 *************** *** 97,101 **** function _do_insert($type, $id ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $userdata, $mx_request_vars, $mx_cache; switch ( $type ) --- 97,101 ---- function _do_insert($type, $id ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $userdata, $mx_request_vars, $mx_cache; switch ( $type ) *************** *** 105,109 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['module_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 105,109 ---- if ( !MX_ADMIN_DEBUG ) { ! if ( $mx_request_vars->is_empty_post('module_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 144,148 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['function_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 144,148 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('function_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 174,178 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['parameter_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 174,178 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('parameter_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 251,255 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['block_title'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 251,255 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('block_title')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 325,329 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['page_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 325,329 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('page_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 435,439 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['column_title'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 435,439 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('column_title')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 478,482 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['block_id'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 478,482 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('block_id')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 537,541 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['template_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 537,541 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('template_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 560,564 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['column_title'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 560,564 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('column_title') ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 590,594 **** } ! $message = $lang['AdminCP_action'] . ": " . $lang['Page_template_column'] . ' (' . htmlspecialchars(trim($HTTP_POST_VARS['column_title'])) . ') ' . $lang['was_inserted']; break; --- 590,594 ---- } ! $message = $lang['AdminCP_action'] . ": " . $lang['Page_template_column'] . ' (' . $mx_request_vars->post('column_title',MX_TYPE_NO_TAGS) . ') ' . $lang['was_inserted']; break; *************** *** 613,617 **** function _do_update($type, $id ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $userdata, $mx_request_vars, $mx_cache; switch ( $type ) --- 613,617 ---- function _do_update($type, $id ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $userdata, $mx_request_vars, $mx_cache; switch ( $type ) *************** *** 621,625 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['module_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 621,625 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('module_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 651,655 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['function_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 651,655 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('function_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 681,685 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['parameter_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 681,685 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('parameter_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 775,779 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['block_title'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 775,779 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('block_title')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 920,924 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['page_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 920,924 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('page_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 988,992 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['column_title'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 988,992 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('column_title')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 1042,1046 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['template_name'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 1042,1046 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('template_name')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 1064,1068 **** if ( !MX_ADMIN_DEBUG ) { ! if ( empty( $HTTP_POST_VARS['column_title'] ) ) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); --- 1064,1068 ---- if ( !MX_ADMIN_DEBUG ) { ! if ($mx_request_vars->is_empty_post('column_title')) { mx_message_die( GENERAL_ERROR, $lang['error_no_field'] ); *************** *** 1104,1108 **** function _do_delete($type, $id, $parent, $recache ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $mx_request_vars, $mx_cache, $mx_root_path, $mx_table_prefix, $table_prefix, $userdata; switch ( $type ) --- 1104,1108 ---- function _do_delete($type, $id, $parent, $recache ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $mx_request_vars, $mx_cache, $mx_root_path, $mx_table_prefix, $table_prefix, $userdata; switch ( $type ) *************** *** 1521,1526 **** $block_id = intval($id); ! $column_id = ( isset($HTTP_POST_VARS['column_id']) ) ? intval($HTTP_POST_VARS['column_id']) : intval($HTTP_GET_VARS['column_id']); ! $block_order = ( isset($HTTP_POST_VARS['block_order']) ) ? intval($HTTP_POST_VARS['block_order']) : intval($HTTP_GET_VARS['block_order']); $sql_xtra_options = ''; --- 1521,1526 ---- $block_id = intval($id); ! $column_id = $mx_request_vars->request('column_id', MX_TYPE_INT); ! $block_order = $mx_request_vars->request('block_order', MX_TYPE_INT); $sql_xtra_options = ''; *************** *** 1649,1653 **** function _do_move($type) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $mx_request_vars, $mx_cache; switch ( $type ) --- 1649,1653 ---- function _do_move($type) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $mx_request_vars, $mx_cache; switch ( $type ) *************** *** 1784,1788 **** function _do_sync($type ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS; switch ( $type ) --- 1784,1788 ---- function _do_sync($type ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $mx_request_vars; switch ( $type ) *************** *** 1794,1799 **** // ???? ! $column_id = intval($HTTP_GET_VARS[column_id]); ! sync('block', intval($HTTP_GET_VARS[block_id])); $show_index = true; --- 1794,1799 ---- // ???? ! $column_id = $mx_request_vars->get('column_id', MX_TYPE_INT); ! sync('block', $mx_request_vars->get('block_id', MX_TYPE_INT)); $show_index = true; *************** *** 1820,1824 **** function _do_upgrade($type ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $mx_request_vars; switch ( $type ) --- 1820,1824 ---- function _do_upgrade($type ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $mx_request_vars; switch ( $type ) *************** *** 1862,1866 **** function _do_export($type ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $HTTP_GET_VARS, $HTTP_POST_VARS, $mx_request_vars; switch ( $type ) --- 1862,1866 ---- function _do_export($type ) { ! global $template, $lang, $db, $board_config, $theme, $phpEx, $mx_request_vars; switch ( $type ) *************** *** 2022,2026 **** // ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; // --- 2022,2026 ---- // ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config; // *************** *** 2367,2371 **** function getSafeObjects($fcontents) { ! global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter; $module_id_max = $this->getMaxId(MODULE_TABLE, 'module_id'); --- 2367,2371 ---- function getSafeObjects($fcontents) { ! global $template, $lang, $db, $board_config, $theme, $delimeter; $module_id_max = $this->getMaxId(MODULE_TABLE, 'module_id'); *************** *** 2561,2565 **** function import_pak($file_name) { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter, $mx_root_path; $fcontents = @file($mx_root_path . $file_name); --- 2561,2565 ---- function import_pak($file_name) { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $theme, $delimeter, $mx_root_path; $fcontents = @file($mx_root_path . $file_name); *************** *** 2899,2903 **** function export_pack($module_id) { ! global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter; $sql = "SELECT * FROM " . MODULE_TABLE . " WHERE module_id = $module_id"; --- 2899,2903 ---- function export_pack($module_id) { ! global $template, $lang, $db, $board_config, $theme, $delimeter; $sql = "SELECT * FROM " . MODULE_TABLE . " WHERE module_id = $module_id"; *************** *** 3782,3786 **** function mx_do_install_upgrade( $sql = '', $main_install = false ) { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; $inst_error = false; --- 3782,3786 ---- function mx_do_install_upgrade( $sql = '', $main_install = false ) { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config; $inst_error = false; Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** mx_functions.php 8 Feb 2008 23:35:56 -0000 1.77 --- mx_functions.php 9 Feb 2008 12:37:24 -0000 1.78 *************** *** 891,895 **** function compose_mx_copy() { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $theme, $db, $board_config, $HTTP_POST_VARS, $mx_page; $mx_page->page_title = $lang['mx_about_title']; --- 891,895 ---- function compose_mx_copy() { ! global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $theme, $db, $board_config, $mx_page; $mx_page->page_title = $lang['mx_about_title']; |