aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-21 16:53:52 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-21 16:53:52 -0400
commit97e21ae21caa2418015ae512755e8078a0bc5ccf (patch)
tree4d1a86b7820e532db0c941f114d979efbafe3a38
parent7910f1c352d4d00551694550f34ab7c3d975e448 (diff)
downloadikiwiki-97e21ae21caa2418015ae512755e8078a0bc5ccf.tar
ikiwiki-97e21ae21caa2418015ae512755e8078a0bc5ccf.tar.gz
don't show an error if the image is missing, instead, a broken link
-rw-r--r--IkiWiki/Plugin/img.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index 42de81bd1..748d28ace 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -42,8 +42,8 @@ sub preprocess (@) { #{{{
my $file = bestlink($params{page}, $image);
my $srcfile = srcfile($file, 1);
- if (! defined $srcfile) {
- error(sprintf(gettext("%s not found"), $image));
+ if (! length $file || ! defined $srcfile) {
+ return htmllink($params{page}, $params{destpage}, $image);
}
my $dir = $params{page};