Changeset 718
- Timestamp:
- 11/29/05 06:22:42 (3 years ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
Build.PL (modified) (2 diffs)
-
Changes (modified) (1 diff)
-
PREREQUISITES (modified) (2 diffs)
-
lib/OpenGuides.pm (modified) (4 diffs)
-
lib/OpenGuides/RDF.pm (modified) (4 diffs)
-
lib/OpenGuides/Template.pm (modified) (1 diff)
-
t/53_show_index.t (modified) (1 diff)
-
wiki.cgi (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Build.PL
r717 r718 223 223 'CGI::Wiki::Plugin::Diff' => '0.07', # earlier buggy 224 224 'CGI::Wiki::Plugin::Locator::Grid'=> '0.02', # cope with sqlite 3 225 'CGI::Wiki::Plugin::RSS::ModWiki' => '0.0 81', # supports DOAP metadata225 'CGI::Wiki::Plugin::RSS::ModWiki' => '0.09', # fixes date formatting bug 226 226 'CGI::Wiki::Plugin::RSS::Reader' => '1.3', # earlier versions don't support RSS 2.0 227 227 'Class::Accessor' => 0, … … 235 235 'Parse::RecDescent' => 0, 236 236 $search_module => 0, 237 'POSIX' => 0, 237 238 'Template' => 0, 238 239 'Test::MockObject' => '0.07', # earlier doesn't use 'mock' -
trunk/Changes
r716 r718 4 4 to reflect this. 5 5 Rename OpenGuides::SuperSearch to OpenGuides::Search. 6 Use corrent content-type (application/rdf+xml) for all RDF output. 6 7 Fix missing bracket in node.tt. 7 8 Add custom_node template just below main content in node.tt. -
trunk/PREREQUISITES
r706 r718 11 11 CGI::Wiki::Plugin::Diff (version 0.07 or later) 12 12 CGI::Wiki::Plugin::Locator::Grid (version 0.02 or later) 13 CGI::Wiki::Plugin::RSS::ModWiki (version 0.0 81or later)13 CGI::Wiki::Plugin::RSS::ModWiki (version 0.09 or later) 14 14 CGI::Wiki::Plugin::RSS::Reader (version 1.3 or later) 15 15 Class::Accessor … … 40 40 Search::InvertedIndex 41 41 ) 42 POSIX 42 43 Template 43 44 Test::MockObject (version 0.07 or later) -
trunk/lib/OpenGuides.pm
r717 r718 14 14 use vars qw( $VERSION ); 15 15 16 $VERSION = '0.5 1';16 $VERSION = '0.52'; 17 17 18 18 =head1 NAME … … 538 538 if ( $args{format} eq "rdf" ) { 539 539 $template = "rdf_index.tt"; 540 $conf{content_type} = " text/plain";540 $conf{content_type} = "application/rdf+xml"; 541 541 } 542 542 elsif ( $args{format} eq "plain" ) { … … 666 666 og_version => $VERSION, 667 667 ); 668 my $output = "Content-Type: text/plain\n";668 my $output = "Content-Type: application/rdf+xml\n"; 669 669 $output .= "Last-Modified: " . $rdf_writer->rss_timestamp( %criteria ) . "\n\n"; 670 670 $output .= $rdf_writer->make_recentchanges_rss( %criteria ); … … 895 895 ); 896 896 if ( $args{content_type} ) { 897 $output_conf{content_type} = ""; 898 my $output = "Content-Type: $args{content_type}\n\n" 899 . OpenGuides::Template->output( %output_conf ); 900 } else { 901 return OpenGuides::Template->output( %output_conf ); 902 } 897 $output_conf{content_type} = $args{content_type}; 898 } 899 return OpenGuides::Template->output( %output_conf ); 903 900 } 904 901 -
trunk/lib/OpenGuides/RDF.pm
r703 r718 257 257 258 258 # RDF version of a node. 259 print "Content-Type: text/plain\n\n";259 print "Content-Type: application/rdf+xml\n\n"; 260 260 print $rdf_writer->emit_rdfxml( node => "Masala Zone, N1 0NU" ); 261 261 262 262 # Ten most recent changes. 263 print "Content-Type: text/plain\n";263 print "Content-Type: application/rdf+xml\n"; 264 264 print "Last-Modified: " . $self->rss_timestamp( items => 10 ) . "\n\n"; 265 265 print $rdf_writer->make_recentchanges_rss( items => 10 ); … … 288 288 ); 289 289 290 print "Content-Type: text/plain\n\n";290 print "Content-Type: application/rdf+xml\n\n"; 291 291 print $rdf_writer->emit_rdfxml( node => "Masala Zone, N1 0NU" ); 292 292 … … 324 324 325 325 # Ten most recent changes. 326 print "Content-Type: text/plain\n";326 print "Content-Type: application/rdf+xml\n"; 327 327 print "Last-Modified: " . $rdf_writer->rss_timestamp( items => 10 ) . "\n\n"; 328 328 print $rdf_writer->make_recentchanges_rss( items => 10 ); … … 336 336 ); 337 337 338 print "Content-Type: text/plain\n";338 print "Content-Type: application/rdf+xml\n"; 339 339 print "Last-Modified: " . $rdf_writer->rss_timestamp( %args ) . "\n\n"; 340 340 print $rdf_writer->make_recentchanges_rss( %args ); -
trunk/lib/OpenGuides/Template.pm
r683 r718 167 167 my $header = ""; 168 168 unless ( defined $args{content_type} and $args{content_type} eq "" ) { 169 $header = CGI::header( -cookie => $args{cookies} ); 169 my $content_type; 170 if ($args{content_type}) { 171 $content_type = $args{content_type}; 172 } else { 173 $content_type = "text/html"; 174 } 175 $header = CGI::header( -type => $content_type, -cookie => $args{cookies} ); 170 176 } 171 177 -
trunk/t/53_show_index.t
r587 r718 51 51 format => "rdf" 52 52 ); 53 like( $output, qr|Content-Type: text/plain|,54 "RDF output gets content-type of text/plain" );53 like( $output, qr|Content-Type: application/rdf\+xml|, 54 "RDF output gets content-type of application/rdf+xml" ); 55 55 } -
trunk/wiki.cgi
r711 r718 277 277 my $rdf_writer = OpenGuides::RDF->new( wiki => $wiki, 278 278 config => $config ); 279 print "Content-type: text/plain\n\n";279 print "Content-type: application/rdf+xml\n\n"; 280 280 print $rdf_writer->emit_rdfxml( node => $args{node} ); 281 281 exit 0;
