Set isHidden=1 in GalleryFile by default, to prevent some navigations from having
problems. Update existing GalleryFile assets to set isHidden=1.
This commit is contained in:
parent
e66e2d04cc
commit
51d1955671
3 changed files with 31 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ use Getopt::Long;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Asset::File::GalleryFile;
|
||||
use WebGUI::Shop::Pay;
|
||||
use WebGUI::Shop::PayDriver;
|
||||
|
||||
|
|
@ -32,6 +33,7 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
setDefaultItransactCredentialTemplate($session);
|
||||
hideGalleryPhotos($session);
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
|
|
@ -56,6 +58,19 @@ sub setDefaultItransactCredentialTemplate {
|
|||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
sub hideGalleryPhotos {
|
||||
my $session = shift;
|
||||
print "\tSet the isHidden bit in all Photos so your navigations do not blow up... " unless $quiet;
|
||||
# and here's our code
|
||||
my $getAPhoto = WebGUI::Asset::File::GalleryFile->getIsa($session);
|
||||
while (my $photo = $getAPhoto->()) {
|
||||
$photo->update(isHidden => 1);
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
#sub exampleFunction {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue