* brokenlinks: Don't list the same link multiple times. (%links might
authorJoey Hess <joey@kitenet.net>
Sun, 16 Dec 2007 21:42:18 +0000 (16:42 -0500)
committerJoey Hess <joey@kitenet.net>
Sun, 16 Dec 2007 21:42:18 +0000 (16:42 -0500)
  contain multiple copies of the same link)

IkiWiki/Plugin/brokenlinks.pm
debian/changelog
po/ikiwiki.pot

index ef5837a5876c44b1082a3556d5cabe75cd24c7ef..0295a8fe6b570d7b49503ba6587ae41a28f0cfa7 100644 (file)
@@ -22,7 +22,10 @@ sub preprocess (@) { #{{{
        foreach my $page (keys %links) {
                if (pagespec_match($page, $params{pages}, location => $params{page})) {
                        my $discussion=gettext("discussion");
+                       my %seen;
                        foreach my $link (@{$links{$page}}) {
+                               next if $seen{$link};
+                               $seen{$link}=1;
                                next if $link =~ /.*\/\Q$discussion\E/i && $config{discussion};
                                my $bestlink=bestlink($page, $link);
                                next if length $bestlink;
index 940993baf90d237f804df8c8e34d7e6f079444bd..50ab0d54d00679546d9949cf2ad3e44ed22870de 100644 (file)
@@ -53,6 +53,8 @@ ikiwiki (2.16) UNRELEASED; urgency=low
     liw's disappearing openids).
   * aggregate: Convert filter hook to a needsbuild hook.
   * map: Don't inline images.
+  * brokenlinks: Don't list the same link multiple times. (%links might
+    contain multiple copies of the same link)
 
  -- Joey Hess <joeyh@debian.org>  Mon, 03 Dec 2007 14:47:36 -0500
 
index 9a8ccc219874e118ae26b601a5c3ff1414356fa2..66ff207793b41d754210d33bc62c5bb3f33bf758 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-12-16 15:48-0500\n"
+"POT-Creation-Date: 2007-12-16 16:08-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -42,7 +42,7 @@ msgid "%s is not an editable page"
 msgstr ""
 
 #: ../IkiWiki/CGI.pm:441 ../IkiWiki/Plugin/brokenlinks.pm:24
-#: ../IkiWiki/Plugin/inline.pm:232 ../IkiWiki/Plugin/opendiscussion.pm:17
+#: ../IkiWiki/Plugin/inline.pm:234 ../IkiWiki/Plugin/opendiscussion.pm:17
 #: ../IkiWiki/Plugin/orphans.pm:28 ../IkiWiki/Render.pm:98
 #: ../IkiWiki/Render.pm:178
 msgid "discussion"
@@ -204,20 +204,20 @@ msgstr ""
 msgid "unknown sort type %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:193
+#: ../IkiWiki/Plugin/inline.pm:195
 msgid "Add a new post titled:"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:209
+#: ../IkiWiki/Plugin/inline.pm:211
 #, perl-format
 msgid "nonexistant template %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:240 ../IkiWiki/Render.pm:102
+#: ../IkiWiki/Plugin/inline.pm:242 ../IkiWiki/Render.pm:102
 msgid "Discussion"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:454
+#: ../IkiWiki/Plugin/inline.pm:456
 msgid "RPC::XML::Client not found, not pinging"
 msgstr ""