moving wiki down the path of ajax enlightenment
This commit is contained in:
parent
650ddb805d
commit
efa444c1d3
11 changed files with 336 additions and 286 deletions
|
|
@ -749,7 +749,20 @@ sub processPropertiesFromFormPost {
|
|||
$self->getThread->subscribe if ($self->session->form->process("subscribe"));
|
||||
delete $self->{_storageLocation};
|
||||
$self->postProcess;
|
||||
$self->requestCommit;
|
||||
# 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -869,25 +882,6 @@ sub rethreadUnder {
|
|||
delete $self->{_thread};
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# allows us to let the cs post use it's own workflow approval process
|
||||
sub requestCommit {
|
||||
my $self = shift;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setParent ( newParent )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue