@@ -76,7 +76,7 @@ |
||
| 76 | 76 | //echo count($titles)." titles\n"; |
| 77 | 77 | $edited = file(__DIR__.'/../resources/article_externRef_edited.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
| 78 | 78 | $filtered = array_diff($titles, $edited); |
| 79 | -$list = new PageList( $filtered ); |
|
| 79 | +$list = new PageList($filtered); |
|
| 80 | 80 | echo ">".$list->count()." dans liste\n"; |
| 81 | 81 | |
| 82 | 82 | new ExternRefWorker($botConfig, $wiki, $list); |
@@ -37,25 +37,25 @@ discard block |
||
| 37 | 37 | $data = []; |
| 38 | 38 | |
| 39 | 39 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is null and edited is null and skip=0'); |
| 40 | -$data['not analyzed citation'] = (int)$monitor['count(id)']; |
|
| 40 | +$data['not analyzed citation'] = (int) $monitor['count(id)']; |
|
| 41 | 41 | |
| 42 | 42 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is not null'); |
| 43 | -$data['analyzed citation'] = (int)$monitor['count(id)']; |
|
| 43 | +$data['analyzed citation'] = (int) $monitor['count(id)']; |
|
| 44 | 44 | |
| 45 | 45 | $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where skip=1 and edited is null'); // ? |
| 46 | -$data['skip pages'] = (int)$monitor['n']; |
|
| 46 | +$data['skip pages'] = (int) $monitor['n']; |
|
| 47 | 47 | |
| 48 | 48 | $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited is true'); |
| 49 | -$data['edited pages'] = (int)$monitor['n']; |
|
| 49 | +$data['edited pages'] = (int) $monitor['n']; |
|
| 50 | 50 | |
| 51 | 51 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate > SUBDATE(NOW(),1)'); |
| 52 | -$data['analyzed citation 24H'] = (int)$monitor['count(id)']; |
|
| 52 | +$data['analyzed citation 24H'] = (int) $monitor['count(id)']; |
|
| 53 | 53 | |
| 54 | 54 | $monitor = $db->fetchRow('select count(id) as n from page_ouvrages where edited > SUBDATE(NOW(),1)'); |
| 55 | -$data['edited citations 24H'] = (int)$monitor['n']; |
|
| 55 | +$data['edited citations 24H'] = (int) $monitor['n']; |
|
| 56 | 56 | |
| 57 | 57 | $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited > SUBDATE(NOW(),1)'); |
| 58 | -$data['edited pages 24H'] = (int)$monitor['n']; |
|
| 58 | +$data['edited pages 24H'] = (int) $monitor['n']; |
|
| 59 | 59 | |
| 60 | 60 | $monitor = $db->fetchRow( |
| 61 | 61 | 'SELECT count(distinct A.page) FROM page_ouvrages A |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | AND A.page = B.page |
| 75 | 75 | )' |
| 76 | 76 | ); |
| 77 | -$data['waiting pages'] = (int)$monitor['count(distinct A.page)']; |
|
| 77 | +$data['waiting pages'] = (int) $monitor['count(distinct A.page)']; |
|
| 78 | 78 | |
| 79 | 79 | $data['currentdate'] = DateUtil::english2french((new DateTime())->format('j F Y \à H\:i').' (CEST)'); |
| 80 | 80 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | try { |
| 33 | 33 | $result = $trans->process($url, $summary); |
| 34 | 34 | } catch (\Exception $e) { |
| 35 | - echo "EXCEPTION ". $e->getMessage().$e->getFile().$e->getLine(); |
|
| 35 | + echo "EXCEPTION ".$e->getMessage().$e->getFile().$e->getLine(); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | echo $result."\n"; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | private $options = []; |
| 38 | 38 | |
| 39 | - public function __construct(LoggerInterface $log, ?array $options=[]) |
|
| 39 | + public function __construct(LoggerInterface $log, ?array $options = []) |
|
| 40 | 40 | { |
| 41 | 41 | $this->log = $log; |
| 42 | 42 | $this->options = $options; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $mapJson['DATA-TYPE'] = 'JSON-LD+META'; |
| 74 | 74 | } |
| 75 | 75 | // récupère "accès url" de OpenGraph (prévaut sur JSON:'isAccessibleForFree' |
| 76 | - if(isset($mapMeta['accès url']) ){ |
|
| 76 | + if (isset($mapMeta['accès url'])) { |
|
| 77 | 77 | $mapJson['accès url'] = $mapMeta['accès url']; |
| 78 | 78 | $mapJson['DATA-TYPE'] = 'JSON-LD+META'; |
| 79 | 79 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $row['id'], |
| 111 | 111 | $this->raw |
| 112 | 112 | ) |
| 113 | - );; |
|
| 113 | + ); ; |
|
| 114 | 114 | $this->queueAdapter->skipRow(intval($row['id'])); |
| 115 | 115 | sleep(10); |
| 116 | 116 | continue; |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | private function sendCompleted() |
| 325 | 325 | { |
| 326 | 326 | $isbn13 = $this->ouvrage->getParam('isbn'); |
| 327 | - if(!empty($isbn)) { |
|
| 327 | + if (!empty($isbn)) { |
|
| 328 | 328 | $isbn13 = substr($isbn13, 0, 19); |
| 329 | 329 | } |
| 330 | 330 | |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | 'modifs' => mb_substr(implode(',', $this->getSummaryLog()), 0, 250), |
| 337 | 337 | 'notcosmetic' => ($this->notCosmetic) ? 1 : 0, |
| 338 | 338 | 'major' => ($this->major) ? 1 : 0, |
| 339 | - 'isbn' => substr($isbn13,0,19), |
|
| 339 | + 'isbn' => substr($isbn13, 0, 19), |
|
| 340 | 340 | 'version' => WikiBotConfig::VERSION ?? null, |
| 341 | 341 | ]; |
| 342 | 342 | $this->log->info('finalData', $finalData); |
@@ -124,8 +124,7 @@ |
||
| 124 | 124 | } |
| 125 | 125 | if (isset($this->summary->memo['count lien brisé'])) { |
| 126 | 126 | $suffix .= ', ⚠️️️lien brisé'; //⚠️ |