Ignore:
Timestamp:
Jul 21, 2005, 4:11:35 PM (16 years ago)
Author:
Earle Martin
Message:

fix redirect checking in a less stupid way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r656 r657  
    174174        # Avoid loops by not generating redirects to the same node or the
    175175        # previous node.
    176       if ( $wiki->node_exists($redirect) ) {
    177         unless ($redirect eq $id) {
    178           unless ($redirect eq $oldid) {
     176        if ( $wiki->node_exists($redirect) && $redirect ne $id && $redirect ne $oldid ) {
    179177            my $output = $self->redirect_to_node($redirect, $id);
    180178            return $output if $return_output;
    181179            print $output;
    182180            exit 0;
    183           }
    184181        }
    185       }
    186182    }
    187183    my $content    = $wiki->format($raw);
Note: See TracChangeset for help on using the changeset viewer.