]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Fix a big in the img plugin that caused thumbnailed files to not be
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 1 Apr 2007 20:53:03 +0000 (20:53 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 1 Apr 2007 20:53:03 +0000 (20:53 +0000)
  tracked properly.

IkiWiki/Plugin/img.pm
debian/changelog
po/ikiwiki.pot

index 0606f5001170190b4177eea63240ad808889ffa6..8888b3a56d8bb2a350fe22a310cf8cb23c390c6a 100644 (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";
index 84f6a2b58273ff67c81c6e62e4fcbaa7984c56c2..a192956199cd908706cca3b900b668c2145d250f 100644 (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
 
index 5de4356eedcdf8632eb101a4c7afa0b43bfedb81..757aec0b37d2eb0bcc2bf95d8fca2e14e72635fb 100644 (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 ""