...
 
Commits (8)
......@@ -495,11 +495,15 @@ class Core extends Password {
$request = "action=edit&assert=" . $this->assert . "&maxlag=" . $this->maxlag . "&format=json&bot=&title=" . urlencode($title) .
"&text=" . urlencode($content) .
"&token=" . urlencode($token) .
"&summary=" . urlencode($summary) .
"&bot=" . urlencode($botflag) .
"&minor=" . urlencode($minorflag);
if ($noCreate === 1) {
$request .= "&minor=" . urlencode($minorflag);
"&summary=" . urlencode($summary);
if ($botflag) {
$request .= "&bot=";
}
if ($minorflag) {
$request .= "&minor=";
}
if ($noCreate) {
$request .= "&nocreate=";
}
if ($sectionnumber !== -1) {
$request .= "&section=" . urlencode($sectionnumber);
......@@ -1095,13 +1099,13 @@ class Core extends Password {
/** getMissingLinks
* Returns missing links "redlinks" on a page
* @author Freddy2001
* @param $Site - Page with links that will be checked
* @param $page - Page with links that will be checked
* @return Array with missing pages or false if there are no links
*/
public function getMissingLinks ($Site) {
$request = "action=query&format=json&prop=info&generator=links&utf8=1&formatversion=2&gpllimit=max&titles=" . urlencode($Site);
public function getMissingLinks ($page) {
$request = "action=query&format=json&prop=info&generator=links&utf8=1&formatversion=2&gpllimit=max&titles=" . urlencode($page);
try {
$result = $this->httpRequest($data, $this->job, 'GET');
$result = $this->httpRequest($request, $this->job, 'GET');
$result = json_decode($result, true);
$answer = $result['query']['pages'];
$result = array();
......
This diff is collapsed.