needsbuild hook interface changed; the hooks should now return the modified array of things that need built. (Backwards compatability code keeps plugins using the old interface working.)
parent
7475f90be2
commit
8a6f4a7e50
|
@ -210,6 +210,8 @@ sub needsbuild (@) {
|
||||||
markunseen($feed->{sourcepage});
|
markunseen($feed->{sourcepage});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
|
|
|
@ -491,6 +491,7 @@ sub needsbuild (@) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
1
|
1
|
||||||
|
|
|
@ -41,6 +41,8 @@ sub needsbuild (@) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
|
|
|
@ -64,6 +64,8 @@ sub needsbuild (@) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ sub needsbuild (@) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub scrub ($$) {
|
sub scrub ($$) {
|
||||||
|
|
|
@ -45,6 +45,7 @@ sub needsbuild (@) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
|
|
|
@ -221,6 +221,8 @@ sub needsbuild () {
|
||||||
foreach my $master (keys %translations) {
|
foreach my $master (keys %translations) {
|
||||||
map add_depends($_, $master), values %{otherlanguages_pages($master)};
|
map add_depends($_, $master), values %{otherlanguages_pages($master)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub scan (@) {
|
sub scan (@) {
|
||||||
|
|
|
@ -73,7 +73,11 @@ sub refresh () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub needsbuild ($) {
|
sub needsbuild ($) {
|
||||||
|
my $needsbuild=shift;
|
||||||
|
|
||||||
debug("skeleton plugin needsbuild");
|
debug("skeleton plugin needsbuild");
|
||||||
|
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
|
|
|
@ -60,6 +60,7 @@ sub needsbuild ($) {
|
||||||
|
|
||||||
$wikistate{theme}{currenttheme}=$config{theme};
|
$wikistate{theme}{currenttheme}=$config{theme};
|
||||||
}
|
}
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
1
|
1
|
||||||
|
|
|
@ -37,6 +37,7 @@ sub needsbuild (@) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $needsbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
|
|
|
@ -759,7 +759,10 @@ sub refresh () {
|
||||||
my ($new, $internal_new)=find_new_files($files);
|
my ($new, $internal_new)=find_new_files($files);
|
||||||
my ($del, $internal_del)=find_del_files($pages);
|
my ($del, $internal_del)=find_del_files($pages);
|
||||||
my ($changed, $internal_changed)=find_changed($files);
|
my ($changed, $internal_changed)=find_changed($files);
|
||||||
run_hooks(needsbuild => sub { shift->($changed) });
|
run_hooks(needsbuild => sub {
|
||||||
|
my $ret=shift->($changed);
|
||||||
|
$changed=$ret if ref $ret eq 'ARRAY';
|
||||||
|
});
|
||||||
my $oldlink_targets=calculate_old_links($changed, $del);
|
my $oldlink_targets=calculate_old_links($changed, $del);
|
||||||
|
|
||||||
foreach my $file (@$changed) {
|
foreach my $file (@$changed) {
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
ikiwiki (3.20100832) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* needsbuild hook interface changed; the hooks should now return
|
||||||
|
the modified array of things that need built. (Backwards compatability
|
||||||
|
code keeps plugins using the old interface working.)
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Tue, 07 Sep 2010 12:08:05 -0400
|
||||||
|
|
||||||
ikiwiki (3.20100831) unstable; urgency=low
|
ikiwiki (3.20100831) unstable; urgency=low
|
||||||
|
|
||||||
* filecheck: Fall back to using the file command if the freedesktop
|
* filecheck: Fall back to using the file command if the freedesktop
|
||||||
|
|
|
@ -179,8 +179,8 @@ function is passed no values.
|
||||||
|
|
||||||
This allows a plugin to manipulate the list of files that need to be
|
This allows a plugin to manipulate the list of files that need to be
|
||||||
built when the wiki is refreshed. The function is passed a reference to an
|
built when the wiki is refreshed. The function is passed a reference to an
|
||||||
array of files that will be rebuilt, and can modify the array, either
|
array of files that will be rebuilt. It should return an array reference
|
||||||
adding or removing files from it.
|
that is a modified version of its input. It can add or remove files from it.
|
||||||
|
|
||||||
### scan
|
### scan
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue