diff options
author | Igor Wiedler <igor@wiedler.ch> | 2013-07-14 11:34:58 -0400 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2013-07-14 11:34:58 -0400 |
commit | f6865dc33a8cedb7d21a64401ed80d2edbac36bd (patch) | |
tree | 66aa645c4d86636f0bce04a7125a7757a466b224 /phpBB/includes/functions.php | |
parent | fa3cdb6bf2cfdca9c26168bd258752718bc8a43f (diff) | |
parent | c15bde161a93fc2abc48cacd7e5a71c682880e52 (diff) | |
download | forums-f6865dc33a8cedb7d21a64401ed80d2edbac36bd.tar forums-f6865dc33a8cedb7d21a64401ed80d2edbac36bd.tar.gz forums-f6865dc33a8cedb7d21a64401ed80d2edbac36bd.tar.bz2 forums-f6865dc33a8cedb7d21a64401ed80d2edbac36bd.tar.xz forums-f6865dc33a8cedb7d21a64401ed80d2edbac36bd.zip |
Merge remote-tracking branch 'upstream/develop' into ticket/11574
* upstream/develop: (575 commits)
[ticket/11702] Fix forum_posts left over for link-click counts in viewforum.php
[ticket/11696] Move file to new directory
[ticket/11696] Rename constructor to __construct()
[ticket/11696] Remove manual loading of db_tools in extension controller test
[ticket/11696] Rename db_tools.php so it can be autoloaded
[ticket/11698] Moving all autoloadable files to phpbb/
[ticket/11694] Do not locate assets with root path
[ticket/11692] Don't update search_type in dev migration if already appended
[ticket/11675] Fix template loop
[ticket/11690] Old module class names may get autoloaded by class_exists
[ticket/9649] Display information on index for moderators on unapproved posts
[ticket/10999] Fix assets_version in ACP
[prep-release-3.0.12] More changelog items for the 3.0.12 release.
[ticket/11687] Add assets_version to phpbb_config
[ticket/11686] Not checking for phpBB Debug errors on functional tests
[ticket/11670] Consistency with logo: Replace "phpBB(tm)" with "phpBB(R)".
[ticket/11674] Do not include vendor folder if there are no dependencies.
[ticket/11685] Remove logout confirmation page
[ticket/11684] Remove useless confirmation page after login and admin login
[ticket/9657] Define user before injecting
...
Conflicts:
phpBB/includes/functions_container.php
phpBB/install/database_update.php
phpBB/install/index.php
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b087e1298b..49f2e469bc 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1974,7 +1974,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s */ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false) { - global $db, $tracking_topics, $user, $config, $auth, $request; + global $db, $tracking_topics, $user, $config, $auth, $request, $phpbb_container; // Determine the users last forum mark time if not given. if ($mark_time_forum === false) @@ -1999,7 +1999,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti // Handle update of unapproved topics info. // Only update for moderators having m_approve permission for the forum. - $sql_update_unapproved = ($auth->acl_get('m_approve', $forum_id)) ? '': 'AND t.topic_approved = 1'; + $phpbb_content_visibility = $phpbb_container->get('content.visibility'); // Check the forum for any left unread topics. // If there are none, we mark the forum as read. @@ -2019,8 +2019,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti AND tt.user_id = ' . $user->data['user_id'] . ') WHERE t.forum_id = ' . $forum_id . ' AND t.topic_last_post_time > ' . $mark_time_forum . ' - AND t.topic_moved_id = 0 ' . - $sql_update_unapproved . ' + AND t.topic_moved_id = 0 + AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.') . ' AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)'; $result = $db->sql_query_limit($sql, 1); @@ -2044,8 +2044,8 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti FROM ' . TOPICS_TABLE . ' t WHERE t.forum_id = ' . $forum_id . ' AND t.topic_last_post_time > ' . $mark_time_forum . ' - AND t.topic_moved_id = 0 ' . - $sql_update_unapproved; + AND t.topic_moved_id = 0 + AND ' . $phpbb_content_visibility->get_visibility_sql('topic', $forum_id, 't.'); $result = $db->sql_query($sql); $check_forum = $tracking_topics['tf'][$forum_id]; @@ -2345,9 +2345,8 @@ function phpbb_generate_template_pagination($template, $base_url, $block_var_nam $tpl_prefix . 'BASE_URL' => $base_url, 'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url), $tpl_prefix . 'PER_PAGE' => $per_page, - $tpl_prefix . 'PREVIOUS_PAGE' => $previous_page, - $tpl_prefix . 'PREV_PAGE' => $previous_page, - $tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page) : '', + 'U_' . $tpl_prefix . 'PREVIOUS_PAGE' => $previous_page, + 'U_' . $tpl_prefix . 'NEXT_PAGE' => ($on_page != $total_pages) ? $base_url . $url_delim . $start_name . '=' . ($on_page * $per_page) : '', $tpl_prefix . 'TOTAL_PAGES' => $total_pages, $tpl_prefix . 'CURRENT_PAGE' => $on_page, ); @@ -3302,8 +3301,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa return; } - $redirect = meta_refresh(3, $redirect); - trigger_error($message . '<br /><br />' . sprintf($l_redirect, '<a href="' . $redirect . '">', '</a>')); + redirect($redirect); } // Something failed, determine what... |