Changeset 440
- Timestamp:
- 07/13/04 23:55:53 (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 modified
-
Changes (modified) (1 diff)
-
MANIFEST (modified) (1 diff)
-
lib/OpenGuides.pm (modified) (4 diffs)
-
t/64_bug_node_history.t (added)
-
wiki.cgi (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r439 r440 1 0.36 2 Changed node template to include link to diff of current version3 from previous version.4 Fixed case sensitivity bug in index node autocreation.1 0.36 13 July 2004 2 Added diff link to node template. Fixed case sensitivity bug in 3 index node autocreation. Fixed bug with node history comments 4 not being HTML-escaped. 5 5 6 6 0.35 25 June 2004 -
trunk/MANIFEST
r401 r440 65 65 t/62_bug_os_coords.t 66 66 t/63_bug_map_link_no_address.t 67 t/64_bug_node_history.t 67 68 t/templates/15_test.tt 68 69 wiki.cgi -
trunk/lib/OpenGuides.pm
r431 r440 13 13 use vars qw( $VERSION ); 14 14 15 $VERSION = '0.3 5';15 $VERSION = '0.36'; 16 16 17 17 =head1 NAME … … 432 432 $guide->list_all_versions ( id => "Home Page" ); 433 433 434 # Or return output as a string (useful for writing tests). 435 $guide->list_all_versions ( 436 id => "Home Page", 437 return_output => 1, 438 ); 439 440 # Or return the hash of variables that will be passed to the template 441 # (not including those set additionally by OpenGuides::Template). 442 $guide->list_all_versions ( 443 id => "Home Page", 444 return_tt_vars => 1, 445 ); 446 434 447 =cut 435 448 436 449 sub list_all_versions { 437 450 my ($self, %args) = @_; 451 my $return_output = $args{return_output} || 0; 438 452 my $node = $args{id}; 439 453 my %curr_data = $self->wiki->retrieve_node($node); … … 445 459 version => $version ); 446 460 # $node_data{version} will be zero if this version was deleted. 447 push @history, { version => $version, 448 modified => $node_data{last_modified}, 449 username => $node_data{metadata}{username}[0], 450 comment => $node_data{metadata}{comment}[0], 461 push @history, { 462 version => CGI->escapeHTML( $version ), 463 modified => CGI->escapeHTML( $node_data{last_modified} ), 464 username => CGI->escapeHTML( $node_data{metadata}{username}[0] ), 465 comment => CGI->escapeHTML( $node_data{metadata}{comment}[0] ), 451 466 } if $node_data{version}; 452 467 } … … 456 471 not_deletable => 1, 457 472 history => \@history ); 458 print $self->process_template( 459 id => $node, 460 template => "node_history.tt", 461 tt_vars => \%tt_vars, 462 ); 473 return %tt_vars if $args{return_tt_vars}; 474 my $output = $self->process_template( 475 id => $node, 476 template => "node_history.tt", 477 tt_vars => \%tt_vars, 478 ); 479 return $output if $return_output; 480 print $output; 463 481 } 464 482 -
trunk/wiki.cgi
r437 r440 5 5 6 6 use vars qw( $VERSION ); 7 $VERSION = '0.3 5';7 $VERSION = '0.36'; 8 8 9 9 use CGI qw/:standard/;
