From: Brad Jorsch Date: Thu, 7 Dec 2017 15:14:35 +0000 (-0500) Subject: ImageListPager: Don't stomp on $join_conds X-Git-Tag: 1.31.0-rc.0~1260 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=149081f1a7edbb3d8c81aac779e91d08faed1a99 ImageListPager: Don't stomp on $join_conds When adding a join to the oldimage table to get counts, don't stomp on any existing values in $join_conds. Just add the condition. Bug: T182245 Change-Id: I4cd3332355f9974bdf35dc083be5bba537fcfb5f --- diff --git a/includes/specials/pagers/ImageListPager.php b/includes/specials/pagers/ImageListPager.php index 1c46f4c3c2..008573bedd 100644 --- a/includes/specials/pagers/ImageListPager.php +++ b/includes/specials/pagers/ImageListPager.php @@ -288,7 +288,7 @@ class ImageListPager extends TablePager { $columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) ); $options = [ 'GROUP BY' => array_merge( [ 'img_user' ], $columnlist ) ]; - $join_conds = [ 'oldimage' => [ 'LEFT JOIN', 'oi_name = img_name' ] ]; + $join_conds['oldimage'] = [ 'LEFT JOIN', 'oi_name = img_name' ]; } return [