From a4ffac4063aa043fbace17b16710fa5a19596293 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 22 May 2008 16:39:43 +0000 Subject: [PATCH] Revert r35178 and normalize User's getID() and setID() methods to prettier getId() and setId() This doesn't accomplish anything, of course, but if you're going to run around changing them, at least make em prettier eh? :) --- includes/EditPage.php | 2 +- includes/LogPage.php | 2 +- includes/PageHistory.php | 2 +- includes/RecentChange.php | 10 +++++----- includes/Revision.php | 2 +- includes/SpecialBlockip.php | 6 +++--- includes/SpecialImport.php | 2 +- includes/SpecialIpblocklist.php | 2 +- includes/SpecialPreferences.php | 4 ++-- includes/SpecialRecentchanges.php | 6 +++--- includes/SpecialRecentchangeslinked.php | 2 +- includes/SpecialUpload.php | 2 +- includes/SpecialUserrights.php | 2 +- includes/SpecialWatchlist.php | 2 +- includes/Title.php | 2 +- includes/User.php | 6 +++--- includes/UserMailer.php | 4 ++-- includes/WatchedItem.php | 2 +- includes/WatchlistEditor.php | 16 ++++++++-------- includes/api/ApiQueryUserInfo.php | 2 +- includes/api/ApiQueryWatchlist.php | 2 +- includes/filerepo/ICRepo.php | 4 ++-- includes/filerepo/LocalFile.php | 8 ++++---- maintenance/changePassword.php | 6 +++--- maintenance/cleanupSpam.php | 2 +- maintenance/reassignEdits.inc.php | 2 +- 26 files changed, 51 insertions(+), 51 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 8df876a2f0..cb25581010 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -870,7 +870,7 @@ class EditPage { } } } - $userid = $wgUser->getID(); + $userid = $wgUser->getId(); if ( $this->isConflict) { wfDebug( "EditPage::editForm conflict! getting section '$this->section' for time '$this->edittime' (article time '" . diff --git a/includes/LogPage.php b/includes/LogPage.php index 89e144baad..f8e235e7f6 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -56,7 +56,7 @@ class LogPage { $fname = 'LogPage::saveContent'; $dbw = wfGetDB( DB_MASTER ); - $uid = $wgUser->getID(); + $uid = $wgUser->getId(); $log_id = $dbw->nextSequenceValue( 'log_log_id_seq' ); $this->timestamp = $now = wfTimestampNow(); diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 8a09a3e660..9f9bbbe6e8 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -473,7 +473,7 @@ class PageHistory { 'wl_notificationtimestamp', array( 'wl_namespace' => $this->mTitle->getNamespace(), 'wl_title' => $this->mTitle->getDBkey(), - 'wl_user' => $wgUser->getID() + 'wl_user' => $wgUser->getId() ), __METHOD__ ); diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 609f410229..4b13b12aad 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -223,7 +223,7 @@ class RecentChange if( $wgUseEnotif || $wgShowUpdatedMarker ) { // Users if( $this->mAttribs['rc_user'] ) { - $editor = ($wgUser->getID() == $this->mAttribs['rc_user']) ? + $editor = ($wgUser->getId() == $this->mAttribs['rc_user']) ? $wgUser : User::newFromID( $this->mAttribs['rc_user'] ); // Anons } else { @@ -289,7 +289,7 @@ class RecentChange 'rc_type' => RC_EDIT, 'rc_minor' => $minor ? 1 : 0, 'rc_cur_id' => $title->getArticleID(), - 'rc_user' => $user->getID(), + 'rc_user' => $user->getId(), 'rc_user_text' => $user->getName(), 'rc_comment' => $comment, 'rc_this_oldid' => $newId, @@ -343,7 +343,7 @@ class RecentChange 'rc_type' => RC_NEW, 'rc_minor' => $minor ? 1 : 0, 'rc_cur_id' => $title->getArticleID(), - 'rc_user' => $user->getID(), + 'rc_user' => $user->getId(), 'rc_user_text' => $user->getName(), 'rc_comment' => $comment, 'rc_this_oldid' => $newId, @@ -394,7 +394,7 @@ class RecentChange 'rc_type' => $overRedir ? RC_MOVE_OVER_REDIRECT : RC_MOVE, 'rc_minor' => 0, 'rc_cur_id' => $oldTitle->getArticleID(), - 'rc_user' => $user->getID(), + 'rc_user' => $user->getId(), 'rc_user_text' => $user->getName(), 'rc_comment' => $comment, 'rc_this_oldid' => 0, @@ -452,7 +452,7 @@ class RecentChange 'rc_type' => RC_LOG, 'rc_minor' => 0, 'rc_cur_id' => $target->getArticleID(), - 'rc_user' => $user->getID(), + 'rc_user' => $user->getId(), 'rc_user_text' => $user->getName(), 'rc_comment' => $logComment, 'rc_this_oldid' => 0, diff --git a/includes/Revision.php b/includes/Revision.php index f801bed79c..0f8ba711fc 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -332,7 +332,7 @@ class Revision { $this->mPage = isset( $row['page'] ) ? intval( $row['page'] ) : null; $this->mTextId = isset( $row['text_id'] ) ? intval( $row['text_id'] ) : null; $this->mUserText = isset( $row['user_text'] ) ? strval( $row['user_text'] ) : $wgUser->getName(); - $this->mUser = isset( $row['user'] ) ? intval( $row['user'] ) : $wgUser->getID(); + $this->mUser = isset( $row['user'] ) ? intval( $row['user'] ) : $wgUser->getId(); $this->mMinorEdit = isset( $row['minor_edit'] ) ? intval( $row['minor_edit'] ) : 0; $this->mTimestamp = isset( $row['timestamp'] ) ? strval( $row['timestamp'] ) : wfTimestamp( TS_MW ); $this->mDeleted = isset( $row['deleted'] ) ? intval( $row['deleted'] ) : 0; diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 0f503d27ef..2d3c50a249 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -314,9 +314,9 @@ class IPBlockForm { # Username block if ( $wgSysopUserBans ) { $user = User::newFromName( $this->BlockAddress ); - if( !is_null( $user ) && $user->getID() ) { + if( !is_null( $user ) && $user->getId() ) { # Use canonical name - $userId = $user->getID(); + $userId = $user->getId(); $this->BlockAddress = $user->getName(); } else { return array('nosuchusershort', htmlspecialchars( $user ? $user->getName() : $this->BlockAddress ) ); @@ -358,7 +358,7 @@ class IPBlockForm { # Create block # Note: for a user block, ipb_address is only for display purposes - $block = new Block( $this->BlockAddress, $userId, $wgUser->getID(), + $block = new Block( $this->BlockAddress, $userId, $wgUser->getId(), $reasonstr, wfTimestampNow(), 0, $expiry, $this->BlockAnonOnly, $this->BlockCreateAccount, $this->BlockEnableAutoblock, $this->BlockHideName, $this->BlockEmail); diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 5f5c63a76d..862b3e1861 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -351,7 +351,7 @@ class WikiRevision { # Sneak a single revision into place $user = User::newFromName( $this->getUser() ); if( $user ) { - $userId = intval( $user->getID() ); + $userId = intval( $user->getId() ); $userText = $user->getName(); } else { $userId = 0; diff --git a/includes/SpecialIpblocklist.php b/includes/SpecialIpblocklist.php index d6807d290b..3bca2000ba 100644 --- a/includes/SpecialIpblocklist.php +++ b/includes/SpecialIpblocklist.php @@ -249,7 +249,7 @@ class IPUnblockForm { $conds['ipb_auto'] = 0; } else { $user = User::newFromName( $this->ip ); - if ( $user && ( $id = $user->getID() ) != 0 ) { + if ( $user && ( $id = $user->getId() ) != 0 ) { $conds['ipb_user'] = $id; } else { // Uh...? diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 0d7e02a840..89db89109a 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -605,10 +605,10 @@ class PreferencesForm { $userInformationHtml = $this->tableRow( wfMsgHtml( 'username' ), htmlspecialchars( $wgUser->getName() ) ) . - $this->tableRow( wfMsgHtml( 'uid' ), htmlspecialchars( $wgUser->getID() ) ) . + $this->tableRow( wfMsgHtml( 'uid' ), htmlspecialchars( $wgUser->getId() ) ) . $this->tableRow( wfMsgHtml( 'prefs-edits' ), - $wgLang->formatNum( User::edits( $wgUser->getID() ) ) + $wgLang->formatNum( User::edits( $wgUser->getId() ) ) ); if( wfRunHooks( 'PreferencesUserInformationPanel', array( $this, &$userInformationHtml ) ) ) { diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 7afd21f05b..e50fe021b8 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -149,15 +149,15 @@ function wfSpecialRecentchanges( $par, $specialPage ) { $hidem .= $forcebot ? ' AND rc_bot = 1' : ''; if( $hidemyself ) { - if( $wgUser->getID() ) { - $hidem .= ' AND rc_user != ' . $wgUser->getID(); + if( $wgUser->getId() ) { + $hidem .= ' AND rc_user != ' . $wgUser->getId(); } else { $hidem .= ' AND rc_user_text != ' . $dbr->addQuotes( $wgUser->getName() ); } } // JOIN on watchlist for users - $uid = $wgUser->getID(); + $uid = $wgUser->getId(); if( $uid ) { $tables = array( 'recentchanges', 'watchlist' ); $join_conds = array( 'watchlist' => array('LEFT JOIN',"wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace") ); diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index bec9b10487..a6bf0e7a71 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -82,7 +82,7 @@ function wfSpecialRecentchangeslinked( $par = NULL ) { list($recentchanges, $categorylinks, $pagelinks, $watchlist) = $dbr->tableNamesN( 'recentchanges', 'categorylinks', 'pagelinks', "watchlist" ); - $uid = $wgUser->getID(); + $uid = $wgUser->getId(); // The fields we are selecting $fields = "rc_cur_id,rc_namespace,rc_title, rc_user,rc_comment,rc_user_text,rc_timestamp,rc_minor,rc_log_type,rc_log_action,rc_params,rc_deleted, diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 147db6cce4..03ff46e872 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -1655,7 +1655,7 @@ wgUploadAutoFill = {$autofill}; if ( !$row ) return false; - return $user->getID() == $row->img_user; + return $user->getId() == $row->img_user; } /** diff --git a/includes/SpecialUserrights.php b/includes/SpecialUserrights.php index 082ec6925f..1873b48726 100644 --- a/includes/SpecialUserrights.php +++ b/includes/SpecialUserrights.php @@ -141,7 +141,7 @@ class UserrightsPage extends SpecialPage { // Validate input set... $changeable = $this->changeableGroups(); - if ($wgUser->getID() != 0 && $wgUser->getID() == $user->getID()) { + if ($wgUser->getId() != 0 && $wgUser->getId() == $user->getId()) { $addable = array_merge($changeable['add'], $wgGroupsAddToSelf); $removable = array_merge($changeable['remove'], $wgGroupsRemoveFromSelf); } else { diff --git a/includes/SpecialWatchlist.php b/includes/SpecialWatchlist.php index f0bddf8d53..bb5e7ba06f 100644 --- a/includes/SpecialWatchlist.php +++ b/includes/SpecialWatchlist.php @@ -44,7 +44,7 @@ function wfSpecialWatchlist( $par ) { return; } - $uid = $wgUser->getID(); + $uid = $wgUser->getId(); if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) && $wgRequest->getVal( 'reset' ) && $wgRequest->wasPosted() ) { $wgUser->clearAllNotifications( $uid ); $wgOut->redirect( $specialTitle->getFullUrl() ); diff --git a/includes/Title.php b/includes/Title.php index 760eb3a152..b8b5e1e56b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1338,7 +1338,7 @@ class Title { , 'pt_create_perm' => $create_perm , 'pt_timestamp' => Block::encodeExpiry(wfTimestampNow(), $dbw) , 'pt_expiry' => $encodedExpiry - , 'pt_user' => $wgUser->getID(), 'pt_reason' => $reason ), __METHOD__ ); + , 'pt_user' => $wgUser->getId(), 'pt_reason' => $reason ), __METHOD__ ); } else { $dbw->delete( 'protected_titles', array( 'pt_namespace' => $namespace, 'pt_title' => $title ), __METHOD__ ); diff --git a/includes/User.php b/includes/User.php index ea2c2f36b7..3eee728068 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1252,7 +1252,7 @@ class User { /** * Get the user ID. Returns 0 if the user is anonymous or nonexistent. */ - function getID() { + function getId() { if( $this->mId === null and $this->mName !== null and User::isIP( $this->mName ) ) { // Special case, we know the user is anonymous @@ -1267,7 +1267,7 @@ class User { /** * Set the user and reload all fields according to that ID */ - function setID( $v ) { + function setId( $v ) { $this->mId = $v; $this->clearInstanceCache( 'id' ); } @@ -1997,7 +1997,7 @@ class User { $title->getText() == $wgUser->getName()) { $watched = true; - } elseif ( $this->getID() == $wgUser->getID() ) { + } elseif ( $this->getId() == $wgUser->getId() ) { $watched = $title->userIsWatching(); } else { $watched = true; diff --git a/includes/UserMailer.php b/includes/UserMailer.php index fa11454c20..8e576bb21b 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -342,12 +342,12 @@ class EmailNotification { $targetUser = User::newFromName( $title->getText() ); if ( !$targetUser || $targetUser->isAnon() ) { wfDebug( __METHOD__.": user talk page edited, but user does not exist\n" ); - } elseif ( $targetUser->getID() == $editor->getID() ) { + } elseif ( $targetUser->getId() == $editor->getId() ) { wfDebug( __METHOD__.": user edited their own talk page, no notification sent\n" ); } elseif( $targetUser->getOption( 'enotifusertalkpages' ) ) { wfDebug( __METHOD__.": sending talk page update notification\n" ); $this->compose( $targetUser ); - $userTalkId = $targetUser->getID(); + $userTalkId = $targetUser->getId(); } else { wfDebug( __METHOD__.": talk page owner doesn't want notifications\n" ); } diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index 51d1b88b6e..ace50a5fc8 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -19,7 +19,7 @@ class WatchedItem { $wl = new WatchedItem; $wl->mUser = $user; $wl->mTitle = $title; - $wl->id = $user->getID(); + $wl->id = $user->getId(); # Patch (also) for email notification on page changes T.Gries/M.Arndt 11.09.2004 # TG patch: here we do not consider pages and their talk pages equivalent - why should we ? # The change results in talk-pages not automatically included in watchlists, when their parent page is included diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index f442b049fd..4f64b783f4 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -158,7 +158,7 @@ class WatchlistEditor { */ private function countWatchlist( $user ) { $dbr = wfGetDB( DB_MASTER ); - $res = $dbr->select( 'watchlist', 'COUNT(*) AS count', array( 'wl_user' => $user->getID() ), __METHOD__ ); + $res = $dbr->select( 'watchlist', 'COUNT(*) AS count', array( 'wl_user' => $user->getId() ), __METHOD__ ); $row = $dbr->fetchObject( $res ); return ceil( $row->count / 2 ); // Paranoia } @@ -177,7 +177,7 @@ class WatchlistEditor { 'watchlist', '*', array( - 'wl_user' => $user->getID(), + 'wl_user' => $user->getId(), ), __METHOD__ ); @@ -203,7 +203,7 @@ class WatchlistEditor { private function getWatchlistInfo( $user ) { $titles = array(); $dbr = wfGetDB( DB_MASTER ); - $uid = intval( $user->getID() ); + $uid = intval( $user->getId() ); list( $watchlist, $page ) = $dbr->tableNamesN( 'watchlist', 'page' ); $sql = "SELECT wl_namespace, wl_title, page_id, page_len, page_is_redirect FROM {$watchlist} LEFT JOIN {$page} ON ( wl_namespace = page_namespace @@ -254,7 +254,7 @@ class WatchlistEditor { */ private function clearWatchlist( $user ) { $dbw = wfGetDB( DB_MASTER ); - $dbw->delete( 'watchlist', array( 'wl_user' => $user->getID() ), __METHOD__ ); + $dbw->delete( 'watchlist', array( 'wl_user' => $user->getId() ), __METHOD__ ); } /** @@ -274,13 +274,13 @@ class WatchlistEditor { $title = Title::newFromText( $title ); if( $title instanceof Title ) { $rows[] = array( - 'wl_user' => $user->getID(), + 'wl_user' => $user->getId(), 'wl_namespace' => ( $title->getNamespace() & ~1 ), 'wl_title' => $title->getDBkey(), 'wl_notificationtimestamp' => null, ); $rows[] = array( - 'wl_user' => $user->getID(), + 'wl_user' => $user->getId(), 'wl_namespace' => ( $title->getNamespace() | 1 ), 'wl_title' => $title->getDBkey(), 'wl_notificationtimestamp' => null, @@ -308,7 +308,7 @@ class WatchlistEditor { $dbw->delete( 'watchlist', array( - 'wl_user' => $user->getID(), + 'wl_user' => $user->getId(), 'wl_namespace' => ( $title->getNamespace() & ~1 ), 'wl_title' => $title->getDBkey(), ), @@ -317,7 +317,7 @@ class WatchlistEditor { $dbw->delete( 'watchlist', array( - 'wl_user' => $user->getID(), + 'wl_user' => $user->getId(), 'wl_namespace' => ( $title->getNamespace() | 1 ), 'wl_title' => $title->getDBkey(), ), diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 633ba1f2cc..3ad9177aa8 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -57,7 +57,7 @@ class ApiQueryUserInfo extends ApiQueryBase { global $wgUser; $result = $this->getResult(); $vals = array(); - $vals['id'] = $wgUser->getID(); + $vals['id'] = $wgUser->getId(); $vals['name'] = $wgUser->getName(); if($wgUser->isAnon()) diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index bdeef14d50..80bdd5d599 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -122,7 +122,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { 'recentchanges' )); - $userId = $wgUser->getID(); + $userId = $wgUser->getId(); $this->addWhere(array ( 'wl_namespace = rc_namespace', 'wl_title = rc_title', diff --git a/includes/filerepo/ICRepo.php b/includes/filerepo/ICRepo.php index 4c77ecbf3d..c8009ee0b2 100644 --- a/includes/filerepo/ICRepo.php +++ b/includes/filerepo/ICRepo.php @@ -239,7 +239,7 @@ class ICFile extends LocalFile{ 'img_minor_mime' => $minor, 'img_timestamp' => $timestamp, 'img_description' => $comment, - 'img_user' => $wgUser->getID(), + 'img_user' => $wgUser->getId(), 'img_user_text' => $wgUser->getName(), 'img_metadata' => $this->metadata, ), @@ -261,7 +261,7 @@ class ICFile extends LocalFile{ 'img_minor_mime' => $this->minor_mime, 'img_timestamp' => $timestamp, 'img_description' => $comment, - 'img_user' => $wgUser->getID(), + 'img_user' => $wgUser->getId(), 'img_user_text' => $wgUser->getName(), 'img_metadata' => $this->metadata, ), array( /* WHERE */ diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 7d0d548fad..228659c65a 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -770,7 +770,7 @@ class LocalFile extends File $props = $this->repo->getFileProps( $this->getVirtualUrl() ); } $props['description'] = $comment; - $props['user'] = $wgUser->getID(); + $props['user'] = $wgUser->getId(); $props['user_text'] = $wgUser->getName(); $props['timestamp'] = wfTimestamp( TS_MW ); $this->setProps( $props ); @@ -806,7 +806,7 @@ class LocalFile extends File 'img_minor_mime' => $this->minor_mime, 'img_timestamp' => $timestamp, 'img_description' => $comment, - 'img_user' => $wgUser->getID(), + 'img_user' => $wgUser->getId(), 'img_user_text' => $wgUser->getName(), 'img_metadata' => $this->metadata, 'img_sha1' => $this->sha1 @@ -852,7 +852,7 @@ class LocalFile extends File 'img_minor_mime' => $this->minor_mime, 'img_timestamp' => $timestamp, 'img_description' => $comment, - 'img_user' => $wgUser->getID(), + 'img_user' => $wgUser->getId(), 'img_user_text' => $wgUser->getName(), 'img_metadata' => $this->metadata, 'img_sha1' => $this->sha1 @@ -1262,7 +1262,7 @@ class LocalFileDeleteBatch { global $wgUser; $dbw = $this->file->repo->getMasterDB(); $encTimestamp = $dbw->addQuotes( $dbw->timestamp() ); - $encUserId = $dbw->addQuotes( $wgUser->getID() ); + $encUserId = $dbw->addQuotes( $wgUser->getId() ); $encReason = $dbw->addQuotes( $this->reason ); $encGroup = $dbw->addQuotes( 'deleted' ); $ext = $this->file->getExtension(); diff --git a/maintenance/changePassword.php b/maintenance/changePassword.php index 0e657ca006..a2af7b4d6c 100644 --- a/maintenance/changePassword.php +++ b/maintenance/changePassword.php @@ -40,7 +40,7 @@ class ChangePassword { } $this->user = User::newFromName( $user ); - if ( !$this->user->getID() ) { + if ( !$this->user->getId() ) { die ( "No such user: $user\n" ); } @@ -54,10 +54,10 @@ class ChangePassword { $this->dbw->update( 'user', array( - 'user_password' => wfEncryptPassword( $this->user->getID(), $this->password ) + 'user_password' => wfEncryptPassword( $this->user->getId(), $this->password ) ), array( - 'user_id' => $this->user->getID() + 'user_id' => $this->user->getId() ), $fname ); diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php index 793df5d8f8..eb9bd914cc 100644 --- a/maintenance/cleanupSpam.php +++ b/maintenance/cleanupSpam.php @@ -62,7 +62,7 @@ $username = wfMsg( 'spambot_username' ); $fname = $username; $wgUser = User::newFromName( $username ); // Create the user if necessary -if ( !$wgUser->getID() ) { +if ( !$wgUser->getId() ) { $wgUser->addToDatabase(); } diff --git a/maintenance/reassignEdits.inc.php b/maintenance/reassignEdits.inc.php index ce038ca830..e68b4cf512 100644 --- a/maintenance/reassignEdits.inc.php +++ b/maintenance/reassignEdits.inc.php @@ -81,7 +81,7 @@ function reassignEdits( &$from, &$to, $rc = false, $report = false ) { * @return array */ function userConditions( &$user, $idfield, $utfield ) { - return $user->getId() ? array( $idfield => $user->getID() ) : array( $utfield => $user->getName() ); + return $user->getId() ? array( $idfield => $user->getId() ) : array( $utfield => $user->getName() ); } /** -- 2.20.1