don't show an error if the image is missing, instead, a broken link
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 21 Jul 2008 20:53:52 +0000 (16:53 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 21 Jul 2008 20:53:52 +0000 (16:53 -0400)
IkiWiki/Plugin/img.pm

index 42de81bd16defdfbb4535cfd3c373e3bd1e52383..748d28aceae70a3494b8a9f587c0f2de0595db6c 100644 (file)
@@ -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};