Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -82,6 +82,7 @@ |
83 | 83 | array( 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql'), |
84 | 84 | array( 'archive', 'ar_page', 'patch-archive-ar_page.sql'), |
85 | 85 | array( 'image', 'img_sha1', 'patch-img_sha1.sql' ), |
| 86 | + array( 'page', 'page_key', 'patch-page_key.sql' ), |
86 | 87 | ); |
87 | 88 | |
88 | 89 | # For extensions only, should be populated via hooks |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -190,6 +190,9 @@ |
191 | 191 | -- Spaces are transformed into underscores in title storage. |
192 | 192 | page_title varchar(255) binary NOT NULL, |
193 | 193 | |
| 194 | + -- page_title in uppercase. Used for case-insensitive title searching. |
| 195 | + page_key varchar(255) binary NOT NULL, |
| 196 | + |
194 | 197 | -- Comma-separated set of permission keys indicating who |
195 | 198 | -- can move or edit the page. |
196 | 199 | page_restrictions tinyblob NOT NULL, |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -262,6 +262,7 @@ |
263 | 263 | 'page_id', |
264 | 264 | 'page_namespace', |
265 | 265 | 'page_title', |
| 266 | + 'page_key', |
266 | 267 | 'page_restrictions', |
267 | 268 | 'page_counter', |
268 | 269 | 'page_is_redirect', |
— | — | @@ -1001,6 +1002,7 @@ |
1002 | 1003 | * @private |
1003 | 1004 | */ |
1004 | 1005 | function insertOn( $dbw ) { |
| 1006 | + global $wgContLang; |
1005 | 1007 | wfProfileIn( __METHOD__ ); |
1006 | 1008 | |
1007 | 1009 | $page_id = $dbw->nextSequenceValue( 'page_page_id_seq' ); |
— | — | @@ -1008,6 +1010,7 @@ |
1009 | 1011 | 'page_id' => $page_id, |
1010 | 1012 | 'page_namespace' => $this->mTitle->getNamespace(), |
1011 | 1013 | 'page_title' => $this->mTitle->getDBkey(), |
| 1014 | + 'page_key' => $wgContLang->caseFold($this->mTitle->getDBkey()), |
1012 | 1015 | 'page_counter' => 0, |
1013 | 1016 | 'page_restrictions' => '', |
1014 | 1017 | 'page_is_redirect' => 0, # Will set this shortly... |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -2126,7 +2126,7 @@ |
2127 | 2127 | * be a redirect |
2128 | 2128 | */ |
2129 | 2129 | private function moveOverExistingRedirect( &$nt, $reason = '' ) { |
2130 | | - global $wgUseSquid; |
| 2130 | + global $wgUseSquid, $wgContLang; |
2131 | 2131 | $fname = 'Title::moveOverExistingRedirect'; |
2132 | 2132 | $comment = wfMsgForContent( '1movedto2_redir', $this->getPrefixedText(), $nt->getPrefixedText() ); |
2133 | 2133 | |
— | — | @@ -2156,6 +2156,7 @@ |
2157 | 2157 | 'page_touched' => $dbw->timestamp($now), |
2158 | 2158 | 'page_namespace' => $nt->getNamespace(), |
2159 | 2159 | 'page_title' => $nt->getDBkey(), |
| 2160 | + 'page_key' => $wgContLang->caseFold($nt->getDBkey()), |
2160 | 2161 | 'page_latest' => $nullRevId, |
2161 | 2162 | ), |
2162 | 2163 | /* WHERE */ array( 'page_id' => $oldid ), |
— | — | @@ -2203,7 +2204,7 @@ |
2204 | 2205 | * @param Title &$nt the new Title |
2205 | 2206 | */ |
2206 | 2207 | private function moveToNewTitle( &$nt, $reason = '' ) { |
2207 | | - global $wgUseSquid; |
| 2208 | + global $wgUseSquid, $wgContLang; |
2208 | 2209 | $fname = 'MovePageForm::moveToNewTitle'; |
2209 | 2210 | $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ); |
2210 | 2211 | if ( $reason ) { |
— | — | @@ -2226,6 +2227,7 @@ |
2227 | 2228 | 'page_touched' => $now, |
2228 | 2229 | 'page_namespace' => $nt->getNamespace(), |
2229 | 2230 | 'page_title' => $nt->getDBkey(), |
| 2231 | + 'page_key' => $wgContLang->caseFold($nt->getDBkey()), |
2230 | 2232 | 'page_latest' => $nullRevId, |
2231 | 2233 | ), |
2232 | 2234 | /* WHERE */ array( 'page_id' => $oldid ), |