Update of /cvsroot/phpbb-php5mod/phpbb-php5
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10348
Modified Files:
modcp.php viewtopic.php
Log Message:
2.0.16.4
Index: modcp.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/modcp.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** modcp.php 16 Apr 2005 21:02:23 -0000 1.3
--- modcp.php 27 Jun 2005 20:16:43 -0000 1.4
***************
*** 465,468 ****
--- 465,481 ----
$old_forum_id = $forum_id;
+ $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $new_forum_id;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
+ }
+
+ if (!$db->sql_fetchrow($result))
+ {
+ message_die(GENERAL_MESSAGE, 'New forum does not exist');
+ }
+ $db->sql_freeresult($result);
+
if ( $new_forum_id != $old_forum_id )
{
***************
*** 757,760 ****
--- 770,786 ----
$new_forum_id = intval($_POST['new_forum_id']);
$topic_time = time();
+
+ $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $new_forum_id;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
+ }
+
+ if (!$db->sql_fetchrow($result))
+ {
+ message_die(GENERAL_MESSAGE, 'New forum does not exist');
+ }
+ $db->sql_freeresult($result);
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** viewtopic.php 12 May 2005 02:56:08 -0000 1.9
--- viewtopic.php 27 Jun 2005 20:16:44 -0000 1.10
***************
*** 1108,1112 ****
// This was shamelessly 'borrowed' from volker at multiartstudio dot de
// via php.net's annotated manual
! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
}
--- 1108,1112 ----
// This was shamelessly 'borrowed' from volker at multiartstudio dot de
// via php.net's annotated manual
! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
}
|