X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnusedimages.php;h=9fcbf15f78116f17c1f9329c6bdcf8ff721046dc;hp=36ec09ec817891dfad6f6c3de8b3e8bfa3c12767;hb=22806b0a4509e97b56fb52b387e17e3c80fb7eb2;hpb=1e0f3d8c0fb7314cf1fd86ce9b2d994f74378a7c diff --git a/includes/specials/SpecialUnusedimages.php b/includes/specials/SpecialUnusedimages.php index 36ec09ec81..9fcbf15f78 100644 --- a/includes/specials/SpecialUnusedimages.php +++ b/includes/specials/SpecialUnusedimages.php @@ -44,30 +44,28 @@ class UnusedimagesPage extends ImageQueryPage { } function getQueryInfo() { - $retval = array( - 'tables' => array( 'image', 'imagelinks' ), - 'fields' => array( + $retval = [ + 'tables' => [ 'image', 'imagelinks' ], + 'fields' => [ 'namespace' => NS_FILE, 'title' => 'img_name', 'value' => 'img_timestamp', - 'img_user', 'img_user_text', - 'img_description' - ), - 'conds' => array( 'il_to IS NULL' ), - 'join_conds' => array( 'imagelinks' => array( 'LEFT JOIN', 'il_to = img_name' ) ) - ); + ], + 'conds' => [ 'il_to IS NULL' ], + 'join_conds' => [ 'imagelinks' => [ 'LEFT JOIN', 'il_to = img_name' ] ] + ]; if ( $this->getConfig()->get( 'CountCategorizedImagesAsUsed' ) ) { // Order is significant - $retval['tables'] = array( 'image', 'page', 'categorylinks', - 'imagelinks' ); + $retval['tables'] = [ 'image', 'page', 'categorylinks', + 'imagelinks' ]; $retval['conds']['page_namespace'] = NS_FILE; $retval['conds'][] = 'cl_from IS NULL'; $retval['conds'][] = 'img_name = page_title'; - $retval['join_conds']['categorylinks'] = array( - 'LEFT JOIN', 'cl_from = page_id' ); - $retval['join_conds']['imagelinks'] = array( - 'LEFT JOIN', 'il_to = page_title' ); + $retval['join_conds']['categorylinks'] = [ + 'LEFT JOIN', 'cl_from = page_id' ]; + $retval['join_conds']['imagelinks'] = [ + 'LEFT JOIN', 'il_to = page_title' ]; } return $retval;