summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-16 16:42:18 -0500
committerJoey Hess <joey@kitenet.net>2007-12-16 16:42:18 -0500
commitc3fed25ad4d301a8e901cf46ba9d11dbf6866d03 (patch)
treebc115228ce56390f169d87557dd833b4387a207f
parentb17ee42a2775b78329b3d26041f07243ca41841a (diff)
* brokenlinks: Don't list the same link multiple times. (%links might
contain multiple copies of the same link)
-rw-r--r--IkiWiki/Plugin/brokenlinks.pm3
-rw-r--r--debian/changelog2
-rw-r--r--po/ikiwiki.pot12
3 files changed, 11 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index ef5837a58..0295a8fe6 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
@@ -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;
diff --git a/debian/changelog b/debian/changelog
index 940993baf..50ab0d54d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot
index 9a8ccc219..66ff20779 100644
--- a/po/ikiwiki.pot
+++ b/po/ikiwiki.pot
@@ -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 ""