if ( $that === null ) {
$that = new self();
}
+
return $that;
}
- protected function __construct() {}
+ protected function __construct() {
+ }
/**
* Returns the default gender option in this wiki.
if ( $this->default === null ) {
$this->default = User::getDefaultOption( 'gender' );
}
+
return $this->default;
}
$this->misses++;
wfDebug( __METHOD__ . ": too many misses, returning default onwards\n" );
}
- return $this->getDefault();
+ return $this->getDefault();
} else {
$this->misses++;
$this->doQuery( $username, $caller );
$default = $this->getDefault();
$usersToCheck = array();
- foreach ( (array) $users as $value ) {
+ foreach ( (array)$users as $value ) {
$name = self::normalizeUsername( $value );
// Skip users whose gender setting we already know
if ( !isset( $this->cache[$name] ) ) {
if ( $indexSlash !== false ) {
$username = substr( $username, 0, $indexSlash );
}
+
// normalize underscore/spaces
return strtr( $username, '_', ' ' );
}