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
|
|
@ -10,6 +10,7 @@
|
|||
- fixed #9356: Data Form Mail Fields
|
||||
- fixed #9365: Account: when viewing another person's contribution, it displays my name
|
||||
- fixed #9351: Cannot translate phrase
|
||||
- fixed #9368: Gallery: All children included into navigation
|
||||
|
||||
7.6.7
|
||||
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -739,6 +739,21 @@ sub setComment {
|
|||
);
|
||||
}
|
||||
|
||||
####################################################################
|
||||
|
||||
=head2 update
|
||||
|
||||
Wrap update so that isHidden is always set to be a 1.
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
return $self->SUPER::update({%$properties, isHidden => 1});
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 view ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue