Skip to content

Commit

Permalink
Update updateExternalLinks.php
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox authored Dec 11, 2023
1 parent 044b0e1 commit 23cb987
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions maintenance/updateExternalLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ public function execute() {
'externallinks',
[
'el_from',
'el_to'
'el_to_domain_index',
'el_to_path'
]
);

$rottenlinksarray = [];

foreach ( $res as $row ) {
$rottenlinksarray[$row->el_to][] = (int)$row->el_from;
$rottenlinksarray[$row->el_to_domain_index . $row->el_to_path][] = (int)$row->el_from;
}

foreach ( $rottenlinksarray as $url => $pages ) {
Expand Down Expand Up @@ -63,8 +64,7 @@ public function execute() {
$dbw->insert( 'rottenlinks',
[
'rl_externallink' => $url,
'rl_respcode' => $resp,
'rl_pageusage' => json_encode( $pages )
'rl_respcode' => $resp
],
__METHOD__
);
Expand Down

0 comments on commit 23cb987

Please sign in to comment.