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
}
/**
- * 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() );
}
/**