remove WebGUI::Utility::isIn
This commit is contained in:
parent
0e754a51e4
commit
6aa26c2e44
61 changed files with 126 additions and 148 deletions
|
|
@ -227,7 +227,7 @@ sub getFormElement {
|
|||
$param{value} = ($data->{defaultValue} =~ /checked/xi) ? 1 : "";
|
||||
}
|
||||
|
||||
if (WebGUI::Utility::isIn($data->{fieldType},qw(SelectList CheckList SelectBox Attachments SelectSlider))) {
|
||||
if ($data->{fieldType} ~~ [qw(SelectList CheckList SelectBox Attachments SelectSlider)]) {
|
||||
my @defaultValues;
|
||||
if ($self->session->form->param($name)) {
|
||||
@defaultValues = $self->session->form->selectList($name);
|
||||
|
|
@ -358,7 +358,7 @@ sub view {
|
|||
|
||||
my $currentUrlWithoutSort = $self->getUrl();
|
||||
foreach ($form->param) {
|
||||
unless (WebGUI::Utility::isIn($_,qw(sortBy sortOrder op func)) || $_ =~ /identifier/i || $_ =~ /password/i) {
|
||||
unless ( $_ ~~ [qw(sortBy sortOrder op func), qr/identifier/i, qr/password/i]) {
|
||||
$currentUrlWithoutSort = $url->append($currentUrlWithoutSort, $url->escape($_)
|
||||
.'='.$url->escape($form->process($_)));
|
||||
}
|
||||
|
|
@ -502,7 +502,7 @@ sub view {
|
|||
}
|
||||
|
||||
my @sortByUserProperties = ('dateCreated', 'lastUpdated', 'karma', 'userId');
|
||||
if(isIn($sortBy,@sortByUserProperties)){
|
||||
if( $sortBy ~~ @sortByUserProperties ){
|
||||
$sortBy = 'users.'.$sortBy;
|
||||
}
|
||||
$sortBy = join '.', map { $dbh->quote_identifier($_) } split /\./, $sortBy;
|
||||
|
|
@ -550,7 +550,7 @@ sub view {
|
|||
# Handle special case of alias, which does not have a default value but is set to the username by default
|
||||
$value = $user->{userName} if ($profileFieldName eq 'alias' && $value eq '');
|
||||
my %profileFieldValues;
|
||||
if (WebGUI::Utility::isIn(ucfirst $profileField->{fieldType},qw(File Image)) && $value ne ''){
|
||||
if ((ucfirst $profileField->{fieldType}) ~~ [qw(File Image)]) && $value ne ''){
|
||||
my $file = WebGUI::Form::DynamicField->new($self->session,
|
||||
fieldType=>$profileField->{fieldType},
|
||||
value=>$value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue