}
if ( $this->requiresUnblock() && $user->isBlocked() ) {
- $block = $user->mBlock;
+ $block = $user->getBlock();
throw new UserBlockedError( $block );
}
}
$timestamp = wfTimestamp( TS_MW, $timestamp );
- $lastmod = wfTimestamp( TS_RFC2822, max( $timestamp, $wgUser->mTouched, $wgCacheEpoch ) );
+ $lastmod = wfTimestamp( TS_RFC2822, max( $timestamp, $wgUser->getTouched(), $wgCacheEpoch ) );
if ( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) {
# IE sends sizes after the date like this:
$this->disable();
$this->mLastModified = $lastmod;
- wfDebug( "$fname: CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp ; site $wgCacheEpoch\n", false );
+ wfDebug( "$fname: CACHED client: $ismodsince ; user: $wgUser->getTouched() ; page: $timestamp ; site $wgCacheEpoch\n", false );
return true;
} else {
- wfDebug( "$fname: READY client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp ; site $wgCacheEpoch\n", false );
+ wfDebug( "$fname: READY client: $ismodsince ; user: $wgUser->getTouched() ; page: $timestamp ; site $wgCacheEpoch\n", false );
$this->mLastModified = $lastmod;
}
} else {
return false;
case self::AS_BLOCKED_PAGE_FOR_USER:
- throw new UserBlockedError( $wgUser->mBlock );
+ throw new UserBlockedError( $wgUser->getBlock() );
case self::AS_IMAGE_REDIRECT_ANON:
case self::AS_IMAGE_REDIRECT_LOGGED:
wfDeprecated( __METHOD__, '1.19' );
global $wgUser;
- throw new UserBlockedError( $wgUser->mBlock );
+ throw new UserBlockedError( $wgUser->getBlock() );
}
/**
$out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n";
}
}
-
+
if ( $row->rev_sha1 ) {
- $out .= " " . Xml::element('sha1', null, strval($row->rev_sha1) ) . "\n";
+ $out .= " " . Xml::element('sha1', null, strval( $row->rev_sha1 ) ) . "\n";
} else {
$out .= " <sha1/>\n";
}
-
+
if ( $row->page_restrictions != '' ) {
$out .= ' ' . Xml::element( 'restrictions', array(),
strval( $row->page_restrictions ) ) . "\n";
// Already set, no problem
continue;
} elseif ( !is_null( $prefFromUser ) && // Make sure we're not just pulling nothing
- $field->validate( $prefFromUser, $user->mOptions ) === true ) {
+ $field->validate( $prefFromUser, $user->getOptions() ) === true ) {
$info['default'] = $prefFromUser;
- } elseif ( $field->validate( $globalDefault, $user->mOptions ) === true ) {
+ } elseif ( $field->validate( $globalDefault, $user->getOptions() ) === true ) {
$info['default'] = $globalDefault;
} else {
throw new MWException( "Global default '$globalDefault' is invalid for field $name" );
$this->checkPermissions();
if ( $this->requiresUnblock() && $user->isBlocked() ) {
- $block = $user->mBlock;
+ $block = $user->getBlock();
throw new UserBlockedError( $block );
}
// Don't block the user from editing their own talk page unless they've been
// explicitly blocked from that too.
} elseif( $user->isBlocked() && $user->mBlock->prevents( $action ) !== false ) {
- $block = $user->mBlock;
+ $block = $user->getBlock();
// This is from OutputPage::blockedPage
// Copied at r23888 by werdna
$link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]";
$blockid = $block->getId();
- $blockExpiry = $user->mBlock->mExpiry;
- $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $user->mBlock->mTimestamp ), true );
+ $blockExpiry = $block->getExpiry();
+ $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $block->mTimestamp ), true );
if ( $blockExpiry == 'infinity' ) {
$blockExpiry = wfMessage( 'infiniteblock' )->text();
} else {
$blockExpiry = $wgLang->timeanddate( wfTimestamp( TS_MW, $blockExpiry ), true );
}
- $intended = strval( $user->mBlock->getTarget() );
+ $intended = strval( $block->getTarget() );
$errors[] = array( ( $block->mAuto ? 'autoblockedtext' : 'blockedtext' ), $link, $reason, $ip, $name,
$blockid, $blockExpiry, $intended, $blockTimestamp );
# Check blocks
if( $user->isBlocked() ) {
- throw new UserBlockedError( $user->mBlock );
+ throw new UserBlockedError( $user->getBlock() );
}
# Check whether we actually want to allow changing stuff
* allow them to use Special:UserRights.
*/
if( $user->isBlocked() && !$user->isAllowed( 'userrights' ) ) {
- throw new UserBlockedError( $user->mBlock );
+ throw new UserBlockedError( $user->getBlock() );
}
$request = $this->getRequest();
return rtrim( $input );
}
+ /**
+ * @return bool
+ */
public function isQuiet() {
return $this->mQuiet;
}