* @return User object
*/
function getUser() {
- if( !is_null( $this->mUser ) )
+ if ( !is_null( $this->mUser ) ) {
return $this->mUser;
+ }
return $this->mOptions->getUser();
}
if ( $ns == NS_CATEGORY ) {
wfProfileIn( __METHOD__."-category" );
- $s = preg_replace( "/(\s*\n)+\s*$/D", '', $s ); # bug 87
+ $s = rtrim( $s . "\n" ); # bug 87
if ( $wasblank ) {
$sortkey = $this->getDefaultSort();
* @return either a Revision object or null
*/
protected function getRevisionObject() {
- if ( !is_null( $this->mRevisionObject ) )
+ if ( !is_null( $this->mRevisionObject ) ) {
return $this->mRevisionObject;
- if ( is_null( $this->mRevisionId ) )
+ }
+ if ( is_null( $this->mRevisionId ) ) {
return null;
+ }
$this->mRevisionObject = Revision::newFromId( $this->mRevisionId );
return $this->mRevisionObject;