diff options
author | intrigeri <intrigeri@boum.org> | 2008-07-13 14:51:20 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2008-07-13 22:03:06 +0200 |
commit | 16cf69477d9511debba84152629d9f08a6e643a5 (patch) | |
tree | 9313270bb8ff6e84011ec34eed25237835781b13 | |
parent | f32369f66924e0c008370c29462af57fd218267a (diff) |
pedigree: fixed misc bugs
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r-- | IkiWiki/Plugin/pedigree.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/pedigree.pm b/IkiWiki/Plugin/pedigree.pm index efe6c3e77..b051a6da2 100644 --- a/IkiWiki/Plugin/pedigree.pm +++ b/IkiWiki/Plugin/pedigree.pm @@ -17,10 +17,10 @@ sub pedigree ($) { #{{{ my @ret; my $path=""; my $title=$config{wikiname}; - my $i; + my $i=0; my @pagepath=(split("/", $page)); - my $pageloc=@pagepath - 1; + my $pagedepth=@pagepath; foreach my $dir (@pagepath) { next if $dir eq 'index'; push @ret, { @@ -28,12 +28,12 @@ sub pedigree ($) { #{{{ page => $title, level => $i, is_root => ($i eq 0), - is_first_child => ($i eq 1), - is_mother => ($i eq ($pageloc - 1)), - is_grand_mother => ($i eq ($pageloc - 2)) + is_second_ancestor => ($i eq 1), + is_grand_mother => ($i eq ($pagedepth - 2)), + is_mother => ($i eq ($pagedepth - 1)), }; $path.="/".$dir; - $title=pagetitle($dir); + $title=IkiWiki::pagetitle($dir); $i++; } return @ret; |