aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php27
1 files changed, 3 insertions, 24 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index f7e19f3e7d..71f8ab572e 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2208,6 +2208,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
if (!($prune_flags & FORUM_FLAG_PRUNE_ANNOUNCE))
{
$sql_and .= ' AND topic_type <> ' . POST_ANNOUNCE;
+ $sql_and .= ' AND topic_type <> ' . POST_GLOBAL;
}
if (!($prune_flags & FORUM_FLAG_PRUNE_STICKY))
@@ -2720,29 +2721,9 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
while ($row = $db->sql_fetchrow($result))
{
- if (!$row['forum_id'])
+ if ($auth->acl_get('f_read', $row['forum_id']))
{
- if ($auth->acl_getf_global('f_read'))
- {
- if (!$default_forum_id)
- {
- $sql = 'SELECT forum_id
- FROM ' . FORUMS_TABLE . '
- WHERE forum_type = ' . FORUM_POST;
- $f_result = $db->sql_query_limit($sql, 1);
- $default_forum_id = (int) $db->sql_fetchfield('forum_id', false, $f_result);
- $db->sql_freeresult($f_result);
- }
-
- $is_auth[$row['topic_id']] = $default_forum_id;
- }
- }
- else
- {
- if ($auth->acl_get('f_read', $row['forum_id']))
- {
- $is_auth[$row['topic_id']] = $row['forum_id'];
- }
+ $is_auth[$row['topic_id']] = $row['forum_id'];
}
if ($auth->acl_gets('a_', 'm_', $row['forum_id']))
@@ -3358,5 +3339,3 @@ function enable_bitfield_column_flag($table_name, $column_name, $flag, $sql_more
' . $sql_more;
$db->sql_query($sql);
}
-
-?> \ No newline at end of file