Author: earle Date: 2005-07-21 16:11:35 +0100 (Thu, 21 Jul 2005) New Revision: 657
Modified: trunk/lib/OpenGuides.pm Log: fix redirect checking in a less stupid way
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2005-07-21 14:58:27 UTC (rev 656) +++ trunk/lib/OpenGuides.pm 2005-07-21 15:11:35 UTC (rev 657) @@ -173,16 +173,12 @@
# Avoid loops by not generating redirects to the same node or the # previous node. - if ( $wiki->node_exists($redirect) ) { - unless ($redirect eq $id) { - unless ($redirect eq $oldid) { + if ( $wiki->node_exists($redirect) && $redirect ne $id && $redirect ne $oldid ) { my $output = $self->redirect_to_node($redirect, $id); return $output if $return_output; print $output; exit 0; - } } - } } my $content = $wiki->format($raw); my $modified = $node_data{last_modified};
openguides-commits@lists.openguides.org