replaced return; with return undef;
This commit is contained in:
parent
ffa90c5fbd
commit
fa09c41598
113 changed files with 287 additions and 286 deletions
|
|
@ -54,7 +54,7 @@ Handles a click on an advertisement.
|
|||
sub www_clickAd {
|
||||
my $session = shift;
|
||||
my $id = $session->form->param("id");
|
||||
return unless $id;
|
||||
return undef unless $id;
|
||||
my $url = WebGUI::AdSpace->countClick($session, $id);
|
||||
$session->http->setRedirect($url);
|
||||
return "Redirecting to $url";
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ and set the __PROCESSED flag to prevent processing entries twice.
|
|||
|
||||
sub _process {
|
||||
my ($session, $helpEntry, $key) = @_;
|
||||
return if exists($helpEntry->{__PROCESSED}) and $helpEntry->{__PROCESSED};
|
||||
return undef if exists($helpEntry->{__PROCESSED}) and $helpEntry->{__PROCESSED};
|
||||
$helpEntry->{related} = [ _related($session, $helpEntry->{related}) ];
|
||||
##Add an ISA link unless it already exists.
|
||||
##This simplifies handling later.
|
||||
|
|
@ -157,7 +157,7 @@ sub _get {
|
|||
}
|
||||
else {
|
||||
$session->errorHandler->warn("Unable to load help for $namespace -> $id");
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ sub www_ssoViaSessionId {
|
|||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,12 +41,12 @@ An instanciated session object.
|
|||
sub _getSpeller {
|
||||
my ($baseDir, $userDir, $homeDir);
|
||||
my $session = shift;
|
||||
return unless Text::Aspell->can('new');
|
||||
return undef unless Text::Aspell->can('new');
|
||||
my $speller = Text::Aspell->new;
|
||||
|
||||
# Get language
|
||||
my $lang = $session->form->process('lang');
|
||||
return unless (isIn($lang, map {m/^.*?:([^:]*):.*?$/} $speller->list_dictionaries));
|
||||
return undef unless (isIn($lang, map {m/^.*?:([^:]*):.*?$/} $speller->list_dictionaries));
|
||||
|
||||
# User homedir
|
||||
my $userId = $session->user->userId;
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ Allows an administrator to assume another user.
|
|||
sub www_becomeUser {
|
||||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless canEdit($session);
|
||||
return unless WebGUI::User->validUserId($session, $session->form->process("uid"));
|
||||
return undef unless WebGUI::User->validUserId($session, $session->form->process("uid"));
|
||||
$session->var->end($session->var->get("sessionId"));
|
||||
$session->user({userId=>$session->form->process("uid")});
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ sub www_setWorkingVersionTag {
|
|||
$tag->setWorking();
|
||||
}
|
||||
if ($session->form->param("backToSite")) {
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
return www_manageVersions($session);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue