Added WebGUI::Asset::File::GalleryFile
Changed Photo to subclass WebGUI::Asset::File::GalleryFile
This commit is contained in:
parent
9695b704c5
commit
3842ebf6fa
23 changed files with 360 additions and 115 deletions
|
|
@ -5,6 +5,9 @@
|
|||
- Added ability to edit comments. Entirely changed how comments work in prep
|
||||
for turning it into a mixin.
|
||||
- fixed: Child assets not indicated by plus sign in uncommited tags
|
||||
- Added WebGUI::Asset::File::GalleryFile as a subclass for all files to be
|
||||
used inside the Gallery.
|
||||
- Changed WebGUI::Asset::File::Image::Photo to subclass GalleryFile
|
||||
|
||||
7.5.4
|
||||
- fixed: unable to remove calendar feeds in IE6
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -25,6 +25,7 @@ my $session = start(); # this line required
|
|||
# upgrade functions go here
|
||||
addGalleryEditCommentTemplate( $session );
|
||||
addGalleryRichEditAlbum( $session );
|
||||
migrateToGalleryFile( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -58,6 +59,29 @@ sub addGalleryRichEditAlbum {
|
|||
$session->db->write( q{
|
||||
ALTER TABLE Gallery ADD COLUMN richEditIdAlbum VARCHAR(22) BINARY
|
||||
} );
|
||||
$session->db->write( q{
|
||||
ALTER TABLE Gallery ADD COLUMN richEditIdFile VARCHAR(22) BINARY
|
||||
} );
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Move File::Image::Photos to File::GalleryFile::Photos
|
||||
sub migrateToGalleryFile {
|
||||
my $session = shift;
|
||||
print "\tMigrating Image::Photos to GalleryFile::Photos (this may take time)..." unless $quiet;
|
||||
|
||||
# Change WebGUI::Asset::File::Image::Photo to WebGUI::Asset::File::GalleryFile::Photo
|
||||
$session->db->write( q{
|
||||
UPDATE asset SET className='WebGUI::Asset::File::GalleryFile::Photo' WHERE
|
||||
className='WebGUI::Asset::File::Image::Photo'
|
||||
});
|
||||
|
||||
# Delete Photos from ImageAsset table
|
||||
$session->db->write(
|
||||
"DELETE FROM ImageAsset WHERE assetId IN ( SELECT assetId FROM Photo )"
|
||||
);
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue