r24492 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24491‎ | r24492 | r24493 >
Date:14:40, 31 July 2007
Author:brion
Status:old
Tags:
Comment:
Backing out 24448, 24455, 24456 for the moment.
Try not to slip in schema changes while everyone else is drinking pls :D
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-page_key.sql (deleted) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-page_key.sql
@@ -1,5 +0,0 @@
2 -ALTER TABLE /*$wgDBprefix*/page
3 - ADD page_key VARCHAR(255) BINARY NOT NULL;
4 -ALTER TABLE /*$wgDBprefix*/page
5 - ADD INDEX name_key (page_namespace, page_key);
6 -
Index: trunk/phase3/maintenance/updaters.inc
@@ -82,7 +82,6 @@
8383 array( 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql'),
8484 array( 'archive', 'ar_page', 'patch-archive-ar_page.sql'),
8585 array( 'image', 'img_sha1', 'patch-img_sha1.sql' ),
86 - array( 'page', 'page_key', 'patch-page_key.sql' ),
8786 );
8887
8988 # For extensions only, should be populated via hooks
Index: trunk/phase3/maintenance/tables.sql
@@ -190,9 +190,6 @@
191191 -- Spaces are transformed into underscores in title storage.
192192 page_title varchar(255) binary NOT NULL,
193193
194 - -- page_title in uppercase. Used for case-insensitive title searching.
195 - page_key varchar(255) binary NOT NULL,
196 -
197194 -- Comma-separated set of permission keys indicating who
198195 -- can move or edit the page.
199196 page_restrictions tinyblob NOT NULL,
@@ -227,7 +224,6 @@
228225
229226 PRIMARY KEY page_id (page_id),
230227 UNIQUE INDEX name_title (page_namespace,page_title),
231 - INDEX name_key (page_namespace, page_key),
232228
233229 -- Special-purpose indexes
234230 INDEX (page_random),
Index: trunk/phase3/includes/Article.php
@@ -262,7 +262,6 @@
263263 'page_id',
264264 'page_namespace',
265265 'page_title',
266 - 'page_key',
267266 'page_restrictions',
268267 'page_counter',
269268 'page_is_redirect',
@@ -1002,7 +1001,6 @@
10031002 * @private
10041003 */
10051004 function insertOn( $dbw ) {
1006 - global $wgContLang;
10071005 wfProfileIn( __METHOD__ );
10081006
10091007 $page_id = $dbw->nextSequenceValue( 'page_page_id_seq' );
@@ -1010,7 +1008,6 @@
10111009 'page_id' => $page_id,
10121010 'page_namespace' => $this->mTitle->getNamespace(),
10131011 'page_title' => $this->mTitle->getDBkey(),
1014 - 'page_key' => $wgContLang->caseFold($this->mTitle->getDBkey()),
10151012 'page_counter' => 0,
10161013 'page_restrictions' => '',
10171014 'page_is_redirect' => 0, # Will set this shortly...
Index: trunk/phase3/includes/Title.php
@@ -2126,7 +2126,7 @@
21272127 * be a redirect
21282128 */
21292129 private function moveOverExistingRedirect( &$nt, $reason = '' ) {
2130 - global $wgUseSquid, $wgContLang;
 2130+ global $wgUseSquid;
21312131 $fname = 'Title::moveOverExistingRedirect';
21322132 $comment = wfMsgForContent( '1movedto2_redir', $this->getPrefixedText(), $nt->getPrefixedText() );
21332133
@@ -2156,7 +2156,6 @@
21572157 'page_touched' => $dbw->timestamp($now),
21582158 'page_namespace' => $nt->getNamespace(),
21592159 'page_title' => $nt->getDBkey(),
2160 - 'page_key' => $wgContLang->caseFold($nt->getDBkey()),
21612160 'page_latest' => $nullRevId,
21622161 ),
21632162 /* WHERE */ array( 'page_id' => $oldid ),
@@ -2204,7 +2203,7 @@
22052204 * @param Title &$nt the new Title
22062205 */
22072206 private function moveToNewTitle( &$nt, $reason = '' ) {
2208 - global $wgUseSquid, $wgContLang;
 2207+ global $wgUseSquid;
22092208 $fname = 'MovePageForm::moveToNewTitle';
22102209 $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
22112210 if ( $reason ) {
@@ -2227,7 +2226,6 @@
22282227 'page_touched' => $now,
22292228 'page_namespace' => $nt->getNamespace(),
22302229 'page_title' => $nt->getDBkey(),
2231 - 'page_key' => $wgContLang->caseFold($nt->getDBkey()),
22322230 'page_latest' => $nullRevId,
22332231 ),
22342232 /* WHERE */ array( 'page_id' => $oldid ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r24631Merged revisions 24480-24600 via svnmerge from...david18:39, 6 August 2007

Status & tagging log