From e7140d658d6bd37023eca51d6d01207a34fe2d0e Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 27 Mar 2006 12:48:29 +0000 Subject: - add missing pagination to queue/reports - hide the close button on closed reports page - fix a JS bug in mcp/acp ban view git-svn-id: file:///svn/phpbb/trunk@5733 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_ban.html | 5 ++++- phpBB/includes/mcp/mcp_queue.php | 6 +++++- phpBB/includes/mcp/mcp_reports.php | 12 +++++++----- phpBB/mcp.php | 2 +- phpBB/styles/subSilver/template/mcp_ban.html | 5 ++++- phpBB/styles/subSilver/template/mcp_reports.html | 10 ++++++++-- 6 files changed, 29 insertions(+), 11 deletions(-) (limited to 'phpBB') diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 6eed1500e7..735afc9417 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -12,16 +12,19 @@ ban_length['{ban_length.BAN_ID}'] = "{ban_length.LENGTH}"; var ban_reason = new Array(); + ban_reason[-1] = ""; ban_reason['{ban_reason.BAN_ID}'] = "{ban_reason.REASON}"; var ban_give_reason = new Array(); + ban_give_reason[-1] = ""; ban_give_reason['{ban_give_reason.BAN_ID}'] = "{ban_give_reason.REASON}"; @@ -81,7 +84,7 @@
-
+
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 11378d1f9f..e63ffbbdc2 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -288,7 +288,11 @@ class mcp_queue // Now display the page $template->assign_vars(array( 'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'], - 'S_FORUM_OPTIONS' => $forum_options) + 'S_FORUM_OPTIONS' => $forum_options, + + 'PAGINATION' => generate_pagination("{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&f=$forum_id", $total, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start), + 'TOTAL' => $total) ); $this->tpl_name = 'mcp_queue'; diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 8b30694e1a..30d4466157 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -291,7 +291,6 @@ class mcp_reports 'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['reporter_id']}" : '', 'S_CHECKBOX' => $s_checkbox, - 'S_CLOSED' => ($mode == 'reports_closed') ? true : false, 'FORUM_NAME' => $row['forum_name'], 'POSTER' => $poster, @@ -307,9 +306,12 @@ class mcp_reports // Now display the page $template->assign_vars(array( - 'L_DISPLAY_ITEMS' => $user->lang['DISPLAY_POSTS'], - 'S_MCP_ACTION' => "{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&t=0", - 'S_FORUM_OPTIONS' => $forum_options) + 'PAGINATION' => generate_pagination("{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&f=$forum_id&t=$topic_id", $total, $config['topics_per_page'], $start), + 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start), + 'TOTAL' => $total, + 'S_MCP_ACTION' => "{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&t=0", + 'S_FORUM_OPTIONS' => $forum_options, + 'S_CLOSED' => ($mode == 'reports_closed') ? true : false) ); $this->tpl_name = 'mcp_reports'; @@ -488,7 +490,7 @@ function close_report($post_id_list, $mode, $action) else { meta_refresh(3, "viewforum.$phpEx$SID&f=$forum_id"); - trigger_error($user->lang[$success_msg] . '

' . sprintf($user->lang['RETURN_FORUM'], "', '')); + trigger_error($user->lang[$success_msg] . '

' . sprintf($user->lang['RETURN_PAGE'], "", '')); } } diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 46a263518e..0ef50378c9 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -477,7 +477,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, 'S_SELECT_SORT_DAYS'=> $s_limit_days) ); - if (($sort_days && $mode != 'viewlogs') || $mode == 'reports' || $where_sql != 'WHERE') + if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts')) || $where_sql != 'WHERE') { $result = $db->sql_query($sql); $total = ($row = $db->sql_fetchrow($result)) ? $row['total'] : 0; diff --git a/phpBB/styles/subSilver/template/mcp_ban.html b/phpBB/styles/subSilver/template/mcp_ban.html index 0ceaf9fb0e..d8dea4e1e4 100644 --- a/phpBB/styles/subSilver/template/mcp_ban.html +++ b/phpBB/styles/subSilver/template/mcp_ban.html @@ -6,16 +6,19 @@ ban_length['{ban_length.BAN_ID}'] = "{ban_length.LENGTH}"; var ban_reason = new Array(); + ban_reason[-1] = ""; ban_reason['{ban_reason.BAN_ID}'] = "{ban_reason.REASON}"; var ban_give_reason = new Array(); + ban_give_reason[-1] = ""; ban_give_reason['{ban_give_reason.BAN_ID}'] = "{ban_give_reason.REASON}"; @@ -79,7 +82,7 @@ {L_BAN_CELL}: - + {L_BAN_LENGTH}: diff --git a/phpBB/styles/subSilver/template/mcp_reports.html b/phpBB/styles/subSilver/template/mcp_reports.html index 9fa329ba2d..00a10ac8f6 100644 --- a/phpBB/styles/subSilver/template/mcp_reports.html +++ b/phpBB/styles/subSilver/template/mcp_reports.html @@ -5,7 +5,7 @@ {L_DISPLAY_OPTIONS} - {L_DISPLAY_ITEMS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_FORUM}   + {L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} {L_FORUM}    {L_POST}  @@ -32,7 +32,13 @@ -   + + + + +   + + -- cgit v1.2.1