Commit graph

32 commits

Author SHA1 Message Date
Roan Kattouw
f02557a424 API: Redo r62540 for all modules, easier than I first imagined 2010-02-15 20:42:43 +00:00
Roan Kattouw
e99771b884 API: Optimize read rights check in opensearch so $wgUser doesn't get unstubbed if $wgGroupPermissions['*']['read'] is true 2010-02-15 20:20:00 +00:00
Tim Starling
278a489ffe Search suggestion API requests make up a substantial portion of our total apache load and thus deserve some optimisation:
* Made the cache expiry time configurable via $wgSearchSuggestCacheExpiry
* Removed must-revalidate from the Cache-Control of such requests. Introduced a generic interface to ApiMain for doing that.
2010-02-14 23:52:45 +00:00
Aryeh Gregor
3758769f0d stylize.php on API code
"I wouldn't object to stylizing the API code to bring it in line with
the rest of MW on principle, but I'm not gonna bother myself." --Roan
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60657#c5108>

If you're seeing this commit in blames, tell your blame tool to ignore
whitespace, e.g., git blame -w or svn blame -x -w.
2010-01-11 15:55:52 +00:00
Alexandre Emsenhuber
e8f9ef9409 Fix for r57986: Notice: Undefined variable: wgEnableOpenSearchSuggest in includes/api/ApiOpenSearch.php on line 53 2009-10-21 21:22:00 +00:00
Roan Kattouw
99748cf05c Split allowing &suggest requests in API opensearch from $wgEnableMWSuggest to a separate variable. This makes it possible to enable SimpleSearch (which uses API opensearch) but disable mwsuggest; enabling both seems to cause issues with the login form in Safari or Opera (don't remember which) 2009-10-21 18:44:58 +00:00
Roan Kattouw
990714436e API: When returning an emtpy opensearch result because mwsuggest is disabled, return a valid opensearch response. 2009-09-10 13:07:36 +00:00
Roan Kattouw
f0c3eaf444 API: Fix up r47142: use a boolean parameter for suggest 2009-02-12 17:27:05 +00:00
Aaron Schulz
0b28c717b2 Add suggest=1 to search suggestion AJAX request. ApiOpenSearch won't execute such request if $wgEnableMWSuggest is disabled 2009-02-11 15:56:53 +00:00
Brion Vibber
79d0c8e34b Pulling back r46341 and r46342 for now "API: (bug 17142) Add redirects parameter to action=opensearch to control redirect resolution. Changes to OpenSearchXML extension in next commit"
Mysteriously there's no way to get a boolean parameter to default to true, which leads to an incompatibility in the sensible behavior of the more detailed responses in the XML output -- eg you get a whole buttload of "#REDIRECT Blabla" in your results, which is absolutely hideous. This is very much not desireable. :)
If we could change the default, and allow it to be set on or off for specific requests if some person for some reason is doing highly customized suggestion searches and wants it configured differently (no idea why), that might be doable. But as written this doesn't make any sense.
2009-01-27 20:39:24 +00:00
Roan Kattouw
41cc3f6271 API: (bug 17142) Add redirects parameter to action=opensearch to control redirect resolution. Changes to OpenSearchXML extension in next commit 2009-01-27 14:43:06 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Robert Stojnić
d6fd8e7c13 Ajax suggestions:
* check in a new ajax suggestion engine (mwsuggest.js) which uses 
  OpenSearch to fetch results (by default via API), this should
  deprecated the old ajaxsearch thingy
* extend PrefixSearchBackend hook to accept multiple namespaces for
  future lucene use (default implementation however can still 
  process only one)
* Added to preferences, also a feature to turn it on/off for every 
  input (disabled atm until I work out browser issues completely)
* WMF wikis probably won't be using API to fetch results, but a 
  custom php wrapper that just forwards the request to appropriate
  lucene daemon, added support for that

SpecialSearch:
* moved stuff out of SpecialSearch to SearchEngine, like snippet
  highlighting and such
* support for additional interwiki results, e.g. title matches
  from other projects shown in a separate box on the right
* todo: interwiki box doesn't have standard prev/next links to 
  avoid clutter and unintuitive interface
* support for related articles
2008-04-15 23:06:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Brion Vibber
7a3227596e * Merged backends for OpenSearch suggestions and AJAX search.
Both now accept namespace prefixes, handle 'Media:' and 'Special:' pages,
  and reject interwiki prefixes. PrefixSearch class centralizes this code,
  and the backend part can be overridden by the PrefixSearchBackend hook.
2008-01-30 01:07:49 +00:00
Roan Kattouw
19358606a1 API: Changing all modules' getParamDescription(), getAllowedParams() and getDescription() methods to public. ApiParamInfo needs them, and some versions of PHP threw fatal errors because they were protected. Oddly, other versions didn't (maybe because the caller and the callee have a common ancestor?) 2008-01-28 19:05:26 +00:00
Roan Kattouw
e1f0ca77b3 Using ApiBase's parameter framework handle ApiOpenSearch's limit parameter. 2007-12-29 21:43:30 +00:00
Brion Vibber
21e46f5f3a Add an optional limit parameter (range 1 to 100) to the OpenSearch suggestion interface.
Will be using this in adaptor to the Apple Dictionary widget's search, since we're having performance problems with the special-purpose search backend.
2007-12-29 00:14:22 +00:00
Yuri Astrakhan
380f66878f API: Removed maximum limit checking when running api in an internal mode. 2007-07-15 00:52:35 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Yuri Astrakhan
cb38c11c84 API: documentation and cleanup. 2007-05-20 23:31:44 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Yuri Astrakhan
3ec1b5b646 API * simple backlinks module (no redirect resolution yet)
* Cleaned up references
2006-10-25 03:54:56 +00:00
Yuri Astrakhan
eb02c1a87b API * cache expiration control
* Added PHP-serialized & WDDX formats
2006-10-22 23:45:20 +00:00
Yuri Astrakhan
10390af521 API * Added rudimentary RC list
* More readable query formulation
2006-10-20 07:10:18 +00:00
Yuri Astrakhan
398160f15e API *
* OpenSearch support for namespaces
* Minor watchlist feed cleanup
2006-10-18 23:49:09 +00:00
Yuri Astrakhan
550c083a18 API
* Removed slow result SanitizeData
* Fixed watchlist feed bug (reported by nickj)
* Fixed HTML formatting bug (reported & fixed by nickj)
* clarified HTML intro message
2006-10-18 05:27:43 +00:00
Yuri Astrakhan
262435b9f8 * API: help screen now shows default and allowed parameter values
* API: added experimental watchlist rss/atom feed
* API: if available, json_encode() will be used
* API: opensearch parameter changed to "search=" (more descriptive)
* API: minor parameter cleanup, a wrapper for Feed class
2006-10-16 00:08:03 +00:00
Yuri Astrakhan
7a710254db * API query optimizations
* API allow modules to have custom printers
2006-10-15 07:43:52 +00:00
Yuri Astrakhan
9262f69c0a * API watchlist: Forced an index, enabled generator 2006-10-14 16:02:42 +00:00
Yuri Astrakhan
b56d23ed46 * API: Restructured to allow internal usage. Error handling cleanup.
* API: Added opensearch module, added apprefix param for list=allpages
2006-10-14 07:18:08 +00:00