*/
function watch( $add = true ) {
global $wgUser, $wgOut;
- global $wgDeferredUpdateList;
if ( 0 == $wgUser->getID() ) {
$wgOut->errorpage( 'watchnologin', 'watchnologintext' );
$text = wfMsg( 'removedwatchtext', $link );
$wgOut->addWikiText( $text );
- $up = new UserUpdate();
- array_push( $wgDeferredUpdateList, $up );
-
+ $wgUser->saveSettings();
+
$wgOut->returnToMain( true, $this->mTitle->getPrefixedText() );
}
* @access private
*/
function savePreferences() {
- global $wgUser, $wgLang, $wgDeferredUpdateList, $wgOut;
+ global $wgUser, $wgLang, $wgOut;
if ( '' != $this->mNewpass ) {
if ( $this->mNewpass != $this->mRetypePass ) {
$wgUser->setOption( $tname, $tvalue );
}
$wgUser->setCookies();
- $up = new UserUpdate();
- array_push( $wgDeferredUpdateList, $up );
+
+ $wgUser->saveSettings();
+
$wgOut->setParserOptions( ParserOptions::newFromUser( $wgUser ) );
$po = ParserOptions::newFromUser( $wgUser );
$this->mainPrefsForm( wfMsg( 'savedprefs' ) );
*/
function addNewAccount() {
global $wgUser, $wgOut;
- global $wgDeferredUpdateList;
$u = $this->addNewAccountInternal();
$wgUser = $u;
$wgUser->setCookies();
- $up = new UserUpdate();
- array_push( $wgDeferredUpdateList, $up );
+ $wgUser->saveSettings();
if( $this->hasSessionCookie() ) {
return $this->successfulLogin( wfMsg( 'welcomecreation', $wgUser->getName() ) );
}
}
-
/**
* @access private
*/
*/
function processLogin() {
global $wgUser;
- global $wgDeferredUpdateList;
if ( '' == $this->mName ) {
$this->mainLoginForm( wfMsg( 'noname' ) );
$wgUser = $u;
$wgUser->setCookies();
- $up = new UserUpdate();
- array_push( $wgDeferredUpdateList, $up );
-
+ $wgUser->saveSettings();
+
if( $this->hasSessionCookie() ) {
return $this->successfulLogin( wfMsg( 'loginsuccess', $wgUser->getName() ) );
} else {
/**
*
*/
-require_once( 'UserUpdate.php' );
+
require_once( 'SiteStatsUpdate.php' );
require_once( 'LinksUpdate.php' );
require_once( 'SearchUpdate.php' );
+++ /dev/null
-<?php
-/**
- * See deferred.doc
- *
- * @package MediaWiki
- */
-
-/**
- *
- * @package MediaWiki
- */
-class UserUpdate {
- /**
- *
- */
- function UserUpdate() { }
-
- /**
- *
- */
- function doUpdate() {
- global $wgUser;
- $wgUser->saveSettings();
- }
-}
-
-?>