aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/refreshLinks.php
diff options
context:
space:
mode:
authorBartosz Dziewoński <matma.rex@gmail.com>2023-10-22 00:16:29 +0200
committerBartosz Dziewoński <matma.rex@gmail.com>2023-10-22 01:06:04 +0200
commitc9683b70924858fa27ce732612e132050d003ed3 (patch)
tree360ede7ac8c5fca908964b2e2fd4165d2a8ab63c /maintenance/refreshLinks.php
parent978d739bc6269415b9e561fd2c7e5c6260af54d5 (diff)
downloadmediawikicore-c9683b70924858fa27ce732612e132050d003ed3.tar.gz
mediawikicore-c9683b70924858fa27ce732612e132050d003ed3.zip
Replace more single-value $db->buildComparison() with $db->expr()
A few more fairly simple cases that don't quite match the regexp in I2cfc3070c2a08fc3888ad48a995f7d79198cc336 or required other tweaks. Change-Id: I5438c777344e9ba07f3b62a452fce9ec63baa48a
Diffstat (limited to 'maintenance/refreshLinks.php')
-rw-r--r--maintenance/refreshLinks.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index 6befb9c49993..7b45b9e4e5ea 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -80,10 +80,10 @@ class RefreshLinks extends Maintenance {
}
if ( $this->hasOption( 'before-timestamp' ) ) {
- $timeCond = $dbr->buildComparison( '<', [
- 'page_links_updated' => $this->getOption( 'before-timestamp' )
- ] );
- $builder->andWhere( [ "$timeCond OR page_links_updated IS NULL" ] );
+ $builder->andWhere(
+ $dbr->expr( 'page_links_updated', '<', $this->getOption( 'before-timestamp' ) )
+ ->or( 'page_links_updated', '=', null )
+ );
}
if ( $this->hasOption( 'category' ) ) {