* Detect invalid pagespecs and do not merge them in add_depends,
as that can result in a broken merged pagespec that matches nothing.master
parent
6ce7454cc3
commit
8a29361c32
13
IkiWiki.pm
13
IkiWiki.pm
|
@ -1106,6 +1106,8 @@ sub add_depends ($$) { #{{{
|
||||||
my $page=shift;
|
my $page=shift;
|
||||||
my $pagespec=shift;
|
my $pagespec=shift;
|
||||||
|
|
||||||
|
return unless pagespec_valid($pagespec);
|
||||||
|
|
||||||
if (! exists $depends{$page}) {
|
if (! exists $depends{$page}) {
|
||||||
$depends{$page}=$pagespec;
|
$depends{$page}=$pagespec;
|
||||||
}
|
}
|
||||||
|
@ -1234,6 +1236,17 @@ sub pagespec_match ($$;@) { #{{{
|
||||||
return $ret;
|
return $ret;
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
|
sub pagespec_valid ($) { #{{{
|
||||||
|
my $spec=shift;
|
||||||
|
|
||||||
|
# used by generated code
|
||||||
|
my $page="";
|
||||||
|
my @params;
|
||||||
|
|
||||||
|
eval pagespec_translate($spec);
|
||||||
|
return ! $@;
|
||||||
|
} #}}}
|
||||||
|
|
||||||
package IkiWiki::FailReason;
|
package IkiWiki::FailReason;
|
||||||
|
|
||||||
use overload ( #{{{
|
use overload ( #{{{
|
||||||
|
|
|
@ -45,6 +45,8 @@ ikiwiki (2.41) UNRELEASED; urgency=low
|
||||||
* external: Add getargv and setargv methods to allow access to ikiwiki's
|
* external: Add getargv and setargv methods to allow access to ikiwiki's
|
||||||
@ARGV.
|
@ARGV.
|
||||||
* Correct bug in encoding of %pagestate keys, fixes edittemplate.
|
* Correct bug in encoding of %pagestate keys, fixes edittemplate.
|
||||||
|
* Detect invalid pagespecs and do not merge them in add_depends,
|
||||||
|
as that can result in a broken merged pagespec that matches nothing.
|
||||||
|
|
||||||
-- martin f. krafft <madduck@debian.org> Sun, 02 Mar 2008 17:46:38 +0100
|
-- martin f. krafft <madduck@debian.org> Sun, 02 Mar 2008 17:46:38 +0100
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue