| Index: trunk/phase3/includes/Title.php |
| — | — | @@ -3111,19 +3111,26 @@ |
| 3112 | 3112 | |
| 3113 | 3113 | // Refresh the sortkey for this row. Be careful to avoid resetting |
| 3114 | 3114 | // cl_timestamp, which may disturb time-based lists on some sites. |
| 3115 | | - $prefix = $dbw->selectField( |
| | 3115 | + $prefixes = $dbw->select( |
| 3116 | 3116 | 'categorylinks', |
| 3117 | | - 'cl_sortkey_prefix', |
| | 3117 | + array( 'cl_sortkey_prefix', 'cl_to' ), |
| 3118 | 3118 | array( 'cl_from' => $pageid ), |
| 3119 | 3119 | __METHOD__ |
| 3120 | 3120 | ); |
| 3121 | | - $dbw->update( 'categorylinks', |
| 3122 | | - array( |
| 3123 | | - 'cl_sortkey' => Collation::singleton()->getSortKey( |
| 3124 | | - $nt->getCategorySortkey( $prefix ) ), |
| 3125 | | - 'cl_timestamp=cl_timestamp' ), |
| 3126 | | - array( 'cl_from' => $pageid ), |
| 3127 | | - __METHOD__ ); |
| | 3121 | + foreach ( $prefixes as $prefixRow ) { |
| | 3122 | + $prefix = $prefixRow->cl_sortkey_prefix; |
| | 3123 | + $catTo = $prefixRow->cl_to; |
| | 3124 | + $dbw->update( 'categorylinks', |
| | 3125 | + array( |
| | 3126 | + 'cl_sortkey' => Collation::singleton()->getSortKey( |
| | 3127 | + $nt->getCategorySortkey( $prefix ) ), |
| | 3128 | + 'cl_timestamp=cl_timestamp' ), |
| | 3129 | + array( |
| | 3130 | + 'cl_from' => $pageid, |
| | 3131 | + 'cl_to' => $catTo ), |
| | 3132 | + __METHOD__ |
| | 3133 | + ); |
| | 3134 | + } |
| 3128 | 3135 | |
| 3129 | 3136 | if ( $protected ) { |
| 3130 | 3137 | # Protect the redirect title as the title used to be... |