]> sipb.mit.edu Git - ikiwiki.git/commitdiff
drop redir loop detection code
authorJoey Hess <joey@kitenet.net>
Sat, 8 Dec 2007 20:05:41 +0000 (15:05 -0500)
committerJoey Hess <joey@kitenet.net>
Sat, 8 Dec 2007 20:05:41 +0000 (15:05 -0500)
it won't work for incremental builds

for now, relying on browsers to notice loops

IkiWiki/Plugin/meta.pm

index 134c0ce5d1065f5520407c2d671c52073c569040..a0dd66376b295cc574f75ad6cdcad2473c832d8f 100644 (file)
@@ -13,7 +13,6 @@ my %author;
 my %authorurl;
 my %license;
 my %copyright;
-my %redirected;
 
 sub import { #{{{
        hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
@@ -71,18 +70,12 @@ sub preprocess (@) { #{{{
                }
        }
        elsif ($key eq 'redir') {
-               $redirected{$page}=1;
                my $safe=0;
                if ($value =~ /^$config{wiki_link_regexp}$/) {
                        my $link=bestlink($page, $value);
                        if (! length $link) {
                                return "[[meta ".gettext("redir page not found")."]]";
                        }
-                       if ($redirected{$link}) {
-                               # TODO this is a cheap way of avoiding
-                               # redir cycles, but it is really too strict.
-                               return "[[meta ".gettext("redir to page that itself redirs is not allowed")."]]";
-                       }
                        $value=urlto($link, $destpage);
                        $safe=1;
                }