if ( $this->mLoadedItems === true ) {
return;
}
- wfProfileIn( __METHOD__ );
// Set it now to avoid infinite recursion in accessors
$this->mLoadedItems = true;
Hooks::run( 'UserLoadAfterLoadFromSession', array( $this ) );
break;
default:
- wfProfileOut( __METHOD__ );
throw new MWException( "Unrecognised value for User->mFrom: \"{$this->mFrom}\"" );
}
- wfProfileOut( __METHOD__ );
}
/**
* @param string|bool $name
*/
public function loadDefaults( $name = false ) {
- wfProfileIn( __METHOD__ );
$passwordFactory = self::getPasswordFactory();
Hooks::run( 'UserLoadDefaults', array( $this, $name ) );
- wfProfileOut( __METHOD__ );
}
/**
return;
}
- wfProfileIn( __METHOD__ );
wfDebug( __METHOD__ . ": checking...\n" );
// Initialize data...
// Extensions
Hooks::run( 'GetBlockedStatus', array( &$this ) );
- wfProfileOut( __METHOD__ );
}
/**
* @return bool True if blacklisted.
*/
public function inDnsBlacklist( $ip, $bases ) {
- wfProfileIn( __METHOD__ );
$found = false;
// @todo FIXME: IPv6 ??? (http://bugs.php.net/bug.php?id=33170)
}
}
- wfProfileOut( __METHOD__ );
return $found;
}
if ( !$wgProxyList ) {
return false;
}
- wfProfileIn( __METHOD__ );
if ( !is_array( $wgProxyList ) ) {
// Load from the specified file
} else {
$ret = false;
}
- wfProfileOut( __METHOD__ );
return $ret;
}
}
global $wgMemc;
- wfProfileIn( __METHOD__ );
- wfProfileIn( __METHOD__ . '-' . $action );
$limits = $wgRateLimits[$action];
$keys = array();
}
}
- wfProfileOut( __METHOD__ . '-' . $action );
- wfProfileOut( __METHOD__ );
return $triggered;
}
*/
public function isBlockedFrom( $title, $bFromSlave = false ) {
global $wgBlockAllowsUTEdit;
- wfProfileIn( __METHOD__ );
$blocked = $this->isBlocked( $bFromSlave );
$allowUsertalk = ( $wgBlockAllowsUTEdit ? $this->mAllowUsertalk : false );
Hooks::run( 'UserIsBlockedFrom', array( $this, $title, &$blocked, &$allowUsertalk ) );
- wfProfileOut( __METHOD__ );
return $blocked;
}
*/
public function getEffectiveGroups( $recache = false ) {
if ( $recache || is_null( $this->mEffectiveGroups ) ) {
- wfProfileIn( __METHOD__ );
$this->mEffectiveGroups = array_unique( array_merge(
$this->getGroups(), // explicit groups
$this->getAutomaticGroups( $recache ) // implicit groups
Hooks::run( 'UserEffectiveGroups', array( &$this, &$this->mEffectiveGroups ) );
// Force reindexation of groups when a hook has unset one of them
$this->mEffectiveGroups = array_values( array_unique( $this->mEffectiveGroups ) );
- wfProfileOut( __METHOD__ );
}
return $this->mEffectiveGroups;
}
*/
public function getAutomaticGroups( $recache = false ) {
if ( $recache || is_null( $this->mImplicitGroups ) ) {
- wfProfileIn( __METHOD__ );
$this->mImplicitGroups = array( '*' );
if ( $this->getId() ) {
$this->mImplicitGroups[] = 'user';
// as getEffectiveGroups() depends on this function
$this->mEffectiveGroups = null;
}
- wfProfileOut( __METHOD__ );
}
return $this->mImplicitGroups;
}
if ( $this->mEditCount === null ) {
/* Populate the count, if it has not been populated yet */
- wfProfileIn( __METHOD__ );
$dbr = wfGetDB( DB_SLAVE );
// check if the user_editcount field has been initialized
$count = $dbr->selectField(
$count = $this->initEditCount();
}
$this->mEditCount = $count;
- wfProfileOut( __METHOD__ );
}
return (int)$this->mEditCount;
}
public function checkPassword( $password ) {
global $wgAuth, $wgLegacyEncoding;
- $section = new ProfileSection( __METHOD__ );
-
$this->loadPasswords();
// Certain authentication plugins do NOT want to save
if ( $title ) {
return Linker::link( $title, htmlspecialchars( $text ) );
} else {
- return $text;
+ return htmlspecialchars( $text );
}
}