Skip to content

Commit

Permalink
RottenLinksJob: convert to QueryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Nov 18, 2024
1 parent e455b82 commit c82a68b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions includes/RottenLinksJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ public function run() {

$resp = RottenLinks::getResponse( $url );

$dbw->insert( 'rottenlinks',
[
$dbw->newInsertQueryBuilder()
->insertInto( 'rottenlinks' )
->row( [
'rl_externallink' => $url,
'rl_respcode' => $resp
],
__METHOD__
);
'rl_respcode' => $resp,
] )
->caller( __METHOD__ )
->execute();
}
}

Expand Down Expand Up @@ -112,7 +113,11 @@ public function run() {
continue;
}

$dbw->delete( 'rottenlinks', [ 'rl_externallink' => $url ], __METHOD__ );
$dbw->newDeleteQueryBuilder()
->deleteFrom( 'rottenlinks' )
->where( [ 'rl_externallink' => $url ] )
->caller( __METHOD__ )
->execute();
}
}

Expand Down

0 comments on commit c82a68b

Please sign in to comment.