X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3a31030550d302fdafa6407e9d24e300031d9787..a9fb41084613bbc4c53faeb33ee90a6eb6c52533:/IkiWiki/Plugin/inline.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 890cdb446..8c00ca5f5 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -113,7 +113,7 @@ sub preprocess_inline (@) { #{{{ my $file = $pagesources{$page}; my $type = pagetype($file); if (! $raw || ($raw && ! defined $type)) { - if (! $archive && $quick) { + unless ($archive && $quick) { # Get the content before populating the # template, since getting the content uses # the same template if inlines are nested. @@ -234,12 +234,14 @@ sub date_3339 ($) { #{{{ sub absolute_urls ($$) { #{{{ # sucky sub because rss sucks my $content=shift; - my $url=shift; + my $baseurl=shift; + my $url=$baseurl; $url=~s/[^\/]+$//; - $content=~s//dev/null'; defined(my $pid = fork) or error("Can't fork: $!"); return if $pid; + chdir '/'; + eval q{use POSIX ’setsid’}; setsid() or error("Can't start a new session: $!"); + open STDIN, '/dev/null'; + open STDOUT, '>/dev/null'; open STDERR, '>&STDOUT' or error("Can’t dup stdout: $!"); # Don't need to keep a lock on the wiki as a daemon.