Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Really fix bug with links to pages with names containing colons
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
fortune.pm
diff --git
a/IkiWiki/Plugin/fortune.pm
b/IkiWiki/Plugin/fortune.pm
index 43f4526af3a99812ccfad101526b3242aabed088..a78a73d5f1f4fa034777408896496971643d5f3b 100644
(file)
--- a/
IkiWiki/Plugin/fortune.pm
+++ b/
IkiWiki/Plugin/fortune.pm
@@
-2,9
+2,9
@@
# Include a fortune in a page
package IkiWiki::Plugin::fortune;
# Include a fortune in a page
package IkiWiki::Plugin::fortune;
-use IkiWiki;
use warnings;
use strict;
use warnings;
use strict;
+use IkiWiki 2.00;
sub import { #{{{
hook(type => "preprocess", id => "fortune", call => \&preprocess);
sub import { #{{{
hook(type => "preprocess", id => "fortune", call => \&preprocess);
@@
-12,10
+12,10
@@
sub import { #{{{
sub preprocess (@) { #{{{
$ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
sub preprocess (@) { #{{{
$ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
- my $f = `fortune`;
+ my $f = `fortune
2>/dev/null
`;
if ($?) {
if ($?) {
-
return "[[fortune failed]]"
;
+
error gettext("fortune failed")
;
}
else {
return "<pre>$f</pre>\n";
}
else {
return "<pre>$f</pre>\n";