img: Fix adding of dependency from page to the image.
This was impressively broken. add_depends was being called with params backwards, and on parameter was set to the name of the generated file, which isn't in the source. Now updates to images will update the page that contains them, thus updating them. This is unncessary for fullsize images, so skipped.master
parent
7922eae327
commit
9d96250fc5
|
@ -44,6 +44,7 @@ sub preprocess (@) {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_link($params{page}, $image);
|
add_link($params{page}, $image);
|
||||||
|
|
||||||
# optimisation: detect scan mode, and avoid generating the image
|
# optimisation: detect scan mode, and avoid generating the image
|
||||||
if (! defined wantarray) {
|
if (! defined wantarray) {
|
||||||
return;
|
return;
|
||||||
|
@ -65,6 +66,8 @@ sub preprocess (@) {
|
||||||
my $r;
|
my $r;
|
||||||
|
|
||||||
if ($params{size} ne 'full') {
|
if ($params{size} ne 'full') {
|
||||||
|
add_depends($params{page}, $image);
|
||||||
|
|
||||||
my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/);
|
my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/);
|
||||||
error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size})
|
error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size})
|
||||||
unless (defined $w && defined $h &&
|
unless (defined $w && defined $h &&
|
||||||
|
@ -102,8 +105,6 @@ sub preprocess (@) {
|
||||||
$imglink = $file;
|
$imglink = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
add_depends($imglink, $params{page});
|
|
||||||
|
|
||||||
my ($fileurl, $imgurl);
|
my ($fileurl, $imgurl);
|
||||||
if (! $params{preview}) {
|
if (! $params{preview}) {
|
||||||
$fileurl=urlto($file, $params{destpage});
|
$fileurl=urlto($file, $params{destpage});
|
||||||
|
|
|
@ -8,6 +8,7 @@ ikiwiki (3.15) UNRELEASED; urgency=low
|
||||||
* Add further build machinery to generate translated underlays from
|
* Add further build machinery to generate translated underlays from
|
||||||
the po file, for use by wikis whose primary language is not English.
|
the po file, for use by wikis whose primary language is not English.
|
||||||
* Add Danish basewiki translation by Jonas Smedegaard.
|
* Add Danish basewiki translation by Jonas Smedegaard.
|
||||||
|
* img: Fix adding of dependency from page to the image.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400
|
-- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue