Changeset 1056
- Timestamp:
- 06/10/07 15:47:11 (18 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
Changes (modified) (1 diff)
-
lib/OpenGuides.pm (modified) (1 diff)
-
t/51_display_node.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r1050 r1056 14 14 Only display the google maps preference if node maps are enabled 15 15 (#192). 16 Respect redirect=0 (#104). 16 17 17 18 0.60 13 May 2007 -
trunk/lib/OpenGuides.pm
r1045 r1056 176 176 my $config = $self->config; 177 177 my $oldid = $args{oldid} || ''; 178 my $do_redirect = $args{redirect} ||1;178 my $do_redirect = defined($args{redirect}) ? $args{redirect} : 1; 179 179 180 180 my %tt_vars; -
trunk/t/51_display_node.t
r957 r1056 13 13 } 14 14 15 plan tests => 7;15 plan tests => 9; 16 16 17 17 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); … … 48 48 my %tt_vars = $guide->display_node( return_tt_vars => 1 ); 49 49 ok( defined $tt_vars{recent_changes}, "...and recent_changes is set for the home node even if we have changed its name" ); 50 51 $wiki->write_node( 'Redirect Test', '#REDIRECT Test Page', undef ); 52 53 $output = $guide->display_node( id => 'Redirect Test', return_output => 1 ); 54 55 like( $output, qr{^\QLocation: http://example.com/wiki.cgi?id=Test_Page;oldid=Redirect_Test}ms, 56 '#REDIRECT redirects correctly' ); 57 58 $output = $guide->display_node( id => 'Redirect Test', return_output => 1, redirect => 0 ); 59 60 unlike( $output, qr{^\QLocation: }ms, '...but not with redirect=0' );
