Commit adcefcb8 authored by Luke081515's avatar Luke081515

Choose if edits should be marked as minor

parent d32fda34
Pipeline #1841 passed with stages
in 1 minute and 50 seconds
......@@ -15,6 +15,7 @@ class Corrector extends Core {
private $needle;
private $cont;
private $accountname;
private $minor;
public function __construct($Account, $Job, $pUseHTTPS = true) {
if ($this->ask("Use a botflag? [y/N] ", "required") === 'y') {
......@@ -47,6 +48,11 @@ class Corrector extends Core {
if ($this->ask("Continue a previous search request? [y/N] ", "required") === 'y') {
$this->cont = $this->ask("What was the last title you've checked? ", "required");
}
if ($this->ask("Mark edits as minor? [y/N] ", "required") === 'y') {
$this->minor = true;
} else {
$this->minor = false;
}
}
/** setSummary
* @return void
......@@ -159,7 +165,11 @@ class Corrector extends Core {
if($answer == 'Y') {
// Do replace
$newhtml = $this->replace($html, $needle, $new);
$this->editPage($seite, $newhtml, $this->summary);
if (!$this->minor) {
$this->editPage($seite, $newhtml, $this->summary);
} else {
$this->editPageMinor($seite, $newhtml, $this->summary);
}
$this->echoMsg("\n" . "Replaced.", "success");
break;
} else {
......
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