1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

- a bunch of bugfixes. :P

git-svn-id: file:///svn/phpbb/trunk@5678 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-03-21 19:23:34 +00:00
parent 44c60cff4d
commit 21de871aff
47 changed files with 200 additions and 119 deletions

View File

@@ -51,7 +51,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$topics_per_page = ($forum_info['forum_topics_per_page']) ? $forum_info['forum_topics_per_page'] : $config['topics_per_page'];
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';

View File

@@ -15,7 +15,7 @@
*/
class mcp_logs
{
var $u_action;
var $p_master;
function mcp_main(&$p_master)
@@ -36,7 +36,10 @@ class mcp_logs
}
// Set up general vars
// Isn't this set above? :o
$action = request_var('action', '');
$start = request_var('start', 0);
$deletemark = (isset($_POST['del_marked'])) ? true : false;
$deleteall = (isset($_POST['del_all'])) ? true : false;
@@ -111,7 +114,7 @@ class mcp_logs
$template->assign_vars(array(
'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
'TOTAL_LOGS' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
'PAGINATION' => generate_pagination($u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start, true),
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start, true),
'U_POST_ACTION' => "mcp.$phpEx$SID&i=$id&mode=$mode&u=$user_id",
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,

View File

@@ -181,7 +181,11 @@ class mcp_queue
$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . $row['forum_name'] . '</option>';
}
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';

View File

@@ -212,7 +212,11 @@ class mcp_reports
$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . $row['forum_name'] . '</option>';
}
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
mcp_sorting('reports', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';

View File

@@ -60,6 +60,11 @@ function mcp_topic_view($id, $mode, $action)
// Jumpbox, sort selects and that kind of things
make_jumpbox($url . "&amp;i=$id&amp;mode=forum_view", $topic_info['forum_id'], false, 'm_');
$where_sql = ($action == 'reports') ? 'WHERE post_reported = 1 AND ' : 'WHERE';
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
@@ -290,7 +295,11 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
{
if ($action == 'split_beyond')
{
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
if ($sort_order_sql{0} == 'u')

View File

@@ -349,13 +349,13 @@ function mcp_warn_user_view($id, $mode, $action)
'USERNAME' => $userrow['username'],
'USER_COLOR' => (!empty($userrow['user_colour'])) ? $userrow['user_colour'] : '',
'RANK_TITLE' => $rank_title,
'RANK_TITLE' => $userrow['rank_title'],
'JOINED' => $user->format_date($userrow['user_regdate'], $user->lang['DATE_FORMAT']),
'POSTS' => ($userrow['user_posts']) ? $userrow['user_posts'] : 0,
'WARNINGS' => ($userrow['user_warnings']) ? $userrow['user_warnings'] : 0,
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,
'AVATAR_IMG' => $userrow['avatar_img'],
'RANK_IMG' => $userrow['rank_img'],
)
);
}
@@ -378,7 +378,6 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0)
$message_parser = new parse_message();
$message_parser->message = sprintf($lang['WARNING_PM_BODY'], $warning);
$message_md5 = md5($message_parser->message);
$message_parser->parse(true, true, true, false, false, true);
$pm_data = array(
@@ -390,7 +389,6 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0)
'enable_smilies' => true,
'enable_urls' => false,
'icon_id' => 0,
'message_md5' => (int) $message_md5,
'bbcode_bitfield' => (int) $message_parser->bbcode_bitfield,
'bbcode_uid' => $message_parser->bbcode_uid,
'message' => $message_parser->message,