@@ -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 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $mapJson['DATA-TYPE'] = 'JSON-LD+META'; |
| 62 | 62 | } |
| 63 | 63 | // récupère "accès url" de OpenGraph (prévaut sur JSON:'isAccessibleForFree' |
| 64 | - if(isset($mapMeta['accès url']) ){ |
|
| 64 | + if (isset($mapMeta['accès url'])) { |
|
| 65 | 65 | $mapJson['accès url'] = $mapMeta['accès url']; |
| 66 | 66 | $mapJson['DATA-TYPE'] = 'JSON-LD+META'; |
| 67 | 67 | } |
@@ -33,25 +33,25 @@ discard block |
||
| 33 | 33 | $data = []; |
| 34 | 34 | |
| 35 | 35 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is null and edited is null and skip=0'); |
| 36 | -$data['not analyzed citation'] = (int)$monitor['count(id)']; |
|
| 36 | +$data['not analyzed citation'] = (int) $monitor['count(id)']; |
|
| 37 | 37 | |
| 38 | 38 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is not null'); |
| 39 | -$data['analyzed citation'] = (int)$monitor['count(id)']; |
|
| 39 | +$data['analyzed citation'] = (int) $monitor['count(id)']; |
|
| 40 | 40 | |
| 41 | 41 | $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where skip=1 and edited is null'); // ? |
| 42 | -$data['skip pages'] = (int)$monitor['n']; |
|
| 42 | +$data['skip pages'] = (int) $monitor['n']; |
|
| 43 | 43 | |
| 44 | 44 | $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited is true'); |
| 45 | -$data['edited pages'] = (int)$monitor['n']; |
|
| 45 | +$data['edited pages'] = (int) $monitor['n']; |
|
| 46 | 46 | |
| 47 | 47 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate > SUBDATE(NOW(),1)'); |
| 48 | -$data['analyzed citation 24H'] = (int)$monitor['count(id)']; |
|
| 48 | +$data['analyzed citation 24H'] = (int) $monitor['count(id)']; |
|
| 49 | 49 | |
| 50 | 50 | $monitor = $db->fetchRow('select count(id) as n from page_ouvrages where edited > SUBDATE(NOW(),1)'); |
| 51 | -$data['edited citations 24H'] = (int)$monitor['n']; |
|
| 51 | +$data['edited citations 24H'] = (int) $monitor['n']; |
|
| 52 | 52 | |
| 53 | 53 | $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited > SUBDATE(NOW(),1)'); |
| 54 | -$data['edited pages 24H'] = (int)$monitor['n']; |
|
| 54 | +$data['edited pages 24H'] = (int) $monitor['n']; |
|
| 55 | 55 | |
| 56 | 56 | $monitor = $db->fetchRow('SELECT count(distinct A.page) FROM page_ouvrages A |
| 57 | 57 | WHERE A.notcosmetic=1 AND A.opti IS NOT NULL |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ) |
| 69 | 69 | AND A.page = B.page |
| 70 | 70 | )'); |
| 71 | -$data['waiting pages'] = (int)$monitor['count(distinct A.page)']; |
|
| 71 | +$data['waiting pages'] = (int) $monitor['count(distinct A.page)']; |
|
| 72 | 72 | |
| 73 | 73 | $data['currentdate'] = DateUtil::dateEnglish2french((new DateTime())->format('j F Y \à H\:i').' (CEST)'); |
| 74 | 74 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | $monitWiki = ''; |
| 81 | -if(!empty($monitor)) { |
|
| 81 | +if (!empty($monitor)) { |
|
| 82 | 82 | foreach ($monitor as $monit) { |
| 83 | 83 | // % = "%" |
| 84 | 84 | $edited = new DateTime($monit['edited']); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | "<tr><td>%s %</td><td>%s</td><td>[https://fr.wikipedia.org/w/index.php?title=%s&action=history histo]</td><td>[[%s]]</td><td>%s</td></tr>\n", |
| 87 | 87 | $monit['altered'] ?? '?', |
| 88 | 88 | $edited->format('d-m-Y'), |
| 89 | - str_replace(' ','_', $monit['page']), |
|
| 89 | + str_replace(' ', '_', $monit['page']), |
|
| 90 | 90 | $monit['page'] ?? '??', |
| 91 | 91 | $monit['version'] |
| 92 | 92 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | wiki; |
| 124 | 124 | |
| 125 | 125 | $wikiText = str_replace('#monitor#', $monitWiki, $wikiText); |
| 126 | -foreach($data as $key => $dat){ |
|
| 126 | +foreach ($data as $key => $dat) { |
|
| 127 | 127 | $wikiText = str_replace('#'.$key.'#', $dat, $wikiText); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -133,15 +133,15 @@ discard block |
||
| 133 | 133 | $result = $this->api->getRequest( |
| 134 | 134 | new SimpleRequest( |
| 135 | 135 | 'query', [ |
| 136 | - 'meta' => 'notifications', |
|
| 137 | - 'notwikis' => self::DEFAULT_WIKIS, |
|
| 138 | - 'notfilter' => '!read', // default: read|!read |
|
| 139 | - 'notlimit' => '30', // max 50 |
|
| 140 | - // 'notunreadfirst' => '1', // comment for false |
|
| 141 | - // 'notgroupbysection' => '1', |
|
| 142 | - 'notsections' => 'alert', // alert|message |
|
| 143 | - 'format' => 'php', |
|
| 144 | - ] |
|
| 136 | + 'meta' => 'notifications', |
|
| 137 | + 'notwikis' => self::DEFAULT_WIKIS, |
|
| 138 | + 'notfilter' => '!read', // default: read|!read |
|
| 139 | + 'notlimit' => '30', // max 50 |
|
| 140 | + // 'notunreadfirst' => '1', // comment for false |
|
| 141 | + // 'notgroupbysection' => '1', |
|
| 142 | + 'notsections' => 'alert', // alert|message |
|
| 143 | + 'format' => 'php', |
|
| 144 | + ] |
|
| 145 | 145 | ) |
| 146 | 146 | ); |
| 147 | 147 | |
@@ -159,9 +159,9 @@ discard block |
||
| 159 | 159 | $this->api->postRequest( |
| 160 | 160 | new SimpleRequest( |
| 161 | 161 | 'echomarkread', [ |
| 162 | - 'list' => $id, |
|
| 163 | - 'token' => $this->api->getToken(), |
|
| 164 | - ] |
|
| 162 | + 'list' => $id, |
|
| 163 | + 'token' => $this->api->getToken(), |
|
| 164 | + ] |
|
| 165 | 165 | ) |
| 166 | 166 | ); |
| 167 | 167 | } catch (\Throwable $e) { |
@@ -122,8 +122,7 @@ |
||
| 122 | 122 | } |
| 123 | 123 | if (isset($this->summary->memo['count lien brisé'])) { |
| 124 | 124 | $suffix .= ', ⚠️️️lien brisé'; //⚠️ |