Commit 070991e0 authored by ~rs's avatar ~rs Committed by Luke081515

add $limit

parent 89acdfd8
......@@ -1234,7 +1234,7 @@ class Core extends Password {
* @return result - array with the results
*/
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 . "&sroffset=" . $offset . "&srwhat=" . $what;
$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;
$result = json_decode($this->httpRequest($data, $this->job, "GET"), true);
return $result;
}
......
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