Changeset 718

Show
Ignore:
Timestamp:
11/29/05 06:22:42 (3 years ago)
Author:
earle
Message:

fixes #28

Location:
trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r717 r718  
    223223        'CGI::Wiki::Plugin::Diff'         => '0.07',  # earlier buggy 
    224224        'CGI::Wiki::Plugin::Locator::Grid'=> '0.02',  # cope with sqlite 3 
    225         'CGI::Wiki::Plugin::RSS::ModWiki' => '0.081', # supports DOAP metadata 
     225        'CGI::Wiki::Plugin::RSS::ModWiki' => '0.09',  # fixes date formatting bug 
    226226        'CGI::Wiki::Plugin::RSS::Reader'  => '1.3',   # earlier versions don't support RSS 2.0 
    227227        'Class::Accessor'                 => 0, 
     
    235235        'Parse::RecDescent'               => 0, 
    236236        $search_module                    => 0, 
     237        'POSIX'                           => 0, 
    237238        'Template'                        => 0, 
    238239        'Test::MockObject'                => '0.07', # earlier doesn't use 'mock' 
  • trunk/Changes

    r716 r718  
    44          to reflect this. 
    55        Rename OpenGuides::SuperSearch to OpenGuides::Search. 
     6        Use corrent content-type (application/rdf+xml) for all RDF output. 
    67        Fix missing bracket in node.tt. 
    78        Add custom_node template just below main content in node.tt. 
  • trunk/PREREQUISITES

    r706 r718  
    1111CGI::Wiki::Plugin::Diff (version 0.07 or later) 
    1212CGI::Wiki::Plugin::Locator::Grid (version 0.02 or later) 
    13 CGI::Wiki::Plugin::RSS::ModWiki (version 0.081 or later) 
     13CGI::Wiki::Plugin::RSS::ModWiki (version 0.09 or later) 
    1414CGI::Wiki::Plugin::RSS::Reader (version 1.3 or later) 
    1515Class::Accessor 
     
    4040  Search::InvertedIndex 
    4141) 
     42POSIX 
    4243Template 
    4344Test::MockObject (version 0.07 or later) 
  • trunk/lib/OpenGuides.pm

    r717 r718  
    1414use vars qw( $VERSION ); 
    1515 
    16 $VERSION = '0.51'; 
     16$VERSION = '0.52'; 
    1717 
    1818=head1 NAME 
     
    538538        if ( $args{format} eq "rdf" ) { 
    539539            $template = "rdf_index.tt"; 
    540             $conf{content_type} = "text/plain"; 
     540            $conf{content_type} = "application/rdf+xml"; 
    541541        } 
    542542        elsif ( $args{format} eq "plain" ) { 
     
    666666                                             og_version => $VERSION, 
    667667                                         ); 
    668     my $output = "Content-Type: text/plain\n"; 
     668    my $output = "Content-Type: application/rdf+xml\n"; 
    669669    $output .= "Last-Modified: " . $rdf_writer->rss_timestamp( %criteria ) . "\n\n"; 
    670670    $output .= $rdf_writer->make_recentchanges_rss( %criteria ); 
     
    895895                      ); 
    896896    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 ); 
    903900} 
    904901 
  • trunk/lib/OpenGuides/RDF.pm

    r703 r718  
    257257 
    258258    # RDF version of a node. 
    259     print "Content-Type: text/plain\n\n"; 
     259    print "Content-Type: application/rdf+xml\n\n"; 
    260260    print $rdf_writer->emit_rdfxml( node => "Masala Zone, N1 0NU" ); 
    261261 
    262262    # Ten most recent changes. 
    263     print "Content-Type: text/plain\n"; 
     263    print "Content-Type: application/rdf+xml\n"; 
    264264    print "Last-Modified: " . $self->rss_timestamp( items => 10 ) . "\n\n"; 
    265265    print $rdf_writer->make_recentchanges_rss( items => 10 ); 
     
    288288    ); 
    289289 
    290     print "Content-Type: text/plain\n\n"; 
     290    print "Content-Type: application/rdf+xml\n\n"; 
    291291    print $rdf_writer->emit_rdfxml( node => "Masala Zone, N1 0NU" ); 
    292292 
     
    324324 
    325325    # Ten most recent changes. 
    326     print "Content-Type: text/plain\n"; 
     326    print "Content-Type: application/rdf+xml\n"; 
    327327    print "Last-Modified: " . $rdf_writer->rss_timestamp( items => 10 ) . "\n\n"; 
    328328    print $rdf_writer->make_recentchanges_rss( items => 10 ); 
     
    336336               ); 
    337337 
    338     print "Content-Type: text/plain\n"; 
     338    print "Content-Type: application/rdf+xml\n"; 
    339339    print "Last-Modified: " . $rdf_writer->rss_timestamp( %args ) . "\n\n"; 
    340340    print $rdf_writer->make_recentchanges_rss( %args ); 
  • trunk/lib/OpenGuides/Template.pm

    r683 r718  
    167167    my $header = ""; 
    168168    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} ); 
    170176    } 
    171177 
  • trunk/t/53_show_index.t

    r587 r718  
    5151                                  format        => "rdf" 
    5252                                ); 
    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" ); 
    5555} 
  • trunk/wiki.cgi

    r711 r718  
    277277    my $rdf_writer = OpenGuides::RDF->new( wiki      => $wiki, 
    278278                       config => $config ); 
    279     print "Content-type: text/plain\n\n"; 
     279    print "Content-type: application/rdf+xml\n\n"; 
    280280    print $rdf_writer->emit_rdfxml( node => $args{node} ); 
    281281    exit 0;