[Phpbb-php5mod-cvs-checkins] phpbb-php5 modcp.php,1.2,1.3 privmsg.php,1.3,1.4 search.php,1.3,1.4 vie
Brought to you by:
jelly_doughnut
From: Josh <jel...@us...> - 2005-04-16 21:02:32
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20363 Modified Files: modcp.php privmsg.php search.php viewtopic.php Log Message: 2.0.14.3 Index: modcp.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/modcp.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** modcp.php 30 Jul 2004 02:12:38 -0000 1.2 --- modcp.php 16 Apr 2005 21:02:23 -0000 1.3 *************** *** 132,135 **** --- 132,140 ---- $topic_row = $db->sql_fetchrow($result); + if (!$topic_row) + { + message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); + } + $forum_topics = ( $topic_row['forum_topics'] == 0 ) ? 1 : $topic_row['forum_topics']; $forum_id = $topic_row['forum_id']; *************** *** 147,150 **** --- 152,161 ---- $topic_row = $db->sql_fetchrow($result); + if (!$topic_row) + { + message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); + } + + $forum_topics = ( $topic_row['forum_topics'] == 0 ) ? 1 : $topic_row['forum_topics']; $forum_name = $topic_row['forum_name']; Index: privmsg.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/privmsg.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** privmsg.php 20 Nov 2004 01:01:10 -0000 1.3 --- privmsg.php 16 Apr 2005 21:02:23 -0000 1.4 *************** *** 564,570 **** // on then we process it, else leave it alone // ! if ( !$board_config['allow_html'] ) { ! if ( $user_sig != '' && $privmsg['privmsgs_enable_sig'] && $userdata['user_allowhtml'] ) { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); --- 564,570 ---- // on then we process it, else leave it alone // ! if ( !$board_config['allow_html'] || !$userdata['user_allowhtml']) { ! if ( $user_sig != '') { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); *************** *** 1528,1534 **** // Finalise processing as per viewtopic // ! if ( !$html_on ) { ! if ( $user_sig != '' || !$userdata['user_allowhtml'] ) { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); --- 1528,1534 ---- // Finalise processing as per viewtopic // ! if ( !$html_on || !$board_config['allow_html'] || !$userdata['user_allowhtml'] ) { ! if ( $user_sig != '' ) { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); Index: search.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/search.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** search.php 20 Nov 2004 01:01:10 -0000 1.3 --- search.php 16 Apr 2005 21:02:23 -0000 1.4 *************** *** 198,201 **** --- 198,206 ---- else { + if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author)))) + { + $search_author = ''; + } + $search_author = str_replace('*', '%', trim($search_author)); *************** *** 265,268 **** --- 270,279 ---- for($i = 0; $i < count($split_search); $i++) { + if (preg_match('#^[\*%]+$#', trim($split_search[$i])) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($split_search[$i])))) + { + $split_search[$i] = ''; + continue; + } + switch ( $split_search[$i] ) { *************** *** 408,411 **** --- 419,427 ---- if ( $search_author != '' ) { + if (preg_match('#^[\*%]+$#', trim($search_author)) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($search_author)))) + { + $search_author = ''; + } + $search_author = str_replace('*', '%', trim(str_replace("\'", "''", $search_author))); } Index: viewtopic.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** viewtopic.php 28 Feb 2005 00:58:11 -0000 1.6 --- viewtopic.php 16 Apr 2005 21:02:23 -0000 1.7 *************** *** 1050,1056 **** // on then we process it, else leave it alone // ! if ( !$board_config['allow_html'] ) { ! if ( $user_sig != '' && $userdata['user_allowhtml'] ) { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); --- 1050,1056 ---- // on then we process it, else leave it alone // ! if ( !$board_config['allow_html'] || !$userdata['user_allowhtml']) { ! if ( $user_sig != '' ) { $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); *************** *** 1119,1127 **** if ($user_sig != '') { ! $user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1)); } ! $message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1)); ! } // --- 1119,1126 ---- if ($user_sig != '') { ! $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1)); } ! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1)); } // |