ImageListPager: Actor migration for buildQueryConds()
[lhc/web/wiklou.git] / includes / specials / pagers / ImageListPager.php
index 3d7148d..ab3237a 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 !== '' ) {
@@ -449,7 +456,7 @@ class ImageListPager extends TablePager {
                                        if ( $thumb ) {
                                                return $thumb->toHtml( [ 'desc-link' => true ] );
                                        } else {
-                                               return wfMessage( 'thumbnail_error', '' )->escaped();
+                                               return $this->msg( 'thumbnail_error', '' )->escaped();
                                        }
                                } else {
                                        return htmlspecialchars( $value );