- fix: Direct 6.8.10-7.2+ Upgrade Problem
This commit is contained in:
parent
0d0ec2ccca
commit
3df71a5351
7 changed files with 169 additions and 696 deletions
|
|
@ -14,6 +14,8 @@
|
|||
- fix: A newly released version of Html::Template fixes a bug with global
|
||||
variables and nested loops. testEnvironment.pl has been updated to
|
||||
require that it be used.
|
||||
- fix: Direct 6.8.10-7.2+ Upgrade Problem
|
||||
|
||||
|
||||
7.3.8
|
||||
- Fixed a template variable rewriting problem with HTML::Template::Expr
|
||||
|
|
|
|||
|
|
@ -81,10 +81,6 @@ save you many hours of grief.
|
|||
|
||||
7.2.0
|
||||
--------------------------------------------------------------------
|
||||
* IMPORTANT: You must upgrade to 7.1.3 before upgrading to 7.2.0 or
|
||||
higher. Upgrading from a version prior to 7.1.3 directly to a
|
||||
7.2.x or higher version will cause your upgrade to fail.
|
||||
|
||||
* NOTE: if you tried to upgrade to 7.2.0 and it failed during the
|
||||
addition of RSS From Parent capability, there have been bugs fixed
|
||||
in that section of the relevant upgrade script in 7.2.1.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -98,7 +98,7 @@ sub updateArticle {
|
|||
}
|
||||
foreach my $child (@{$children}) {
|
||||
$child->getStorageLocation->copy($storage);
|
||||
$child->purge;
|
||||
$child->purge({skipExported=>1});
|
||||
}
|
||||
}
|
||||
if ($asset->get("convertCarriageReturns")) {
|
||||
|
|
@ -264,7 +264,7 @@ sub convertMessageLogToInbox {
|
|||
while (my ($id) = $rs->array) {
|
||||
my $asset = WebGUI::Asset->new($session, $id, "WebGUI::Asset::Template");
|
||||
if (defined $asset) {
|
||||
$asset->purge;
|
||||
$asset->purge({skipExported=>1});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -409,7 +409,7 @@ sub addWorkflow {
|
|||
while (my ($id) = $rs->array) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass($session, $id);
|
||||
if (defined $asset && $asset->get("status") eq "denied") {
|
||||
$asset->purge;
|
||||
$asset->purge({skipExported=>1});
|
||||
}
|
||||
}
|
||||
$session->db->write("update assetData set status='approved' where status='denied'");
|
||||
|
|
@ -621,7 +621,7 @@ sub updateTemplates {
|
|||
$session->db->write("alter table template add column headBlock text");
|
||||
my $template = WebGUI::Asset->new($session, "PBtmpl0000000000000003", "WebGUI::Asset::Template");
|
||||
if (defined $template) {
|
||||
$template->purge;
|
||||
$template->purge({skipExported=>1});
|
||||
}
|
||||
opendir(DIR,"templates-6.99.0");
|
||||
my @files = readdir(DIR);
|
||||
|
|
@ -1035,7 +1035,6 @@ sub removeFiles {
|
|||
unlink '../../lib/WebGUI/ErrorHandler.pm';
|
||||
unlink '../../lib/WebGUI/HTTP.pm';
|
||||
unlink '../../lib/WebGUI/Privilege.pm';
|
||||
unlink '../../lib/WebGUI/DateTime.pm';
|
||||
unlink '../../lib/WebGUI/FormProcessor.pm';
|
||||
unlink '../../lib/WebGUI/URL.pm';
|
||||
unlink '../../lib/WebGUI/Id.pm';
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ sub deleteTemplate {
|
|||
print "\tDeleting a template that was accidentally added.\n" unless ($quiet);
|
||||
my $template = WebGUI::Asset->newByDynamicClass($session, "wCIc38CvNHUK7aY92Ww4SQ");
|
||||
if (defined $template) {
|
||||
$template->purge;
|
||||
$template->purge({skipExported=>1});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,16 +88,27 @@ sub getAssetsInTrash {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 purge ( )
|
||||
=head2 purge ( [ options ] )
|
||||
|
||||
Deletes an asset from tables and removes anything bound to that asset, including descendants.
|
||||
|
||||
=head3 options
|
||||
|
||||
A hash refernece containing options that change the behavior of this method.
|
||||
|
||||
=head4 skipExported
|
||||
|
||||
A boolean that, if true, will skip dealing with exported files.
|
||||
|
||||
=cut
|
||||
|
||||
sub purge {
|
||||
my $self = shift;
|
||||
my $options = shift;
|
||||
return undef if ($self->getId eq $self->session->setting->get("defaultPage") || $self->getId eq $self->session->setting->get("notFoundPage") || $self->get("isSystem"));
|
||||
$self->_invokeWorkflowOnExportedFiles($self->session->setting->get('purgeWorkflow'), 1);
|
||||
unless ($options->{skipExported}) {
|
||||
$self->_invokeWorkflowOnExportedFiles($self->session->setting->get('purgeWorkflow'), 1);
|
||||
}
|
||||
|
||||
my $kids = $self->getLineage(["children"],{returnObjects=>1, statesToInclude=>['published', 'clipboard', 'clipboard-limbo','trash','trash-limbo']});
|
||||
foreach my $kid (@{$kids}) {
|
||||
|
|
@ -155,7 +166,7 @@ sub _invokeWorkflowOnExportedFiles {
|
|||
my $workflowId = shift;
|
||||
my $clearExportedAs = shift;
|
||||
|
||||
my ($lastExportedAs) = $self->session->db->quickArray("SELECT lastExportedAs FROM asset WHERE assetId = ?", [$self->getId]);
|
||||
my ($lastExportedAs) = $self->get("lastExportedAs");
|
||||
my $wfInstance = WebGUI::Workflow::Instance->create($self->session, { workflowId => $self->session->setting->get('trashWorkflow') });
|
||||
$wfInstance->setScratch(WebGUI::Workflow::Activity::DeleteExportedFiles::DELETE_FILES_SCRATCH(), Storable::freeze([defined($lastExportedAs)? ($lastExportedAs) : ()]));
|
||||
$clearExportedAs and $self->session->db->write("UPDATE asset SET lastExportedAs = NULL WHERE assetId = ?", [$self->getId]);
|
||||
|
|
|
|||
|
|
@ -269,8 +269,8 @@ foreach my $filename (keys %config) {
|
|||
mkdir($backupTo);
|
||||
while ($upgrade{$config{$filename}{version}}{sql} ne "" || $upgrade{$config{$filename}{version}}{pl} ne "") {
|
||||
my $upgrade = $upgrade{$config{$filename}{version}}{from};
|
||||
print "\n".$config{$filename}{db}." ".$upgrade{$upgrade}{from}."-".$upgrade{$upgrade}{to}."\n" unless ($quiet);
|
||||
unless ($skipBackup) {
|
||||
print "\n".$config{$filename}{db}." ".$upgrade{$upgrade}{from}."-".$upgrade{$upgrade}{to}."\n" unless ($quiet);
|
||||
print "\tBacking up $config{$filename}{db} ($upgrade{$upgrade}{from})..." unless ($quiet);
|
||||
my $cmd = qq!$dumpcmd -u"$config{$filename}{dbuser}" -p"$config{$filename}{dbpass}"!;
|
||||
$cmd .= " --host=".$config{$filename}{host} if ($config{$filename}{host});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue