fixed a feedback loop with shortcut
This commit is contained in:
parent
1b08faa78b
commit
d0ac36daf3
3 changed files with 16 additions and 5 deletions
|
|
@ -2172,6 +2172,13 @@ sub www_createShortcut () {
|
|||
shortcutToAssetId=>$self->getId,
|
||||
title=>$self->get("title"),
|
||||
menuTitle=>$self->get("menuTitle"),
|
||||
isHidden=>$self->get("isHidden"),
|
||||
newWindow=>$self->get("newWindow"),
|
||||
startDate=>$self->get("startDate"),
|
||||
endDate=>$self->get("endDate"),
|
||||
ownerUserId=>$self->get("ownerUserId"),
|
||||
groupIdEdit=>$self->get("groupIdEdit"),
|
||||
groupIdView=>$self->get("groupIdView"),
|
||||
url=>$self->get("title"),
|
||||
templateId=>'PBtmpl0000000000000140'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -320,9 +320,15 @@ sub processPropertiesFromFormPost {
|
|||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
my $content;
|
||||
if ($self->get("shortcutToAssetId") eq $self->get("parentId")) {
|
||||
$content = "Displaying this shortcut would cause a feedback loop.";
|
||||
} else {
|
||||
$content = $self->getShortcut->view;
|
||||
}
|
||||
my %var = (
|
||||
isShortcut => 1,
|
||||
'shortcut.content' => $self->getShortcut->view,
|
||||
'shortcut.content' => $content,
|
||||
'shortcut.label' => 'Shortcut',
|
||||
originalURL => $self->getShortcut->getUrl
|
||||
);
|
||||
|
|
@ -335,7 +341,7 @@ sub www_edit {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
$self->getAdminConsole->setHelp("shortcut add/edit","Shortcut");
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2));
|
||||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,"Shortcut"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue