diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-12-03 15:39:06 -0500 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-12-03 15:39:06 -0500 |
| commit | 6027541dc7c8164db2391564f1c71146ada6c813 (patch) | |
| tree | 028886e686d4bebfd3292c7232b462f81ca971a7 /phpBB/index.php | |
| parent | 5e225d5d7ab3890a6a06791742d1b2d97d9f40e1 (diff) | |
| parent | c1311faebf01db1cd0f27420af31c326b0270d37 (diff) | |
| download | forums-6027541dc7c8164db2391564f1c71146ada6c813.tar forums-6027541dc7c8164db2391564f1c71146ada6c813.tar.gz forums-6027541dc7c8164db2391564f1c71146ada6c813.tar.bz2 forums-6027541dc7c8164db2391564f1c71146ada6c813.tar.xz forums-6027541dc7c8164db2391564f1c71146ada6c813.zip | |
Merge remote-tracking branch 'nickvergessen/ticket/develop/10345' into develop
* nickvergessen/ticket/develop/10345: (21 commits)
[ticket/10345] Check directly whether the key to use exists
[ticket/10345] Return the language key when the key has an empty array
[ticket/10345] Document behaviour for floating numbers on phpbb_get_plural_form
[ticket/10345] Remove doubled check for valid plural rule
[ticket/10345] Add documentation and phpbb_ prefix to the new avatar functions
[ticket/10345] Add cases for 1 pixel height on MAX_FLASH and MAX_IMG sizes
[ticket/10345] Fix parsing error in language/en/viewtopic.php
[ticket/10345] Move rule determination code into a new function
[ticket/10345] Fix little type in unit test
[ticket/10345] Remove more useless 0-cases
[ticket/10345] Make the use of the 0-case optional
[ticket/10345] Remove some unused 0 cases
[ticket/10345] Fix some last use cases of sprintf() to use $user->lang()
[ticket/10345] Add tests for array() as first parameter on call to $user->lang()
[ticket/10345] Fix some documentation issues.
[ticket/10345] Allow float as array key and add some tests
[ticket/10345] Use the plural function in some more places.
[ticket/10345] Make use of the plural function in some basic places
[ticket/10345] Remove '1 hour ago' string which conflicted with plural rules
[ticket/10345] Fix documentation on the new function and the switch
...
Diffstat (limited to 'phpBB/index.php')
| -rw-r--r-- | phpBB/index.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 182efbc7e0..b32d90bfd0 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -27,15 +27,6 @@ $user->setup('viewforum'); display_forums('', $config['load_moderators']); -// Set some stats, get posts count from forums data if we... hum... retrieve all forums data -$total_posts = $config['num_posts']; -$total_topics = $config['num_topics']; -$total_users = $config['num_users']; - -$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER'; -$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER'; -$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER'; - $order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend'; // Grab group details for legend display if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) @@ -124,10 +115,10 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets(' // Assign index specific vars $template->assign_vars(array( - 'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts), - 'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics), - 'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users), - 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])), + 'TOTAL_POSTS' => $user->lang('TOTAL_POSTS', (int) $config['num_posts']), + 'TOTAL_TOPICS' => $user->lang('TOTAL_TOPICS', (int) $config['num_topics']), + 'TOTAL_USERS' => $user->lang('TOTAL_USERS', (int) $config['num_users']), + 'NEWEST_USER' => $user->lang('NEWEST_USER', get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])), 'LEGEND' => $legend, 'BIRTHDAY_LIST' => (empty($birthday_list)) ? '' : implode(', ', $birthday_list), |
