|
From: Paul S. O. <ps...@us...> - 2001-12-24 16:33:19
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv16791
Modified Files:
index.php
Log Message:
Fixed 'bug' #495108, introduced a further string for fields with plural and singular entries, copes with zero conditions.
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/index.php,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** index.php 2001/12/24 13:03:44 1.86
--- index.php 2001/12/24 16:33:17 1.87
***************
*** 97,100 ****
--- 97,127 ----
$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
***************
*** 238,243 ****
$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),
"NEWEST_USER" => sprintf($lang['Newest_user'], "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . "\">", $newest_user, "</a>"),
--- 265,270 ----
$template->assign_vars(array(
! "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&" . POST_USERS_URL . "=$newest_uid") . "\">", $newest_user, "</a>"),
|