Force the isLockedBy flag to be reset when autocommitting the tag for a duplicated template.

Fixes #10795
This commit is contained in:
Colin Kuskie 2009-08-20 03:58:34 +00:00
parent d6b402676a
commit 2bbf81417b
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,5 @@
7.7.18
- fixed #10795: Copy and edit template give error
- fixed #10788: Thread rating calculate during post delete/restore
- will now respect X-Forwarded-Proto header
- no longer need special Apache configuration to handle SSLPROXY header

View file

@ -874,7 +874,7 @@ sub www_editDuplicate {
menuTitle => $self->get( "menuTitle" ) . " (copy)",
} );
# Make our asset use our new template
# Make the asset that originally invoked edit template use the newly created asset.
if ( $self->session->form->get( "proceed" ) eq "goBackToPage" ) {
if ( my $asset = WebGUI::Asset->newByUrl( $session, $form->get( "returnUrl" ) ) ) {
# Find which property we should set by comparing namespaces and current values
@ -888,7 +888,11 @@ sub www_editDuplicate {
# Auto-commit our revision if necessary
# TODO: This needs to be handled automatically somehow...
WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session);
my $status = WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session);
##Force the locked by tag
if ($status eq 'commit') {
$newTemplate->{_properties}{isLockedBy} = undef;
}
last DEF;
}
}