]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/tag.pm
fix back-compat with old Net::OpenID
[git.ikiwiki.info.git] / IkiWiki / Plugin / tag.pm
index ecc77cbb11162a5587de36ab30adc9edc9defdb1..cdcfaf536082825444b3e8d3f27b406bc413cd53 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::tag;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %tags;
 
@@ -73,7 +73,7 @@ sub preprocess_tag (@) {
                $tag=linkpage($tag);
                $tags{$page}{$tag}=1;
                # hidden WikiLink
-               push @{$links{$page}}, tagpage($tag);
+               add_link($page, tagpage($tag));
        }
                
        return "";
@@ -88,14 +88,14 @@ sub preprocess_taglink (@) {
                if (/(.*)\|(.*)/) {
                        my $tag=linkpage($2);
                        $tags{$params{page}}{$tag}=1;
-                       push @{$links{$params{page}}}, tagpage($tag);
+                       add_link($params{page}, tagpage($tag));
                        return taglink($params{page}, $params{destpage}, $tag,
                                linktext => pagetitle($1));
                }
                else {
                        my $tag=linkpage($_);
                        $tags{$params{page}}{$tag}=1;
-                       push @{$links{$params{page}}}, tagpage($tag);
+                       add_link($params{page}, tagpage($tag));
                        return taglink($params{page}, $params{destpage}, $tag);
                }
        }
@@ -125,4 +125,12 @@ sub pagetemplate (@) {
        }
 }
 
+package IkiWiki::PageSpec;
+
+sub match_tagged ($$;@) {
+       my $page = shift;
+       my $glob = shift;
+       return match_link($page, IkiWiki::Plugin::tag::tagpage($glob));
+}
+
 1