|
From: Paul S. O. <ps...@us...> - 2002-03-19 12:26:55
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv24561
Modified Files:
modcp.php
Log Message:
Output message if neither a forum nor topic id are specified
Index: modcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/modcp.php,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** modcp.php 19 Mar 2002 00:47:52 -0000 1.65
--- modcp.php 19 Mar 2002 12:26:52 -0000 1.66
***************
*** 36,40 ****
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
- include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
//
--- 36,39 ----
***************
*** 132,136 ****
// Obtain relevant data
//
! if( $topic_id )
{
$sql = "SELECT f.forum_id, f.forum_name, f.forum_topics
--- 131,135 ----
// Obtain relevant data
//
! if ( !empty($topic_id) )
{
$sql = "SELECT f.forum_id, f.forum_name, f.forum_topics
***************
*** 138,144 ****
WHERE t.topic_id = " . $topic_id . "
AND f.forum_id = t.forum_id";
! if(!$result = $db->sql_query($sql))
{
! message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], "", __LINE__, __FILE__, $sql);
}
$topic_row = $db->sql_fetchrow($result);
--- 137,143 ----
WHERE t.topic_id = " . $topic_id . "
AND f.forum_id = t.forum_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
$topic_row = $db->sql_fetchrow($result);
***************
*** 148,159 ****
$forum_name = $topic_row['forum_name'];
}
! else if( $forum_id )
{
$sql = "SELECT forum_name, forum_topics
FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $forum_id;
! if(!$result = $db->sql_query($sql))
{
! message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], "", __LINE__, __FILE__, $sql);
}
$topic_row = $db->sql_fetchrow($result);
--- 147,158 ----
$forum_name = $topic_row['forum_name'];
}
! else if ( !empty($forum_id) )
{
$sql = "SELECT forum_name, forum_topics
FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $forum_id;
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_MESSAGE, 'Forum_not_exist');
}
$topic_row = $db->sql_fetchrow($result);
***************
*** 162,165 ****
--- 161,168 ----
$forum_name = $topic_row['forum_name'];
}
+ else
+ {
+ message_die(GENERAL_MESSAGE, 'Forum_not_exist');
+ }
//
***************
*** 196,199 ****
--- 199,204 ----
if ( $confirm )
{
+ include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
+
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
|