r82445 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82444‎ | r82445 | r82446 >
Date:11:49, 19 February 2011
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Bug 27518: Updater calls PopulateLogSearch before adding logging.log_user_text; populateLogUsertext not called
Modified paths:
  • /trunk/phase3/includes/AutoLoader.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/installer/DatabaseUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/SqliteUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -1,5 +1,8 @@
22 <?php
33
 4+if ( !defined( 'MEDIAWIKI' ) )
 5+ die( 1 );
 6+
47 /**
58 * Special handling for image description pages
69 *
@@ -7,10 +10,10 @@
811 */
912 class ImagePage extends Article {
1013
11 - private $img; // Image object
12 - private $displayImg;
13 - private $repo;
14 - private $fileLoaded;
 14+ /* private */ var $img; // Image object
 15+ /* private */ var $displayImg;
 16+ /* private */ var $repo;
 17+ /* private */ var $fileLoaded;
1518 var $mExtraDescription = false;
1619 var $dupes;
1720
Index: trunk/phase3/includes/installer/DatabaseUpdater.php
@@ -489,6 +489,21 @@
490490 $this->output( "...ss_active_users user count set...\n" );
491491 }
492492
 493+ protected function doLogUsertextPopulation() {
 494+ if ( $this->updateRowExists( 'populate log_usertext' ) ) {
 495+ $this->output( "...log_user_text field already populated.\n" );
 496+ return;
 497+ }
 498+
 499+ $this->output(
 500+ "Populating log_user_text field, printing progress markers. For large\n" .
 501+ "databases, you may want to hit Ctrl-C and do this manually with\n" .
 502+ "maintenance/populateLogUsertext.php.\n" );
 503+ $task = new PopulateLogUsertext();
 504+ $task->execute();
 505+ $this->output( "Done populating log_user_text field.\n" );
 506+ }
 507+
493508 protected function doLogSearchPopulation() {
494509 if ( $this->updateRowExists( 'populate log_search' ) ) {
495510 $this->output( "...log_search table already populated.\n" );
Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -147,8 +147,9 @@
148148 // 1.16
149149 array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
150150 array( 'addTable', 'log_search', 'patch-log_search.sql' ),
 151+ array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
 152+ array( 'doLogUsertextPopulation' ), # listed separately from the previous update because 1.16 was released without this update
151153 array( 'doLogSearchPopulation' ),
152 - array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
153154 array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
154155 array( 'addTable', 'external_user', 'patch-external_user.sql' ),
155156 array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
Index: trunk/phase3/includes/installer/SqliteUpdater.php
@@ -30,8 +30,9 @@
3131 // 1.16
3232 array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
3333 array( 'addTable', 'log_search', 'patch-log_search.sql' ),
 34+ array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
 35+ array( 'doLogUsertextPopulation' ), # listed separately from the previous update because 1.16 was released without this update
3436 array( 'doLogSearchPopulation' ),
35 - array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
3637 array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
3738 array( 'addTable', 'external_user', 'patch-external_user.sql' ),
3839 array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
Index: trunk/phase3/includes/AutoLoader.php
@@ -718,6 +718,7 @@
719719 'DeleteDefaultMessages' => 'maintenance/deleteDefaultMessages.php',
720720 'PopulateCategory' => 'maintenance/populateCategory.php',
721721 'PopulateLogSearch' => 'maintenance/populateLogSearch.php',
 722+ 'PopulateLogUsertext' => 'maintenance/populateLogUsertext.php',
722723 'PopulateParentId' => 'maintenance/populateParentId.php',
723724 'PopulateRevisionLength' => 'maintenance/populateRevisionLength.php',
724725 'SevenZipStream' => 'maintenance/7zip.inc',

Follow-up revisions

RevisionCommit summaryAuthorDate
r82462Partial revert my accidental revert of r82366 in r82445.maxsem16:25, 19 February 2011
r84855Per CR on r84589: drop unintentially merged 1.18 schema change (r84185) and a...demon16:38, 27 March 2011

Comments

#Comment by Nikerabbit (talk | contribs)   15:58, 19 February 2011

Are the ImagePage changes related?

#Comment by MaxSem (talk | contribs)   16:27, 19 February 2011

Whoops, it's an unintended revert of r82366, which is marked fixme. Undid the useless part in r82462, will revert the rest if needed, further discussion should be at at r82366.

Status & tagging log