r54652 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54651‎ | r54652 | r54653 >
Date:12:17, 9 August 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* set $wgUseRootUser in __construct() so that it's available in config files
* added missing global declaration for $slaveIndexes in FixSlaveDesync::execute()
Modified paths:
  • /trunk/phase3/maintenance/fixSlaveDesync.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/fixSlaveDesync.php
@@ -22,14 +22,17 @@
2323
2424 class FixSlaveDesync extends Maintenance {
2525 public function __construct() {
 26+ global $wgUseRootUser;
 27+ $wgUseRootUser = true;
 28+
2629 parent::__construct();
2730 $this->mDescription = "";
2831
2932 }
3033
3134 public function execute() {
32 - global $wgUseRootUser, $wgDBservers;
33 - $wgUseRootUser = true;
 35+ global $slaveIndexes, $wgDBservers;
 36+
3437
3538 $slaveIndexes = array();
3639 for ( $i = 1; $i < count( $wgDBservers ); $i++ ) {

Comments

#Comment by Brion VIBBER (talk | contribs)   20:32, 10 August 2009

wgUseRootUser should be phased out in favor of db setting selection in the Maintenance class...

Status & tagging log