aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_front.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-09-14 00:28:52 +0200
committerOleg Pudeyev <oleg@bsdpower.com>2011-11-25 15:10:44 -0500
commit88ae40a4b19360645d5e5a614cc378e7cce4afe3 (patch)
tree057ddd8d25a1ec8b943b8f95cab9c861a385285b /phpBB/includes/mcp/mcp_front.php
parent0734dd3c42f573d819c058cd6c6b55d035d1836d (diff)
downloadforums-88ae40a4b19360645d5e5a614cc378e7cce4afe3.tar
forums-88ae40a4b19360645d5e5a614cc378e7cce4afe3.tar.gz
forums-88ae40a4b19360645d5e5a614cc378e7cce4afe3.tar.bz2
forums-88ae40a4b19360645d5e5a614cc378e7cce4afe3.tar.xz
forums-88ae40a4b19360645d5e5a614cc378e7cce4afe3.zip
[ticket/10345] Make use of the plural function in some basic places
PHPBB3-10345
Diffstat (limited to 'phpBB/includes/mcp/mcp_front.php')
-rw-r--r--phpBB/includes/mcp/mcp_front.php53
1 files changed, 10 insertions, 43 deletions
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index ee74a04c91..4ae46f98a2 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -119,22 +119,9 @@ function mcp_front_view($id, $mode, $action)
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_MCP_QUEUE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue"),
+ 'L_UNAPPROVED_TOTAL' => $user->lang('UNAPPROVED_POSTS_TOTAL', (int) $total),
+ 'S_HAS_UNAPPROVED_POSTS'=> ($total != 0),
));
-
- if ($total == 0)
- {
- $template->assign_vars(array(
- 'L_UNAPPROVED_TOTAL' => $user->lang['UNAPPROVED_POSTS_ZERO_TOTAL'],
- 'S_HAS_UNAPPROVED_POSTS' => false)
- );
- }
- else
- {
- $template->assign_vars(array(
- 'L_UNAPPROVED_TOTAL' => ($total == 1) ? $user->lang['UNAPPROVED_POST_TOTAL'] : sprintf($user->lang['UNAPPROVED_POSTS_TOTAL'], $total),
- 'S_HAS_UNAPPROVED_POSTS' => true)
- );
- }
}
}
@@ -220,20 +207,10 @@ function mcp_front_view($id, $mode, $action)
}
}
- if ($total == 0)
- {
- $template->assign_vars(array(
- 'L_REPORTS_TOTAL' => $user->lang['REPORTS_ZERO_TOTAL'],
- 'S_HAS_REPORTS' => false)
- );
- }
- else
- {
- $template->assign_vars(array(
- 'L_REPORTS_TOTAL' => ($total == 1) ? $user->lang['REPORT_TOTAL'] : sprintf($user->lang['REPORTS_TOTAL'], $total),
- 'S_HAS_REPORTS' => true)
- );
- }
+ $template->assign_vars(array(
+ 'L_REPORTS_TOTAL' => $user->lang('REPORTS_TOTAL', (int) $total),
+ 'S_HAS_REPORTS' => ($total != 0),
+ ));
}
}
@@ -313,20 +290,10 @@ function mcp_front_view($id, $mode, $action)
}
}
- if ($total == 0)
- {
- $template->assign_vars(array(
- 'L_PM_REPORTS_TOTAL' => $user->lang['PM_REPORTS_ZERO_TOTAL'],
- 'S_HAS_PM_REPORTS' => false)
- );
- }
- else
- {
- $template->assign_vars(array(
- 'L_PM_REPORTS_TOTAL' => ($total == 1) ? $user->lang['PM_REPORT_TOTAL'] : sprintf($user->lang['PM_REPORTS_TOTAL'], $total),
- 'S_HAS_PM_REPORTS' => true)
- );
- }
+ $template->assign_vars(array(
+ 'L_PM_REPORTS_TOTAL' => $user->lang('PM_REPORTS_TOTAL', (int) $total),
+ 'S_HAS_PM_REPORTS' => ($total != 0),
+ ));
}
// Latest 5 logs