Index: trunk/phase3/includes/Article.php |
— | — | @@ -4543,7 +4543,7 @@ |
4544 | 4544 | * @since 1.16 (r52326) for LiquidThreads |
4545 | 4545 | * |
4546 | 4546 | * @param $oldid mixed integer Revision ID or null |
4547 | | - * @return ParserOutput |
| 4547 | + * @return ParserOutput or false if the given revsion ID is not found |
4548 | 4548 | */ |
4549 | 4549 | public function getParserOutput( $oldid = null ) { |
4550 | 4550 | global $wgEnableParserCache, $wgUser; |
— | — | @@ -4567,17 +4567,16 @@ |
4568 | 4568 | } |
4569 | 4569 | } |
4570 | 4570 | |
4571 | | - $text = false; |
4572 | 4571 | // Cache miss; parse and output it. |
4573 | | - if ( $oldid !== null ) { |
| 4572 | + if ( $oldid === null ) { |
| 4573 | + $text = $this->getRawText(); |
| 4574 | + } else { |
4574 | 4575 | $rev = Revision::newFromTitle( $this->getTitle(), $oldid ); |
4575 | | - if ( $rev !== null ) { |
4576 | | - $text = $rev->getText(); |
| 4576 | + if ( $rev === null ) { |
| 4577 | + return false; |
4577 | 4578 | } |
| 4579 | + $text = $rev->getText(); |
4578 | 4580 | } |
4579 | | - if ( $text === false ) { |
4580 | | - $text = $this->getRawText(); |
4581 | | - } |
4582 | 4581 | |
4583 | 4582 | return $this->getOutputFromWikitext( $text, $useParserCache ); |
4584 | 4583 | } |