r17055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17054‎ | r17055 | r17056 >
Date:19:56, 16 October 2006
Author:brion
Status:old
Tags:
Comment:
* (bug 7596) Fix for 1.9 User class restructure
Modified paths:
  • /trunk/extensions/Makebot/Makebot.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Makebot/Makebot.class.php
@@ -39,7 +39,12 @@
4040 $wgOut->addHtml( wfElement( 'p', NULL, NULL ) );
4141 $user = User::newFromName( $this->target );
4242 if( is_object( $user ) && !is_null( $user ) ) {
43 - $user->loadFromDatabase();
 43+ global $wgVersion;
 44+ if( version_compare( $wgVersion, '1.9alpha' ) < 0 ) {
 45+ $user->loadFromDatabase();
 46+ } else {
 47+ $user->load();
 48+ }
4449 # Valid username, check existence
4550 if( $user->getID() ) {
4651 # Exists; check current privileges