summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-09-27 20:57:27 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-09-27 20:57:27 -0400
commit7cb620d0e8ed922184d3f1cc38d849665cf8d742 (patch)
tree4bf24e53ba1956f4e15209baf9d6c22e9ca2f620 /IkiWiki/Plugin
parentf42215cb65173299bca13cd8bafabdcb9ad2ab2d (diff)
img: Fix dependency code for full size images.
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.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/img.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index 223b5a11f..e2f541506 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -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 &&