Skip to content

Commit cb84485

Browse files
authored
Update query join condition for newer MW versions
Nevermind, this isn't a normal DQL. Misunderstood DB structure and linktarget has category name for some reason
1 parent 73e58a8 commit cb84485

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/SpecialPages/SpecialPandocExport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ private function getCategoryPages( string $categoryName, array &$visited ): arra
345345
->from( 'categorylinks' );
346346

347347
if ( version_compare( $mwVersion, '1.44', '>=' ) ) {
348-
$qb->join( 'category', null )
349-
->where( [ 'cat_title' => $dbKey ] );
348+
$qb->join( 'linktarget', null, 'cl_target_id = lt_id' )
349+
->where( [ 'lt_title' => $dbKey ] );
350350
} else {
351351
$qb->where( [ 'cl_to' => $dbKey ] );
352352
}

0 commit comments

Comments
 (0)