$cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
$dbw->delete(
'recentchanges',
- array( "rc_timestamp < '$cutoff'" ),
+ array( 'rc_timestamp < ' . $dbw->addQuotes( $cutoff ) ),
__METHOD__
);
}
}
if ( $offset ) {
- $offsets = array( "rev_timestamp $oper '$offset'" );
+ $offsets = array( 'rev_timestamp $oper ' . $dbr->addQuotes( $dbr->timestamp( $offset ) ) );
} else {
$offsets = array();
}
return $dbr->select( 'revision',
Revision::selectFields(),
- array_merge( array( "rev_page=$page_id" ), $offsets ),
+ array_merge( array( 'rev_page' => $page_id ), $offsets ),
__METHOD__,
array( 'ORDER BY' => "rev_timestamp $dirs",
'USE INDEX' => 'page_timestamp', 'LIMIT' => $limit )