diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 1ce32a3a3..186da6e86 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.6.0 + - fixed: copying or duplicating an asset in the asset manager never autocommits - fixed: Server side spell checker errors when checking text with single quotes - remove Do Nothing On Delete workflow and allow none to be selected for on delete etc workflow - remove remnants of realtime workflow selection code diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index 741f6208b..65ddf8f2a 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -370,6 +370,22 @@ sub www_manage { } } + # Handle Auto Request Commit setting + if ($session->setting->get("autoRequestCommit")) { + # Make sure version tag hasn't already been committed by another process + my $versionTag = WebGUI::VersionTag->getWorking($session, "nocreate"); + + if ($versionTag && $session->setting->get("skipCommitComments")) { + $versionTag->requestCommit; + } + elsif ($versionTag) { + $session->http->setRedirect( + $currentAsset->getUrl("op=commitVersionTag;tagId=".WebGUI::VersionTag->getWorking($session)->getId) + ); + return undef; + } + } + # Show the page $session->style->setLink( $session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type=>'text/css'}); $session->style->setLink( $session->url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>'stylesheet', type=>'text/css'});