* Fix a big in the img plugin that caused thumbnailed files to not be

tracked properly.
master
joey 2007-04-01 20:53:03 +00:00
parent 6351ae2ac4
commit bf9e8bc900
3 changed files with 10 additions and 7 deletions

View File

@ -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";

2
debian/changelog vendored
View File

@ -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 <joeyh@debian.org> Sun, 01 Apr 2007 15:37:17 -0400

View File

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 ""