From: joey Date: Sun, 1 Apr 2007 20:53:03 +0000 (+0000) Subject: * Fix a big in the img plugin that caused thumbnailed files to not be X-Git-Tag: 1.49~123 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf9e8bc900e344e8382c8e96001a74eb2e0b9629;p=ikiwiki.git * Fix a big in the img plugin that caused thumbnailed files to not be tracked properly. --- diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 0606f5001..8888b3a56 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -51,6 +51,8 @@ sub preprocess (@) { #{{{ my $outfile = "$config{destdir}/$dir/${w}x${h}-$base"; $imglink = "$dir/${w}x${h}-$base"; + + will_render($params{page}, $imglink); if (-e $outfile && (-M srcfile($file) >= -M $outfile)) { $r = $im->Read($outfile); @@ -65,7 +67,6 @@ sub preprocess (@) { #{{{ # don't actually write file in preview mode if (! $params{preview}) { - will_render($params{page}, $imglink); my @blob = $im->ImageToBlob(); writefile($imglink, $config{destdir}, $blob[0], 1); } @@ -84,8 +85,8 @@ sub preprocess (@) { #{{{ my ($fileurl, $imgurl); if (! $params{preview}) { - $fileurl=IkiWiki::abs2rel($file, IkiWiki::dirname($params{destpage})); - $imgurl=IkiWiki::abs2rel($imglink, IkiWiki::dirname($params{destpage})); + $fileurl=urlto($file, $params{destpage}); + $imgurl=urlto($imglink, $params{destpage}); } else { $fileurl="$config{url}/$file"; diff --git a/debian/changelog b/debian/changelog index 84f6a2b58..a19295619 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ ikiwiki (1.49) UNRELEASED; urgency=low on and supported creating it (especially Tumov). This adds a "usedirs" option that makes ikiwiki use foo/index.html instead of foo.html as output page names. It is not yet enabled by default. + * Fix a big in the img plugin that caused thumbnailed files to not be + tracked properly. -- Joey Hess Sun, 01 Apr 2007 15:37:17 -0400 diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 5de4356ee..757aec0b3 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-04-01 16:00-0400\n" +"POT-Creation-Date: 2007-04-01 16:43-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -132,13 +132,13 @@ msgstr "" msgid "bad size \"%s\"" msgstr "" -#: ../IkiWiki/Plugin/img.pm:57 ../IkiWiki/Plugin/img.pm:61 -#: ../IkiWiki/Plugin/img.pm:79 +#: ../IkiWiki/Plugin/img.pm:59 ../IkiWiki/Plugin/img.pm:63 +#: ../IkiWiki/Plugin/img.pm:80 #, perl-format msgid "failed to read %s: %s" msgstr "" -#: ../IkiWiki/Plugin/img.pm:64 +#: ../IkiWiki/Plugin/img.pm:66 #, perl-format msgid "failed to resize: %s" msgstr ""