added a flag to distinguish between albums and files

This commit is contained in:
Doug Bell 2008-06-06 23:42:05 +00:00
parent cad6226d70
commit 2511c406ff
4 changed files with 18 additions and 1 deletions

View file

@ -97,6 +97,8 @@
- fixed: Password Recovery now only works for Active users and does not allow
deactivated users to log in
- fixed: Gallery Search now correctly limits by class name
- added: A template variable to distinguish between Files and Albums in the Gallery
Search
7.5.10
- fix: Syntax error in GetCsMail

View file

@ -1069,7 +1069,10 @@ sub www_search {
$p->appendTemplateVars( $var );
for my $result ( @{ $p->getPageData } ) {
my $asset = WebGUI::Asset->newByDynamicClass( $self->session, $result->{assetId} );
push @{ $var->{search_results} }, $asset->getTemplateVars;
push @{ $var->{search_results} }, {
%{ $asset->getTemplateVars },
isAlbum => $asset->isa( 'WebGUI::Asset::Wobject::GalleryAlbum' ),
};
}
}

View file

@ -154,6 +154,12 @@ our $HELP = {
{
name => 'search_results',
description => 'helpvar search_results',
variables => [
{
name => 'isAlbum',
description => 'helpvar isAlbum',
},
],
},
],
# All classes that can be found by a Gallery search go in here

View file

@ -693,6 +693,12 @@ our $I18N = {
lastUpdated => 0,
context => q{Error message when trying to add albums to uncommitted Gallery assets},
},
'helpvar isAlbum' => {
message => q{This variable is true if the current result is a GalleryAlbum.},
lastUpdated => 0,
context => q{Description of template variable},
},
};
1;