mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 16:15:22 +02:00
Merge in r8843, r8908, r8909
git-svn-id: file:///svn/phpbb/trunk@8910 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
aa9dbcec3c
commit
b486710ea1
@ -2385,8 +2385,14 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||
|
||||
if (isset($user->lang[$row['log_operation']]))
|
||||
{
|
||||
// We supress the warning about inappropriate number of passed parameters here due to possible changes within LOG strings from one version to another.
|
||||
$log[$i]['action'] = @vsprintf($log[$i]['action'], $log_data_ary);
|
||||
// Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
|
||||
// It doesn't matter if we add more arguments than placeholders
|
||||
if (substr_count($log[$i]['action'], '%') - sizeof($log_data_ary))
|
||||
{
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($log[$i]['action'], '%') - sizeof($log_data_ary), ''));
|
||||
}
|
||||
|
||||
$log[$i]['action'] = vsprintf($log[$i]['action'], $log_data_ary);
|
||||
|
||||
// If within the admin panel we do not censor text out
|
||||
if (defined('IN_ADMIN'))
|
||||
|
@ -204,6 +204,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$subforums[$parent_id][$forum_id]['display'] = ($row['display_on_index']) ? true : false;
|
||||
$subforums[$parent_id][$forum_id]['name'] = $row['forum_name'];
|
||||
$subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
||||
$subforums[$parent_id][$forum_id]['children'] = array();
|
||||
|
||||
if (isset($subforums[$parent_id][$row['parent_id']]) && !$row['display_on_index'])
|
||||
{
|
||||
$subforums[$parent_id][$row['parent_id']]['children'][] = $forum_id;
|
||||
}
|
||||
|
||||
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
||||
|
||||
@ -303,6 +309,14 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
{
|
||||
$subforum_unread = (isset($forum_tracking_info[$subforum_id]) && $subforum_row['orig_forum_last_post_time'] > $forum_tracking_info[$subforum_id]) ? true : false;
|
||||
|
||||
if (!$subforum_unread && !empty($subforum_row['children']))
|
||||
{
|
||||
foreach ($subforum_row['children'] as $child_id)
|
||||
{
|
||||
$subforum_unread = (isset($forum_tracking_info[$child_id]) && $subforums[$forum_id][$child_id]['orig_forum_last_post_time'] > $forum_tracking_info[$child_id]) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($subforum_row['display'] && $subforum_row['name'])
|
||||
{
|
||||
$subforums_list[] = array(
|
||||
|
@ -639,7 +639,7 @@ function mcp_move_topic($topic_ids)
|
||||
{
|
||||
// Get the list of forums to resync, add a log entry
|
||||
$forum_ids[] = $row['forum_id'];
|
||||
add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name']);
|
||||
add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']);
|
||||
|
||||
// If we have moved a global announcement, we need to correct the topic type
|
||||
if ($row['topic_type'] == POST_GLOBAL)
|
||||
|
@ -480,7 +480,7 @@ $lang = array_merge($lang, array(
|
||||
'LOG_LOCK' => '<strong>Locked topic</strong><br />» %s',
|
||||
'LOG_LOCK_POST' => '<strong>Locked post</strong><br />» %s',
|
||||
'LOG_MERGE' => '<strong>Merged posts</strong> into topic<br />» %s',
|
||||
'LOG_MOVE' => '<strong>Moved topic</strong><br />» from %s',
|
||||
'LOG_MOVE' => '<strong>Moved topic</strong><br />» from %1$s to %2$s',
|
||||
'LOG_POST_APPROVED' => '<strong>Approved post</strong><br />» %s',
|
||||
'LOG_POST_DISAPPROVED' => '<strong>Disapproved post “%1$s” with the following reason</strong><br />» %2$s',
|
||||
'LOG_POST_EDITED' => '<strong>Edited post “%1$s” written by</strong><br />» %2$s',
|
||||
|
@ -476,6 +476,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$u_search = append_sid('search', $u_sort_param . $u_show_results);
|
||||
$u_search .= ($search_id) ? '&search_id=' . $search_id : '';
|
||||
$u_search .= ($u_hilit) ? '&keywords=' . urlencode(htmlspecialchars_decode($search->search_query)) : '';
|
||||
$u_search .= ($search_terms != 'all') ? '&terms=' . $search_terms : '';
|
||||
$u_search .= ($topic_id) ? '&t=' . $topic_id : '';
|
||||
$u_search .= ($author) ? '&author=' . urlencode(htmlspecialchars_decode($author)) : '';
|
||||
$u_search .= ($author_id) ? '&author_id=' . $author_id : '';
|
||||
@ -542,7 +543,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
if ($config['load_db_track'])
|
||||
if ($config['load_db_track'] && $author_id !== $user->data['user_id'])
|
||||
{
|
||||
$sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.user_id = ' . $user->data['user_id'] . '
|
||||
AND t.topic_id = tp.topic_id)';
|
||||
@ -772,6 +773,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
|
||||
if ($show_results == 'topics')
|
||||
{
|
||||
if ($config['load_db_track'] && $author_id === $user->data['user_id'])
|
||||
{
|
||||
$row['topic_posted'] = 1;
|
||||
}
|
||||
|
||||
$folder_img = $folder_alt = $topic_type = '';
|
||||
topic_status($row, $replies, (isset($topic_tracking_info[$forum_id][$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$forum_id][$row['topic_id']]) ? true : false, $folder_img, $folder_alt, $topic_type);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user