In all=no conditionals, depend on the influences, not the test pagespec Previously, if a page like `plugins/trail` contained a conditional like [[!if test="backlink(plugins/goodstuff)" all=no]] (which it gets via `templates/gitbranch`), then the [[plugins/conditional]] plugin would give `plugins/trail` a dependency on `(backlink(plugins/goodstuff)) and plugins/trail`. This dependency is useless: that pagespec can never match any page other than `plugins/trail`, but if `plugins/trail` has been modified or deleted, then it's going to be rendered or deleted *anyway*, so there's no point in spending time evaluating match_backlink for it. Conversely, the influences from the result were not taken into account, so `plugins/trail` did not have the `{ "plugins/goodstuff" => $DEPEND_LINKS }` dependency that it should. Invert that, depending on the influences but not on the test. Bug: http://ikiwiki.info/bugs/editing_gitbranch_template_is_really_slow/
avoid unnecessary uses of UNIVERSAL Foo->Bar->can("method") works just as well, even if Foo::Bar is not loaded. Using UNIVERSAL::can is deprecated. But, I was unable to easily eliminate conditional.pm's use of UNIVERSAL::can
remove unnecessary and troublesome filter calls This better defines what the filter hook is passed, to only be the raw, complete text of a page. Not some snippet, or data read in from an unrelated template. Several plugins that filtered text that originates from an (already filtered) page were modified not to do that. Note that this was not done very consistently before; other plugins that receive text from a page called preprocess on it w/o first calling filter. The template plugin gets text from elsewhere, and was also changed not to filter it. That leads to one known regression -- the embed plugin cannot be used to embed stuff in templates now. But that plugin is deprecated anyway. Later we may want to increase the coverage of what is filtered. Perhaps a good goal would be to allow writing a filter plugin that filters out unwanted words, from any input. We're not there yet; not only does the template plugin load unfiltered text from its templates now, but so can the table plugin, and other plugins that use templates (like inline!). I think we can cross that bridge when we come to it. If I wanted such a censoring plugin, I'd probably make it use a sanitize hook instead, for the better coverage. For now I am concentrating on the needs of the two non-deprecated users of filter. This should fix bugs/po_vs_templates, and it probably fixes an obscure bug around txt's use of filter for robots.txt.
conditional: Fix bug that forced "all" mode off by default. Commit b7351daacd0d4a041a51b43d99b7bf589de54f53 introduced the bug.
setup file ordering
Group related plugins into sections in the setup file, and drop unused rcs plugins from the setup file.
conditional: use pagespec_match_list
indentation
conditional: use yesno
Consistently allow use of relative paths in all PageSpecs that take a page name parameter. Previously, match_created_before(), match_created_after(), match_sourcepage(), and match_destpage() did not support that, and the docs were not clear.
finalise version 3.00 of the plugin api
Coding style change: Remove explcit vim folding markers.
avoid unnecessarily rebuilding pages with complex conditionals I noticed that ikiwiki/formatting was beilg rebuilt when any page changed. This turned out to be because it contained a complex conditional "enabled(foo) or enabled(bar)", and the conditional plugin did not notice that this consisted only of enabled() tests, and copied it unchanged into add_depends. Thus, the page's dependencies were satisfied by any page change. The fix is to beef up the parser so that it can handle that and more complex conditionals, and detect if they consist only of such tests.
add plugin safe/rebuild info (part 1 of 2) too many plugins.. brain exploding..
switch preprocess hooks to use error function
* conditional: Improve regexp testing for simple uses of pagespecs that match only the page using the directive, adding 'included()' and supporting negated pagespecs and added whitespace.
fix
* Add a destpage parameter to the filter hook. * Fix links to smilies generated by the smiley plugin for inlined pages. The old links were often wrong, but often still worked by accident.
* Add all=no option to conditional, can be used to form conditionals that do not need to examine every page in the wiki. * Use this to simplify the goodstuff detection in the plugin template.
the kind of perl code that can only be written at 4:30 am (Get a good message when a PageSpec fails due to a negated success by creating success objects with a reason string, which morph into failure objects when negated.)