@@ -54,7 +54,7 @@ |
||
54 | 54 | // carriage return only fund between refs inside {{Références | références= ... }} |
55 | 55 | // if carriage return </ref>\n<ref… outside that template, the ref-link appears on a new line => \n deleted |
56 | 56 | $wikiText = preg_replace('#</ref>[\n\r\s]*<ref#', '</ref>{{,}}<ref', $wikiText); |
57 | - $wikiText = preg_replace('#(<ref name=[^\/\>\r\n]+/>)[\n\r\s]*<ref#', "$1" . '{{,}}<ref', $wikiText); |
|
57 | + $wikiText = preg_replace('#(<ref name=[^\/\>\r\n]+/>)[\n\r\s]*<ref#', "$1".'{{,}}<ref', $wikiText); |
|
58 | 58 | |
59 | 59 | // {{Sfn|...}}{{Sfn|...}} |
60 | 60 | $wikiText = preg_replace('#(\{\{sfn[\s\|\n\r][^\{\}]+}})\s*(\{\{sfn[\s\|\n\r])#i', '$1{{,}}$2', $wikiText); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | use Codedungeon\PHPCliColors\Color; |
19 | 19 | use Mediawiki\DataModel\EditInfo; |
20 | 20 | |
21 | -include __DIR__ . '/../ZiziBot_Bootstrap.php'; |
|
21 | +include __DIR__.'/../ZiziBot_Bootstrap.php'; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Stupid bot for replacement task (manual or auto) |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | $titles = $list->getPageTitles(); |
52 | 52 | // ------ |
53 | 53 | |
54 | -echo count($titles) . " articles !\n"; |
|
54 | +echo count($titles)." articles !\n"; |
|
55 | 55 | foreach ($titles as $title) { |
56 | 56 | sleep(1); |
57 | 57 | $bot->checkStopOnTalkpageOrException(); |
58 | 58 | |
59 | 59 | $title = trim($title); |
60 | - echo Color::BG_YELLOW . $title . Color::NORMAL . "\n"; |
|
60 | + echo Color::BG_YELLOW.$title.Color::NORMAL."\n"; |
|
61 | 61 | |
62 | 62 | $pageAction = new WikiPageAction($wiki, $title); |
63 | 63 | if ($pageAction->getNs() !== 0) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | echo $diffAdapter->getDiff( |
96 | 96 | str_replace('. ', ".\n", $text), |
97 | 97 | str_replace('. ', ".\n", $newText), |
98 | - ) . "\n"; |
|
98 | + )."\n"; |
|
99 | 99 | |
100 | 100 | if (!$auto) { |
101 | 101 | $ask = readline("*** ÉDITION ? [y/n/auto]"); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $currentTaskName = $taskName; |
111 | 111 | if ($botFlag) { |
112 | - $currentTaskName = 'Bot ' . $taskName; |
|
112 | + $currentTaskName = 'Bot '.$taskName; |
|
113 | 113 | } |
114 | 114 | $result = $pageAction->editPage($newText, new EditInfo($currentTaskName, $minor, $botFlag)); |
115 | 115 | dump($result); |
@@ -118,6 +118,6 @@ |
||
118 | 118 | $this->rendererOptions, |
119 | 119 | ); |
120 | 120 | |
121 | - return $unifiedResult . "\n\n"; |
|
121 | + return $unifiedResult."\n\n"; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | \ No newline at end of file |