Remove all unnecessary usage of SUPER from Assets
This commit is contained in:
parent
c2baef0bde
commit
5f9f1e6dec
46 changed files with 175 additions and 171 deletions
|
|
@ -222,9 +222,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $templateId = $self->templateId;
|
||||
if ($self->session->form->process("overrideTemplateId") ne "") {
|
||||
$templateId = $self->session->form->process("overrideTemplateId");
|
||||
|
|
@ -239,7 +239,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -63,11 +63,12 @@ The session variable.
|
|||
|
||||
=cut
|
||||
|
||||
sub canAdd {
|
||||
around canAdd => sub {
|
||||
my $orig = shift;
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
$class->SUPER::canAdd($session, undef, '3');
|
||||
}
|
||||
return $class->$orig($session, undef, '3');
|
||||
};
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -812,9 +812,9 @@ parameters.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
|
||||
my $view = ucfirst lc $self->session->form->param("type")
|
||||
|| ucfirst $self->defaultView
|
||||
|
|
@ -838,7 +838,7 @@ sub prepareView {
|
|||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -179,9 +179,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -192,7 +192,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare;
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -168,9 +168,9 @@ Prepare the view. Add stuff to HEAD.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView(@_);
|
||||
super();
|
||||
my $session = $self->session;
|
||||
|
||||
# For now, prepare the form control.
|
||||
|
|
@ -199,7 +199,7 @@ sub prepareView {
|
|||
$self->{_template} = $template;
|
||||
|
||||
return;
|
||||
} ## end sub prepareView
|
||||
}; ## end sub prepareView
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -677,9 +677,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -690,7 +690,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -127,9 +127,9 @@ Overridden to check the updated dates of children as well
|
|||
|
||||
=cut
|
||||
|
||||
sub getContentLastModifiedBy {
|
||||
override getContentLastModifiedBy => sub {
|
||||
my $self = shift;
|
||||
my $mtime = $self->SUPER::getContentLastModified;
|
||||
my $mtime = super();
|
||||
my $userId = $self->get('revisedBy');
|
||||
my $childIter = $self->getLineageIterator(["children"]);
|
||||
while ( 1 ) {
|
||||
|
|
@ -147,7 +147,7 @@ sub getContentLastModifiedBy {
|
|||
}
|
||||
}
|
||||
return $userId;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -157,9 +157,9 @@ Returns the TabForm object that will be used in generating the edit page for thi
|
|||
|
||||
=cut
|
||||
|
||||
sub getEditForm {
|
||||
override getEditForm => sub {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
my $tabform = super();
|
||||
my $i18n = WebGUI::International->new($self->session,"Asset_Folder");
|
||||
if ($self->get("assetId") eq "new") {
|
||||
$tabform->getTab("properties")->whatNext(
|
||||
|
|
@ -171,7 +171,7 @@ sub getEditForm {
|
|||
);
|
||||
}
|
||||
return $tabform;
|
||||
}
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -202,9 +202,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -215,7 +215,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -226,9 +226,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -239,7 +239,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -132,9 +132,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->inOutTemplateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -145,7 +145,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -535,7 +535,6 @@ where users.userId<>'1' and
|
|||
$departmentSQLclause
|
||||
group by InOutBoard_statusLog.dateStamp
|
||||
order by department, lastName, firstName, InOutBoard_statusLog.dateStamp";
|
||||
$self->session->log->warn("QUERY: $sql\n");
|
||||
$p->setDataByQuery($sql);
|
||||
my $rowdata = $p->getPageData();
|
||||
my @rows;
|
||||
|
|
|
|||
|
|
@ -137,9 +137,9 @@ and to put children in their places.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView;
|
||||
super();
|
||||
my $session = $self->session;
|
||||
my $templateId;
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ sub prepareView {
|
|||
|
||||
$self->{_viewVars} = \%vars;
|
||||
$self->{_viewPlaceholder} = \%placeHolder;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -369,9 +369,9 @@ Extend the base class to include the userid of the person that made last modific
|
|||
|
||||
=cut
|
||||
|
||||
sub getContentLastModifiedBy {
|
||||
override getContentLastModifiedBy => sub {
|
||||
my $self = shift;
|
||||
my $mtime = $self->SUPER::getContentLastModified;
|
||||
my $mtime = super();
|
||||
my $userId = $self->get('revisedBy');
|
||||
my $childIter = $self->getLineageIterator(["children"],{excludeClasses=>['WebGUI::Asset::Wobject::Layout']});
|
||||
while ( 1 ) {
|
||||
|
|
@ -389,7 +389,7 @@ sub getContentLastModifiedBy {
|
|||
}
|
||||
}
|
||||
return $userId;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -325,9 +325,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById( $self->session, $self->templateIdView );
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -338,7 +338,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare;
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -537,10 +537,10 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -553,7 +553,7 @@ sub prepareView {
|
|||
$self->{_viewTemplate} = $template;
|
||||
|
||||
return undef;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = eval{ WebGUI::Asset::Template->newById($self->session, $self->templateId) };
|
||||
if ($@ or !$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -60,7 +60,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -69,7 +69,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -301,9 +301,9 @@ Extend the superclass to add metadata and to preprocess the template.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); # part of Couldn't lookup className (param: PBtmpl0000000000000048)
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -314,7 +314,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -336,9 +336,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->get("templateId"));
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -349,7 +349,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -588,9 +588,9 @@ sub i18n {
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->projectDashboardTemplateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -601,7 +601,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -392,9 +392,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -405,7 +405,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -109,7 +109,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -66,10 +66,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
warn "Shelf: going to do prepareView on template with id: " . $self->templateId . " and we are: " . $self->getId;
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); # boom XXX
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -80,7 +79,7 @@ warn "Shelf: going to do prepareView on template with id: " . $self->templateId
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -324,9 +324,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -337,7 +337,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -443,9 +443,10 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
around prepareView => sub {
|
||||
my $orig = shift;
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
$self->$orig(@_);
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -456,7 +457,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare;
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -110,9 +110,10 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
around prepareView => sub {
|
||||
my $orig = shift;
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
$self->$orig(@_);
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -123,7 +124,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare;
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1320,9 +1320,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $templateId = $self->templateId;
|
||||
if ( $self->session->form->process('overrideTemplateId') ne q{} ) {
|
||||
$templateId = $self->session->form->process('overrideTemplateId');
|
||||
|
|
@ -1338,7 +1338,7 @@ sub prepareView {
|
|||
$template->prepare;
|
||||
$self->{_viewTemplate} = $template;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -1578,12 +1578,12 @@ been inserted into the AssetIndex.
|
|||
|
||||
=cut
|
||||
|
||||
sub indexContent {
|
||||
override indexContent => sub {
|
||||
my ($self) = @_;
|
||||
my $session = $self->session;
|
||||
$self->SUPER::indexContent();
|
||||
super();
|
||||
$self->reindexThings;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -1696,9 +1696,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -1710,7 +1710,7 @@ sub prepareView {
|
|||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
return undef;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ use WebGUI::Asset::Wobject::ProjectManager;
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template;
|
||||
$template = WebGUI::Asset::Template->newById($self->session, $self->userViewTemplateId);
|
||||
if (!$template) {
|
||||
|
|
@ -87,7 +87,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -318,9 +318,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $templateId = $self->templateId;
|
||||
if ($self->session->form->process("overrideTemplateId") ne "") {
|
||||
$templateId = $self->session->form->process("overrideTemplateId");
|
||||
|
|
@ -337,7 +337,7 @@ sub prepareView {
|
|||
$self->{_viewTemplate} = $template;
|
||||
|
||||
return undef;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
override prepareView => sub {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
super();
|
||||
my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId);
|
||||
if (!$template) {
|
||||
WebGUI::Error::ObjectNotFound::Template->throw(
|
||||
|
|
@ -82,7 +82,7 @@ sub prepareView {
|
|||
}
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -773,11 +773,13 @@ Extend the master method to delete all keyword entries.
|
|||
|
||||
=cut
|
||||
|
||||
sub purge {
|
||||
##Using around due to the plugin
|
||||
around purge => sub {
|
||||
my $orig = shift;
|
||||
my $self = shift;
|
||||
$self->session->db->write('delete from WikiMasterKeywords where assetId=?',[$self->getId]);
|
||||
return $self->SUPER::purge;
|
||||
}
|
||||
return $self->$orig(@_);
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue