diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-02-06 19:09:43 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-02-06 19:09:43 +0000 |
commit | 333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440 (patch) | |
tree | 08a84c7c140f482b7e7917acc6bc6480e5b0ff43 /phpBB/includes/acp/acp_users.php | |
parent | 10f775cb1cc44b083373543a6c08214d1dd291f0 (diff) | |
download | forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar.gz forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar.bz2 forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.tar.xz forums-333b3515ed1e94dba1593b2eb3f9fb9d5a1f1440.zip |
Some... fixes... laying around here.
git-svn-id: file:///svn/phpbb/trunk@6970 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 24fd028bad..87744660a2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -134,7 +134,8 @@ class acp_users 'U_BACK' => $this->u_action, 'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&u=$user_id"), 'U_ACTION' => $this->u_action . '&u=' . $user_id, - 'S_FORM_OPTIONS' => $s_form_options) + 'S_FORM_OPTIONS' => $s_form_options, + 'MANAGED_USERNAME' => $user_row['username']) ); // Prevent normal users/admins change/view founders if they are not a founder by themselves @@ -398,44 +399,6 @@ class acp_users if (confirm_box(true)) { - $sql = 'SELECT topic_id, COUNT(post_id) AS total_posts - FROM ' . POSTS_TABLE . " - WHERE poster_id = $user_id - GROUP BY topic_id"; - $result = $db->sql_query($sql); - - $topic_id_ary = array(); - while ($row = $db->sql_fetchrow($result)) - { - $topic_id_ary[$row['topic_id']] = $row['total_posts']; - } - $db->sql_freeresult($result); - - if (sizeof($topic_id_ary)) - { - $sql = 'SELECT topic_id, topic_replies, topic_replies_real - FROM ' . TOPICS_TABLE . ' - WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary)); - $result = $db->sql_query($sql); - - $del_topic_ary = array(); - while ($row = $db->sql_fetchrow($result)) - { - if (max($row['topic_replies'], $row['topic_replies_real']) + 1 == $topic_id_ary[$row['topic_id']]) - { - $del_topic_ary[] = $row['topic_id']; - } - } - $db->sql_freeresult($result); - - if (sizeof($del_topic_ary)) - { - $sql = 'DELETE FROM ' . TOPICS_TABLE . ' - WHERE ' . $db->sql_in_set('topic_id', $del_topic_ary); - $db->sql_query($sql); - } - } - // Delete posts, attachments, etc. delete_posts('poster_id', $user_id); |