cleaning up warnings/variable redefinition and pod
This commit is contained in:
parent
807a5ad09e
commit
dd90696d7c
5 changed files with 20 additions and 19 deletions
|
|
@ -67,15 +67,15 @@ sub appendCommonVars {
|
|||
|
||||
Calls the method passed in
|
||||
|
||||
=method
|
||||
=head3 method
|
||||
|
||||
Method to call. If no method is passed in, the view method is called
|
||||
|
||||
=args
|
||||
=head3 args
|
||||
|
||||
array reference of arguments to pass to the method being called.
|
||||
|
||||
=uid
|
||||
=head3 uid
|
||||
|
||||
uid to set in the object.
|
||||
|
||||
|
|
@ -123,11 +123,11 @@ sub callMethod {
|
|||
|
||||
Wraps the content in the style and layout of the account pluggin
|
||||
|
||||
=content
|
||||
=head3 content
|
||||
|
||||
Content to wrap in the pluggin style and layout
|
||||
|
||||
=withoutStyle
|
||||
=head3 withoutStyle
|
||||
|
||||
Return the layout without the style wrapper
|
||||
|
||||
|
|
|
|||
|
|
@ -899,7 +899,7 @@ sub www_getCompareFormData {
|
|||
my $sort = $session->scratch->get('sort') || $self->get('defaultSort');
|
||||
my $sortDirection = ' asc';
|
||||
|
||||
if ( WebGUI::Utility::isIn($sort),qw(revisionDate score)) {
|
||||
if ( WebGUI::Utility::isIn($sort, qw(revisionDate score)) ) {
|
||||
$sortDirection = " desc";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ sub rejectAddRequest {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 sendAddRequest ( userId, message )
|
||||
=head2 sendAddRequest ( userId, message, inviteUrl )
|
||||
|
||||
Sends a request to another user to be added to this user's friends list. Returns an invitationId.
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ The user to invite to be a friend.
|
|||
|
||||
The message to lure them to accept.
|
||||
|
||||
=head inviteUrl
|
||||
=head3 inviteUrl
|
||||
|
||||
The url to view the friend request
|
||||
|
||||
|
|
@ -410,4 +410,4 @@ sub sendMessage {
|
|||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -151,22 +151,23 @@ sub validateProfileData {
|
|||
my $opts = shift || {};
|
||||
my $regOnly = $opts->{regOnly};
|
||||
|
||||
my $error = "";
|
||||
my $warning = "";
|
||||
my $fields = $regOnly ? WebGUI::ProfileField->getRegistrationFields($session)
|
||||
: WebGUI::ProfileField->getEditableFields($session);
|
||||
|
||||
my $retHash = $session->user->validateProfileDataFromForm($fields);
|
||||
|
||||
my $warnings = $retHash->{warnings};
|
||||
my $errors = $retHash->{errors};
|
||||
|
||||
my $format = "<li>%s</li>";
|
||||
my $warningMessage = "";
|
||||
my $errorMessage = "";
|
||||
|
||||
map { $warning .= sprintf($format,$_) }@{$warnings};
|
||||
map { $error .= sprintf($format,$_) }@{$errors};
|
||||
|
||||
return ($retHash->{profile},$error,$warning);
|
||||
for my $warning ( @{ $retHash->{warnings} } ) {
|
||||
$warningMessage .= sprintf $format, $warning;
|
||||
}
|
||||
for my $error ( @{ $retHash->{errors} } ) {
|
||||
$errorMessage .= sprintf $format, $error;
|
||||
}
|
||||
|
||||
return ($retHash->{profile}, $errorMessage, $warningMessage);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use Data::Dumper;
|
|||
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use Test::More tests => 20; # increment this value for each test you create
|
||||
use Test::More tests => 19; # increment this value for each test you create
|
||||
use WebGUI::Asset::Wobject::SyndicatedContent;
|
||||
use XML::FeedPP;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue