almost done fixing addRevision changes
This commit is contained in:
parent
3ce9198220
commit
1866c593ea
25 changed files with 186 additions and 199 deletions
|
|
@ -319,6 +319,7 @@ sub www_editBranchSave {
|
|||
my %data;
|
||||
my $pb = WebGUI::ProgressBar->new($session);
|
||||
my $i18n = WebGUI::International->new($session, 'Asset');
|
||||
my $tag = WebGUI::VersionTag->getWorking( $session );
|
||||
$data{isHidden} = $form->yesNo("isHidden") if ($form->yesNo("change_isHidden"));
|
||||
$data{newWindow} = $form->yesNo("newWindow") if ($form->yesNo("change_newWindow"));
|
||||
$data{encryptPage} = $form->yesNo("encryptPage") if ($form->yesNo("change_encryptPage"));
|
||||
|
|
@ -401,10 +402,11 @@ sub www_editBranchSave {
|
|||
my $revision;
|
||||
if (scalar %$newData > 0) {
|
||||
$revision = $descendant->addRevision(
|
||||
$newData,
|
||||
{ %$newData, tagId => $tag->getId, status => "pending" },
|
||||
undef,
|
||||
{skipAutoCommitWorkflows => 1, skipNotification => 1},
|
||||
);
|
||||
$revision->setVersionLock;
|
||||
}
|
||||
else {
|
||||
$revision = $descendant;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,12 @@ sub process {
|
|||
return { error => sprintf $i18n->get('already locked'), $asset->getTitle};
|
||||
}
|
||||
|
||||
$asset = $asset->addRevision;
|
||||
my $tag = WebGUI::VersionTag->getWorking( $session );
|
||||
$asset = $asset->addRevision({
|
||||
tagId => $tag->getId,
|
||||
status => "pending",
|
||||
});
|
||||
$asset->setVersionLock;
|
||||
return {
|
||||
message => sprintf($i18n->get('locked asset'), $asset->getTitle),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue