Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -649,8 +649,9 @@ |
650 | 650 | * @return User object |
651 | 651 | */ |
652 | 652 | function getUser() { |
653 | | - if( !is_null( $this->mUser ) ) |
| 653 | + if ( !is_null( $this->mUser ) ) { |
654 | 654 | return $this->mUser; |
| 655 | + } |
655 | 656 | return $this->mOptions->getUser(); |
656 | 657 | } |
657 | 658 | |
— | — | @@ -1875,7 +1876,7 @@ |
1876 | 1877 | |
1877 | 1878 | if ( $ns == NS_CATEGORY ) { |
1878 | 1879 | wfProfileIn( __METHOD__."-category" ); |
1879 | | - $s = preg_replace( "/(\s*\n)+\s*$/D", '', $s ); # bug 87 |
| 1880 | + $s = rtrim( $s . "\n" ); # bug 87 |
1880 | 1881 | |
1881 | 1882 | if ( $wasblank ) { |
1882 | 1883 | $sortkey = $this->getDefaultSort(); |
— | — | @@ -4983,10 +4984,12 @@ |
4984 | 4985 | * @return either a Revision object or null |
4985 | 4986 | */ |
4986 | 4987 | protected function getRevisionObject() { |
4987 | | - if ( !is_null( $this->mRevisionObject ) ) |
| 4988 | + if ( !is_null( $this->mRevisionObject ) ) { |
4988 | 4989 | return $this->mRevisionObject; |
4989 | | - if ( is_null( $this->mRevisionId ) ) |
| 4990 | + } |
| 4991 | + if ( is_null( $this->mRevisionId ) ) { |
4990 | 4992 | return null; |
| 4993 | + } |
4991 | 4994 | |
4992 | 4995 | $this->mRevisionObject = Revision::newFromId( $this->mRevisionId ); |
4993 | 4996 | return $this->mRevisionObject; |