maintenance: Fix sql for touched-only option of refreshLinks script
The convert from raw sql to expression in 81c6df6a46
has a error for the touched condition.
Switch the conditions and use RawSQLExpression to use the raw sql.
Follow-Up: Ieb229d8088cb1ff3f03e44f7ac99eb612f48bc7b
Change-Id: I8fbe0ec44d1a43795a3e4c94f910e09878eebde6
(cherry picked from commit f11b59de58bcb241fa337bbcdd276d25bc94e462)
This commit is contained in:
parent
f4e70dc71e
commit
7508435ecc
1 changed files with 3 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ use MediaWiki\Revision\RevisionRecord;
|
|||
use MediaWiki\Title\Title;
|
||||
use Wikimedia\Rdbms\IExpression;
|
||||
use Wikimedia\Rdbms\IReadableDatabase;
|
||||
use Wikimedia\Rdbms\RawSQLExpression;
|
||||
use Wikimedia\Rdbms\SelectQueryBuilder;
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
|
|
@ -112,8 +113,8 @@ class RefreshLinks extends Maintenance {
|
|||
} else {
|
||||
if ( $touched ) {
|
||||
$builder->andWhere( [
|
||||
$dbr->expr( 'page_touched', '>', 'page_links_updated' )
|
||||
->or( 'page_links_updated', '=', null ),
|
||||
$dbr->expr( 'page_links_updated', '=', null )
|
||||
->orExpr( new RawSQLExpression( 'page_touched > page_links_updated' ) ),
|
||||
] );
|
||||
}
|
||||
$this->output( "Refreshing $what from pages...\n" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue