mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 07:08:09 +01:00
git-svn-id: file:///svn/phpbb/trunk@6643 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6d6f433d2e
commit
59f3e65aee
@ -67,6 +67,8 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
|
||||
'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
|
||||
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
|
||||
|
||||
'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id),
|
||||
'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
@ -138,12 +140,25 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
|
||||
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'REPLIES' => ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'],
|
||||
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
|
||||
'TOPIC_ID' => $row['topic_id'],
|
||||
'S_TOPIC_CHECKED' => ($topic_id_list && in_array($row['topic_id'], $topic_id_list)) ? 'checked="checked" ' : '',
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
|
||||
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
|
||||
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
|
@ -360,6 +360,10 @@ function close_report($post_id_list, $mode, $action)
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', '_f_', 'r')) . '&mode=reports');
|
||||
}
|
||||
else if ($action == 'close' && !request_var('r', 0))
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', '_f_', 'p')) . '&mode=reports');
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('_f_')));
|
||||
|
@ -428,16 +428,20 @@ class ucp_main
|
||||
$template->assign_block_vars('topicrow', array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
|
||||
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
|
||||
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
|
||||
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
|
||||
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
|
||||
'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id")),
|
||||
'REPLIES' => $replies,
|
||||
@ -460,8 +464,6 @@ class ucp_main
|
||||
|
||||
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_VIEW_TOPIC' => $view_topic_url)
|
||||
);
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ if (extension_loaded('mbstring'))
|
||||
* UTF-8 aware alternative to substr
|
||||
* @ignore
|
||||
*/
|
||||
function utf8_substr($str, $offset, $length = null)
|
||||
function utf8_substr($str, $offset, $length = null)
|
||||
{
|
||||
if (is_null($length))
|
||||
{
|
||||
|
@ -195,7 +195,7 @@ switch ($mode)
|
||||
// instead of saying they are moderating all forums
|
||||
if (!$s_forum_select && $undisclosed_forum)
|
||||
{
|
||||
$s_forum_select = $user->lang['FORUM_UNDISCLOSED'];
|
||||
$s_forum_select = '<option value="">' . $user->lang['FORUM_UNDISCLOSED'] . '</option>';
|
||||
}
|
||||
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
|
||||
@ -215,8 +215,6 @@ switch ($mode)
|
||||
$template->assign_block_vars($which_row, array(
|
||||
'USER_ID' => $row['user_id'],
|
||||
'FORUMS' => $s_forum_select,
|
||||
'USERNAME' => $row['username'],
|
||||
'USER_COLOR' => $row['user_colour'],
|
||||
'RANK_TITLE' => $rank_title,
|
||||
'GROUP_NAME' => $group_name,
|
||||
'GROUP_COLOR' => $row['group_colour'],
|
||||
@ -225,9 +223,13 @@ switch ($mode)
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
|
||||
'U_GROUP' => $u_group,
|
||||
'U_VIEW_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']),
|
||||
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '')
|
||||
);
|
||||
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -253,22 +253,18 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$show_results = 'topics';
|
||||
$sort_key = 't';
|
||||
$sort_dir = 'd';
|
||||
$sort_days = request_var('st', 7);
|
||||
$sort_by_sql['t'] = 't.topic_last_post_time';
|
||||
|
||||
if (!$sort_days)
|
||||
{
|
||||
$sort_days = 3;
|
||||
}
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
$s_sort_key = $s_sort_dir = '';
|
||||
$u_sort_param = 'st=' . $sort_days;
|
||||
|
||||
$last_post_time = (time() - ($sort_days * 24 * 3600));
|
||||
$last_post_time_sql = ($sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($sort_days * 24 * 3600)) : '';
|
||||
|
||||
$sql = 'SELECT t.topic_last_post_time, t.topic_id
|
||||
FROM ' . TOPICS_TABLE . " t
|
||||
WHERE t.topic_last_post_time > $last_post_time
|
||||
AND t.topic_moved_id = 0
|
||||
WHERE t.topic_moved_id = 0
|
||||
$last_post_time_sql
|
||||
" . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
|
||||
' . ((sizeof($ex_fid_ary)) ? ' AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '') . '
|
||||
ORDER BY t.topic_last_post_time DESC';
|
||||
@ -365,6 +361,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
|
||||
// show_results should not change after this
|
||||
$per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page'];
|
||||
$total_match_count = 0;
|
||||
|
||||
if ($search_id)
|
||||
{
|
||||
@ -402,14 +399,20 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$total_match_count = $search->author_search($show_results, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $id_ary, $start, $per_page);
|
||||
}
|
||||
|
||||
if (!sizeof($id_ary))
|
||||
// For some searches we need to print out the "no results" page directly to allow re-sorting/refining the search options.
|
||||
if (!sizeof($id_ary) && $search_id !== 'active_topics')
|
||||
{
|
||||
trigger_error($user->lang['NO_SEARCH_RESULTS']);
|
||||
}
|
||||
|
||||
$sql_where = $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary);
|
||||
$sql_where .= (sizeof($ex_fid_ary)) ? ' AND (' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . ' OR f.forum_id IS NULL)' : '';
|
||||
$sql_where .= ($show_results == 'posts') ? $m_approve_fid_sql : str_replace(array('p.post_approved', 'p.forum_id'), array('t.topic_approved', 't.forum_id'), $m_approve_fid_sql);
|
||||
$sql_where = '';
|
||||
|
||||
if (sizeof($id_ary))
|
||||
{
|
||||
$sql_where .= $db->sql_in_set(($show_results == 'posts') ? 'p.post_id' : 't.topic_id', $id_ary);
|
||||
$sql_where .= (sizeof($ex_fid_ary)) ? ' AND (' . $db->sql_in_set('f.forum_id', $ex_fid_ary, true) . ' OR f.forum_id IS NULL)' : '';
|
||||
$sql_where .= ($show_results == 'posts') ? $m_approve_fid_sql : str_replace(array('p.post_approved', 'p.forum_id'), array('t.topic_approved', 't.forum_id'), $m_approve_fid_sql);
|
||||
}
|
||||
|
||||
if ($show_results == 'posts')
|
||||
{
|
||||
|
@ -16,7 +16,7 @@
|
||||
<!-- BEGIN admin -->
|
||||
<!-- IF admin.S_ROW_COUNT is even --> <tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
|
||||
|
||||
<td class="gen" align="center"><strong><a<!-- IF admin.USER_COLOR --> style="color:#{admin.USER_COLOR}"<!-- ENDIF --> href="{admin.U_VIEW_PROFILE}">{admin.USERNAME}</a></strong></td>
|
||||
<td class="gen" align="center"><strong>{admin.USERNAME_FULL}</strong></td>
|
||||
<td class="gensmall" align="center"> </td>
|
||||
<td class="gensmall" align="center" nowrap="nowrap">
|
||||
<!-- IF admin.U_GROUP -->
|
||||
@ -39,7 +39,7 @@
|
||||
<!-- BEGIN mod -->
|
||||
<!-- IF mod.S_ROW_COUNT is even --> <tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
|
||||
|
||||
<td class="gen" align="center"><strong><a<!-- IF mod.USER_COLOR --> style="color:#{mod.USER_COLOR}"<!-- ENDIF --> href="{mod.U_VIEW_PROFILE}">{mod.USERNAME}</a></strong></td>
|
||||
<td class="gen" align="center"><strong>{mod.USERNAME_FULL}</strong></td>
|
||||
<td align="center"><!-- IF not mod.FORUMS -->{L_ALL_FORUMS}<!-- ELSE --><select style="width: 200px;">{mod.FORUMS}</select><!-- ENDIF --> </td>
|
||||
<td class="gensmall" align="center" nowrap="nowrap">
|
||||
<!-- IF mod.U_GROUP -->
|
||||
|
@ -16,7 +16,7 @@
|
||||
<td rowspan="2" align="left" valign="top"><a name="{history_row.U_POST_ID}"></a>
|
||||
<table width="150" cellspacing="0">
|
||||
<tr>
|
||||
<td align="center" colspan="2"><b class="postauthor">{history_row.MESSAGE_AUTHOR_FULL}</b></td>
|
||||
<td align="center" colspan="2"><span class="postauthor">{history_row.MESSAGE_AUTHOR_FULL}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user