1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +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:
Chris Smith
2008-09-23 12:56:34 +00:00
parent aa9dbcec3c
commit b486710ea1
5 changed files with 31 additions and 5 deletions

View File

@@ -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'))

View File

@@ -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(

View File

@@ -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)