aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-07-06 16:46:53 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-07-06 16:46:53 +0000
commit462dc69b8e8568f4656675b31b99a31ad98e1331 (patch)
tree80887b741981fbb7ae508039ae8da66e5e918310 /phpBB/includes/functions_admin.php
parent2b531a279f267642582b275dc3f215367e6a5396 (diff)
downloadforums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar
forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.gz
forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.bz2
forums-462dc69b8e8568f4656675b31b99a31ad98e1331.tar.xz
forums-462dc69b8e8568f4656675b31b99a31ad98e1331.zip
some bugfixes
git-svn-id: file:///svn/phpbb/trunk@6149 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 76d9f66a07..dc873eff60 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -212,7 +212,7 @@ function group_select_options($group_id, $exclude_ids = false)
global $db, $user, $config;
$exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE group_id NOT IN (' . implode(', ', array_map('intval', $exclude_ids)) . ')' : '';
- $sql_and = ($config['coppa_hide_groups']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : '';
+ $sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name NOT IN ('INACTIVE_COPPA', 'REGISTERED_COPPA')" : '';
$sql = 'SELECT group_id, group_name, group_type
FROM ' . GROUPS_TABLE . "
@@ -483,7 +483,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
*/
function delete_topics($where_type, $where_ids, $auto_sync = true)
{
- global $db;
+ global $db, $config;
$forum_ids = $topic_ids = array();
@@ -546,6 +546,8 @@ function delete_topics($where_type, $where_ids, $auto_sync = true)
sync('topic_reported', $where_type, $where_ids);
}
+ set_config('num_topics', $config['num_topics'] - sizeof($return['topics']), true);
+
return $return;
}
@@ -638,6 +640,8 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
sync('forum', 'forum_id', $forum_ids, true);
}
+ set_config('num_posts', $config['num_posts'] - sizeof($post_ids), true);
+
return sizeof($post_ids);
}