Fix inability to create shortcuts to threads.
This commit is contained in:
parent
f1aef291cf
commit
0ffb28436b
2 changed files with 6 additions and 2 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
- fix: editing posts loses changes in preview
|
- fix: editing posts loses changes in preview
|
||||||
- change: Asset::getContainer no longer changes the session asset
|
- change: Asset::getContainer no longer changes the session asset
|
||||||
- fix: Survey numeric multiple choice options
|
- fix: Survey numeric multiple choice options
|
||||||
|
- fix: inability to create shortcuts to threads
|
||||||
|
|
||||||
7.1.4
|
7.1.4
|
||||||
- Template variables in the main Survey Template were out of date in the
|
- Template variables in the main Survey Template were out of date in the
|
||||||
|
|
|
||||||
|
|
@ -207,8 +207,10 @@ sub www_copyList {
|
||||||
sub www_createShortcut {
|
sub www_createShortcut {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(4));
|
return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(4));
|
||||||
my $isOnDashboard = ref $self->getParent eq 'WebGUI::Asset::Wobject::Dashboard';
|
my $isOnDashboard = $self->getParent->isa('WebGUI::Asset::Wobject::Dashboard');
|
||||||
my $child = $self->getParent->addChild({
|
|
||||||
|
my $shortcutParent = $isOnDashboard? $self->getParent : WebGUI::Asset->getImportNode($self->session);
|
||||||
|
my $child = $shortcutParent->addChild({
|
||||||
className=>'WebGUI::Asset::Shortcut',
|
className=>'WebGUI::Asset::Shortcut',
|
||||||
shortcutToAssetId=>$self->getId,
|
shortcutToAssetId=>$self->getId,
|
||||||
title=>$self->getTitle,
|
title=>$self->getTitle,
|
||||||
|
|
@ -221,6 +223,7 @@ sub www_createShortcut {
|
||||||
url=>$self->get("title"),
|
url=>$self->get("title"),
|
||||||
templateId=>'PBtmpl0000000000000140'
|
templateId=>'PBtmpl0000000000000140'
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($isOnDashboard) {
|
if ($isOnDashboard) {
|
||||||
return $self->getParent->www_view;
|
return $self->getParent->www_view;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue