diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-08 03:21:19 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-08 03:21:19 -0400 |
commit | ab44fe5e394fe7b69c57266e2934200a3ee9bbc5 (patch) | |
tree | e6021c19fa15800787b1a7459fb8ad40cf2d8391 /phpBB/includes/functions_admin.php | |
parent | 9c6660a2253149baff0094b943823de6758b35a6 (diff) | |
parent | c0336988155736583c6fc4398980bd2a4e4036b6 (diff) | |
download | forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar.gz forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar.bz2 forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.tar.xz forums-ab44fe5e394fe7b69c57266e2934200a3ee9bbc5.zip |
Merge branch 'develop' into feature/prune-users
* develop: (170 commits)
[ticket/10145] Always recompile all templates when DEBUG_EXTRA is defined.
[feature/attachment-management-no-reassignment] Handle privacy and some more.
[ticket/10148] Turn TEMPLATE_BITFIELD into an instance variable.
[ticket/10147] Corrected a typo in includes/functions_template.php.
[ticket/10141] Save a hash lookup when value is not in cache.
[ticket/10143] Added tests for storing a previously deleted value in db cache.
[ticket/10105] Update AIM express link.
[ticket/10105] Update AIM application download link.
[ticket/10137] Remove unintended space at end of PHP_URL_FOPEN_SUPPORT_EXPLAIN.
[ticket/10141] Split double-assignment into conditional and unconditional part.
[ticket/10141] Use a cache in $auth->_fill_acl() for better performance.
[ticket/9961] Create log entries when users are activated.
[ticket/10139] Make signatures of set_atomic() consistent by using $new_value.
[ticket/10139] Rename $cache to $use_cache to avoid confusion with cache object
[ticket/10006] Remove unneeded if statements
[ticket/10006] Remove return values
[ticket/10006] More testing
[ticket/10006] Tweak the tests a bit
[ticket/10006] Add phpbb_config::delete
[ticket/7941] Added @return to generate_board_url docstring.
...
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 1468345003..ee59d77cdb 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)) @@ -2695,29 +2696,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'])) |