X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialListDuplicatedFiles.php;h=49fa417c0e3b10eb83ec457361be6731aa405f9b;hb=3599ebf004cee683b7d90591c2422f3b7ff54c84;hp=1e3dff6f346bf0445ac3ece47d33b07501abcfdf;hpb=488224991c712ef4b92c4559068cdf55febc58f9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialListDuplicatedFiles.php b/includes/specials/SpecialListDuplicatedFiles.php index 1e3dff6f34..49fa417c0e 100644 --- a/includes/specials/SpecialListDuplicatedFiles.php +++ b/includes/specials/SpecialListDuplicatedFiles.php @@ -34,7 +34,7 @@ class ListDuplicatedFilesPage extends QueryPage { parent::__construct( $name ); } - function isExpensive() { + public function isExpensive() { return true; } @@ -53,19 +53,19 @@ class ListDuplicatedFilesPage extends QueryPage { * with however we are doing cached special pages. * @return array */ - function getQueryInfo() { - return array( - 'tables' => array( 'image' ), - 'fields' => array( + public function getQueryInfo() { + return [ + 'tables' => [ 'image' ], + 'fields' => [ 'namespace' => NS_FILE, 'title' => 'MIN(img_name)', 'value' => 'count(*)' - ), - 'options' => array( + ], + 'options' => [ 'GROUP BY' => 'img_sha1', 'HAVING' => 'count(*) > 1', - ), - ); + ], + ]; } /** @@ -87,7 +87,6 @@ class ListDuplicatedFilesPage extends QueryPage { } } - /** * @param Skin $skin * @param object $result Result row @@ -97,12 +96,12 @@ class ListDuplicatedFilesPage extends QueryPage { // Future version might include a list of the first 5 duplicates // perhaps separated by an "↔". $image1 = Title::makeTitle( $result->namespace, $result->title ); - $dupeSearch = SpecialPage::getTitleFor( 'FileDuplicateSearch', $image1->getDBKey() ); + $dupeSearch = SpecialPage::getTitleFor( 'FileDuplicateSearch', $image1->getDBkey() ); $msg = $this->msg( 'listduplicatedfiles-entry' ) ->params( $image1->getText() ) ->numParams( $result->value - 1 ) - ->params( $dupeSearch->getPrefixedDBKey() ); + ->params( $dupeSearch->getPrefixedDBkey() ); return $msg->parse(); }