]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Fri, 13 Aug 2010 21:59:51 +0000 (17:59 -0400)
committerJoey Hess <joey@kitenet.net>
Fri, 13 Aug 2010 21:59:51 +0000 (17:59 -0400)
IkiWiki/Plugin/smiley.pm
debian/changelog

index 0d77916d0d3d633e7656d79527cce12647089d47..6f4f49d18f4b3fb08d0d73a8ba877987fb12a94d 100644 (file)
@@ -25,7 +25,14 @@ sub getsetup () {
 }
 
 sub build_regexp () {
-       my $list=readfile(srcfile("smileys.mdwn"));
+       my $srcfile = srcfile("smileys.mdwn", 1);
+       if (! defined $srcfile) {
+               print STDERR sprintf(gettext("smiley plugin will not work without %s"),
+                       "smileys.mdwn")."\n";
+               $smiley_regexp='';
+               return;
+       }
+       my $list=readfile($srcfile);
        while ($list =~ m/^\s*\*\s+\\\\([^\s]+)\s+\[\[([^]]+)\]\]/mg) {
                my $smiley=$1;
                my $file=$2;
index f90fd8855296656788f08b836938b9020994c2d8..834dbd2659cf25eb7228ecb83eba22fe406efdba 100644 (file)
@@ -4,6 +4,7 @@ ikiwiki (3.20100805) UNRELEASED; urgency=low
     magic file cannot identify a file.
   * flattr: New plugin. (Thanks to jaywalk for the initial implementation
     at a flattr plugin! This one is less configurable, but simpler.)
+  * smiley: warn instead of error for missing smileys (Giuseppe Bilotta)
 
  -- Joey Hess <joeyh@debian.org>  Mon, 09 Aug 2010 13:18:28 -0400