ImageListPager: Actor migration for buildQueryConds()
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 4 Dec 2018 16:08:08 +0000 (11:08 -0500)
committerPaladox <thomasmulhall410@yahoo.com>
Wed, 5 Dec 2018 21:39:10 +0000 (21:39 +0000)
This method got missed in I8d825eb0.

Bug: T211061
Change-Id: Ice7446e54a42cbf48eae2a2092862a722650086c
(cherry picked from commit 86b081aa4100bfde2c4903c16fd593f485954326)

includes/specials/pagers/ImageListPager.php

index 3225256..bb4f0b3 100644 (file)
@@ -134,7 +134,14 @@ class ImageListPager extends TablePager {
                $conds = [];
 
                if ( !is_null( $this->mUserName ) ) {
-                       $conds[$prefix . '_user_text'] = $this->mUserName;
+                       // getQueryInfoReal() should have handled the tables and joins.
+                       $dbr = wfGetDB( DB_REPLICA );
+                       $actorWhere = ActorMigration::newMigration()->getWhere(
+                               $dbr,
+                               $prefix . '_user',
+                               User::newFromName( $this->mUserName, false )
+                       );
+                       $conds[] = $actorWhere['conds'];
                }
 
                if ( $this->mSearch !== '' ) {