Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -165,30 +165,3 @@ |
166 | 166 | } |
167 | 167 | } |
168 | 168 | } |
169 | | - |
170 | | -/** |
171 | | - * Stub object for the user. The initialisation of the will depend of |
172 | | - * $wgCommandLineMode. If it's true, it will be an anonymous user and if it's |
173 | | - * false, the user will be loaded from credidentails provided by cookies. This |
174 | | - * object have to be in $wgUser global. |
175 | | - */ |
176 | | -class StubUser extends StubObject { |
177 | | - |
178 | | - function __construct() { |
179 | | - parent::__construct( 'wgUser' ); |
180 | | - } |
181 | | - |
182 | | - function __call( $name, $args ) { |
183 | | - return $this->_call( $name, $args ); |
184 | | - } |
185 | | - |
186 | | - function _newObject() { |
187 | | - global $wgCommandLineMode; |
188 | | - if( $wgCommandLineMode ) { |
189 | | - $user = new User; |
190 | | - } else { |
191 | | - $user = User::newFromSession(); |
192 | | - } |
193 | | - return $user; |
194 | | - } |
195 | | -} |
Index: trunk/phase3/includes/Setup.php |
— | — | @@ -322,8 +322,7 @@ |
323 | 323 | |
324 | 324 | // Now that variant lists may be available... |
325 | 325 | $wgRequest->interpolateTitle(); |
326 | | - |
327 | | -$wgUser = new StubUser; |
| 326 | +$wgUser = $wgCommandLineMode ? new User : User::newFromSession(); |
328 | 327 | $wgLang = new StubUserLang; |
329 | 328 | $wgOut = new StubObject( 'wgOut', 'OutputPage' ); |
330 | 329 | $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ); |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -214,7 +214,6 @@ |
215 | 215 | 'SquidPurgeClientPool' => 'includes/SquidPurgeClient.php', |
216 | 216 | 'Status' => 'includes/Status.php', |
217 | 217 | 'StubContLang' => 'includes/StubObject.php', |
218 | | - 'StubUser' => 'includes/StubObject.php', |
219 | 218 | 'StubUserLang' => 'includes/StubObject.php', |
220 | 219 | 'StubObject' => 'includes/StubObject.php', |
221 | 220 | 'StringUtils' => 'includes/StringUtils.php', |