diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php
index 66b3307cf0..c5b5587a2b 100755
--- a/phpBB/language/lang_english.php
+++ b/phpBB/language/lang_english.php
@@ -167,9 +167,14 @@ $lang['No_Posts'] = "No Posts";
$lang['Forum_Index'] = "Forum Index";
$lang['No_forums'] = "This board has no forums";
+$lang['Private_Messages'] = "Private Messages";
+$lang['Who_is_Online'] = "Who is Online";
+
//
// Viewforum
//
+$lang['View_forum'] = "View Forum";
+
$lang['Forum_not_exist'] = "The forum you selected does not exist, please go back and try again";
$lang['Reached_on_error'] = "You have reached this page in error, please go back and try again";
@@ -181,6 +186,7 @@ $lang['Sticky'] = "Sticky:";
// Viewtopic
//
$lang['View_topic'] = "View topic";
+
$lang['Guest'] = 'Guest';
$lang['Post_subject'] = "Post subject";
$lang['View_next_topic'] = "View next topic";
@@ -265,6 +271,8 @@ $lang['to_return_topic'] = "to return to the topic";
//
// Private Messaging
//
+$lang['Private_Messaging'] = "Private Messaging";
+
$lang['You_have'] = "You have"; // followed by "x new message/s"
$lang['new'] = "new"; // see above
$lang['message'] = "message"; // see above
@@ -285,6 +293,8 @@ $lang['Mark'] = "Mark";
$lang['Display_messages'] = "Display messages from previous"; // Followed by number of days/weeks/months
$lang['All_Messages'] = "All Messages";
+$lang['No_messages_folder'] = "You have no messages in this folder";
+
$lang['Cannot_send_privmsg'] = "Sorry but you are not currently allowed to send private messages.";
$lang['No_to_user'] = "You must specify a username to send this message";
$lang['No_such_user'] = "Sorry but no such user exists";
@@ -463,6 +473,7 @@ $lang['Non_member_groups'] = "Non-member groups";
$lang['Memberships_pending'] = "Memberships pending";
$lang['Join_group'] = "Join Group";
+$lang['No_group_members'] = "This group has no members";
$lang['This_open_group'] = "This is an open group, click to request membership";
$lang['This_closed_group'] = "This is a closed group, no more users accepted";
@@ -613,24 +624,12 @@ $lang[11] = "GMT + 11" . " " . $lang['Hours'];
$lang[12] = "GMT + 12" . " " . $lang['Hours'];
//
+// End
+// -------------------------------------------------
+
+// -------------------------------------------------
// Old format ... _DON'T_add_any_ new entries here!!
//
-// Index page
-// Members and profile
-// Viewforum
-// Private forums
-// Viewtopic
-// Functions
-// Page_header
-$l_statsblock = '$statsblock = "Our users have posted a total of -$total_posts- $l_messages.
-We have -$total_users- Registered Users.
-The newest Registered User is -$newest_user-.
--$users_online- ". ($users_online==1?"user is":"users are") ." currently browsing the forums.
";';
-$l_privnotify = '$privnotify = "
You have $new_message new private ".($new_message>1?"messages":"message").".";';
-
-// Page_tail
-// Auth
-
// Register
$l_mailingaddress =
"
diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php
index 45e388cca2..b1ce1074e4 100644
--- a/phpBB/privmsg.php
+++ b/phpBB/privmsg.php
@@ -1209,50 +1209,62 @@ if(!$pm_status = $db->sql_query($sql))
message_die(GENERAL_ERROR, "Could not query private messages.", "", __LINE__, __FILE__, $sql);
}
$pm_total = $db->sql_numrows($pm_tot_status);
+$pm_count = $db->sql_numrows($pm_status);
$pm_list = $db->sql_fetchrowset($pm_status);
//
// Okay, let's build the correct folder
//
-for($i = 0; $i < count($pm_list); $i++)
+if($pm_count)
{
- $privmsg_id = $pm_list[$i]['privmsgs_id'];
-
- $flag = $pm_list[$i]['privmsgs_type'];
- $icon_flag = ($flag == PRIVMSGS_READ_MAIL || $flag == PRIVMSGS_SAVED_MAIL || $flag == PRIVMSGS_SENT_MAIL) ? "" : "
";
-
- $msg_userid = $pm_list[$i]['user_id'];
- $msg_username = stripslashes($pm_list[$i]['username']);
-
- $u_from_user_profile = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$msg_userid");
-
- $msg_subject = stripslashes($pm_list[$i]['privmsgs_subject']);
- $u_subject = append_sid("privmsg.$phpEx?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id");
-
- $msg_date = create_date($board_config['default_dateformat'], $pm_list[$i]['privmsgs_date'], $board_config['default_timezone']);
-
- if($flag == PRIVMSGS_NEW_MAIL && $folder == "inbox")
+ for($i = 0; $i < $pm_count; $i++)
{
- $msg_subject = "" . $msg_subject . "";
- $msg_date = "" . $msg_date . "";
- $msg_username = "" . $msg_username . "";
- }
+ $privmsg_id = $pm_list[$i]['privmsgs_id'];
- $row_color = (!($i % 2)) ? "#".$theme['td_color1'] : "#".$theme['td_color2'];
+ $flag = $pm_list[$i]['privmsgs_type'];
+ $icon_flag = ($flag == PRIVMSGS_READ_MAIL || $flag == PRIVMSGS_SAVED_MAIL || $flag == PRIVMSGS_SENT_MAIL) ? "
" : "
";
- $template->assign_block_vars("listrow", array(
- "ICON_FLAG_IMG" => $icon_flag,
- "FROM" => $msg_username,
- "SUBJECT" => $msg_subject,
- "DATE" => $msg_date,
- "ROW_COLOR" => $row_color,
+ $msg_userid = $pm_list[$i]['user_id'];
+ $msg_username = stripslashes($pm_list[$i]['username']);
- "S_DEL_CHECKBOX" => "",
+ $u_from_user_profile = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$msg_userid");
- "U_READ" => $u_subject,
- "U_FROM_USER_PROFILE" => $u_from_user_profile)
+ $msg_subject = stripslashes($pm_list[$i]['privmsgs_subject']);
+ $u_subject = append_sid("privmsg.$phpEx?folder=$folder&mode=read&" . POST_POST_URL . "=$privmsg_id");
+
+ $msg_date = create_date($board_config['default_dateformat'], $pm_list[$i]['privmsgs_date'], $board_config['default_timezone']);
+
+ if($flag == PRIVMSGS_NEW_MAIL && $folder == "inbox")
+ {
+ $msg_subject = "" . $msg_subject . "";
+ $msg_date = "" . $msg_date . "";
+ $msg_username = "" . $msg_username . "";
+ }
+
+ $row_color = (!($i % 2)) ? "#".$theme['td_color1'] : "#".$theme['td_color2'];
+
+ $template->assign_block_vars("listrow", array(
+ "ICON_FLAG_IMG" => $icon_flag,
+ "FROM" => $msg_username,
+ "SUBJECT" => $msg_subject,
+ "DATE" => $msg_date,
+ "ROW_COLOR" => $row_color,
+
+ "S_DEL_CHECKBOX" => "",
+
+ "U_READ" => $u_subject,
+ "U_FROM_USER_PROFILE" => $u_from_user_profile)
+ );
+ } // for ...
+}
+else
+{
+ $template->assign_vars(array(
+ "L_NO_MESSAGES" => $lang['No_messages_folder'])
);
-} // for ...
+
+ $template->assign_block_vars("nomessages", array() );
+}
$template->assign_vars(array(
"PAGINATION" => generate_pagination("privmsg.$phpEx?folder=$folder", $pm_total, $board_config['topics_per_page'], $start),
diff --git a/phpBB/templates/PSO/privmsgs_body.tpl b/phpBB/templates/PSO/privmsgs_body.tpl
index 5f6cb9f797..fb84d9c41e 100644
--- a/phpBB/templates/PSO/privmsgs_body.tpl
+++ b/phpBB/templates/PSO/privmsgs_body.tpl
@@ -32,6 +32,11 @@