aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_post.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-05-27 16:24:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-05-27 16:24:21 +0000
commitce4445f74a28eaee02c8d90c1a04a759cf88a9c3 (patch)
treefc3af067265d1df62ec14ae912fa5333a535b789 /phpBB/includes/mcp/mcp_post.php
parentb51b978854adf0e5cd902f01cd2da9f34f19429d (diff)
downloadforums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar
forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar.gz
forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar.bz2
forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.tar.xz
forums-ce4445f74a28eaee02c8d90c1a04a759cf88a9c3.zip
- remove description from profile fields
- added disclaimer about DEBUG_EXTRA to the ACP (i think this is needed - some idiots might think it is wise to have this enabled on a production board. :) We *may* let it there for the Betas though, but it will be removed during the RC's) - some bugfixes git-svn-id: file:///svn/phpbb/trunk@5973 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_post.php')
-rw-r--r--phpBB/includes/mcp/mcp_post.php29
1 files changed, 16 insertions, 13 deletions
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index d226a0b545..106af1e2ed 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -362,20 +362,23 @@ function change_poster(&$post_info, $userdata)
markread('post', $post_info['forum_id'], $post_info['topic_id'], time(), $userdata['user_id']);
// Remove the dotted topic option if the old user has no more posts within this topic
- $sql = 'SELECT topic_id
- FROM ' . POSTS_TABLE . '
- WHERE topic_id = ' . $post_info['topic_id'] . '
- AND poster_id = ' . $post_info['user_id'];
- $result = $db->sql_query_limit($sql, 1);
- $topic_id = (int) $db->sql_fetchfield('topic_id');
- $db->sql_freeresult($result);
-
- if (!$topic_id)
+ if ($config['load_db_track'] && $post_info['user_id'] != ANONYMOUS)
{
- $sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . '
- WHERE user_id = ' . $post_info['user_id'] . '
- AND topic_id = ' . $post_info['topic_id'];
- $db->sql_query($sql);
+ $sql = 'SELECT topic_id
+ FROM ' . POSTS_TABLE . '
+ WHERE topic_id = ' . $post_info['topic_id'] . '
+ AND poster_id = ' . $post_info['user_id'];
+ $result = $db->sql_query_limit($sql, 1);
+ $topic_id = (int) $db->sql_fetchfield('topic_id');
+ $db->sql_freeresult($result);
+
+ if (!$topic_id)
+ {
+ $sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . '
+ WHERE user_id = ' . $post_info['user_id'] . '
+ AND topic_id = ' . $post_info['topic_id'];
+ $db->sql_query($sql);
+ }
}
// Do not change the poster_id within the attachments table, since they were still posted by the original user