diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-19 12:26:52 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-03-19 12:26:52 +0000 |
| commit | af033db88d8ccdc7bd180c61e00952709d51946b (patch) | |
| tree | 1f84997bd354d82ed663aaca234ef6b156cec771 /phpBB/modcp.php | |
| parent | 0ea0442698717ba049c258eb77c7fb1386d09819 (diff) | |
| download | forums-af033db88d8ccdc7bd180c61e00952709d51946b.tar forums-af033db88d8ccdc7bd180c61e00952709d51946b.tar.gz forums-af033db88d8ccdc7bd180c61e00952709d51946b.tar.bz2 forums-af033db88d8ccdc7bd180c61e00952709d51946b.tar.xz forums-af033db88d8ccdc7bd180c61e00952709d51946b.zip | |
Output message if neither a forum nor topic id are specified
git-svn-id: file:///svn/phpbb/trunk@2347 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/modcp.php')
| -rw-r--r-- | phpBB/modcp.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/phpBB/modcp.php b/phpBB/modcp.php index 3218eff0b2..7db697c700 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -35,7 +35,6 @@ include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/bbcode.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); -include($phpbb_root_path . 'includes/functions_search.'.$phpEx); // // Obtain initial var settings @@ -131,15 +130,15 @@ else // // Obtain relevant data // -if( $topic_id ) +if ( !empty($topic_id) ) { $sql = "SELECT f.forum_id, f.forum_name, f.forum_topics FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f WHERE t.topic_id = " . $topic_id . " AND f.forum_id = t.forum_id"; - if(!$result = $db->sql_query($sql)) + if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], "", __LINE__, __FILE__, $sql); + message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); } $topic_row = $db->sql_fetchrow($result); @@ -147,20 +146,24 @@ if( $topic_id ) $forum_id = $topic_row['forum_id']; $forum_name = $topic_row['forum_name']; } -else if( $forum_id ) +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)) + if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_MESSAGE, $lang['Topic_post_not_exist'], "", __LINE__, __FILE__, $sql); + message_die(GENERAL_MESSAGE, 'Forum_not_exist'); } $topic_row = $db->sql_fetchrow($result); $forum_topics = $topic_row['forum_topics']; $forum_name = $topic_row['forum_name']; } +else +{ + message_die(GENERAL_MESSAGE, 'Forum_not_exist'); +} // // Start session management @@ -195,6 +198,8 @@ switch($mode) 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); $topic_id_sql = ""; |
