From a59baedd517b2352a1bbd68929c2977073452159 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 5 Aug 2010 11:00:11 -0700 Subject: [PATCH] Dispatch code for RSS, Atom and RDF feeds. --- lib/WebGUI/AssetAspect/RssFeed.pm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/WebGUI/AssetAspect/RssFeed.pm b/lib/WebGUI/AssetAspect/RssFeed.pm index 8818f70a7..fc758fc0a 100644 --- a/lib/WebGUI/AssetAspect/RssFeed.pm +++ b/lib/WebGUI/AssetAspect/RssFeed.pm @@ -143,6 +143,28 @@ sub definition { #------------------------------------------------------------------- +=head2 dispatch ( ) + +Extent the base method in Asset.pm to handle RSS feeds. + +=cut + +sub dispatch { + my ( $self, $fragment ) = @_; + if ($fragment eq '.rss') { + return $self->www_viewRss; + } + elsif ($fragment eq '.atom') { + return $self->www_viewAtom; + } + elsif ($fragment eq '.rdf') { + return $self->www_viewRdf; + } + return $self->next::method(); +} + +#------------------------------------------------------------------- + =head2 _httpBasicLogin ( ) Set header values and content to show the HTTP Basic Auth login box.