From: <no...@kr...> - 2008-11-26 19:16:28
|
Revision: 5682 Author: noam Date: 2008-11-26 14:16:24 -0500 (Wed, 26 Nov 2008) Log Message: ----------- made trunk v3.05 and separated v3.04 and v3.05 upgrade code and changelog entries Modified Paths: -------------- trunk/krang/docs/changelog.pod trunk/krang/lib/Krang.pm trunk/krang/upgrade/V3_04.pm Added Paths: ----------- trunk/krang/upgrade/V3_05.pm Modified: trunk/krang/docs/changelog.pod =================================================================== --- trunk/krang/docs/changelog.pod 2008-11-26 18:48:29 UTC (rev 5681) +++ trunk/krang/docs/changelog.pod 2008-11-26 19:16:24 UTC (rev 5682) @@ -2,16 +2,12 @@ This document contains a list of changes for each release of Krang. -=head2 3.04 - IN DEVELOPMENT +=head2 3.05 - IN DEVELOPMENT =over =item * -Fixed broken JS for ListGroup management in Edit Story UI. [Noam Weinstein] - -=item * - Added a server-side paste filter to L<Krang::ElementClass::PoorText>, triggered by the onPaste event. [Bodo Schulze] @@ -30,12 +26,6 @@ =item * -Fixed bug in FTP code where timezone used by FTP server (for file creation -dates, logging, etc.) was always UTC regardless of the local machine's -timezone (causing inconsistency in Krang dates and log entries). [Noam Weinstein] - -=item * - Made sure a media is reported as unpublished after changing its category. [Bodo Schulze] @@ -87,8 +77,26 @@ version of a Story or Media currently open for edit, causing confusion and the possible loss of changes if the user clicked 'Edit' again. [Noam Weinstein] +=back + + + +=head2 3.04 + +=over + =item * +Fixed bug in FTP code where timezone used by FTP server (for file creation +dates, logging, etc.) was always UTC regardless of the local machine's +timezone (causing inconsistency in Krang dates and log entries). [Noam Weinstein] + +=item * + +Fixed broken JS for ListGroup management in Edit Story UI. [Noam Weinstein] + +=item * + Ported fix to unpreview a media object when it is deleted (instead of just unpublishing it). [David Kaufman] Modified: trunk/krang/lib/Krang.pm =================================================================== --- trunk/krang/lib/Krang.pm 2008-11-26 18:48:29 UTC (rev 5681) +++ trunk/krang/lib/Krang.pm 2008-11-26 19:16:24 UTC (rev 5682) @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = "3.04"; +our $VERSION = "3.05"; =head1 NAME Modified: trunk/krang/upgrade/V3_04.pm =================================================================== --- trunk/krang/upgrade/V3_04.pm 2008-11-26 18:48:29 UTC (rev 5681) +++ trunk/krang/upgrade/V3_04.pm 2008-11-26 19:16:24 UTC (rev 5682) @@ -208,16 +208,6 @@ # 5. add element support to media objects $self->add_elements_to_media(); - - # 6. add the new published flag to media - my @media_columns = @{$dbh->selectcol_arrayref('SHOW columns FROM media')}; - print "Adding 'published' column to media table... "; - if (grep { $_ eq 'published' } @alert_columns) { - print "already exists (skipping)\n\n"; - } else { - $dbh->do('ALTER TABLE media ADD published bool NOT NULL DEFAULT 0'); - print "DONE\n\n"; - } } sub add_elements_to_media { @@ -394,7 +384,7 @@ } if ($warn_about_chown_failure) { print - "\n* * * WARNING * * * \t The Krang upgrade script was unable to correct the ownership of $element_lib/$class.pm\n"; + "\n* * * WARNING * * * \t The Krang upgrade script was unable to verify/fix the ownership of $element_lib/$class.pm\n"; } if ($warn_about_set_conf) { print Added: trunk/krang/upgrade/V3_05.pm =================================================================== --- trunk/krang/upgrade/V3_05.pm (rev 0) +++ trunk/krang/upgrade/V3_05.pm 2008-11-26 19:16:24 UTC (rev 5682) @@ -0,0 +1,30 @@ +package V3_05; +use strict; +use warnings; +use Krang::ClassFactory qw(pkg); +use Krang::ClassLoader base => 'Upgrade'; +use Krang::ClassLoader DB => 'dbh'; +use Krang::ClassLoader 'ElementLibrary'; +use Krang::Conf qw(KrangRoot InstanceElementSet); +use File::Spec::Functions qw(catfile catdir); + +sub per_installation { } + +sub per_instance { + my ($self, %args) = @_; + return if $args{no_db}; + my $dbh = dbh(); + print "\n\nUPGRADING INSTANCE " . uc(InstanceElementSet) . ":\n\n"; + + # add the new published flag to media + my @media_columns = @{$dbh->selectcol_arrayref('SHOW columns FROM media')}; + print "Adding 'published' column to media table... "; + if (grep { $_ eq 'published' } @alert_columns) { + print "already exists (skipping)\n\n"; + } else { + $dbh->do('ALTER TABLE media ADD published bool NOT NULL DEFAULT 0'); + print "DONE\n\n"; + } +} + +1; |