*The function is User::getID() not getId()
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 22 May 2008 14:57:07 +0000 (14:57 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 22 May 2008 14:57:07 +0000 (14:57 +0000)
includes/Revision.php
includes/SpecialImport.php
includes/SpecialPreferences.php
includes/SpecialUserrights.php
includes/SpecialWatchlist.php
includes/Title.php
includes/UserMailer.php
includes/WatchedItem.php
includes/WatchlistEditor.php
includes/api/ApiQueryUserInfo.php
includes/filerepo/LocalFile.php

index 6f43a7d..5b14e48 100644 (file)
@@ -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;
index 862b3e1..5f5c63a 100644 (file)
@@ -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;
index be6d7fb..0d7e02a 100644 (file)
@@ -608,7 +608,7 @@ class PreferencesForm {
                        $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 ) ) ) {
index 1873b48..082ec69 100644 (file)
@@ -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 {
index bb5e7ba..f0bddf8 100644 (file)
@@ -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() );
index b8b5e1e..760eb3a 100644 (file)
@@ -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__ );
index 8e576bb..fa11454 100644 (file)
@@ -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" );
                                }
index ace50a5..51d1b88 100644 (file)
@@ -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
index 4f64b78..f442b04 100644 (file)
@@ -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(),
                                        ),
index 3ad9177..633ba1f 100644 (file)
@@ -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())
index 9e8a3ef..7d0d548 100644 (file)
@@ -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();