remove WebGUI::Utility::isIn

This commit is contained in:
Graham Knop 2010-09-07 12:33:15 -05:00
parent 0e754a51e4
commit 6aa26c2e44
61 changed files with 126 additions and 148 deletions

View file

@ -38,7 +38,7 @@ it will return 0 and an error message.
sub addFile {
my ($self, $type, $uri) = @_;
return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER');
return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER'];
return 0, 'No URI' unless $uri;
my $collateralType = $type eq 'JS' ? 'jsFiles'
: $type eq 'CSS' ? 'cssFiles'
@ -412,7 +412,7 @@ types of files.
sub deleteFiles {
my ($self, $type) = @_;
return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER');
return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER'];
my $collateralType = $type eq 'JS' ? 'jsFiles'
: $type eq 'CSS' ? 'cssFiles'
: 'otherFiles';
@ -440,7 +440,7 @@ The unique collateral GUID to delete from the bundle.
sub deleteFile {
my ($self, $type, $fileId) = @_;
return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER');
return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER'];
return 0, 'No fileId' unless $fileId;
my $collateralType = $type eq 'JS' ? 'jsFiles'
: $type eq 'CSS' ? 'cssFiles'
@ -714,7 +714,7 @@ The unique collateral GUID to move in the bundle.
sub moveFileDown {
my ($self, $type, $fileId) = @_;
return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER');
return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER'];
return 0, 'No fileId' unless $fileId;
my $collateralType = $type eq 'JS' ? 'jsFiles'
: $type eq 'CSS' ? 'cssFiles'
@ -748,7 +748,7 @@ The unique collateral GUID to move in the bundle.
sub moveFileUp {
my ($self, $type, $fileId) = @_;
return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER');
return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER'];
return 0, 'No fileId' unless $fileId;
my $collateralType = $type eq 'JS' ? 'jsFiles'
: $type eq 'CSS' ? 'cssFiles'