This is a static dump of issues in the old "Flyspray" bugtracker for DokuWiki. Bugs and feature requests
are now tracked at the issue tracker at Github.
Open
This task was never closed in our old bug tracker.
Feel free to open a new task at Github if you feel this is still relevant.
FS#2858 search_* functions from inc/search.php override $conf parameters
Backend
2013-10-02eroux
The search_* (except search_universal) functions defined in inc/search.php override the $opts parameters, which makes option passing impossible and $opts parameter confusing. For instance, this prevents from making a non-recursive namespace search. Try
Can someone tell why only a select number of options is passed? Is it only for historical reasons?
Otherwise i will come up with a solution that will pass all the relevant opts.
2013-10-12andi
Yes this is mostly historical. The original idea was to have specialized search_* functions that would set/accept their own set of options. Then I grew tired of it and decided to build a fully configurable search_universal. In theory search_universal should be able to replace every other search_ function.
A plugin should simply use search_universal or define it's own function.
To cleanup the search.php it should be possible to make all other search_* functions make call search_universal with the correctly tuned options and thus drop a lot of duplicated code. OTOH, the specialize functions may be a tiny bit faster.
PullRequests+Tests welcome.
2014-03-17Klap-in
There are plugins depending on the specialized search_* functions as well (so require deprecation), is this a useful clean up?
Also there is insight lost in how someone can apply the more complex search_universal.
Which these considerations, is it still a useful contribution?
2014-03-18andi
Klap-In my suggestion was not to remove the specialized functions but simply remove their code and replace it with a properly configured call to search_universal.