diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-20 00:22:29 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-20 00:22:29 +0000 |
commit | 5b0bba72b1c619af2f39859ec0c262f860f991ac (patch) | |
tree | 9fb003cf223ff6bf2e26feb78a35603dff88a471 /phpBB/includes/functions_post.php | |
parent | 65aa92182826eb06830626df49ab7a0210b06718 (diff) | |
download | forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.gz forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.bz2 forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.xz forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.zip |
merged from 2.0.0 branch (marked merge_point_20020420) + assorted updates and trial stuff for example session alterations
git-svn-id: file:///svn/phpbb/trunk@2532 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_post.php')
-rw-r--r-- | phpBB/includes/functions_post.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php index 3d5e8e6b24..901a1bbbda 100644 --- a/phpBB/includes/functions_post.php +++ b/phpBB/includes/functions_post.php @@ -22,7 +22,7 @@ if ( !defined('IN_PHPBB') ) { - die("Hacking attempt"); + die('Hacking attempt'); } $html_entities_match = array('#&#', '#<#', '#>#'); @@ -380,7 +380,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i { global $db; - $sign = ( $mode == 'delete' ) ? "- 1" : "+ 1"; + $sign = ( $mode == 'delete' ) ? '- 1' : '+ 1'; $forum_update_sql = "forum_posts = forum_posts $sign"; $topic_update_sql = ''; @@ -395,7 +395,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i else { - $topic_update_sql = "topic_replies = topic_replies - 1"; + $topic_update_sql .= "topic_replies = topic_replies - 1"; $sql = "SELECT MAX(post_id) AS post_id FROM " . POSTS_TABLE . " @@ -439,9 +439,13 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i if ( $row = $db->sql_fetchrow($result) ) { - $topic_update_sql = 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['post_id']; + $topic_update_sql .= 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['post_id']; } } + else + { + $topic_update_sql .= 'topic_replies = topic_replies - 1'; + } } else if ( $mode != 'poll_delete' ) { |