removing the autocommit jury rig that posts and wikipage's were using
This commit is contained in:
parent
82867ec273
commit
eb580be7f1
6 changed files with 39 additions and 37 deletions
|
|
@ -301,6 +301,12 @@ sub formatContent {
|
|||
return $msg;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getAutoCommitWorkflowId {
|
||||
my $self = shift;
|
||||
return $self->getThread->getParent->get("approvalWorkflow");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getAvatarUrl ( )
|
||||
|
|
@ -749,20 +755,6 @@ sub processPropertiesFromFormPost {
|
|||
$self->getThread->subscribe if ($self->session->form->process("subscribe"));
|
||||
delete $self->{_storageLocation};
|
||||
$self->postProcess;
|
||||
# allows us to let the cs post use it's own workflow approval process
|
||||
my $currentTag = WebGUI::VersionTag->getWorking($self->session);
|
||||
if ($currentTag->getAssetCount < 2) {
|
||||
$currentTag->set({workflowId=>$self->getThread->getParent->get("approvalWorkflow")});
|
||||
$currentTag->requestCommit;
|
||||
} else {
|
||||
my $newTag = WebGUI::VersionTag->create($self->session, {
|
||||
name=>$self->getTitle." / ".$self->session->user->username,
|
||||
workflowId=>$self->getThread->getParent->get("approvalWorkflow")
|
||||
});
|
||||
$self->session->db->write("update assetData set tagId=? where assetId=? and tagId=?",[$newTag->getId, $self->getId, $currentTag->getId]);
|
||||
$self->purgeCache;
|
||||
$newTag->requestCommit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue