Fix inability to create shortcuts to threads.

This commit is contained in:
Drake 2006-11-07 15:52:25 +00:00
parent f1aef291cf
commit 0ffb28436b
2 changed files with 6 additions and 2 deletions

View file

@ -25,6 +25,7 @@
- fix: editing posts loses changes in preview
- change: Asset::getContainer no longer changes the session asset
- fix: Survey numeric multiple choice options
- fix: inability to create shortcuts to threads
7.1.4
- Template variables in the main Survey Template were out of date in the

View file

@ -207,8 +207,10 @@ sub www_copyList {
sub www_createShortcut {
my $self = shift;
return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(4));
my $isOnDashboard = ref $self->getParent eq 'WebGUI::Asset::Wobject::Dashboard';
my $child = $self->getParent->addChild({
my $isOnDashboard = $self->getParent->isa('WebGUI::Asset::Wobject::Dashboard');
my $shortcutParent = $isOnDashboard? $self->getParent : WebGUI::Asset->getImportNode($self->session);
my $child = $shortcutParent->addChild({
className=>'WebGUI::Asset::Shortcut',
shortcutToAssetId=>$self->getId,
title=>$self->getTitle,
@ -221,6 +223,7 @@ sub www_createShortcut {
url=>$self->get("title"),
templateId=>'PBtmpl0000000000000140'
});
if ($isOnDashboard) {
return $self->getParent->www_view;
} else {