Changeset 379


Ignore:
Timestamp:
Jun 10, 2004, 11:17:11 PM (18 years ago)
Author:
kake
Message:

Fixed bug in show_index.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r378 r379  
    88use OpenGuides::Template;
    99use OpenGuides::Utils;
     10use URI::Escape;
    1011
    1112use vars qw( $VERSION );
     
    336337                    );
    337338
     339  # Or return output as a string (useful for writing tests).
     340  $guide->show_index(
     341                      type          => "category",
     342                      value         => "pubs",
     343                      return_output => 1,
     344                    );
     345
    338346=cut
    339347
     
    387395    my ($template, %conf);
    388396
    389     if ( $args{format} eq "rdf" ) {
     397    if ( $args{format} and $args{format} eq "rdf" ) {
    390398        $template = "rdf_index.tt";
    391399        $conf{content_type} = "text/plain";
     
    401409    );
    402410
    403     print $self->process_template( %conf );
     411    my $output = $self->process_template( %conf );
     412    return $output if $args{return_output};
     413    print $output;
    404414}
    405415
Note: See TracChangeset for help on using the changeset viewer.