Changeset 753 for trunk/wiki.cgi

Show
Ignore:
Timestamp:
04/05/06 02:26:00 (3 years ago)
Author:
earle
Message:

New module, OpenGuides::Feed: this extracts the stuff formerly in OpenGuides::RDF (as sub make_recentchanges_rss) that was invoking CGI::Wiki::Plugin::RSS::ModWiki, and replaces it with a single make_feed method that can be used for any feed format, including Atom (using the new CGI::Wiki::Plugin::Atom). Changes to OpenGuides.pm and wiki.cgi are to use this new module appropriately.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wiki.cgi

    r748 r753  
    55 
    66use vars qw( $VERSION ); 
    7 $VERSION = '0.52'; 
     7$VERSION = '0.53'; 
    88 
    99use CGI qw/:standard/; 
     
    104104                           qw( feed items days ignore_minor_edits username 
    105105                               category locale ); 
    106                 $guide->display_rss( %args ); 
     106                $args{feed_type} = 'rss'; 
     107                $guide->display_feed( %args ); 
    107108            } elsif ( $feed eq "chef_dan" ) { 
    108109                display_node_rdf( node => $node ); 
     
    110111                croak "Unknown RSS feed type '$feed'"; 
    111112            } 
     113        } elsif ($format && $format eq 'atom') { 
     114            my %args = map { $_ => ( $q->param($_) || "" ) } 
     115                       qw( feed items days ignore_minor_edits username 
     116                           category locale ); 
     117            $args{feed_type} = 'atom'; 
     118            $guide->display_feed( %args ); 
    112119        } else { 
    113120            $guide->display_node( id => 'RecentChanges' );