X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUnusedimages.php;h=d332db75629872b8d1e8a081b3c2b6bd7ea20935;hb=8f806d211f218d785c728c76aa12ec22352bd520;hp=6955328277bbc548cb2297b89ae0ed2a3f692c04;hpb=c8543fe0bffafec21f2d2774ecc25cdfdcd44c84;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUnusedimages.php b/includes/specials/SpecialUnusedimages.php index 6955328277..d332db7562 100644 --- a/includes/specials/SpecialUnusedimages.php +++ b/includes/specials/SpecialUnusedimages.php @@ -45,28 +45,28 @@ class UnusedimagesPage extends ImageQueryPage { function getQueryInfo() { global $wgCountCategorizedImagesAsUsed; - $retval = array ( - 'tables' => array ( 'image', 'imagelinks' ), - 'fields' => array ( 'namespace' => NS_FILE, + $retval = array( + 'tables' => array( 'image', 'imagelinks' ), + 'fields' => array( '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 ( + 'conds' => array( 'il_to IS NULL' ), + 'join_conds' => array( 'imagelinks' => array( 'LEFT JOIN', 'il_to = img_name' ) ) ); if ( $wgCountCategorizedImagesAsUsed ) { // Order is significant - $retval['tables'] = array ( 'image', 'page', 'categorylinks', + $retval['tables'] = array( '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 ( + $retval['join_conds']['categorylinks'] = array( 'LEFT JOIN', 'cl_from = page_id' ); - $retval['join_conds']['imagelinks'] = array ( + $retval['join_conds']['imagelinks'] = array( 'LEFT JOIN', 'il_to = page_title' ); } return $retval;