@@ -29,8 +29,7 @@ |
||
| 29 | 29 | 'auteur1' => $this->wikifyPressAgency($this->cleanAuthor($this->convertAuteur($jsonLD, 0))), |
| 30 | 30 | 'auteur2' => $this->cleanAuthor($this->convertAuteur($jsonLD, 1)), |
| 31 | 31 | 'auteur3' => $this->cleanAuthor($this->convertAuteur($jsonLD, 2)), |
| 32 | - 'auteur institutionnel' => $this->wikifyPressAgency($this->cleanAuthor($this->convertInstitutionnel |
|
| 33 | - ($jsonLD))), |
|
| 32 | + 'auteur institutionnel' => $this->wikifyPressAgency($this->cleanAuthor($this->convertInstitutionnel($jsonLD))), |
|
| 34 | 33 | //'éditeur' => $jsonLD['publisher']['name'] ?? null, |
| 35 | 34 | 'consulté le' => date('d-m-Y'), |
| 36 | 35 | // 'url-access' => $this->convertURLaccess($jsonLD), |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $page .= '–'.$meta['citation_lastpage']; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - return (string)$page; |
|
| 80 | + return (string) $page; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return null; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | return null; |
| 115 | 115 | } |
| 116 | 116 | $str = str_replace( |
| 117 | - ['|', "\n", "\t", ''', ''', ''', ''', "\n", " ", "é",'©'], |
|
| 117 | + ['|', "\n", "\t", ''', ''', ''', ''', "\n", " ", "é", '©'], |
|
| 118 | 118 | [ |
| 119 | 119 | '/', |
| 120 | 120 | ' ', |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | const EDIT_SIGNALEMENT = true; |
| 40 | 40 | |
| 41 | - const CITATION_LIMIT = 150; |
|
| 41 | + const CITATION_LIMIT = 150; |
|
| 42 | 42 | const DELAY_BOTFLAG_SECONDS = 60; |
| 43 | 43 | const DELAY_NO_BOTFLAG_SECONDS = 60; |
| 44 | 44 | const ERROR_MSG_TEMPLATE = __DIR__.'/templates/message_errors.wiki'; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | // Page supprimée ? |
| 131 | - if($page->getLastRevision() === null) { |
|
| 131 | + if ($page->getLastRevision() === null) { |
|
| 132 | 132 | $this->log->warning("SKIP : page supprimée !\n"); |
| 133 | 133 | $this->db->deleteArticle($title); |
| 134 | 134 | |
@@ -122,8 +122,7 @@ |
||
| 122 | 122 | } |
| 123 | 123 | if (isset($this->summary->memo['count lien brisé'])) { |
| 124 | 124 | $suffix .= ', ⚠️️️lien brisé'; //⚠️ |
@@ -22,9 +22,9 @@ |
||
| 22 | 22 | include __DIR__.'/../myBootstrap.php'; |
| 23 | 23 | |
| 24 | 24 | $quota = new GoogleApiQuota(); |
| 25 | -dump('Google quota : '. $quota ->getCount()); |
|
| 25 | +dump('Google quota : '.$quota ->getCount()); |
|
| 26 | 26 | |
| 27 | -if( $quota->isQuotaReached() ) { |
|
| 27 | +if ($quota->isQuotaReached()) { |
|
| 28 | 28 | throw new \Exception("Google Books API quota reached => exit"); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | $row['id'], |
| 110 | 110 | $this->raw |
| 111 | 111 | ) |
| 112 | - );; |
|
| 112 | + ); ; |
|
| 113 | 113 | $this->queueAdapter->skipRow(intval($row['id'])); |
| 114 | 114 | sleep(10); |
| 115 | 115 | continue; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $this->pastAnalyzed = ($analyzed !== false) ? $analyzed : []; |
| 91 | 91 | |
| 92 | 92 | // @throw exception on "Invalid CSRF token" |
| 93 | - $this->run();//todo delete that and use (Worker)->run($duration) or process management |
|
| 93 | + $this->run(); //todo delete that and use (Worker)->run($duration) or process management |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | protected function setUpInConstructor(): void |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | dump($result); |
| 269 | - echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n"; |
|
| 269 | + echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n"; |
|
| 270 | 270 | sleep(static::SLEEP_AFTER_EDITION); |
| 271 | 271 | } |
| 272 | 272 | |