projects
/
ikiwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move meat of type checking to match_page where it belongs
[ikiwiki.git]
/
IkiWiki.pm
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index 0da2c93c8e4df2731e416a053bcd1bf7f559d854..43995fc9665a3768b88ec7919862e49972bcf1ca 100644
(file)
--- a/
IkiWiki.pm
+++ b/
IkiWiki.pm
@@
-1747,16
+1747,13
@@
sub misctemplate ($$;@) {
});
$template->param(
});
$template->param(
+ dynamic => 1,
+ have_actions => 0, # force off
title => $title,
wikiname => $config{wikiname},
content => $content,
baseurl => baseurl(),
html5 => $config{html5},
title => $title,
wikiname => $config{wikiname},
content => $content,
baseurl => baseurl(),
html5 => $config{html5},
- have_actions => 0, # force off
- parentlinks => [{ # override
- url => $config{url},
- page => $config{wikiname},
- }],
@_,
);
@_,
);
@@
-2332,11
+2329,7
@@
sub match_glob ($$;@) {
my $regexp=IkiWiki::glob2re($glob);
if ($page=~/^$regexp$/i) {
my $regexp=IkiWiki::glob2re($glob);
if ($page=~/^$regexp$/i) {
- if ($params{onlypage} &&
- ! defined IkiWiki::pagetype($IkiWiki::pagesources{$page})) {
- return IkiWiki::FailReason->new("$page is not a page");
- }
- elsif (! IkiWiki::isinternal($page) || $params{internal}) {
+ if (! IkiWiki::isinternal($page) || $params{internal}) {
return IkiWiki::SuccessReason->new("$glob matches $page");
}
else {
return IkiWiki::SuccessReason->new("$glob matches $page");
}
else {
@@
-2353,7
+2346,14
@@
sub match_internal ($$;@) {
}
sub match_page ($$;@) {
}
sub match_page ($$;@) {
- return match_glob($_[0], $_[1], @_, onlypage => 1)
+ my $page=shift;
+ my $match=match_glob($page, $_[1], @_);
+ if ($match && ! defined IkiWiki::pagetype($IkiWiki::pagesources{$page})) {
+ return IkiWiki::FailReason->new("$page is not a page");
+ }
+ else {
+ return $match;
+ }
}
sub match_link ($$;@) {
}
sub match_link ($$;@) {