dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(bug 24593) Native name for Sorani now uses only Arabic script
[lhc/web/wiklou.git]
/
maintenance
/
updateCollation.php
diff --git
a/maintenance/updateCollation.php
b/maintenance/updateCollation.php
index
f842537
..
60578ce
100644
(file)
--- a/
maintenance/updateCollation.php
+++ b/
maintenance/updateCollation.php
@@
-57,11
+57,10
@@
TEXT;
$dbw->begin();
foreach ( $res as $row ) {
$title = Title::newFromRow( $row );
$dbw->begin();
foreach ( $res as $row ) {
$title = Title::newFromRow( $row );
- $rawSortkey = $title->getCategorySortkey();
if ( $row->cl_collation == 0 ) {
# This is an old-style row, so the sortkey needs to be
# converted.
if ( $row->cl_collation == 0 ) {
# This is an old-style row, so the sortkey needs to be
# converted.
- if ( $row->cl_sortkey == $
rawSortkey
) {
+ if ( $row->cl_sortkey == $
title->getCategorySortkey()
) {
$prefix = '';
} else {
# Custom sortkey, use it as a prefix
$prefix = '';
} else {
# Custom sortkey, use it as a prefix
@@
-82,7
+81,8
@@
TEXT;
$dbw->update(
'categorylinks',
array(
$dbw->update(
'categorylinks',
array(
- 'cl_sortkey' => $wgContLang->convertToSortkey( $prefix . $rawSortkey ),
+ 'cl_sortkey' => $wgContLang->convertToSortkey(
+ $title->getCategorySortkey( $prefix ) ),
'cl_sortkey_prefix' => $prefix,
'cl_collation' => $wgCollationVersion,
'cl_type' => $type,
'cl_sortkey_prefix' => $prefix,
'cl_collation' => $wgCollationVersion,
'cl_type' => $type,