add Gallery to test_content and fix problems with RssFeed role
This commit is contained in:
parent
ebdf0c28a3
commit
bdb803915e
5 changed files with 109 additions and 30 deletions
|
|
@ -329,6 +329,7 @@ use WebGUI::International;
|
|||
use WebGUI::Search;
|
||||
use XML::Simple;
|
||||
use WebGUI::HTML;
|
||||
use WebGUI::Asset::Wobject::GalleryAlbum;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -950,9 +951,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
my $self = shift;
|
||||
$self->next::method();
|
||||
around prepareView => sub {
|
||||
my ( $orig, $self, @args ) = @_;
|
||||
$self->$orig( @args );
|
||||
|
||||
if ( $self->viewDefault eq "album" && $self->viewAlbumAssetId && $self->viewAlbumAssetId ne 'PBasset000000000000001') {
|
||||
my $asset
|
||||
|
|
@ -968,7 +969,7 @@ sub prepareView {
|
|||
else {
|
||||
$self->prepareViewListAlbums;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1058,7 +1059,7 @@ instead of having to block things from being added.
|
|||
|
||||
=cut
|
||||
|
||||
sub www_add {
|
||||
override www_add => sub {
|
||||
my $self = shift;
|
||||
|
||||
unless ( $self->hasBeenCommitted ) {
|
||||
|
|
@ -1066,8 +1067,8 @@ sub www_add {
|
|||
return $self->processStyle($i18n->get("error add uncommitted"));
|
||||
}
|
||||
|
||||
return $self->next::method( @_ );
|
||||
}
|
||||
return super();
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ are authorized to see them.
|
|||
|
||||
=cut
|
||||
|
||||
sub getCurrentRevisionDate {
|
||||
override getCurrentRevisionDate => sub {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $assetId = shift;
|
||||
|
|
@ -410,9 +410,9 @@ sub getCurrentRevisionDate {
|
|||
return $revisionDate;
|
||||
}
|
||||
else {
|
||||
return $class->next::method( $session, $assetId );
|
||||
return super();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -721,9 +721,9 @@ See WebGUI::Asset::prepareView() for details.
|
|||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
my $self = shift;
|
||||
$self->next::method();
|
||||
around prepareView => sub {
|
||||
my ($orig, $self, @args) = @_;;
|
||||
$self->$orig(@args);
|
||||
|
||||
my $templateId = $self->getParent->templateIdViewAlbum;
|
||||
|
||||
|
|
@ -740,7 +740,7 @@ sub prepareView {
|
|||
|
||||
$self->{_viewTemplate} = $template;
|
||||
$self->{_viewVariables} = $self->getTemplateVars;
|
||||
}
|
||||
};
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue