diff options
| author | dougk_ff7 <dougk_ff7@users.sourceforge.net> | 2001-10-16 13:10:09 +0000 |
|---|---|---|
| committer | dougk_ff7 <dougk_ff7@users.sourceforge.net> | 2001-10-16 13:10:09 +0000 |
| commit | fd20e68b5e2226d00cd4097010bc25eb46477f5f (patch) | |
| tree | f7f6f39eb71ef2348de02b773a63b9aa59007972 /phpBB/viewtopic.php | |
| parent | a4858256ff68ec2be9e2ee19fd44c7d29be299e2 (diff) | |
| download | forums-fd20e68b5e2226d00cd4097010bc25eb46477f5f.tar forums-fd20e68b5e2226d00cd4097010bc25eb46477f5f.tar.gz forums-fd20e68b5e2226d00cd4097010bc25eb46477f5f.tar.bz2 forums-fd20e68b5e2226d00cd4097010bc25eb46477f5f.tar.xz forums-fd20e68b5e2226d00cd4097010bc25eb46477f5f.zip | |
More changes for global announcements. They no longer require the mode to be set (it works without), posting.php has been updated to reflect replies to announcements in ALL forums, and a admin page for announcements (global) has been added, although it can only link to pages with the true forum and auth permissions. A more refined version will be coming soon
git-svn-id: file:///svn/phpbb/trunk@1222 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index bc1c0d6c43..700366eb33 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -147,24 +147,11 @@ $count_sql = (!isset($post_id)) ? "" : ", COUNT(p2.post_id) AS prev_posts"; $order_sql = (!isset($post_id)) ? "" : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC"; -if( $mode=="viewannounce" ) -{ - $sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . " - FROM $join_sql_table " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f - WHERE $join_sql AND - t.topic_type = " . POST_ANNOUNCE . " AND - (f.forum_id = " . $forum_id . " - OR f.forum_id = -1) - $order_sql"; -} -else -{ - $sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . " - FROM $join_sql_table " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f - WHERE $join_sql - AND f.forum_id = t.forum_id - $order_sql"; -} +$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . " + FROM $join_sql_table " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f + WHERE $join_sql + AND f.forum_id = t.forum_id + $order_sql"; if(!$result = $db->sql_query($sql)) { |
