From e87358d0cb0b4db2d3982ccf11e4470032ecee76 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 4 Jan 2011 18:06:33 -0800 Subject: [PATCH] No need to check out separate tags for auxiliary assets like Folders inside the Story Archive. --- lib/WebGUI/Asset/Wobject/StoryArchive.pm | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/StoryArchive.pm b/lib/WebGUI/Asset/Wobject/StoryArchive.pm index dfa423811..b502cdc5b 100644 --- a/lib/WebGUI/Asset/Wobject/StoryArchive.pm +++ b/lib/WebGUI/Asset/Wobject/StoryArchive.pm @@ -302,19 +302,7 @@ sub getFolder { my $folder = eval { WebGUI::Asset->newByUrl($session, $folderUrl); }; return $folder if !Exception::Class->caught(); - ##The requested folder doesn't exist. Make it and autocommit it. - - ##For a fully automatic commit, save the current tag, create a new one - ##with the commit without approval workflow, commit it, then restore - ##the original if it exists - my ($oldVersionTag, $newVersionTag); - $oldVersionTag = WebGUI::VersionTag->getWorking($session, 'noCreate'); - - if ($self->hasBeenCommitted) { - $newVersionTag = WebGUI::VersionTag->create($session, { workflowId => 'pbworkflow00000000003', }); - $newVersionTag->setWorking; - $newVersionTag->set({ name => 'Adding folder '. $folderName. ' to archive '. $self->getUrl}); - } + ##The requested folder doesn't exist. Make it. ##Call SUPER because my addChild calls getFolder $folder = $self->addChild({ @@ -325,9 +313,6 @@ sub getFolder { isHidden => 1, styleTemplateId => $self->styleTemplateId, }); - $newVersionTag->commit() if $newVersionTag; - ##Restore the old one, if it exists - $oldVersionTag->setWorking() if $oldVersionTag; ##Get a new version of the asset from the db with the correct state $folder = $folder->cloneFromDb();