diff --git a/IkiWiki.pm b/IkiWiki.pm index f1a5f8058..d4e19c388 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -189,11 +189,6 @@ sub loadplugin ($) { #{{{ sub error ($;$) { #{{{ my $message=shift; my $cleaner=shift; - if ($config{cgi}) { - print "Content-type: text/html\n\n"; - print misctemplate(gettext("Error"), - "

".gettext("Error").": $message

"); - } log_message('err' => $message) if $config{syslog}; if (defined $cleaner) { $cleaner->(); diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 6770f6feb..d805506aa 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -750,4 +750,14 @@ sub cgi (;$$) { #{{{ } } #}}} +# Does not need tobe called directly; all errors will go through here. +sub cgierror ($) { #{{{ + my $message=shift; + + print "Content-type: text/html\n\n"; + print misctemplate(gettext("Error"), + "

".gettext("Error").": $message

"); + die $@; +} #}}} + 1 diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index cc0e84b01..49e1d57d6 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -46,7 +46,7 @@ sub preprocess (@) { #{{{ my $base = IkiWiki::basename($file); eval q{use Image::Magick}; - error($@) if $@; + return "[[img ".gettext("Image::Magick not installed")."]]" if $@; my $im = Image::Magick->new; my $imglink; my $r; diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index c241fd40b..990fcaaa1 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -229,10 +229,14 @@ sub render ($) { #{{{ will_render($file, $file, 1); if ($config{hardlink}) { - prep_writefile($file, $config{destdir}); - unlink($config{destdir}."/".$file); - if (link($srcfile, $config{destdir}."/".$file)) { - return; + # only hardlink if owned by same user + my @stat=stat($srcfile); + if ($stat[4] == $>) { + prep_writefile($file, $config{destdir}); + unlink($config{destdir}."/".$file); + if (link($srcfile, $config{destdir}."/".$file)) { + return; + } } # if hardlink fails, fall back to copying } diff --git a/debian/control b/debian/control index a50c13c26..36d83c640 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: ikiwiki Section: web Priority: optional Build-Depends: perl, debhelper (>= 5) -Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, libtext-markdown-perl | markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl +Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, libtext-markdown-perl | markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl, perlmagick Maintainer: Joey Hess Uploaders: Joey Hess , Josh Triplett Standards-Version: 3.8.0 diff --git a/doc/bugs/Missing_build-dep_on_perlmagick__63__.mdwn b/doc/bugs/Missing_build-dep_on_perlmagick__63__.mdwn index 77e9b3560..f6c0266ba 100644 --- a/doc/bugs/Missing_build-dep_on_perlmagick__63__.mdwn +++ b/doc/bugs/Missing_build-dep_on_perlmagick__63__.mdwn @@ -9,3 +9,6 @@ Trying to build current Git master in a (two weeks old - no DSL here) sid chroot make: *** [build-stamp] Error 2 Adding perlmagick to the build-deps fixes it. I read somewhere in debian/changelog that this build-deb was not needed, but... + +> It's not needed by the test suite, but once I added a img to the source +> wiki, it became needed. [[done]] --[[Joey]] diff --git a/doc/bugs/__96____96__clear:_both__39____39___for___96__.page__42____39____63__.mdwn b/doc/bugs/__96____96__clear:_both__39____39___for___96__.page__42____39____63__.mdwn index e389ce3ed..b08468af4 100644 --- a/doc/bugs/__96____96__clear:_both__39____39___for___96__.page__42____39____63__.mdwn +++ b/doc/bugs/__96____96__clear:_both__39____39___for___96__.page__42____39____63__.mdwn @@ -15,3 +15,18 @@ adding this `clear: both`? > before the modification date. So all of them have to clear both above and > below. I'm sure there are better ways for the CSS to handle that. > --[[Joey]] + +>> There is indeed a better way - all the optional things below the +>> content are wrapped in ` + + diff --git a/templates/page.tmpl b/templates/page.tmpl index 166f3c560..d39c9aa2a 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -17,6 +17,7 @@ + - - + - +