' . $sql : '') . ' ';
trigger_error($message, E_USER_ERROR);
}
diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php
index 592af077ef..110f2d78e0 100644
--- a/phpBB/language/en/lang_main.php
+++ b/phpBB/language/en/lang_main.php
@@ -19,12 +19,22 @@
*
***************************************************************************/
+// DEVELOPERS PLEASE NOTE
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+
$lang = array_merge($lang, array(
- 'ENCODING' => 'iso-8859-15',
- 'DIRECTION' => 'ltr',
- 'LEFT' => 'left',
- 'RIGHT' => 'right',
- 'DATE_FORMAT' => 'd M Y',
+ 'ENCODING' => 'iso-8859-15',
+ 'DIRECTION' => 'ltr',
+ 'LEFT' => 'left',
+ 'RIGHT' => 'right',
+ 'DATE_FORMAT' => 'd M Y',
'FORUM' => 'Forum',
'SUBFORUM' => 'Subforum',
@@ -45,6 +55,8 @@ $lang = array_merge($lang, array(
'TIME' => 'Time',
'HOURS' => 'Hours',
'MESSAGE' => 'Message',
+ 'POST_TIME' => 'Post time',
+
'1_DAY' => '1 Day',
'7_DAYS' => '7 Days',
'2_WEEKS' => '2 Weeks',
@@ -54,7 +66,7 @@ $lang = array_merge($lang, array(
'1_YEAR' => '1 Year',
'ASCENDING' => 'Ascending',
'DESCENDING' => 'Descending',
- 'POST_TIME' => 'Post time',
+
'GO' => 'Go',
'JUMP_TO' => 'Jump to',
'SUBMIT' => 'Submit',
@@ -78,34 +90,72 @@ $lang = array_merge($lang, array(
'SELECT_FORUM' => 'Select a forum',
'VIEW_LATEST_POST' => 'View latest post',
'VIEW_NEWEST_POST' => 'View newest post',
- 'PAGE_OF' => 'Page %d of %d',
+ 'PAGE_OF' => 'Page %1$d of %2$d',
'ICQ' => 'ICQ Number',
'AIM' => 'AIM Address',
'MSNM' => 'MSN Messenger',
'YIM' => 'Yahoo Messenger',
- 'Forum_Index' => 'Board Index',
+ 'FORUM_INDEX' => 'Board Index',
+
+
+ 'POST_NEW_TOPIC' => 'Post new topic',
+ 'REPLY_TO_TOPIC' => 'Reply to topic',
+ 'REPLY_WITH_QUOTE' => 'Reply with quote',
+
+
+ 'RETURN_TOPIC' => 'Click %sHere%s to return to the topic',
+ 'RETURN_FORUM' => 'Click %sHere%s to return to the forum',
+ 'RETURN_LOGIN' => 'Click %sHere%s to try again',
+ 'RETURN_MCP' => 'Click %sHere%s to return to the Moderator Control Panel',
+ 'RETURN_GROUP' => 'Click %sHere%s to return to the Group Control Panel',
- 'Post_new_topic' => 'Post new topic',
- 'Reply_to_topic' => 'Reply to topic',
- 'Reply_with_quote' => 'Reply with quote',
- 'Click_return_topic' => 'Click %sHere%s to return to the topic',
- 'Click_return_login' => 'Click %sHere%s to try again',
- 'Click_return_forum' => 'Click %sHere%s to return to the forum',
'Click_view_message' => 'Click %sHere%s to view your message',
- 'Click_return_mcp' => 'Click %sHere%s to return to the Moderator Control Panel',
- 'Click_return_group' => 'Click %sHere%s to return to group information',
- 'Admin_panel' => 'Go to Administration Panel',
- 'Board_disable' => 'Sorry but this board is currently unavailable',
- 'Board_unavailable' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes',
+
+
+ 'BOARD_DISABLE' => 'Sorry but this board is currently unavailable',
+ 'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes',
+ 'BOARD_BANNED' => 'You have been banned from this forum Please contact the %sboard administrator%s for more information',
+
+
'G_ADMINISTRATORS' => 'ADMINISTRATORS',
'G_SUPER_MODERATORS'=> 'SUPER MODERATORS',
'G_MODERATORS' => 'MODERATORS',
'G_REGISTERED' => 'REGISTERED USERS',
'G_INACTIVE' => 'INACTIVE USERS',
'G_GUESTS' => 'GUESTS',
+
+
+ 'YOU_LAST_VISIT' => 'You last visited on %s',
+ 'CURRENT_TIME' => 'The time now is %s',
+ 'SEARCH_NEW' => 'View posts since last visit',
+ 'SEARCH_SELF' => 'View your posts',
+ 'SEARCH_UNANSWERED' => 'View unanswered posts',
+
+ 'REGISTER' => 'Register',
+ 'PROFILE' => 'User Control Panel',
+ 'SEARCH' => 'Search',
+ 'MEMBERLIST' => 'Members',
+ 'FAQ' => 'FAQ',
+ 'USERS' => 'Users',
+ 'USERGROUPS' => 'Groups',
+ 'LAST_POST' => 'Last Post',
+ 'MODERATOR' => 'Moderator',
+ 'MODERATORS' => 'Moderators',
+ 'New_pms' => '%d new messages',
+ 'New_pm' => '%d new message',
+ 'No_new_pm' => '0 new messages',
+ 'Unread_pms' => '%d unread messages',
+ 'Unread_pm' => '%d unread message',
+ 'No_unread_pm' => '0 unread messages',
+ 'You_new_pm' => 'A new private message is waiting for you in your Inbox',
+ 'You_new_pms' => 'New private messages are waiting for you in your Inbox',
+ 'You_no_new_pm' => 'No new private messages are waiting for you',
+
+
+ 'RECORD_ONLINE_USERS' => 'Most users ever online was %1$s on %2$s',
'Registered_users' => 'Registered Users:',
- 'Browsing_forum_guest' => 'Users browsing this forum: %s and %d guest',
- 'Browsing_forum_guests' => 'Users browsing this forum: %s and %d guests',
+ 'Browsing_forum_guest' => 'Users browsing this forum: %1$s and %2$d guest',
+ 'Browsing_forum_guests' => 'Users browsing this forum: %1$s and %2$d guests',
'Online_users_zero_total' => 'In total there are 0 users online :: ',
'Online_users_total' => 'In total there are %d users online :: ',
'Online_user_total' => 'In total there is %d user online :: ',
@@ -118,40 +168,6 @@ $lang = array_merge($lang, array(
'Guest_users_zero_total' => '0 Guests',
'Guest_users_total' => '%d Guests',
'Guest_user_total' => '%d Guest',
- 'Record_online_users' => 'Most users ever online was %s on %s',
- 'Legend' => 'Legend',
- 'Admin_online_color' => '%sAdministrator%s',
- 'Mod_online_color' => '%sModerator%s',
- 'User_online_color' => '%sUser%s',
- 'You_last_visit' => 'You last visited on %s',
- 'Current_time' => 'The time now is %s',
- 'SEARCH_NEW' => 'View posts since last visit',
- 'SEARCH_SELF' => 'View your posts',
- 'SEARCH_UNANSWERED' => 'View unanswered posts',
- 'REGISTER' => 'Register',
- 'PROFILE' => 'User Control Panel',
- 'Edit_profile' => 'Edit your profile',
- 'SEARCH' => 'Search',
- 'MEMBERLIST' => 'Members',
- 'FAQ' => 'FAQ',
- 'BBCode_guide' => 'BBCode Guide',
- 'USERS' => 'Users',
- 'USERGROUPS' => 'Groups',
- 'LAST_POST' => 'Last Post',
- 'MODERATOR' => 'Moderator',
- 'MODERATORS' => 'Moderators',
- 'VIEW_MODERATORS' => 'List forum moderators',
-
- 'New_pms' => '%d new messages',
- 'New_pm' => '%d new message',
- 'No_new_pm' => '0 new messages',
- 'Unread_pms' => '%d unread messages',
- 'Unread_pm' => '%d unread message',
- 'No_unread_pm' => '0 unread messages',
- 'You_new_pm' => 'A new private message is waiting for you in your Inbox',
- 'You_new_pms' => 'New private messages are waiting for you in your Inbox',
- 'You_no_new_pm' => 'No new private messages are waiting for you',
-
'Posted_articles_zero_total' => 'Our users have posted a total of 0 article',
'Posted_articles_total' => 'Our users have posted a total of %d articles',
'Posted_article_total' => 'Our users have posted a total of %d article',
@@ -162,7 +178,9 @@ $lang = array_merge($lang, array(
'Registered_users_total' => 'We have %d registered users',
'Registered_user_total' => 'We have %d registered user',
'Newest_user' => 'The newest registered user is %s%s%s',
+
'No_new_posts_last_visit' => 'No new posts since your last visit',
+
'NO_NEW_POSTS' => 'No new posts',
'NEW_POSTS' => 'New posts',
'NEW_POST' => 'New post',
@@ -170,9 +188,12 @@ $lang = array_merge($lang, array(
'NEW_POSTS_HOT' => 'New posts [ Popular ]',
'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]',
'NEW_POSTS_LOCKED' => 'New posts [ Locked ]',
+
'POST_STICKY' => 'Sticky',
'POST_ANNOUNCEMENT' => 'Announcement',
'FORUM_LOCKED' => 'Forum is locked',
+
+
'Enter_password' => 'Please enter your username and password to login',
'LOGIN' => 'Login',
'LOGOUT' => 'Logout',
@@ -181,72 +202,85 @@ $lang = array_merge($lang, array(
'Error_login' => 'You have specified an incorrect or inactive username or an invalid password',
'Index' => 'Index',
'No_Posts' => 'No Posts',
- 'No_forums' => 'This board has no forums',
+ 'NO_FORUMS' => 'This board has no forums',
+ 'NO_FORUM' => 'The forum you selected does not exist',
'Private_Message' => 'Private Message',
'Private_Messages' => 'Private Messages',
'WHO_IS_ONLINE' => 'Who is Online',
'MARK_FORUMS_READ' => 'Mark all forums read',
'Forums_marked_read' => 'All forums have been marked read',
'View_forum' => 'View Forum',
- 'Forum_not_exist' => 'The forum you selected does not exist',
'Reached_on_error' => 'You have reached this page in error',
'DISPLAY_TOPICS' => 'Display topics from previous',
- 'All_Topics' => 'All Topics',
+ 'ALL_TOPICS' => 'All Topics',
'Topic_Announcement' => 'Announcement:',
'Topic_Sticky' => 'Sticky:',
'Topic_Moved' => 'Moved:',
'Topic_Poll' => '[ Poll ]',
'MARK_TOPICS_READ' => 'Mark all topics read',
'Topics_marked_read' => 'The topics for this forum have now been marked read',
- 'Rules_post_can' => 'You can post new topics in this forum',
- 'Rules_post_cannot' => 'You cannot post new topics in this forum',
- 'Rules_reply_can' => 'You can reply to topics in this forum',
- 'Rules_reply_cannot' => 'You cannot reply to topics in this forum',
- 'Rules_attach_can' => 'You can post attachments in this forum',
- 'Rules_attach_cannot' => 'You cannot post attachments in this forum',
- 'Rules_download_can' => 'You can download attachments in this forum',
- 'Rules_download_cannot' => 'You cannot download attachments in this forum',
- 'Rules_edit_can' => 'You can edit your posts in this forum',
- 'Rules_edit_cannot' => 'You cannot edit your posts in this forum',
- 'Rules_delete_can' => 'You can delete your posts in this forum',
- 'Rules_delete_cannot' => 'You cannot delete your posts in this forum',
- 'Rules_vote_can' => 'You can vote in polls in this forum',
- 'Rules_vote_cannot' => 'You cannot vote in polls in this forum',
+
+
+ 'RULES_POST_CAN' => 'You can post new topics in this forum',
+ 'RULES_POST_CANNOT' => 'You cannot post new topics in this forum',
+ 'RULES_REPLY_CAN' => 'You can reply to topics in this forum',
+ 'RULES_REPLY_CANNOT' => 'You cannot reply to topics in this forum',
+ 'RULES_ATTACH_CAN' => 'You can post attachments in this forum',
+ 'RULES_ATTACH_CANNOT' => 'You cannot post attachments in this forum',
+ 'RULES_DOWNLOAD_CAN' => 'You can download attachments in this forum',
+ 'RULES_DOWNLOAD_CANNOT' => 'You cannot download attachments in this forum',
+ 'RULES_EDIT_CAN' => 'You can edit your posts in this forum',
+ 'RULES_EDIT_CANNOT' => 'You cannot edit your posts in this forum',
+ 'RULES_DELETE_CAN' => 'You can delete your posts in this forum',
+ 'RULES_DELETE_CANNOT' => 'You cannot delete your posts in this forum',
+ 'RULES_VOTE_CAN' => 'You can vote in polls in this forum',
+ 'RULES_VOTE_CANNOT' => 'You cannot vote in polls in this forum',
+
+
+ 'GUEST' => 'Guest',
'ACP' => '[ %sAdministration Control Panel%s ]',
'MCP' => '[ %sModerator Control Panel%s ]',
- 'No_topics_post_one' => 'There are no posts in this forum Click on the Post New Topic link on this page to post one',
+
+
+ 'NO_TOPICS' => 'There are no posts in this forum Click on the Post New Topic link on this page to post one',
+ 'NO_TOPIC' => 'The requested topic does not exist',
+
+
'Stop_watching_forum' => 'Stop watching this forum',
'Start_watching_forum' => 'Watch this forum for new posts',
'No_longer_watching_forum' => 'You are no longer watching this forum',
'You_are_watching_forum' => 'You are now watching this forum',
+
'View_topic' => 'View topic',
- 'GUEST' => 'Guest',
+
'POST_SUBJECT' => 'Post subject',
+
'PRINT_TOPIC' => 'Printable version',
'VIEW_NEXT_TOPIC' => 'View next topic',
'VIEW_PREVIOUS_TOPIC' => 'View previous topic',
- 'VIEW_RESULTS' => 'View Results',
- 'No_newer_topics' => 'There are no newer topics in this forum',
- 'No_older_topics' => 'There are no older topics in this forum',
- 'Topic_post_not_exist' => 'The topic or post you requested does not exist',
- 'No_posts_topic' => 'No posts exist for this topic',
- 'POST_BELOW_KARMA' => 'This post was made by user %s whose karma is below your desired minimum. To display this post click %sHERE%s.',
+ 'NO_NEWER_TOPICS' => 'There are no newer topics in this forum',
+ 'NO_OLDER_TOPICS' => 'There are no older topics in this forum',
+ 'POST_IGNORE' => 'This post was made by %s who is on your ignore list. To display this post click %sHERE%s.',
+ 'POST_BELOW_KARMA' => 'This post was made by %1$s whose karma rating of %2$d is below your desired minimum. To display this post click %3$sHERE%4$s.',
+ 'POST_ENCODING' => 'This post was made in a character set different to that being used here. Some text may display incorrectly. To view this post in its proper encoding click %sHERE%s.',
'DISPLAY_POSTS' => 'Display posts from previous',
'ALL_POSTS' => 'All Posts',
+
'BACK_TO_TOP' => 'Back to top',
- 'READ_PROFILE' => 'View users profile',
- 'SEND_EMAIL' => 'Send email',
- 'VISIT_WEBSITE' => 'Visit posters website',
+ 'READ_PROFILE' => 'Profile',
+ 'SEND_EMAIL' => 'Email',
+ 'VISIT_WEBSITE' => 'WWW',
'ICQ_STATUS' => 'ICQ Status',
- 'EDIT_DELETE_POST' => 'Edit/Delete this post',
- 'VIEW_IP' => 'View IP of poster',
- 'DELETE_POST' => 'Delete this post',
+ 'EDIT_POST' => 'Edit',
+ 'VIEW_IP' => 'IP',
+ 'DELETE_POST' => 'Delete',
'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
'wrote' => 'wrote',
'Quote' => 'Quote',
'Code' => 'Code',
- 'Edited_time_total' => 'Last edited by %s on %s, edited %d time in total',
- 'Edited_times_total' => 'Last edited by %s on %s, edited %d times in total',
+ 'EDITED_TIME_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d time in total',
+ 'EDITED_TIMES_TOTAL' => 'Last edited by %1$s on %2$s, edited %3$d times in total',
+
'QUICK_MOD' => 'Quick-mod tools',
'LOCK_TOPIC' => 'Lock topic',
'UNLOCK_TOPIC' => 'Unlock topic',
@@ -254,17 +288,15 @@ $lang = array_merge($lang, array(
'DELETE_TOPIC' => 'Delete topic',
'SPLIT_TOPIC' => 'Split topic',
'MERGE_TOPIC' => 'Merge topic',
+
'Stop_watching_topic' => 'Stop watching this topic',
'Start_watching_topic' => 'Watch this topic for replies',
'No_longer_watching_topic' => 'You are no longer watching this topic',
'You_are_watching_topic' => 'You are now watching this topic',
- 'Rate_topic' => 'Rate this topic',
- 'Very_poor' => 'Very Poor',
- 'Quite_poor' => 'Quite Poor',
- 'Unrated' => 'Unrated',
- 'Quite_good' => 'Quite Good',
- 'Very_good' => 'Very Good',
+
'Total_votes' => 'Total Votes',
+ 'VIEW_RESULTS' => 'View Results',
+
'MESSAGE_BODY' => 'Message body',
'MESSAGE_BODY_EXPLAIN' => 'Enter your message here, it may contain no more than %d characters.',
@@ -278,6 +310,7 @@ $lang = array_merge($lang, array(
'EDIT_POST' => 'Edit post',
'OPTIONS' => 'Options',
'POST_NORMAL' => 'Normal',
+
'CONFIRM_DELETE' => 'Are you sure you want to delete this post?',
'Confirm_delete_poll' => 'Are you sure you want to delete this poll?',
'Cannot_edit_time' => 'You can no longer edit or delete that post',
@@ -293,16 +326,18 @@ $lang = array_merge($lang, array(
'No_post_id' => 'No post ID was specified',
'No_topic_id' => 'You must select a topic to reply to',
'No_valid_mode' => 'You can only post, reply edit or quote messages, please return and try again',
- 'User_cannot_post' => 'You cannot post in this forum',
- 'User_cannot_reply' => 'You cannot reply in this forum',
- 'User_cannot_quote' => 'You cannot quote posts in this forum',
- 'User_cannot_edit' => 'You cannot edit posts in this forum',
- 'User_cannot_delete' => 'You cannot delete posts in this forum',
+
+ 'USER_CANNOT_POST' => 'You cannot post in this forum',
+ 'USER_CANNOT_REPLY' => 'You cannot reply in this forum',
+ 'USER_CANNOT_QUOTE' => 'You cannot quote posts in this forum',
+ 'USER_CANNOT_EDIT' => 'You cannot edit posts in this forum',
+ 'USER_CANNOT_DELETE' => 'You cannot delete posts in this forum',
+ 'CANNOT_DELETE_REPLIED' => 'Sorry but you may not delete posts that have been replied to',
+ 'CANNOT_DELETE_POLL' => 'Sorry but you cannot delete an active poll',
+ 'EDIT_OWN_POSTS' => 'Sorry but you can only edit your own posts',
+ 'DELETE_OWN_POSTS' => 'Sorry but you can only delete your own posts',
+
'No_such_post' => 'There is no such post, please return and try again',
- 'Edit_own_posts' => 'Sorry but you can only edit your own posts',
- 'Delete_own_posts' => 'Sorry but you can only delete your own posts',
- 'Cannot_delete_replied' => 'Sorry but you may not delete posts that have been replied to',
- 'Cannot_delete_poll' => 'Sorry but you cannot delete an active poll',
'Empty_poll_title' => 'You must enter a title for your poll',
'Too_few_poll_options' => 'You must enter at least two poll options',
'Too_many_poll_options' => 'You have tried to enter too many poll options',
@@ -328,16 +363,16 @@ $lang = array_merge($lang, array(
'DISABLE_BBCODE' => 'Disable BBCode',
'DISABLE_SMILIES' => 'Disable Smilies',
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
- 'HTML_is_ON' => 'HTML is ON',
- 'HTML_is_OFF' => 'HTML is OFF',
- 'BBCode_is_ON' => '%sBBCode%s is ON',
- 'BBCode_is_OFF' => '%sBBCode%s is OFF',
- 'Smilies_are_ON'=> 'Smilies are ON',
- 'Smilies_are_OFF'=> 'Smilies are OFF',
- 'Images_are_ON' => '[img] is ON',
- 'Images_are_OFF'=> '[img] is OFF',
- 'Flash_is_ON' => '[flash] is ON',
- 'Flash_is_OFF' => '[flash] is ON',
+ 'HTML_IS_ON' => 'HTML is ON',
+ 'HTML_IS_OFF' => 'HTML is OFF',
+ 'BBCODE_IS_ON' => '%sBBCode%s is ON',
+ 'BBCODE_IS_OFF' => '%sBBCode%s is OFF',
+ 'SMILIES_ARE_ON'=> 'Smilies are ON',
+ 'SMILIES_ARE_OFF'=> 'Smilies are OFF',
+ 'IMAGES_ARE_ON' => '[img] is ON',
+ 'IMAGES_ARE_OFF'=> '[img] is OFF',
+ 'FLASH_IS_ON' => '[flash] is ON',
+ 'FLASH_IS_OFF' => '[flash] is ON',
'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)',
'NOTIFY_REPLY' => 'Send me an email when a reply is posted',
'SAVE' => 'Save',
@@ -372,6 +407,7 @@ $lang = array_merge($lang, array(
'CLOSE_WINDOW' => 'Close Window',
'Topic_reply_notification' => 'Topic Reply Notification',
+
'User_control_panel' => 'User Control Panel',
'UCP_Main' => 'Control Panel',
'UCP_Profile' => 'Profile Settings',
@@ -434,6 +470,8 @@ $lang = array_merge($lang, array(
'Sentbox_size' => 'Your Sentbox is %d%% full',
'Savebox_size' => 'Your Savebox is %d%% full',
'Click_view_privmsg' => 'Click %sHere%s to visit your Inbox',
+
+
'Viewing_user_profile' => 'Viewing profile :: %s',
'About_user' => 'All about %s',
'Preferences' => 'Preferences',
@@ -543,6 +581,7 @@ $lang = array_merge($lang, array(
'AGREE' => 'I agree to these terms',
'CONFIRM_CODE' => 'Confirmation code',
'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as you see it in the image',
+
'Wrong_activation' => 'The activation key you supplied does not match any in the database',
'Send_password' => 'Send me a new password',
@@ -641,6 +680,8 @@ $lang = array_merge($lang, array(
'Subscribe' => 'Subscribe',
'Unsubscribe' => 'Unsubscribe',
'View_Information' => 'View Information',
+
+
'Search_query' => 'Search Query',
'Search_options' => 'Search Options',
'Search_keywords' => 'Search for Keywords',
@@ -670,6 +711,8 @@ $lang = array_merge($lang, array(
'No_search_match' => 'No topics or posts met your search criteria',
'Found_search_match' => 'Search found %d match',
'Found_search_matches' => 'Search found %d matches',
+
+
'Sorry_auth_announce' => 'Sorry but only %s can post announcements in this forum',
'Sorry_auth_sticky' => 'Sorry but only %s can post sticky messages in this forum',
'Sorry_auth_read' => 'Sorry but only %s can read topics in this forum',
@@ -685,7 +728,8 @@ $lang = array_merge($lang, array(
'Auth_Administrators' => 'administrators',
'Not_Moderator' => 'You are not a moderator of this forum',
'Not_Authorised' => 'Not Authorised',
- 'You_been_banned' => 'You have been banned from this forum Please contact the %sboard administrator%s for more information',
+
+
'Reg_users_zero_online' => 'There are 0 Registered users and ',
'Reg_users_online' => 'There are %d Registered users and ',
'Reg_user_online' => 'There is %d Registered user and ',
@@ -710,6 +754,7 @@ $lang = array_merge($lang, array(
'Viewing_priv_msgs' => 'Viewing Private Messages',
'Viewing_FAQ' => 'Viewing FAQ',
+
'MOD_CP' => 'Moderator Control Panel',
'MOD_CP_EXPLAIN' => 'Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics.',
'SELECT' => 'Select',
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 56e6fa2c6f..53ef269ddc 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -24,39 +24,45 @@ $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
+
// Start initial var setup
-$mark_read = (!empty($_GET['mark'])) ? $_GET['mark'] : '';
$forum_id = (!empty($_GET['f'])) ? intval($_GET['f']) : 0;
$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0;
-$sort_key = (!empty($_POST['sort_key'])) ? $_POST['sort_key']{0} : 't';
-$sort_dir = (!empty($_POST['sort_dir'])) ? $_POST['sort_dir']{0} : 'd';
-// End initial var setup
+$mark_read = (!empty($_GET['mark'])) ? $_GET['mark'] : '';
+$sort_days = (!empty($_REQUEST['sort_days'])) ? intval($_REQUEST['sort_days']) : 0;
+$sort_key = (!empty($_REQUEST['sort_key'])) ? $_REQUEST['sort_key'] : 't';
+$sort_dir = (!empty($_REQUEST['sort_dir'])) ? $_REQUEST['sort_dir'] : 'd';
+
// Start session
//$user->fetch_data(array());
$user->start();
+
// Check if the user has actually sent a forum ID with his/her request
// If not give them a nice error page.
if (!$forum_id)
{
- trigger_error('Forum_not_exist');
+ trigger_error('NO_FORUM');
}
+
+// Grab appropriate forum data
if ($user->data['user_id'] == ANONYMOUS)
{
- $sql = 'SELECT * FROM ' . FORUMS_TABLE . ' WHERE forum_id = ' . $forum_id;
+ $sql = 'SELECT *
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $forum_id;
}
else
{
switch (SQL_LAYER)
{
- //TODO
case 'oracle':
- break;
+ //TODO
+ break;
default:
-
/*
$sql = 'SELECT f.*, tw.topics_list, fw.notify_status
FROM ' . FORUMS_TABLE . ' f
@@ -64,28 +70,36 @@ else
LEFT JOIN " . FORUMS_WATCH_TABLE . ' fw ON fw.user_id = ' . $user->data['user_id'] . ' AND f.forum_id = fw.forum_id
WHERE f.forum_id = ' . $forum_id;
*/
- $sql = 'SELECT f.*, fw.notify_status, lr.lastread_time, lr.lastread_type
- FROM ' . FORUMS_TABLE . ' f
- LEFT JOIN '.LASTREAD_TABLE.' lr ON (
- lr.user_id = '.$user->data['user_id'].'
- AND lr.forum_id = '.-$forum_id.')
- LEFT JOIN ' . FORUMS_WATCH_TABLE . ' fw ON (
- fw.user_id = ' . $user->data['user_id'] . '
- AND f.forum_id = fw.forum_id)
+ $sql = 'SELECT f.*, fw.notify_status
+ FROM (' . FORUMS_TABLE . ' f
+ LEFT JOIN ' . FORUMS_WATCH_TABLE . ' fw ON fw.forum_id = f.forum_id
+ AND fw.user_id = ' . $user->data['user_id'] . ')
WHERE f.forum_id = ' . $forum_id;
+ // UNION if necessary?
+/* $sql = "SELECT *
+ FROM " . FORUMS_TABLE . "
+ WHERE forum_id = $forum_id
+ UNION
+ SELECT notify_status, NULL, NULL, ...
+ FROM " . FORUMS_WATCH_TABLE . "
+ WHERE forum_id = $forum_id
+ AND user_id = " . $user->data['user_id'];*/
}
}
$result = $db->sql_query($sql);
if (!$forum_data = $db->sql_fetchrow($result))
{
- trigger_error('Forum_not_exist');
+ trigger_error('NO_FORUM');
}
+$db->sql_freeresult($result);
+
// Configure style, language, etc.
$user->setup(false, $forum_data['forum_style']);
$auth->acl($user->data, $forum_id);
-// Auth check
+
+// Permissions check
if (!$auth->acl_gets('f_read', 'm_', 'a_', $forum_id))
{
if ($user->data['user_id'] == ANONYMOUS)
@@ -93,17 +107,17 @@ if (!$auth->acl_gets('f_read', 'm_', 'a_', $forum_id))
redirect("login.$phpEx$SID&redirect=viewforum.$phpEx&f=$forum_id" . ((isset($start)) ? "&start=$start" : ''));
}
- trigger_error('Sorry_auth_read');
+ trigger_error('SORRY_AUTH_READ');
}
-// End of auth check
+
// Build navigation links
generate_forum_nav($forum_data);
-// Moderators
-$forum_moderators = array();
// Do we have subforums?
+$moderators = array();
+
if ($forum_data['left_id'] != $forum_data['right_id'] - 1)
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
@@ -112,9 +126,10 @@ if ($forum_data['left_id'] != $forum_data['right_id'] - 1)
else
{
$template->assign_var('S_HAS_SUBFORUM', FALSE);
- get_moderators($forum_moderators, $forum_id);
+ get_moderators($moderators, $forum_id);
}
+
// Output forum listing if it is postable
if ($forum_data['forum_postable'])
{
@@ -130,12 +145,12 @@ if ($forum_data['forum_postable'])
);
}
- $message = $user->lang['Topics_marked_read'] . '