Commit 01c9700a authored by Luke081515's avatar Luke081515

Fix docu

* Fixed docu
* Added spaces at the params
parent e2597b8b
......@@ -1226,14 +1226,14 @@ class Core extends Password {
* uses API fulltext search
* @author KPFC
* @param pattern - pattern to search
* @param ns - numbers of the namespaces to search in; seperate with "|"
* @param prop - properties to return; seperate with "|" (size, wordcount, timestamp, snippet, titlesnippet, redirecttitle, redirectsnippet, sectiontitle, sectionsnippet, isfilematch, categorysnippet, extensiondata)
* @param limit - number of results to return; max 500 or 5000 for bots
* @param offset - show only the results from position on
* @param what - what to search (title/text/nearmatch)
* @param ns - [default: 0] numbers of the namespaces to search in; seperate with "|"
* @param prop - [default: size|wordcount|timestamp|snippet] properties to return; seperate with "|" (size, wordcount, timestamp, snippet, titlesnippet, redirecttitle, redirectsnippet, sectiontitle, sectionsnippet, isfilematch, categorysnippet, extensiondata)
* @param limit - [default: 50] number of results to return; max 500 or 5000 for bots
* @param offset - [default: 0] show only the results from position on
* @param what - [default: text] what to search (title/text/nearmatch)
* @return result - array with the results
*/
public function search($pattern, $ns=0, $prop="size|wordcount|timestamp|snippet", $limit=50, $offset=0, $what="text") {
public function search($pattern, $ns = 0, $prop = "size|wordcount|timestamp|snippet", $limit = 50, $offset = 0, $what = "text") {
$data = "action=query&format=json&assert=" . $this->assert . "&maxlag=" . $this->maxlag . "&list=search&srsearch=" . $pattern . "&srnamespace=" . $ns . "&srprop=" . $prop . "&srlimit=" . $limit . "&sroffset=" . $offset . "&srwhat=" . $what;
return json_decode($this->httpRequest($data, $this->job, "GET"), true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment