aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-12-24 16:34:27 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-12-24 16:34:27 +0000
commita8277d444a756e2cea896701ffb5c350dcb17d81 (patch)
tree42e5512f6e841077f585d9f8fec62b39696a2f91 /phpBB/index.php
parent8b9857c20013b031088b888d62280c9524831da2 (diff)
downloadforums-a8277d444a756e2cea896701ffb5c350dcb17d81.tar
forums-a8277d444a756e2cea896701ffb5c350dcb17d81.tar.gz
forums-a8277d444a756e2cea896701ffb5c350dcb17d81.tar.bz2
forums-a8277d444a756e2cea896701ffb5c350dcb17d81.tar.xz
forums-a8277d444a756e2cea896701ffb5c350dcb17d81.zip
Fixed 'bug' #495108, introduced a further string for fields with plural and singular entries, copes with zero conditions.
git-svn-id: file:///svn/phpbb/trunk@1702 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php31
1 files changed, 29 insertions, 2 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index 3f995e2a76..7d4e46d613 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -96,6 +96,33 @@ $newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
+if( $total_posts == 0 )
+{
+ $l_total_post_s = $lang['Posted_articles_zero_total'];
+}
+else if( $total_posts == 1 )
+{
+ $l_total_post_s = $lang['Posted_article_total'];
+}
+else
+{
+ $l_total_post_s = $lang['Posted_articles_total'];
+}
+
+if( $total_users == 0 )
+{
+ $l_total_user_s = $lang['Registered_users_zero_total'];
+}
+else if( $total_users == 1 )
+{
+ $l_total_user_s = $lang['Registered_user_total'];
+}
+else
+{
+ $l_total_user_s = $lang['Registered_users_total'];
+}
+
+
//
// Start page proper
//
@@ -237,8 +264,8 @@ if($total_categories = $db->sql_numrows($q_categories))
);
$template->assign_vars(array(
- "TOTAL_POSTS" => ( $total_posts == 1 ) ? sprintf($lang['Posted_article_total'], $total_posts) : sprintf($lang['Posted_articles_total'], $total_posts),
- "TOTAL_USERS" => ( $total_users == 1 ) ? sprintf($lang['Registered_user_total'], $total_users) : sprintf($lang['Registered_users_total'], $total_users),
+ "TOTAL_POSTS" => sprintf($l_total_post_s, $total_posts),
+ "TOTAL_USERS" => sprintf($l_total_user_s, $total_users),
"NEWEST_USER" => sprintf($lang['Newest_user'], "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . "\">", $newest_user, "</a>"),
"FORUM_IMG" => $images['forum'],