DELETE {
?category ?x ?y
} WHERE {
+ ?category ?x ?y
VALUES ?category {
%s
}
} INSERT {
%s
} WHERE {
+ ?category ?x ?y
VALUES ?category {
%s
}
'rc_type' => RC_LOG,
] );
$it->addJoinConditions( [
- 'page' => [ 'INNER JOIN', 'rc_cur_id = page_id' ],
+ 'page' => [ 'JOIN', 'rc_cur_id = page_id' ],
] );
$this->addIndex( $it );
return $it;
/**
* Get iterator for links for categories.
* @param IDatabase $dbr
- * @param array $ids List of page IDs
+ * @param int[] $ids List of page IDs
* @return Traversable
*/
protected function getCategoryLinksIterator( IDatabase $dbr, array $ids ) {
* TODO: For now, we do full update even though some data hasn't changed,
* e.g. parents for parent cat and counts for child cat.
*/
+ $childPages = [];
+ $parentCats = [];
foreach ( $batch as $row ) {
$childPages[$row->rc_cur_id] = true;
$parentCats[$row->rc_title] = true;
$pages = [];
$deleteUrls = [];
- if ( !empty( $childPages ) ) {
+ if ( $childPages ) {
// Load child rows by ID
$childRows = $dbr->select(
[ 'page', 'page_props', 'category' ],
}
}
- if ( !empty( $parentCats ) ) {
+ if ( $parentCats ) {
// Load parent rows by title
$joinConditions = [
'page' => [