diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-10-10 00:00:42 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-10-10 00:00:42 +0000 |
commit | dfb252e252f21f3258f39666ca6c50b6b3e716c4 (patch) | |
tree | 90b51e8675cd388017ac5441792c3945d6a45a0c /phpBB/viewforum.php | |
parent | 84cc6cb8aeea2b9ff66eff19cffd7d697d62d7cf (diff) | |
download | forums-dfb252e252f21f3258f39666ca6c50b6b3e716c4.tar forums-dfb252e252f21f3258f39666ca6c50b6b3e716c4.tar.gz forums-dfb252e252f21f3258f39666ca6c50b6b3e716c4.tar.bz2 forums-dfb252e252f21f3258f39666ca6c50b6b3e716c4.tar.xz forums-dfb252e252f21f3258f39666ca6c50b6b3e716c4.zip |
Minor updates and fixes
git-svn-id: file:///svn/phpbb/trunk@1147 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 288e0a3535..23d5b15367 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -29,14 +29,14 @@ include($phpbb_root_path . 'common.'.$phpEx); // if( isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]) ) { - $forum_id = (isset($HTTP_GET_VARS[POST_FORUM_URL])) ? $HTTP_GET_VARS[POST_FORUM_URL] : $HTTP_POST_VARS[POST_FORUM_URL]; + $forum_id = (isset($HTTP_GET_VARS[POST_FORUM_URL])) ? intval($HTTP_GET_VARS[POST_FORUM_URL]) : intval($HTTP_POST_VARS[POST_FORUM_URL]); } else { $forum_id = ""; } -$start = (isset($HTTP_GET_VARS['start'])) ? $HTTP_GET_VARS['start'] : 0; +$start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : 0; if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) ) { @@ -63,7 +63,7 @@ init_userprefs($userdata); // Check if the user has actually sent a forum ID with his/her request // If not give them a nice error page. // -if(isset($forum_id)) +if( isset($forum_id) ) { $sql = "SELECT * FROM " . FORUMS_TABLE . " @@ -91,9 +91,10 @@ $forum_row = $db->sql_fetchrow($result); // // Start auth check // +$is_auth = array(); $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_row); -if(!$is_auth['auth_read'] || !$is_auth['auth_view']) +if( !$is_auth['auth_read'] || !$is_auth['auth_view'] ) { // // The user is not authed to read this forum ... @@ -116,7 +117,7 @@ if( $mark_read == "topics" ) WHERE t.forum_id = $forum_id AND p.post_id = t.topic_last_post_id AND p.post_time > " . $userdata['session_last_visit'] . " - AND t.topic_moved_id = NULL + AND t.topic_moved_id IS NULL LIMIT $start, " . $board_config['topics_per_page']; if(!$t_result = $db->sql_query($sql)) { @@ -487,13 +488,15 @@ if($total_topics) if($topic_rowset[$i]['topic_status'] == TOPIC_LOCKED) { $folder_image = "<img src=\"" . $images['folder_locked'] . "\" alt=\"" . $lang['Topic_locked'] . "\" />"; + $newest_post_img = ""; } else if($topic_rowset[$i]['topic_status'] == TOPIC_MOVED) { $topic_type = $lang['Topic_Moved'] . " "; $topic_id = $topic_rowset[$i]['topic_moved_id']; + + $folder_image = "<img src=\"$folder\" alt=\"" . $lang['No_new_posts'] . "\" />"; $newest_post_img = ""; - $folder_image = ""; } else { |