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});
|
||||
}
|
||||
}
|
||||
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub preprocess (@) {
|
||||
|
|
|
@ -491,6 +491,7 @@ sub needsbuild (@) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
1
|
||||
|
|
|
@ -41,6 +41,8 @@ sub needsbuild (@) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub preprocess (@) {
|
||||
|
|
|
@ -64,6 +64,8 @@ sub needsbuild (@) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub preprocess (@) {
|
||||
|
|
|
@ -37,6 +37,7 @@ sub needsbuild (@) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub scrub ($$) {
|
||||
|
|
|
@ -45,6 +45,7 @@ sub needsbuild (@) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub preprocess (@) {
|
||||
|
|
|
@ -221,6 +221,8 @@ sub needsbuild () {
|
|||
foreach my $master (keys %translations) {
|
||||
map add_depends($_, $master), values %{otherlanguages_pages($master)};
|
||||
}
|
||||
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub scan (@) {
|
||||
|
|
|
@ -73,7 +73,11 @@ sub refresh () {
|
|||
}
|
||||
|
||||
sub needsbuild ($) {
|
||||
my $needsbuild=shift;
|
||||
|
||||
debug("skeleton plugin needsbuild");
|
||||
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub preprocess (@) {
|
||||
|
|
|
@ -60,6 +60,7 @@ sub needsbuild ($) {
|
|||
|
||||
$wikistate{theme}{currenttheme}=$config{theme};
|
||||
}
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
1
|
||||
|
|
|
@ -37,6 +37,7 @@ sub needsbuild (@) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return $needsbuild;
|
||||
}
|
||||
|
||||
sub preprocess (@) {
|
||||
|
|
|
@ -759,7 +759,10 @@ sub refresh () {
|
|||
my ($new, $internal_new)=find_new_files($files);
|
||||
my ($del, $internal_del)=find_del_files($pages);
|
||||
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);
|
||||
|
||||
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
|
||||
|
||||
* 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
|
||||
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
|
||||
adding or removing files from it.
|
||||
array of files that will be rebuilt. It should return an array reference
|
||||
that is a modified version of its input. It can add or remove files from it.
|
||||
|
||||
### scan
|
||||
|
||||
|
|
Loading…
Reference in New Issue