From 7b2a62b74a611cfb74aa9909ddb4f6aa840040e8 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 1 Aug 2012 19:40:10 +0200 Subject: [PATCH] Change File::compare to use getName, not getTitle For files the file name with underscores is often used, than the compare method should do that also. This matches than the ORDER BY img_name done by some query. Change-Id: Ia1b89577538bdfdf751c7b9584e7c008a8c2bb1e --- includes/filerepo/file/File.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 3fa81663b6..7489862ee3 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -246,15 +246,15 @@ abstract class File { } /** - * Callback for usort() to do file sorts by title + * Callback for usort() to do file sorts by name * * @param $a File * @param $b File * - * @return Integer: result of title comparison + * @return Integer: result of name comparison */ public static function compare( File $a, File $b ) { - return Title::compare( $a->getTitle(), $b->getTitle() ); + return strcmp( $a->getName(), $b->getName() ); } /** -- 2.20.1