diff options
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 30 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 6 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_reports.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_attachments.php | 1 | ||||
-rw-r--r-- | phpBB/language/en/common.php | 4 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_attachments.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/ucp_attachments.html | 2 |
8 files changed, 40 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 64959a05f3..1de70d4210 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2829,8 +2829,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa if ($result['status'] == LOGIN_SUCCESS) { $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx"); - $message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT']; - $l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']); // append/replace SID (may change during the session for AOL users) $redirect = reapply_sid($redirect); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 78137d075b..85d9496061 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -379,10 +379,10 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $last_catless = true; foreach ($forum_rows as $row) { - // Empty category + // Category if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT) { - $template->assign_block_vars('forumrow', array( + $cat_row = array( 'S_IS_CAT' => true, 'FORUM_ID' => $row['forum_id'], 'FORUM_NAME' => $row['forum_name'], @@ -391,9 +391,33 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'FORUM_FOLDER_IMG_SRC' => '', 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '', 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '', - 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])) + 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']), ); + /** + * Modify the template data block of the 'category' + * + * This event is triggered once per 'category' + * + * @event core.display_forums_modify_category_template_vars + * @var array cat_row Template data of the 'category' + * @var bool catless The flag indicating whether the 'category' has a parent category + * @var bool last_catless The flag indicating whether the last forum had a parent category + * @var array root_data Array with the root forum data + * @var array row The data of the 'category' + * @since 3.1.0-RC4 + */ + $vars = array( + 'cat_row', + 'catless', + 'last_catless', + 'root_data', + 'row', + ); + extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_category_template_vars', compact($vars))); + + $template->assign_block_vars('forumrow', $cat_row); + continue; } diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index f03bc034e4..74bf687fc8 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -161,9 +161,13 @@ class mcp_main * This event allows you to handle custom quickmod options * * @event core.modify_quickmod_actions + * @var string action Topic quick moderation action name + * @var bool quickmod Flag indicating whether MCP is in quick moderation mode * @since 3.1.0-a4 + * @change 3.1.0-RC4 Added variables: action, quickmod */ - $phpbb_dispatcher->dispatch('core.modify_quickmod_actions'); + $vars = array('action', 'quickmod'); + extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_actions', compact($vars))); break; } diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 247b9d1651..804d48ea97 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -36,7 +36,7 @@ class mcp_reports function main($id, $mode) { global $auth, $db, $user, $template, $cache; - global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container; + global $config, $phpbb_root_path, $phpEx, $action, $phpbb_container, $phpbb_dispatcher; include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index aab45339c5..42724209aa 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -182,6 +182,7 @@ class ucp_attachments $template->assign_vars(array( 'TOTAL_ATTACHMENTS' => $num_attachments, + 'NUM_ATTACHMENTS' => $user->lang('NUM_ATTACHMENTS', $num_attachments), 'L_TITLE' => $user->lang['UCP_ATTACHMENTS'], diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index c27086fd38..83e1f4eaa1 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -518,6 +518,10 @@ $lang = array_merge($lang, array( 'NO_USER_SPECIFIED' => 'No username was specified.', // Nullar/Singular/Plural language entry. The key numbers define the number range in which a certain grammatical expression is valid. + 'NUM_ATTACHMENTS' => array( + 1 => '%d attachment', + 2 => '%d attachments', + ), 'NUM_POSTS_IN_QUEUE' => array( 0 => 'No posts in queue', // 0 1 => '1 post in queue', // 1 diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html index ddbf892dee..1d4963273c 100644 --- a/phpBB/styles/prosilver/template/ucp_attachments.html +++ b/phpBB/styles/prosilver/template/ucp_attachments.html @@ -12,7 +12,7 @@ <!-- IF .attachrow --> <div class="action-bar top"> <div class="pagination"> - {TOTAL_ATTACHMENTS} {L_TITLE} + {NUM_ATTACHMENTS} <!-- IF .pagination --> <!-- INCLUDE pagination.html --> <!-- ELSE --> diff --git a/phpBB/styles/subsilver2/template/ucp_attachments.html b/phpBB/styles/subsilver2/template/ucp_attachments.html index 0f6101aac7..c513f933c0 100644 --- a/phpBB/styles/subsilver2/template/ucp_attachments.html +++ b/phpBB/styles/subsilver2/template/ucp_attachments.html @@ -17,7 +17,7 @@ <table width="100%" cellspacing="1"> <tr> <td class="nav" valign="middle" nowrap="nowrap"> {PAGE_NUMBER}<br /></td> - <td class="gensmall" nowrap="nowrap"> [ {TOTAL_ATTACHMENTS} ] </td> + <td class="gensmall" nowrap="nowrap"> [ {NUM_ATTACHMENTS} ] </td> <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td> </tr> </table> |