Fix the error message shown when you try to send a message from the Inbox, but none
of your friends allow private messaging.
This commit is contained in:
parent
e1f71f655d
commit
d6edd7f3a3
3 changed files with 17 additions and 2 deletions
|
|
@ -1129,7 +1129,8 @@ sub www_sendMessage {
|
|||
my $activeFriendCount = 0;
|
||||
#Append this users friends to the template
|
||||
my @friendsLoop = ();
|
||||
foreach my $friendId (keys %{$friends}) {
|
||||
my @friendIds = keys %{ $friends };
|
||||
foreach my $friendId (@friendIds) {
|
||||
my $friend = WebGUI::User->new($session,$friendId);
|
||||
#This friend has private messages turned off
|
||||
my $disabled = "disabled";
|
||||
|
|
@ -1162,13 +1163,21 @@ sub www_sendMessage {
|
|||
}
|
||||
|
||||
#You can't send new messages if you don't have any friends to send to
|
||||
unless($activeFriendCount) {
|
||||
unless(@friendIds) {
|
||||
my $i18n = WebGUI::International->new($session,'Account_Inbox');
|
||||
$errorMsg = $i18n->get("no friends error");
|
||||
$var->{'isInbox'} = "true";
|
||||
return $self->showError($var,$errorMsg,$backUrl,$self->getInboxErrorTemplateId);
|
||||
}
|
||||
|
||||
#You can't send new messages if you don't have any friends to send to
|
||||
unless($activeFriendCount) {
|
||||
my $i18n = WebGUI::International->new($session,'Account_Inbox');
|
||||
$errorMsg = $i18n->get("no messagable friends error");
|
||||
$var->{'isInbox'} = "true";
|
||||
return $self->showError($var,$errorMsg,$backUrl,$self->getInboxErrorTemplateId);
|
||||
}
|
||||
|
||||
$var->{'friends_loop' } = \@friendsLoop;
|
||||
$var->{'checked_fiends_loop'} = \@checkedFriends;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -340,6 +340,11 @@ our $I18N = {
|
|||
lastUpdated => 1181019679,
|
||||
},
|
||||
|
||||
'no messagable friends error' => {
|
||||
message => q{None of your friends allow private messaging.},
|
||||
lastUpdated => 1244494607,
|
||||
},
|
||||
|
||||
'no friends hover' => {
|
||||
message => q{You must have active friends in the system if you wish to send new private messages without having to first locate their profile},
|
||||
lastUpdated => 1181019679,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue