r78202 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78201‎ | r78202 | r78203 >
Date:18:23, 10 December 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixes for r78201:
* Per Reedy, add braces where needed
* Revert one change that should not have been there
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -649,8 +649,9 @@
650650 * @return User object
651651 */
652652 function getUser() {
653 - if( !is_null( $this->mUser ) )
 653+ if ( !is_null( $this->mUser ) ) {
654654 return $this->mUser;
 655+ }
655656 return $this->mOptions->getUser();
656657 }
657658
@@ -1875,7 +1876,7 @@
18761877
18771878 if ( $ns == NS_CATEGORY ) {
18781879 wfProfileIn( __METHOD__."-category" );
1879 - $s = preg_replace( "/(\s*\n)+\s*$/D", '', $s ); # bug 87
 1880+ $s = rtrim( $s . "\n" ); # bug 87
18801881
18811882 if ( $wasblank ) {
18821883 $sortkey = $this->getDefaultSort();
@@ -4983,10 +4984,12 @@
49844985 * @return either a Revision object or null
49854986 */
49864987 protected function getRevisionObject() {
4987 - if ( !is_null( $this->mRevisionObject ) )
 4988+ if ( !is_null( $this->mRevisionObject ) ) {
49884989 return $this->mRevisionObject;
4989 - if ( is_null( $this->mRevisionId ) )
 4990+ }
 4991+ if ( is_null( $this->mRevisionId ) ) {
49904992 return null;
 4993+ }
49914994
49924995 $this->mRevisionObject = Revision::newFromId( $this->mRevisionId );
49934996 return $this->mRevisionObject;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78201* (bug 19006) {{REVISIONUSER}} no longer acts like {{CURRENTUSER}} in some cases...ialex18:17, 10 December 2010

Status & tagging log