Commit 246a1996 authored by Freddy's avatar Freddy
Browse files

fix per review

parent d3d2706c
......@@ -12,7 +12,8 @@ class Bot extends Core {
$this->initcurl($Account, $Job, $pUseHTTPS = true);
$array = file_get_contents('./kennybilder.csv');
$array = explode("\n", $array);
for($i = 0; count($array) > $i; $i++) {
$i = 0;
while(isset($array[$i])) {
$array[$i] = 'File:' . $array[$i];
$text = $this->readPage($array[$i]);
if(stristr($text, '[[de:')) {
......@@ -27,10 +28,11 @@ class Bot extends Core {
echo $temp . "\n";
$text = str_ireplace('[[en:' . $temp . ']]', '[[:en:' . $temp . '|' . $temp . ']]', $text);
}
$this->editPageMinor($array[$i], $text, "Fix links");
$this->editPageMinor($array[$i], $text, "Fixed links");
sleep(3);
$i++;
}
}
}
new Bot('Freddy2001@commons', 'KennyBilder');
new Bot('Freddy2001@commons', 'InterwikiCorrection');
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