rfe #640: Refactored autocommit and autocomment

Autocommit assets like CS posts or Calendar Events can now be added before the
parent is committed.  They will go into the same version tag as their parent.
This commit is contained in:
Graham Knop 2008-10-22 16:04:10 +00:00
parent 71fc839c83
commit 99a9da626d
22 changed files with 218 additions and 259 deletions

View file

@ -371,21 +371,13 @@ 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;
}
}
# Handle autocommit workflows
if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, {
allowComments => 1,
returnUrl => $currentAsset->getUrl,
})) {
return undef;
};
# Show the page
# i18n we'll need later