]> sipb.mit.edu Git - ikiwiki.git/commitdiff
img: Fix dependency code for full size images.
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 28 Sep 2009 00:57:27 +0000 (20:57 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 28 Sep 2009 00:57:27 +0000 (20:57 -0400)
I had assumed that an image shown full size did not need add_depends, since
a change would not need a change to the displaying page.

But this is not true if the image is modified and its size changes. Then
the page needs to update its img tag to reflect the current size.

IkiWiki/Plugin/img.pm
debian/changelog

index 223b5a11f3e1250ae3dca43551f4601f47508894..e2f541506c309cd4dcef8ad0290c6ffdd03703d1 100644 (file)
@@ -44,6 +44,7 @@ sub preprocess (@) {
        }
 
        add_link($params{page}, $image);
+       add_depends($params{page}, $image);
 
        # optimisation: detect scan mode, and avoid generating the image
        if (! defined wantarray) {
@@ -69,8 +70,6 @@ sub preprocess (@) {
        my ($dwidth, $dheight);
 
        if ($params{size} ne 'full') {
-               add_depends($params{page}, $image);
-
                my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/);
                error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size})
                        unless (defined $w && defined $h &&
index d2ff88a2ab2de6fb1561f0c5621c41da48dcb97e..44c810b00f8817ba11d1a5582cc1f30f7808650d 100644 (file)
@@ -3,6 +3,7 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low
   * parentlinks: Add has_parentlinks template parameter to allow styling
     the toplevel index differently etc.
   * img: Correct bug in image size calculation code.
+  * img: Fix dependency code for full size images.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 27 Sep 2009 17:40:03 -0400