summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm38
-rw-r--r--IkiWiki/Plugin/conditional.pm89
-rw-r--r--basewiki/helponformatting.mdwn6
-rw-r--r--debian/changelog12
-rw-r--r--doc/plugins.mdwn4
-rw-r--r--doc/plugins/camelcase.mdwn2
-rw-r--r--doc/plugins/conditional.mdwn41
-rw-r--r--doc/plugins/contrib/googlemaps.mdwn1
-rw-r--r--doc/plugins/contrib/img.mdwn1
-rw-r--r--doc/plugins/contrib/linguas.mdwn1
-rw-r--r--doc/plugins/contrib/navbar.mdwn4
-rw-r--r--doc/plugins/contrib/syntax.mdwn2
-rw-r--r--doc/plugins/contrib/table.mdwn3
-rw-r--r--doc/plugins/fortune.mdwn4
-rw-r--r--doc/plugins/html.mdwn2
-rw-r--r--doc/plugins/linkmap.mdwn7
-rw-r--r--doc/plugins/map.mdwn7
-rw-r--r--doc/plugins/meta.mdwn3
-rw-r--r--doc/plugins/orphans.mdwn4
-rw-r--r--doc/plugins/polygen.mdwn6
-rw-r--r--doc/plugins/write.mdwn9
-rw-r--r--doc/templates/plugin.mdwn4
-rw-r--r--doc/todo/conditional_text_based_on_ikiwiki_features.mdwn4
-rw-r--r--po/bg.po8
-rw-r--r--po/cs.po8
-rw-r--r--po/es.po8
-rw-r--r--po/fr.po8
-rw-r--r--po/gu.po8
-rw-r--r--po/ikiwiki.pot8
-rw-r--r--po/pl.po8
-rw-r--r--po/sv.po8
-rw-r--r--po/vi.po8
-rwxr-xr-xt/pagespec_match.t4
33 files changed, 247 insertions, 83 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 32ca0449f..b605ac370 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -65,7 +65,8 @@ sub defaultconfig () { #{{{
setup => undef,
adminuser => undef,
adminemail => undef,
- plugin => [qw{mdwn inline htmlscrubber passwordauth signinedit lockedit}],
+ plugin => [qw{mdwn inline htmlscrubber passwordauth signinedit
+ lockedit conditional}],
timeformat => '%c',
locale => undef,
sslcookie => 0,
@@ -850,11 +851,16 @@ sub pagespec_translate ($) { #{{{
elsif ($word eq "(" || $word eq ")" || $word eq "!") {
$code.=" ".$word;
}
- elsif ($word =~ /^(link|backlink|created_before|created_after|creation_month|creation_year|creation_day)\((.+)\)$/) {
- $code.=" match_$1(\$page, ".safequote($2).")";
+ elsif ($word =~ /^(\w+)\((.*)\)$/) {
+ if (exists $IkiWiki::PageSpec::{"match_$1"}) {
+ $code.=" IkiWiki::PageSpec::match_$1(\$page, ".safequote($2).")";
+ }
+ else {
+ $code.=" 0";
+ }
}
else {
- $code.=" match_glob(\$page, ".safequote($word).", \$from)";
+ $code.=" IkiWiki::PageSpec::match_glob(\$page, ".safequote($word).", \$from)";
}
}
@@ -865,17 +871,19 @@ sub pagespec_match ($$;$) { #{{{
my $page=shift;
my $spec=shift;
my $from=shift;
- if (! defined $from){
- $from = "";
- }
return eval pagespec_translate($spec);
} #}}}
+package IkiWiki::PageSpec;
+
sub match_glob ($$$) { #{{{
my $page=shift;
my $glob=shift;
my $from=shift;
+ if (! defined $from){
+ $from = "";
+ }
# relative matching
if ($glob =~ m!^\./!) {
@@ -896,7 +904,7 @@ sub match_link ($$) { #{{{
my $page=shift;
my $link=lc(shift);
- my $links = $links{$page} or return undef;
+ my $links = $IkiWiki::links{$page} or return undef;
foreach my $p (@$links) {
return 1 if lc $p eq $link;
}
@@ -911,8 +919,8 @@ sub match_created_before ($$) { #{{{
my $page=shift;
my $testpage=shift;
- if (exists $pagectime{$testpage}) {
- return $pagectime{$page} < $pagectime{$testpage};
+ if (exists $IkiWiki::pagectime{$testpage}) {
+ return $IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage};
}
else {
return 0;
@@ -923,8 +931,8 @@ sub match_created_after ($$) { #{{{
my $page=shift;
my $testpage=shift;
- if (exists $pagectime{$testpage}) {
- return $pagectime{$page} > $pagectime{$testpage};
+ if (exists $IkiWiki::pagectime{$testpage}) {
+ return $IkiWiki::pagectime{$page} > $IkiWiki::pagectime{$testpage};
}
else {
return 0;
@@ -932,15 +940,15 @@ sub match_created_after ($$) { #{{{
} #}}}
sub match_creation_day ($$) { #{{{
- return ((gmtime($pagectime{shift()}))[3] == shift);
+ return ((gmtime($IkiWiki::pagectime{shift()}))[3] == shift);
} #}}}
sub match_creation_month ($$) { #{{{
- return ((gmtime($pagectime{shift()}))[4] + 1 == shift);
+ return ((gmtime($IkiWiki::pagectime{shift()}))[4] + 1 == shift);
} #}}}
sub match_creation_year ($$) { #{{{
- return ((gmtime($pagectime{shift()}))[5] + 1900 == shift);
+ return ((gmtime($IkiWiki::pagectime{shift()}))[5] + 1900 == shift);
} #}}}
1
diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm
new file mode 100644
index 000000000..35418a3ba
--- /dev/null
+++ b/IkiWiki/Plugin/conditional.pm
@@ -0,0 +1,89 @@
+#!/usr/bin/perl
+package IkiWiki::Plugin::conditional;
+
+use warnings;
+use strict;
+use IkiWiki;
+use UNIVERSAL;
+
+# Globals used to pass information into the PageSpec functions.
+our ($sourcepage, $destpage);
+
+sub import { #{{{
+ hook(type => "preprocess", id => "if", call => \&preprocess_if);
+} # }}}
+
+sub preprocess_if (@) { #{{{
+ my %params=@_;
+
+ if (! exists $params{test} || ! exists $params{then}) {
+ return "[[if requires \"test\" and \"then\" parameters]]";
+ }
+
+ my $result=0;
+ $sourcepage=$params{page};
+ $destpage=$params{destpage};
+ # An optimisation to avoid needless looping over every page
+ # and adding of dependencies for simple uses of some of the
+ # tests.
+ if ($params{test} =~ /^(enabled|sourcepage|destpage)\((.*)\)$/) {
+ $result=eval "IkiWiki::PageSpec::match_$1(undef, ".
+ IkiWiki::safequote($2).")";
+ }
+ else {
+ add_depends($params{page}, $params{test});
+
+ foreach my $page (keys %pagesources) {
+ if (pagespec_match($page, $params{test}, $params{page})) {
+ $result=1;
+ last;
+ }
+ }
+ }
+ $sourcepage="";
+ $destpage="";
+
+ my $ret;
+ if ($result) {
+ $ret=$params{then};
+ }
+ elsif (exists $params{else}) {
+ $ret=$params{else};
+ }
+ else {
+ $ret="";
+ }
+ return IkiWiki::preprocess($params{page}, $params{destpage}, $ret);
+} # }}}
+
+package IkiWiki::PageSpec;
+
+sub match_enabled ($$) { #{{{
+ shift;
+ my $plugin=shift;
+
+ # test if the plugin is enabled
+ return UNIVERSAL::can("IkiWiki::Plugin::".$plugin, "import");
+} #}}}
+
+sub match_sourcepage ($$) { #{{{
+ shift;
+ my $glob=shift;
+
+ return match_glob($IkiWiki::Plugin::conditional::sourcepage, $glob,
+ $IkiWiki::Plugin::conditional::sourcepage);
+} #}}}
+
+sub match_destpage ($$) { #{{{
+ shift;
+ my $glob=shift;
+
+ return match_glob($IkiWiki::Plugin::conditional::destpage, $glob,
+ $IkiWiki::Plugin::conditional::sourcepage);
+} #}}}
+
+sub match_included ($$) { #{{{
+ return $IkiWiki::Plugin::conditional::sourcepage ne $IkiWiki::Plugin::conditional::destpage;
+} #}}}
+
+1
diff --git a/basewiki/helponformatting.mdwn b/basewiki/helponformatting.mdwn
index 8c6483275..871db5f66 100644
--- a/basewiki/helponformatting.mdwn
+++ b/basewiki/helponformatting.mdwn
@@ -72,5 +72,7 @@ To link to any other web page, or to an email address, you can just put the url
You can also use [[PreProcessorDirective]]s to do additional cool stuff.
-Also, if the smiley plugin is enabled in your wiki, you can insert
-[[smileys]] and some other useful symbols.
+[[if test="enabled(smiley)" then="""
+Also, because this wiki has the smiley plugin enabled, you can
+insert \[[smileys]] and some other useful symbols.
+"""]]
diff --git a/debian/changelog b/debian/changelog
index a84008376..01541907b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+ikiwiki (1.43) UNRELEASED; urgency=low
+
+ * Allow plugins to add new types of tests that can be used in PageSpecs.
+ * Add a "conditional" plugin, which allows displaying text if a condition
+ is true. It is enabled by default so conditional can be used in the
+ basewiki.
+ * Use conditionals in the template for plugins, so that plugin pages
+ say if they're currently enabled or not, and in various other places
+ in the wiki.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 11 Feb 2007 20:18:51 -0500
+
ikiwiki (1.42) unstable; urgency=low
* Fix several more missing translations of Discussion.
diff --git a/doc/plugins.mdwn b/doc/plugins.mdwn
index 1006a9e1c..73fb6205c 100644
--- a/doc/plugins.mdwn
+++ b/doc/plugins.mdwn
@@ -8,8 +8,8 @@ There's documentation if you want to [[write]] your own plugins, or you can
install and use plugins [[contributed|contrib]] by others.
The [[mdwn]], [[inline]], [[htmlscrubber]], [[passwordauth]],
-[[signinedit]], and [[lockedit]] plugins are enabled by default.
-To enable other plugins, use the `--plugin` switch described in
+[[signinedit]], [[lockedit]], and [[conditional]] plugins are enabled
+by default. To enable other plugins, use the `--plugin` switch described in
[[usage]], or the equivalent `add_plugins` line in [[ikiwiki.setup]].
# Plugin directory
diff --git a/doc/plugins/camelcase.mdwn b/doc/plugins/camelcase.mdwn
index fd05ac7a9..ea0d80f26 100644
--- a/doc/plugins/camelcase.mdwn
+++ b/doc/plugins/camelcase.mdwn
@@ -4,6 +4,6 @@ This plugin makes words in CamelCase be treated as a [[WikiLink]]. That is
to say, any two or more words capitalised and mashed together are assumed
to be the name of some other page on the wiki, and so become a link.
-If this plugin is enabled, here is a link: SandBox
+If this plugin is enabled, this will be a link: SandBox
[[tag type/link]]
diff --git a/doc/plugins/conditional.mdwn b/doc/plugins/conditional.mdwn
new file mode 100644
index 000000000..f3398af57
--- /dev/null
+++ b/doc/plugins/conditional.mdwn
@@ -0,0 +1,41 @@
+[[template id=plugin name=conditional core=1 included=1 author="[[Joey]]"]]
+[[tag type/format]]
+
+With this plugin, you can make text be conditionally displayed on a page.
+For example:
+
+ \[[if test="enabled(smiley)"
+ then="The smiley plugin is enabled :-)"
+ else="No smiley plugin here.."]]
+
+If the specified `test` succeeds, the `then` text will be displayed,
+otherwise the `else` text will be displayed. The `else` part is optional.
+
+The `then` and `else` values can include any markup that would be allowed
+in the wiki page outside the template. Triple-quoting the values even allows
+quotes to be included.
+
+The `test` is a [[PageSpec]]; if it matches any page in the wiki then it
+succeeds. So you can do things like testing for the existence of a page or
+pages, testing to see if any pages were created in a given month, and so
+on. The regular [[PageSpec]] syntax is expanded with the following
+additional tests:
+
+* enabled(plugin)
+
+ Tests whether the specified plugin is enabled.
+
+* sourcepage(glob)
+
+ Tests whether the glob matches the name of the page that contains the
+ conditional.
+
+* destpage(glob)
+
+ Tests whether the glob matches the name of the page that is being built.
+ That might be different than the name of the page that contains the
+ conditional, if it's being inlined into another page.
+
+* included()
+
+ Tests whether the page is being included onto another page.
diff --git a/doc/plugins/contrib/googlemaps.mdwn b/doc/plugins/contrib/googlemaps.mdwn
index 30f630a2c..9174ebe75 100644
--- a/doc/plugins/contrib/googlemaps.mdwn
+++ b/doc/plugins/contrib/googlemaps.mdwn
@@ -1,6 +1,5 @@
[[template id=plugin name=googlemaps author="Christian Mock"]]
[[tag type/special-purpose]]
-[[meta title="googlemaps (third-party plugin)"]]
`googlemaps` is a plugin that allows using the [Google Maps API][2]
from ikiwiki.
diff --git a/doc/plugins/contrib/img.mdwn b/doc/plugins/contrib/img.mdwn
index 43c502525..c55338bf5 100644
--- a/doc/plugins/contrib/img.mdwn
+++ b/doc/plugins/contrib/img.mdwn
@@ -1,6 +1,5 @@
[[template id=plugin name=img author="Christian Mock"]]
[[tag type/chrome]]
-[[meta title="img (third-party plugin)"]]
`img` is an enhanced image handling plugin.
diff --git a/doc/plugins/contrib/linguas.mdwn b/doc/plugins/contrib/linguas.mdwn
index 7778bf461..cf7a458c7 100644
--- a/doc/plugins/contrib/linguas.mdwn
+++ b/doc/plugins/contrib/linguas.mdwn
@@ -1,5 +1,4 @@
[[template id=plugin name=linguas author="Jordà Polo"]]
-[[meta title="linguas (third-party plugin)"]]
Linguas
=======
diff --git a/doc/plugins/contrib/navbar.mdwn b/doc/plugins/contrib/navbar.mdwn
index 8c473d631..8f15e83f7 100644
--- a/doc/plugins/contrib/navbar.mdwn
+++ b/doc/plugins/contrib/navbar.mdwn
@@ -1,6 +1,4 @@
[[template id=plugin name=navbar author="[[TobiOetiker]]"]]
-[[meta title="navbar (third-party plugin)"]]
-
The Navbar Plugin renders a Navigation Bar into your page. It is based on code
from the sidebar plug in see <http://ikiwiki.kitenet.net/plugins/sidebar.html>
@@ -35,4 +33,4 @@ ikiwiki look good anyway, I won't go into details here ...
Tobi Oetiker 2006.12.30
-If you are interested in this, drop me a line tobi at oetiker dot ch \ No newline at end of file
+If you are interested in this, drop me a line tobi at oetiker dot ch
diff --git a/doc/plugins/contrib/syntax.mdwn b/doc/plugins/contrib/syntax.mdwn
index 3aed3d425..57c614a9d 100644
--- a/doc/plugins/contrib/syntax.mdwn
+++ b/doc/plugins/contrib/syntax.mdwn
@@ -1,7 +1,5 @@
[[template id=plugin name=syntax author="[[VictorMoral]]"]]
[[tag type/chrome type/slow]]
-[[meta title="syntax (third-party plugin)"]]
-
`syntax` is a plugin that add support to ikiwiki for syntax highlighting through the *vim* editor and its perl interface [[cpan Text::VimColor]], so it depends on a vim functional installation.
diff --git a/doc/plugins/contrib/table.mdwn b/doc/plugins/contrib/table.mdwn
index def5041ce..46f7b09a7 100644
--- a/doc/plugins/contrib/table.mdwn
+++ b/doc/plugins/contrib/table.mdwn
@@ -1,4 +1,5 @@
-[[meta title="table (third-party plugin)"]]
+[[template id=plugin name=table author="[[VictorMoral]]"]]
+[[tag type/format]]
This plugin supplies a `table` [[PreprocessorDirective]] to build html tables from data in CSV (comma-separated values) or DSV (delimiter-separated values) format.
diff --git a/doc/plugins/fortune.mdwn b/doc/plugins/fortune.mdwn
index 93bc4bd05..caa002aed 100644
--- a/doc/plugins/fortune.mdwn
+++ b/doc/plugins/fortune.mdwn
@@ -6,8 +6,10 @@ Usage:
\[[fortune ]]
-If this plugin is enabled, here's a fortune for you:
+[[if test="enabled(fortune)" then="""
+Here's a fortune for you:
----
[[fortune ]]
+"""]]
diff --git a/doc/plugins/html.mdwn b/doc/plugins/html.mdwn
index d19c99af8..1a2c5365b 100644
--- a/doc/plugins/html.mdwn
+++ b/doc/plugins/html.mdwn
@@ -4,7 +4,7 @@
This plugin lets html pages be used as source pages for the wiki. The
html pages will still be wrapped in the same html template as any other
page, so for best results you should include only the page body in the html
-file. Also, if the htmlscrubber plugin is enabled, the html pages will be
+file. Also, if the [[htmlscrubber]] plugin is enabled, the html pages will be
sanitised like any other page. You can also use standard [[WikiLink]]s etc
in the html pages.
diff --git a/doc/plugins/linkmap.mdwn b/doc/plugins/linkmap.mdwn
index e0eda9289..50d197f2f 100644
--- a/doc/plugins/linkmap.mdwn
+++ b/doc/plugins/linkmap.mdwn
@@ -22,9 +22,8 @@ directive:
in inches. Both must be specified for the limiting to take effect, otherwise
the map's size is not limited.
-This plugin is included in ikiwiki, but is not enabled by default.
-
-If this plugin is enabled, here is a link map of the index page and all
-pages it links to:
+[[if test="enabled(linkmap)" then="""
+Here is an example link map, of the index page and all pages it links to:
[[linkmap pages="index or (backlink(index) and !*.png)"]]
+"""]
diff --git a/doc/plugins/map.mdwn b/doc/plugins/map.mdwn
index 592a20706..3d44164ae 100644
--- a/doc/plugins/map.mdwn
+++ b/doc/plugins/map.mdwn
@@ -11,9 +11,8 @@ the wiki are mapped.
Hint: To limit the map to displaying pages less than a certian level deep,
use a [[PageSpec]] like this: `pages="* and !*/*/*"`
-This plugin is included in ikiwiki, but is not enabled by default.
-
-If this plugin is enabled, here is a page map for the plugins section
-of this wiki:
+[[if test="enabled(map)" then="""
+Here's an example map, for the plugins section of this wiki:
[[map pages="(plugins or plugins/*) and !*/*/*"]]
+"""]]
diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn
index d87bc0588..41563e965 100644
--- a/doc/plugins/meta.mdwn
+++ b/doc/plugins/meta.mdwn
@@ -54,6 +54,3 @@ header.
The field value is treated as HTML entity-escaped text, so you can include
a quote in the text by writing `&quot;` and so on.
-
-If this plugin is enabled, the title of this page will say that it is.
-[[meta title="meta plugin (enabled)"]]
diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn
index b83879d25..772c19343 100644
--- a/doc/plugins/orphans.mdwn
+++ b/doc/plugins/orphans.mdwn
@@ -11,6 +11,8 @@ Note that it takes [[BackLinks]] into account, but does not count inlining a
page as linking to it, so will generally count many blog-type pages as
orphans.
-If it is enabled, here's a list of orphaned pages on this wiki:
+[[if test="enabled(orphans)" then="""
+Here's a list of orphaned pages on this wiki:
[[orphans ]]
+"""]]
diff --git a/doc/plugins/polygen.mdwn b/doc/plugins/polygen.mdwn
index 240edc961..5cd2f41d2 100644
--- a/doc/plugins/polygen.mdwn
+++ b/doc/plugins/polygen.mdwn
@@ -9,10 +9,10 @@ For example:
It's also possible to specify a starting nonterminal for the grammar by
including `symbol="text"` in the directive.
+[[if test="enabled(polygen)" then="""
----
-If this plugin is enabled, and polygen is installed, here are a few notes
-about ikiwiki.
+Here are a few notes about ikiwiki, courtesy of polygen:
Ikiwiki is internally based on a [[polygen grammar="designpatterns"]]
coupled to a [[polygen grammar="designpatterns"]], as described in
@@ -25,3 +25,5 @@ Ikiwiki reviews:
<li>[[polygen grammar="reviews"]]</li>
<li>[[polygen grammar="reviews"]]</li>
</ul>
+
+"""]]
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 1aaaf1d1e..8630b56ff 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -413,3 +413,12 @@ See IkiWiki::RCS::Stub for the full list of functions. It's ok if
rcs\_getctime does nothing except for throwing an error.
See [[about_RCS_backends]] for some more info.
+
+## PageSpec plugins
+
+It's also possible to write plugins that add new functions to
+[[PageSpecs|PageSpec]]. Such a plugin should add a function to the
+IkiWiki::PageSpec package, that is named `match_foo`, where "foo()" is
+how it will be accessed in a [[PageSpec]]. The function will be passed two
+parameters: The name of the page being matched, and the thing to match
+against. It should return true if the page matches.
diff --git a/doc/templates/plugin.mdwn b/doc/templates/plugin.mdwn
index ca69efd23..1db37e5c2 100644
--- a/doc/templates/plugin.mdwn
+++ b/doc/templates/plugin.mdwn
@@ -1,6 +1,8 @@
<span class="infobox">
Plugin: <TMPL_VAR name><br />
Author: <TMPL_VAR author><br />
-Enabled by default: <TMPL_IF core>yes<TMPL_ELSE>no</TMPL_IF><br />
Included in ikiwiki: <TMPL_IF included>yes<TMPL_ELSE>no</TMPL_IF><br />
+Enabled by default: <TMPL_IF core>yes<TMPL_ELSE>no</TMPL_IF><br />
+Currently enabled: [[if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]<br />
</span>
+[[if test="sourcepage(plugins/contrib/*)" then="""[[meta title="<TMPL_VAR name> (third party plugin)"]]"""]]
diff --git a/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn b/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn
index 05c655b89..bb3482e71 100644
--- a/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn
+++ b/doc/todo/conditional_text_based_on_ikiwiki_features.mdwn
@@ -100,3 +100,7 @@ for the condition itself.
>> typing in the if.
>>
>> --[[JoshTriplett]]
+
+This is now completely [[todo/done]]! See [[plugins/conditional]].
+
+--[[Joey]]
diff --git a/po/bg.po b/po/bg.po
index b457f0f82..4f251b925 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki-bg\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-12 01:19+0200\n"
"Last-Translator: Damyan Ivanov <dam@modsodtsys.com>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
@@ -376,13 +376,13 @@ msgstr "успешно генериране на %s"
msgid "usage: ikiwiki [options] source dest"
msgstr "формат: ikiwiki [опции] източник местоназначение"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"При използване на пареметъра „--cgi” е необходимо да се укаже и "
"местоположението на уикито чрез параметъра „--url”"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Грешка"
@@ -390,7 +390,7 @@ msgstr "Грешка"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i"
diff --git a/po/cs.po b/po/cs.po
index 98b912e62..c1aeb7221 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-07 11:59+0100\n"
"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
@@ -370,11 +370,11 @@ msgstr "%s byl úspěšně vytvořen"
msgid "usage: ikiwiki [options] source dest"
msgstr "použití: ikiwiki [volby] zdroj cíl"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr "Při použití --cgi musíte pomocí --url zadat url k wiki"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Chyba"
@@ -382,7 +382,7 @@ msgstr "Chyba"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "Byla rozpoznána smyčka direktivy %s na %s v hloubce %i"
diff --git a/po/es.po b/po/es.po
index cd28bd094..41964715a 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-03 09:37+0100\n"
"Last-Translator: Víctor Moral <victor@taquiones.net>\n"
"Language-Team: spanish <es@li.org>\n"
@@ -379,13 +379,13 @@ msgstr "creado con éxito el programa envoltorio %s"
msgid "usage: ikiwiki [options] source dest"
msgstr "uso: ikiwiki [opciones] origen destino"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Es obligatorio especicar un url al wiki con el parámetro --url si se utiliza "
"el parámetro --cgi"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Error"
@@ -393,7 +393,7 @@ msgstr "Error"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index bcf864f9c..4920e625d 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-22 22:12+0100\n"
"Last-Translator: Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -379,13 +379,13 @@ msgstr "%s a été créé avec succès"
msgid "usage: ikiwiki [options] source dest"
msgstr "Syntaxe : ikiwiki [options] source destination"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Vous devez indiquer une url vers le wiki par --url lors de l'utilisation de "
"--cgi"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Erreur"
@@ -393,7 +393,7 @@ msgstr "Erreur"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
diff --git a/po/gu.po b/po/gu.po
index 8739a7804..41aaaa474 100644
--- a/po/gu.po
+++ b/po/gu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki-gu\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-11 16:05+0530\n"
"Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n"
"Language-Team: Gujarati <team@utkarsh.org>\n"
@@ -368,11 +368,11 @@ msgstr "સફળતાપૂર્વક પેદા કરેલ છે %s"
msgid "usage: ikiwiki [options] source dest"
msgstr "ઉપયોગ: ikiwiki [વિકલ્પો] source dest"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "ક્ષતિ"
@@ -380,7 +380,7 @@ msgstr "ક્ષતિ"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર"
diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot
index 9dfa1dc0c..587c8ef56 100644
--- a/po/ikiwiki.pot
+++ b/po/ikiwiki.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 21:42-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -369,11 +369,11 @@ msgstr ""
msgid "usage: ikiwiki [options] source dest"
msgstr ""
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr ""
@@ -381,7 +381,7 @@ msgstr ""
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
diff --git a/po/pl.po b/po/pl.po
index 496a4117e..5b1604ae4 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki 1.37\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-05 16:33+100\n"
"Last-Translator: Paweł Tęcza <ptecza@net.icm.edu.pl>\n"
"Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n"
@@ -380,13 +380,13 @@ msgstr "strona pomyślnie utworzona %s"
msgid "usage: ikiwiki [options] source dest"
msgstr "użycie: ikiwiki [parametry] źródło cel"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Użycie parametru --cgi wymaga podania adresu URL do wiki za pomocą parametru "
"--url"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Błąd"
@@ -394,7 +394,7 @@ msgstr "Błąd"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i"
diff --git a/po/sv.po b/po/sv.po
index 786cbad5e..9633d7740 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-10 23:47+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -372,11 +372,11 @@ msgstr "generering av %s lyckades"
msgid "usage: ikiwiki [options] source dest"
msgstr "användning: ikiwiki [flaggor] källa mål"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr "Måste ange url till wiki med --url när --cgi används"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Fel"
@@ -384,7 +384,7 @@ msgstr "Fel"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s förbehandlingsslinga detekterades på %s, djup %i"
diff --git a/po/vi.po b/po/vi.po
index e69a161ef..4b536ff29 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-0500\n"
"PO-Revision-Date: 2007-01-13 15:31+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
@@ -372,12 +372,12 @@ msgstr "%s đã được tạo ra"
msgid "usage: ikiwiki [options] source dest"
msgstr "cách sử dụng: ikiwiki [tùy chọn] nguồn đích"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --cgi »"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Lỗi"
@@ -385,7 +385,7 @@ msgstr "Lỗi"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "vòng lặp tiền xử lý %s được phát hiện trên %s ở độ sâu %i"
diff --git a/t/pagespec_match.t b/t/pagespec_match.t
index bd517f58b..63c2a5098 100755
--- a/t/pagespec_match.t
+++ b/t/pagespec_match.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 41;
+use Test::More tests => 42;
BEGIN { use_ok("IkiWiki"); }
@@ -44,6 +44,8 @@ ok(! pagespec_match("foo", "creation_month(9)"), "other month");
ok(pagespec_match("foo", "creation_day(2)"), "day");
ok(! pagespec_match("foo", "creation_day(3)"), "other day");
+ok(! pagespec_match("foo", "no_such_function(foo)"), "foo");
+
# old style globlists
ok(pagespec_match("foo", "foo bar"), "simple list");
ok(pagespec_match("bar", "foo bar"), "simple list 2");