fix: when upgrading, two revisions of same asset in same second broke upgrade

This commit is contained in:
Doug Bell 2007-12-13 20:13:27 +00:00
parent 73f1a3e379
commit fb33859cc6
3 changed files with 15 additions and 5 deletions

View file

@ -13,6 +13,7 @@
- fix: Import Package does nothing when re-importing trashed package
- fix: CS Posts get re-ordered when copy/paste
- fix: Matrix best/worst now must have 10 or more votes
- fix: When upgrading, two revisions of same asset added in same second.
7.4.18
- fix: Graph draws black triangle covering half the image

View file

@ -44,23 +44,28 @@ These methods are available from this class:
=cut
#-------------------------------------------------------------------
#----------------------------------------------------------------------------
=head2 addRevision ( properties [ , revisionDate, options ] )
Creates a new revision of an existing asset. Returns the new revision of
the asset.
Note that programmers should almost never call this method directly, but
Programmers should almost never call this method directly, but
rather use the update() method instead.
When using this method, take care that an asset doesn't try to add two
revisions of the same asset within the same second. It will cause things to
fail. This is not a bug
=head3 properties
A hash reference containing a list of properties to associate with the child.
=head3 revisionDate
An epoch date representing the date/time stamp that this revision was created. Defaults to$self->session->datetime->time().
An epoch date representing the date/time stamp that this revision was
created. Defaults to $self->session->datetime->time().
=head3 options
@ -68,11 +73,14 @@ A hash reference of options that change the behavior of this method.
=head4 skipAutoCommitWorkflows
If this is set to 1 then assets that would normally autocommit their workflow (like CS Posts) will instead add themselves to the normal working version tag.
If this is set to 1 then assets that would normally autocommit their
workflow (like CS Posts) will instead add themselves to the normal working
version tag.
=head4 skipNotification
If this is set to 1 then assets that normally send notifications will (like CS Posts) will know not to send them under certain conditions.
If this is set to 1 then assets that normally send notifications will (like CS
Posts) will know not to send them under certain conditions.
=cut

View file

@ -290,6 +290,7 @@ foreach my $filename (keys %config) {
}
$config{$filename}{version} = $upgrade{$upgrade}{to};
$notRun = 0;
sleep 1; # Sleep a second to avoid adding asset revisions too quickly
}
my $session = WebGUI::Session->open("../..",$filename);
print "\tSetting site upgrade completed..." unless ($quiet);