]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of ssh://git.kitenet.net/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Fri, 28 Dec 2007 21:15:23 +0000 (16:15 -0500)
committerJoey Hess <joey@kitenet.net>
Fri, 28 Dec 2007 21:15:23 +0000 (16:15 -0500)
IkiWiki/Plugin/img.pm
debian/changelog
doc/plugins/img.mdwn
po/ikiwiki.pot
t/git.t

index 9385f64172024d45a7c71fb618ac5d0358dae45b..88a3d7b4d6f299a4f46efceb21a6cac75f73fbf6 100644 (file)
@@ -106,7 +106,11 @@ sub preprocess (@) { #{{{
        if (! defined $params{link} || lc($params{link}) eq 'yes') {
                return  '<a href="'.$fileurl.'">'.$imgtag.'</a>';
        }
+       elsif ($params{link} =~ /^\w+:\/\//) {
+               return  '<a href="'.$params{link}.'">'.$imgtag.'</a>';
+       }
        elsif (length bestlink($params{page}, $params{link})) {
+               add_depends($params{page}, $params{link});
                return htmllink($params{page}, $params{destpage},
                        $params{link}, linktext => $imgtag,
                        noimageinline => 1);
index 81f31353b238744e0b509c30f64a50429baf1508..aca79c6d151a2473e23f49a62d3f19df53a89c93 100644 (file)
@@ -3,6 +3,7 @@ ikiwiki (2.17) UNRELEASED; urgency=low
   * Improved parentlinks special case for index pages.
   * redir: Support for specifying anchors.
   * img: Avoid nesting images when linking to another image. Closes: #457780
+  * img: Allow the link parameter to point to an exterior url.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 19 Dec 2007 16:39:07 -0500
 
index 7858fd5133e14d0dc795987cca508c798d01174c..06c8429c8fff06e6f2b94ef1a9e7f93d655acbfb 100644 (file)
@@ -28,7 +28,8 @@ unchanged to the html img tag.
 
 The `link` parameter is used to control whether the scaled down image links
 to the full size version. By default it does; set "link=somepage" to link
-to another page instead, or "link=no" to disable the link.
+to another page instead, or "link=no" to disable the link, or
+"link=http://url" to link to a given url.
 
 You can also set default values that will be applied to all later images on
 the page, unless overridden. Useful when including many images on a page.
index 7745cce44407c182458718929f4abd893c3a94e6..a9102965ff2a8b5cc81a26f6782c399f12db9b79 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-12-18 16:38-0500\n"
+"POT-Creation-Date: 2007-12-27 19:28-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"
@@ -239,15 +239,15 @@ msgstr ""
 msgid "stylesheet not found"
 msgstr ""
 
-#: ../IkiWiki/Plugin/meta.pm:114
+#: ../IkiWiki/Plugin/meta.pm:116
 msgid "redir page not found"
 msgstr ""
 
-#: ../IkiWiki/Plugin/meta.pm:126
+#: ../IkiWiki/Plugin/meta.pm:129
 msgid "redir cycle is not allowed"
 msgstr ""
 
-#: ../IkiWiki/Plugin/meta.pm:143
+#: ../IkiWiki/Plugin/meta.pm:146
 msgid "link is no longer supported"
 msgstr ""
 
diff --git a/t/git.t b/t/git.t
index ff9528fcad1f56fa862fce77948e43c12836b618..f4e27c473c5279f6e5a389e000d74f66a5edf2be 100755 (executable)
--- a/t/git.t
+++ b/t/git.t
@@ -24,10 +24,10 @@ $config{rcs} = "git";
 $config{srcdir} = "$dir/src";
 IkiWiki::checkconfig();
 
-system "cd $gitrepo && git init-db 2>/dev/null";
-system "cd $gitrepo && echo dummy >dummy; git add . 2>/dev/null";
-system "cd $gitrepo && git commit -m Initial 2>/dev/null";
-system "git clone -l -s $gitrepo $config{srcdir} 2>/dev/null";
+system "cd $gitrepo && git init >/dev/null 2>&1";
+system "cd $gitrepo && echo dummy > dummy; git add . >/dev/null 2>&1";
+system "cd $gitrepo && git commit -m Initial >/dev/null 2>&1";
+system "git clone -l -s $gitrepo $config{srcdir} >/dev/null 2>&1";
 
 my @changes;
 @changes = IkiWiki::rcs_recentchanges(3);
@@ -53,9 +53,9 @@ my $message = "Added the second page";
 
 my $test2 = readfile("t/test2.mdwn");
 writefile('test2.mdwn', $config{srcdir}, $test2);
-system "cd $config{srcdir}; git add test2.mdwn 2>/dev/null";
-system "cd $config{srcdir}; git commit -m \"$message\" test2.mdwn 2>/dev/null";
-system "cd $config{srcdir}; git push origin 2>/dev/null";
+system "cd $config{srcdir}; git add test2.mdwn >/dev/null 2>&1";
+system "cd $config{srcdir}; git commit -m \"$message\" test2.mdwn >/dev/null 2>&1";
+system "cd $config{srcdir}; git push origin >/dev/null 2>&1";
 
 @changes = IkiWiki::rcs_recentchanges(3);