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/posting.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/posting.php')
| -rw-r--r-- | phpBB/posting.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index c093d3a974..aa702482ad 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -925,15 +925,30 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error ) $sql .= " WHERE topic_id = $new_topic_id"; if($db->sql_query($sql)) - { + { $sql = "UPDATE " . FORUMS_TABLE . " SET forum_last_post_id = $new_post_id, forum_posts = forum_posts + 1"; if($mode == "newtopic") { $sql .= ", forum_topics = forum_topics + 1"; } + + $sqlquery = "SELECT topic_type FROM " . TOPICS_TABLE . " + WHERE topic_id = $topic_id"; + if($result = $db->sql_query($sqlquery)) + { + $topic_row = $db->sql_fetchrow($result); + $topic_type = intval($topic_row['topic_type']); + } + else + { + message_die(GENERAL_ERROR, "Could not query topics table.", __LINE__, __FILE__, $sqlquery, ""); + } + if($topic_type != POST_ANNOUNCE) + { $sql .= " WHERE forum_id = $forum_id"; - + } + if($db->sql_query($sql)) { $sql = "UPDATE " . USERS_TABLE . " |
