From 5b78160079fcf830fe46ad7b2c954eb2be1c3c43 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 11 Jun 2008 19:17:28 +0000 Subject: [PATCH] fixed: Creating a shortcut creates a version tag even with autocommit turned on --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/AssetClipboard.pm | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0d2ca94ef..01a84d1a5 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.5.11 + - fixed: Creating a shortcut creates a version tag even with autocommit turned on - fixed: userImport.pl overwrites settings when updating users - fixed: Collaboration RSS link in header doesn't indicate title - fixed: edit branch can't update URLs on most assets diff --git a/lib/WebGUI/AssetClipboard.pm b/lib/WebGUI/AssetClipboard.pm index 90a1b1bd2..dd6dff3f6 100644 --- a/lib/WebGUI/AssetClipboard.pm +++ b/lib/WebGUI/AssetClipboard.pm @@ -272,10 +272,22 @@ sub www_createShortcut { templateId=>'PBtmpl0000000000000140' }); + if (! $isOnDashboard) { + $child->cut; + } + if ($self->session->setting->get("autoRequestCommit")) { + if ($self->session->setting->get("skipCommitComments")) { + WebGUI::VersionTag->getWorking($self->session)->requestCommit; + } else { + $self->session->http->setRedirect($self->getUrl( + "op=commitVersionTag;tagId=".WebGUI::VersionTag->getWorking($self->session)->getId + )); + return 1; + } + } if ($isOnDashboard) { return $self->getParent->www_view; } else { - $child->cut; $self->session->asset($self->getContainer); return $self->session->asset->www_manageAssets if ($self->session->form->process("proceed") eq "manageAssets"); return $self->session->asset->www_view;