Thread: [Phpbb-php5mod-cvs-checkins] phpbb-php5 common.php,1.1,1.2 faq.php,1.1,1.2 groupcp.php,1.1,1.2 index
Brought to you by:
jelly_doughnut
|
From: geocator <geo...@us...> - 2004-07-30 02:12:48
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13115 Modified Files: common.php faq.php groupcp.php index.php login.php memberlist.php modcp.php posting.php privmsg.php profile.php search.php viewforum.php viewtopic.php Log Message: Say goodbye long array names. Say hello superglobals. Removed code in common.php to try to rename the variables at runtime. No longer needed since we are renaming them. Index: login.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/login.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login.php 29 Jul 2004 22:30:30 -0000 1.1 --- login.php 30 Jul 2004 02:12:38 -0000 1.2 *************** *** 42,48 **** // session id check ! if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) { ! $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; } else --- 42,48 ---- // session id check ! if (!empty($_POST['sid']) || !empty($_GET['sid'])) { ! $sid = (!empty($_POST['sid'])) ? $_POST['sid'] : $_GET['sid']; } else *************** *** 51,62 **** } ! if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) { ! if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] ) { ! $username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : ''; $username = substr(str_replace("\\'", "'", $username), 0, 25); $username = str_replace("'", "\\'", $username); ! $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level --- 51,62 ---- } ! if( isset($_POST['login']) || isset($_GET['login']) || isset($_POST['logout']) || isset($_GET['logout']) ) { ! if( ( isset($_POST['login']) || isset($_GET['login']) ) && !$userdata['session_logged_in'] ) { ! $username = isset($_POST['username']) ? trim(htmlspecialchars($_POST['username'])) : ''; $username = substr(str_replace("\\'", "'", $username), 0, 25); $username = str_replace("'", "\\'", $username); ! $password = isset($_POST['password']) ? $_POST['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level *************** *** 78,82 **** if( md5($password) == $row['user_password'] && $row['user_active'] ) { ! $autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0; $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin); --- 78,82 ---- if( md5($password) == $row['user_password'] && $row['user_active'] ) { ! $autologin = ( isset($_POST['autologin']) ) ? TRUE : 0; $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin); *************** *** 84,88 **** if( $session_id ) { ! $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx"; redirect(append_sid($url, true)); } --- 84,88 ---- if( $session_id ) { ! $url = ( !empty($_POST['redirect']) ) ? str_replace('&', '&', htmlspecialchars($_POST['redirect'])) : "index.$phpEx"; redirect(append_sid($url, true)); } *************** *** 94,98 **** else { ! $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : ''; $redirect = str_replace('?', '&', $redirect); --- 94,98 ---- else { ! $redirect = ( !empty($_POST['redirect']) ) ? str_replace('&', '&', htmlspecialchars($_POST['redirect'])) : ''; $redirect = str_replace('?', '&', $redirect); *************** *** 114,118 **** else { ! $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : ""; $redirect = str_replace("?", "&", $redirect); --- 114,118 ---- else { ! $redirect = ( !empty($_POST['redirect']) ) ? str_replace('&', '&', htmlspecialchars($_POST['redirect'])) : ""; $redirect = str_replace("?", "&", $redirect); *************** *** 131,135 **** } } ! else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] ) { if( $userdata['session_logged_in'] ) --- 131,135 ---- } } ! else if( ( isset($_GET['logout']) || isset($_POST['logout']) ) && $userdata['session_logged_in'] ) { if( $userdata['session_logged_in'] ) *************** *** 138,144 **** } ! if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect'])) { ! $url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']); $url = str_replace('&', '&', $url); redirect(append_sid($url, true)); --- 138,144 ---- } ! if (!empty($_POST['redirect']) || !empty($_GET['redirect'])) { ! $url = (!empty($_POST['redirect'])) ? htmlspecialchars($_POST['redirect']) : htmlspecialchars($_GET['redirect']); $url = str_replace('&', '&', $url); redirect(append_sid($url, true)); *************** *** 151,155 **** else { ! $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx"; redirect(append_sid($url, true)); } --- 151,155 ---- else { ! $url = ( !empty($_POST['redirect']) ) ? str_replace('&', '&', htmlspecialchars($_POST['redirect'])) : "index.$phpEx"; redirect(append_sid($url, true)); } *************** *** 170,176 **** ); ! if( isset($HTTP_POST_VARS['redirect']) || isset($HTTP_GET_VARS['redirect']) ) { ! $forward_to = $HTTP_SERVER_VARS['QUERY_STRING']; if( preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $forward_to, $forward_matches) ) --- 170,176 ---- ); ! if( isset($_POST['redirect']) || isset($_GET['redirect']) ) { ! $forward_to = $_SERVER['QUERY_STRING']; if( preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $forward_to, $forward_matches) ) Index: posting.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/posting.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** posting.php 29 Jul 2004 22:30:30 -0000 1.1 --- posting.php 30 Jul 2004 02:12:38 -0000 1.2 *************** *** 34,40 **** while( list($var, $param) = @each($params) ) { ! if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) ) { ! $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? htmlspecialchars($HTTP_POST_VARS[$param]) : htmlspecialchars($HTTP_GET_VARS[$param]); } else --- 34,40 ---- while( list($var, $param) = @each($params) ) { ! if ( !empty($_POST[$param]) || !empty($_GET[$param]) ) { ! $$var = ( !empty($_POST[$param]) ) ? htmlspecialchars($_POST[$param]) : htmlspecialchars($_GET[$param]); } else *************** *** 44,55 **** } ! $confirm = isset($HTTP_POST_VARS['confirm']) ? true : false; $params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL); while( list($var, $param) = @each($params) ) { ! if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) ) { ! $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? intval($HTTP_POST_VARS[$param]) : intval($HTTP_GET_VARS[$param]); } else --- 44,55 ---- } ! $confirm = isset($_POST['confirm']) ? true : false; $params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL); while( list($var, $param) = @each($params) ) { ! if ( !empty($_POST[$param]) || !empty($_GET[$param]) ) { ! $$var = ( !empty($_POST[$param]) ) ? intval($_POST[$param]) : intval($_GET[$param]); } else *************** *** 64,68 **** // Set topic type // ! $topic_type = ( !empty($HTTP_POST_VARS['topictype']) ) ? intval($HTTP_POST_VARS['topictype']) : POST_NORMAL; // --- 64,68 ---- // Set topic type // ! $topic_type = ( !empty($_POST['topictype']) ) ? intval($_POST['topictype']) : POST_NORMAL; // *************** *** 96,100 **** // page, no point in continuing with any further checks // ! if ( isset($HTTP_POST_VARS['cancel']) ) { if ( $post_id ) --- 96,100 ---- // page, no point in continuing with any further checks // ! if ( isset($_POST['cancel']) ) { if ( $post_id ) *************** *** 363,367 **** else { ! $html_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_html']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] ); } --- 363,367 ---- else { ! $html_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_html']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] ); } *************** *** 372,376 **** else { ! $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_bbcode']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] ); } --- 372,376 ---- else { ! $bbcode_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_bbcode']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] ); } *************** *** 381,390 **** else { ! $smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] ); } if ( ($submit || $refresh) && $is_auth['auth_read']) { ! $notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0; } else --- 381,390 ---- else { ! $smilies_on = ( $submit || $refresh ) ? ( ( !empty($_POST['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] ); } if ( ($submit || $refresh) && $is_auth['auth_read']) { ! $notify_user = ( !empty($_POST['notify']) ) ? TRUE : 0; } else *************** *** 410,414 **** } ! $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] ); // -------------------- --- 410,414 ---- } ! $attach_sig = ( $submit || $refresh ) ? ( ( !empty($_POST['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] ); // -------------------- *************** *** 454,460 **** // Vote in a poll // ! if ( !empty($HTTP_POST_VARS['vote_id']) ) { ! $vote_option_id = intval($HTTP_POST_VARS['vote_id']); $sql = "SELECT vd.vote_id --- 454,460 ---- // Vote in a poll // ! if ( !empty($_POST['vote_id']) ) { ! $vote_option_id = intval($_POST['vote_id']); $sql = "SELECT vd.vote_id *************** *** 538,547 **** case 'newtopic': case 'reply': ! $username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : ''; ! $subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : ''; ! $message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : ''; ! $poll_title = ( isset($HTTP_POST_VARS['poll_title']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_title'] : ''; ! $poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : ''; ! $poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_length'] : ''; $bbcode_uid = ''; --- 538,547 ---- case 'newtopic': case 'reply': ! $username = ( !empty($_POST['username']) ) ? $_POST['username'] : ''; ! $subject = ( !empty($_POST['subject']) ) ? trim($_POST['subject']) : ''; ! $message = ( !empty($_POST['message']) ) ? $_POST['message'] : ''; ! $poll_title = ( isset($_POST['poll_title']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_title'] : ''; ! $poll_options = ( isset($_POST['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_option_text'] : ''; ! $poll_length = ( isset($_POST['poll_length']) && $is_auth['auth_pollcreate'] ) ? $_POST['poll_length'] : ''; $bbcode_uid = ''; *************** *** 577,582 **** if ( $mode == 'newtopic' || $mode == 'reply' ) { ! $tracking_topics = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); ! $tracking_forums = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array(); if ( count($tracking_topics) + count($tracking_forums) == 100 && empty($tracking_topics[$topic_id]) ) --- 577,582 ---- if ( $mode == 'newtopic' || $mode == 'reply' ) { ! $tracking_topics = ( !empty($_COOKIE[$board_config['cookie_name'] . '_t']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . '_t']) : array(); ! $tracking_forums = ( !empty($_COOKIE[$board_config['cookie_name'] . '_f']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . '_f']) : array(); if ( count($tracking_topics) + count($tracking_forums) == 100 && empty($tracking_topics[$topic_id]) ) *************** *** 598,616 **** } ! if( $refresh || isset($HTTP_POST_VARS['del_poll_option']) || $error_msg != '' ) { ! $username = ( !empty($HTTP_POST_VARS['username']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['username']))) : ''; ! $subject = ( !empty($HTTP_POST_VARS['subject']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['subject']))) : ''; ! $message = ( !empty($HTTP_POST_VARS['message']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['message']))) : ''; ! $poll_title = ( !empty($HTTP_POST_VARS['poll_title']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['poll_title']))) : ''; ! $poll_length = ( isset($HTTP_POST_VARS['poll_length']) ) ? max(0, intval($HTTP_POST_VARS['poll_length'])) : 0; $poll_options = array(); ! if ( !empty($HTTP_POST_VARS['poll_option_text']) ) { ! while( list($option_id, $option_text) = @each($HTTP_POST_VARS['poll_option_text']) ) { ! if( isset($HTTP_POST_VARS['del_poll_option'][$option_id]) ) { unset($poll_options[$option_id]); --- 598,616 ---- } ! if( $refresh || isset($_POST['del_poll_option']) || $error_msg != '' ) { ! $username = ( !empty($_POST['username']) ) ? htmlspecialchars(trim(stripslashes($_POST['username']))) : ''; ! $subject = ( !empty($_POST['subject']) ) ? htmlspecialchars(trim(stripslashes($_POST['subject']))) : ''; ! $message = ( !empty($_POST['message']) ) ? htmlspecialchars(trim(stripslashes($_POST['message']))) : ''; ! $poll_title = ( !empty($_POST['poll_title']) ) ? htmlspecialchars(trim(stripslashes($_POST['poll_title']))) : ''; ! $poll_length = ( isset($_POST['poll_length']) ) ? max(0, intval($_POST['poll_length'])) : 0; $poll_options = array(); ! if ( !empty($_POST['poll_option_text']) ) { ! while( list($option_id, $option_text) = @each($_POST['poll_option_text']) ) { ! if( isset($_POST['del_poll_option'][$option_id]) ) { unset($poll_options[$option_id]); *************** *** 623,629 **** } ! if ( isset($poll_add) && !empty($HTTP_POST_VARS['add_poll_option_text']) ) { ! $poll_options[] = htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['add_poll_option_text']))); } --- 623,629 ---- } ! if ( isset($poll_add) && !empty($_POST['add_poll_option_text']) ) { ! $poll_options[] = htmlspecialchars(trim(stripslashes($_POST['add_poll_option_text']))); } Index: search.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/search.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** search.php 29 Jul 2004 22:30:30 -0000 1.1 --- search.php 30 Jul 2004 02:12:38 -0000 1.2 *************** *** 40,46 **** // Define initial vars // ! if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) { ! $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; } else --- 40,46 ---- // Define initial vars // ! if ( isset($_POST['mode']) || isset($_GET['mode']) ) { ! $mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode']; } else *************** *** 49,55 **** } ! 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 --- 49,55 ---- } ! if ( isset($_POST['search_keywords']) || isset($_GET['search_keywords']) ) { ! $search_keywords = ( isset($_POST['search_keywords']) ) ? $_POST['search_keywords'] : $_GET['search_keywords']; } else *************** *** 58,64 **** } ! if ( isset($HTTP_POST_VARS['search_author']) || isset($HTTP_GET_VARS['search_author'])) { ! $search_author = ( isset($HTTP_POST_VARS['search_author']) ) ? $HTTP_POST_VARS['search_author'] : $HTTP_GET_VARS['search_author']; $search_author = htmlspecialchars($search_author); } --- 58,64 ---- } ! if ( isset($_POST['search_author']) || isset($_GET['search_author'])) { ! $search_author = ( isset($_POST['search_author']) ) ? $_POST['search_author'] : $_GET['search_author']; $search_author = htmlspecialchars($search_author); } *************** *** 68,79 **** } ! $search_id = ( isset($HTTP_GET_VARS['search_id']) ) ? $HTTP_GET_VARS['search_id'] : ''; ! $show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts'; $show_results = ($show_results == 'topics') ? 'topics' : 'posts'; ! if ( isset($HTTP_POST_VARS['search_terms']) ) { ! $search_terms = ( $HTTP_POST_VARS['search_terms'] == 'all' ) ? 1 : 0; } else --- 68,79 ---- } ! $search_id = ( isset($_GET['search_id']) ) ? $_GET['search_id'] : ''; ! $show_results = ( isset($_POST['show_results']) ) ? $_POST['show_results'] : 'posts'; $show_results = ($show_results == 'topics') ? 'topics' : 'posts'; ! if ( isset($_POST['search_terms']) ) { ! $search_terms = ( $_POST['search_terms'] == 'all' ) ? 1 : 0; } else *************** *** 82,88 **** } ! if ( isset($HTTP_POST_VARS['search_fields']) ) { ! $search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : 0; } else --- 82,88 ---- } ! if ( isset($_POST['search_fields']) ) { ! $search_fields = ( $_POST['search_fields'] == 'all' ) ? 1 : 0; } else *************** *** 91,104 **** } ! $return_chars = ( isset($HTTP_POST_VARS['return_chars']) ) ? intval($HTTP_POST_VARS['return_chars']) : 200; ! $search_cat = ( isset($HTTP_POST_VARS['search_cat']) ) ? intval($HTTP_POST_VARS['search_cat']) : -1; ! $search_forum = ( isset($HTTP_POST_VARS['search_forum']) ) ? intval($HTTP_POST_VARS['search_forum']) : -1; ! $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 --- 91,104 ---- } ! $return_chars = ( isset($_POST['return_chars']) ) ? intval($_POST['return_chars']) : 200; ! $search_cat = ( isset($_POST['search_cat']) ) ? intval($_POST['search_cat']) : -1; ! $search_forum = ( isset($_POST['search_forum']) ) ? intval($_POST['search_forum']) : -1; ! $sort_by = ( isset($_POST['sort_by']) ) ? intval($_POST['sort_by']) : 0; ! if ( isset($_POST['sort_dir']) ) { ! $sort_dir = ( $_POST['sort_dir'] == 'DESC' ) ? 'DESC' : 'ASC'; } else *************** *** 107,114 **** } ! if ( !empty($HTTP_POST_VARS['search_time']) || !empty($HTTP_GET_VARS['search_time'])) { ! $search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 86400 ); ! $topic_days = (!empty($HTTP_POST_VARS['search_time'])) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']); } else --- 107,114 ---- } ! if ( !empty($_POST['search_time']) || !empty($_GET['search_time'])) { ! $search_time = time() - ( ( ( !empty($_POST['search_time']) ) ? intval($_POST['search_time']) : intval($_GET['search_time']) ) * 86400 ); ! $topic_days = (!empty($_POST['search_time'])) ? intval($_POST['search_time']) : intval($_GET['search_time']); } else *************** *** 118,122 **** } ! $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; $sort_by_types = array($lang['Sort_Time'], $lang['Sort_Post_Subject'], $lang['Sort_Topic_Title'], $lang['Sort_Author'], $lang['Sort_Forum']); --- 118,122 ---- } ! $start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0; $sort_by_types = array($lang['Sort_Time'], $lang['Sort_Post_Subject'], $lang['Sort_Topic_Title'], $lang['Sort_Author'], $lang['Sort_Forum']); *************** *** 135,141 **** // This handles the simple windowed user search functions called from various other scripts // ! if ( isset($HTTP_POST_VARS['search_username']) ) { ! username_search($HTTP_POST_VARS['search_username']); } else --- 135,141 ---- // This handles the simple windowed user search functions called from various other scripts // ! if ( isset($_POST['search_username']) ) { ! username_search($_POST['search_username']); } else *************** *** 834,839 **** $highlight_active = urlencode(trim($highlight_active)); ! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); ! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array(); for($i = 0; $i < count($searchset); $i++) --- 834,839 ---- $highlight_active = urlencode(trim($highlight_active)); ! $tracking_topics = ( isset($_COOKIE[$board_config['cookie_name'] . '_t']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . '_t']) : array(); ! $tracking_forums = ( isset($_COOKIE[$board_config['cookie_name'] . '_f']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . '_f']) : array(); for($i = 0; $i < count($searchset); $i++) *************** *** 1135,1139 **** if ( $searchset[$i]['post_time'] > $userdata['user_lastvisit'] ) { ! if ( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) { --- 1135,1139 ---- if ( $searchset[$i]['post_time'] > $userdata['user_lastvisit'] ) { ! if ( !empty($tracking_topics) || !empty($tracking_forums) || isset($_COOKIE[$board_config['cookie_name'] . '_f_all']) ) { *************** *** 1156,1162 **** } ! if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) { ! if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $searchset[$i]['post_time'] ) { $unread_topics = false; --- 1156,1162 ---- } ! if ( isset($_COOKIE[$board_config['cookie_name'] . '_f_all']) ) { ! if ( $_COOKIE[$board_config['cookie_name'] . '_f_all'] > $searchset[$i]['post_time'] ) { $unread_topics = false; Index: index.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 29 Jul 2004 22:30:30 -0000 1.1 --- index.php 30 Jul 2004 02:12:38 -0000 1.2 *************** *** 35,43 **** // ! $viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1; ! if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) ) { ! $mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark']; } else --- 35,43 ---- // ! $viewcat = ( !empty($_GET[POST_CAT_URL]) ) ? $_GET[POST_CAT_URL] : -1; ! if( isset($_GET['mark']) || isset($_POST['mark']) ) { ! $mark_read = ( isset($_POST['mark']) ) ? $_POST['mark'] : $_GET['mark']; } else *************** *** 68,73 **** // ! $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array(); ! $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array(); // --- 68,73 ---- // ! $tracking_topics = ( isset($_COOKIE[$board_config['cookie_name'] . '_t']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . "_t"]) : array(); ! $tracking_forums = ( isset($_COOKIE[$board_config['cookie_name'] . '_f']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . "_f"]) : array(); // *************** *** 375,381 **** } ! if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) ) { ! if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time ) { $unread_topics = false; --- 375,381 ---- } ! if ( isset($_COOKIE[$board_config['cookie_name'] . '_f_all']) ) { ! if ( $_COOKIE[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time ) { $unread_topics = false; Index: viewtopic.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** viewtopic.php 29 Jul 2004 22:30:30 -0000 1.1 --- viewtopic.php 30 Jul 2004 02:12:38 -0000 1.2 *************** *** 31,50 **** // $topic_id = $post_id = 0; ! if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) ) { ! $topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]); } ! else if ( isset($HTTP_GET_VARS['topic']) ) { ! $topic_id = intval($HTTP_GET_VARS['topic']); } ! if ( isset($HTTP_GET_VARS[POST_POST_URL])) { ! $post_id = intval($HTTP_GET_VARS[POST_POST_URL]); } ! $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; if ( !isset($topic_id) && !isset($post_id) ) --- 31,50 ---- // $topic_id = $post_id = 0; ! if ( isset($_GET[POST_TOPIC_URL]) ) { ! $topic_id = intval($_GET[POST_TOPIC_URL]); } ! else if ( isset($_GET['topic']) ) { ! $topic_id = intval($_GET['topic']); } ! if ( isset($_GET[POST_POST_URL])) { ! $post_id = intval($_GET[POST_POST_URL]); } ! $start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0; if ( !isset($topic_id) && !isset($post_id) ) *************** *** 57,67 **** // or older topic // ! if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) ) { ! if ( $HTTP_GET_VARS['view'] == 'newest' ) { ! if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) ) { ! $session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid']; if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) --- 57,67 ---- // or older topic // ! if ( isset($_GET['view']) && empty($_GET[POST_POST_URL]) ) { ! if ( $_GET['view'] == 'newest' ) { ! if ( isset($_COOKIE[$board_config['cookie_name'] . '_sid']) || isset($_GET['sid']) ) { ! $session_id = isset($_COOKIE[$board_config['cookie_name'] . '_sid']) ? $_COOKIE[$board_config['cookie_name'] . '_sid'] : $_GET['sid']; if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) *************** *** 92,96 **** $post_id = $row['post_id']; ! if (isset($HTTP_GET_VARS['sid'])) { redirect("viewtopic.$phpEx?sid=$session_id&" . POST_POST_URL . "=$post_id#$post_id"); --- 92,96 ---- $post_id = $row['post_id']; ! if (isset($_GET['sid'])) { redirect("viewtopic.$phpEx?sid=$session_id&" . POST_POST_URL . "=$post_id#$post_id"); *************** *** 105,112 **** redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true)); } ! else if ( $HTTP_GET_VARS['view'] == 'next' || $HTTP_GET_VARS['view'] == 'previous' ) { ! $sql_condition = ( $HTTP_GET_VARS['view'] == 'next' ) ? '>' : '<'; ! $sql_ordering = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'ASC' : 'DESC'; $sql = "SELECT t.topic_id --- 105,112 ---- redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true)); } ! else if ( $_GET['view'] == 'next' || $_GET['view'] == 'previous' ) { ! $sql_condition = ( $_GET['view'] == 'next' ) ? '>' : '<'; ! $sql_ordering = ( $_GET['view'] == 'next' ) ? 'ASC' : 'DESC'; $sql = "SELECT t.topic_id *************** *** 129,133 **** else { ! $message = ( $HTTP_GET_VARS['view'] == 'next' ) ? 'No_newer_topics' : 'No_older_topics'; message_die(GENERAL_MESSAGE, $message); } --- 129,133 ---- else { ! $message = ( $_GET['view'] == 'next' ) ? 'No_newer_topics' : 'No_older_topics'; message_die(GENERAL_MESSAGE, $message); } *************** *** 223,229 **** if ( $row = $db->sql_fetchrow($result) ) { ! if ( isset($HTTP_GET_VARS['unwatch']) ) { ! if ( $HTTP_GET_VARS['unwatch'] == 'topic' ) { $is_watching_topic = 0; --- 223,229 ---- if ( $row = $db->sql_fetchrow($result) ) { ! if ( isset($_GET['unwat... [truncated message content] |