I know the uppercase thing is just a standby until a real collation function is written. However in the
mean time, i think it'd be really weird for a wiki with $wgCapitalLinks = false to suddenly have
[[a]] and [[A]] sort under the same letter in a category page, but [[Ä]] and [[ä]] sort no where
near each other, even though on a capitalized wiki they would be the same page.
See discussion on r69816.
Also fix an issue with maintenance/updateCollation.php, where php thinks
that 'uppercase' == 0 (?!). I don't really know what the deal with that
is, but using a ! instead of == 0 seems to fix it. (Follow-up r69961)
* for all rows where cl_collation != $wgCategoryCollation and regenerates
* cl_sortkey based on the page name and cl_sortkey_prefix.
*
- * Currently only supports 'uppercase', which just uppercases the string. This
+ * Currently only supports 'uppercase2', which just uppercases the string. This
* is a dummy collation, to be replaced later by real ones.
*/
-$wgCategoryCollation = 'uppercase';
+$wgCategoryCollation = 'uppercase2';
/** @} */ # End categories }
*/
public function convertToSortkey( $string ) {
# Fake function for now
- return strtoupper( $string );
+ return $this->uc( $string );
}
/**
if ( $string[0] == "\0" ) {
$string = substr( $string, 1 );
}
- return strtoupper( $this->firstChar( $string ) );
+ return $this->uc( $this->firstChar( $string ) );
}
}
$dbw->begin();
foreach ( $res as $row ) {
$title = Title::newFromRow( $row );
- if ( $row->cl_collation == 0 ) {
+ if ( !$row->cl_collation ) {
# This is an old-style row, so the sortkey needs to be
# converted.
if ( $row->cl_sortkey == $title->getText()