From: Joey Hess Date: Fri, 13 Aug 2010 21:59:51 +0000 (-0400) Subject: Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info X-Git-Tag: 3.20100831~78 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/fc5b26dd326932c6f3493983ad65f2783d6170e1?hp=6e905e21a81223d64f759c9753f936e4b2a46064 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info --- diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 0d77916d0..6f4f49d18 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -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; diff --git a/debian/changelog b/debian/changelog index f90fd8855..834dbd265 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 09 Aug 2010 13:18:28 -0400