$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;
# 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;
$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 ) ) ) {
// 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 {
return;
}
- $uid = $wgUser->getId();
+ $uid = $wgUser->getID();
if( ($wgEnotifWatchlist || $wgShowUpdatedMarker) && $wgRequest->getVal( 'reset' ) && $wgRequest->wasPosted() ) {
$wgUser->clearAllNotifications( $uid );
$wgOut->redirect( $specialTitle->getFullUrl() );
, '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__ );
$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" );
}
$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
*/
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
}
'watchlist',
'*',
array(
- 'wl_user' => $user->getId(),
+ 'wl_user' => $user->getID(),
),
__METHOD__
);
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
*/
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__ );
}
/**
$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,
$dbw->delete(
'watchlist',
array(
- 'wl_user' => $user->getId(),
+ 'wl_user' => $user->getID(),
'wl_namespace' => ( $title->getNamespace() & ~1 ),
'wl_title' => $title->getDBkey(),
),
$dbw->delete(
'watchlist',
array(
- 'wl_user' => $user->getId(),
+ 'wl_user' => $user->getID(),
'wl_namespace' => ( $title->getNamespace() | 1 ),
'wl_title' => $title->getDBkey(),
),
global $wgUser;
$result = $this->getResult();
$vals = array();
- $vals['id'] = $wgUser->getId();
+ $vals['id'] = $wgUser->getID();
$vals['name'] = $wgUser->getName();
if($wgUser->isAnon())
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();