* Make testpagespec more robust, including checking for missing/bad
parameters, and detecting if a pagespec failed to compile.master
parent
0041e93808
commit
687928ead2
|
@ -12,6 +12,12 @@ sub import { #{{{
|
||||||
sub preprocess (@) { #{{{
|
sub preprocess (@) { #{{{
|
||||||
my %params=@_;
|
my %params=@_;
|
||||||
|
|
||||||
|
foreach my $param (qw{match pagespec}) {
|
||||||
|
if (! exists $params{$param}) {
|
||||||
|
return "[[testpagespec missing $param parameter]]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
add_depends($params{page}, $params{pagespec});
|
add_depends($params{page}, $params{pagespec});
|
||||||
|
|
||||||
my $ret=pagespec_match($params{match}, $params{pagespec},
|
my $ret=pagespec_match($params{match}, $params{pagespec},
|
||||||
|
@ -19,6 +25,9 @@ sub preprocess (@) { #{{{
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
return "match: $ret";
|
return "match: $ret";
|
||||||
}
|
}
|
||||||
|
elsif (! defined $ret) {
|
||||||
|
return "match failed: $@";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
return "no match: $ret";
|
return "no match: $ret";
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,10 @@ ikiwiki (2.1) UNRELEASED; urgency=low
|
||||||
* Fix a bug that prevented clearing email or subscriptions.
|
* Fix a bug that prevented clearing email or subscriptions.
|
||||||
* Improve handling of edits of locked pages by users who are not yet signed
|
* Improve handling of edits of locked pages by users who are not yet signed
|
||||||
in.
|
in.
|
||||||
|
* Make testpagespec more robust, including checking for missing/bad
|
||||||
|
parameters, and detecting if a pagespec failed to compile.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 07 May 2007 02:02:53 -0400
|
-- Joey Hess <joeyh@debian.org> Tue, 08 May 2007 17:21:13 -0400
|
||||||
|
|
||||||
ikiwiki (2.00) unstable; urgency=low
|
ikiwiki (2.00) unstable; urgency=low
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue