Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -2595,32 +2595,33 @@ |
2596 | 2596 | $previewHTML = $parserOutput->mText; |
2597 | 2597 | $previewHTML .= "<pre class=\"$class\" dir=\"ltr\">\n" . htmlspecialchars( $this->textbox1 ) . "\n</pre>\n"; |
2598 | 2598 | } else { |
2599 | | - $rt = Title::newFromRedirectArray( $this->textbox1 ); |
2600 | | - if ( $rt ) { |
2601 | | - $previewHTML = $this->mArticle->viewRedirect( $rt, false ); |
2602 | | - } else { |
2603 | | - $toparse = $this->textbox1; |
| 2599 | + $toparse = $this->textbox1; |
2604 | 2600 | |
2605 | | - # If we're adding a comment, we need to show the |
2606 | | - # summary as the headline |
2607 | | - if ( $this->section == "new" && $this->summary != "" ) { |
2608 | | - $toparse = wfMsgForContent( 'newsectionheaderdefaultlevel', $this->summary ) . "\n\n" . $toparse; |
2609 | | - } |
| 2601 | + # If we're adding a comment, we need to show the |
| 2602 | + # summary as the headline |
| 2603 | + if ( $this->section == "new" && $this->summary != "" ) { |
| 2604 | + $toparse = wfMsgForContent( 'newsectionheaderdefaultlevel', $this->summary ) . "\n\n" . $toparse; |
| 2605 | + } |
2610 | 2606 | |
2611 | | - wfRunHooks( 'EditPageGetPreviewText', array( $this, &$toparse ) ); |
| 2607 | + wfRunHooks( 'EditPageGetPreviewText', array( $this, &$toparse ) ); |
2612 | 2608 | |
2613 | | - $parserOptions->enableLimitReport(); |
| 2609 | + $parserOptions->enableLimitReport(); |
2614 | 2610 | |
2615 | | - $toparse = $wgParser->preSaveTransform( $toparse, $this->mTitle, $wgUser, $parserOptions ); |
2616 | | - $parserOutput = $wgParser->parse( $toparse, $this->mTitle, $parserOptions ); |
| 2611 | + $toparse = $wgParser->preSaveTransform( $toparse, $this->mTitle, $wgUser, $parserOptions ); |
| 2612 | + $parserOutput = $wgParser->parse( $toparse, $this->mTitle, $parserOptions ); |
2617 | 2613 | |
| 2614 | + $rt = Title::newFromRedirectArray( $this->textbox1 ); |
| 2615 | + if ( $rt ) { |
| 2616 | + $previewHTML = $this->mArticle->viewRedirect( $rt, false ); |
| 2617 | + } else { |
2618 | 2618 | $previewHTML = $parserOutput->getText(); |
2619 | | - $this->mParserOutput = $parserOutput; |
2620 | | - $wgOut->addParserOutputNoText( $parserOutput ); |
| 2619 | + } |
2621 | 2620 | |
2622 | | - if ( count( $parserOutput->getWarnings() ) ) { |
2623 | | - $note .= "\n\n" . implode( "\n\n", $parserOutput->getWarnings() ); |
2624 | | - } |
| 2621 | + $this->mParserOutput = $parserOutput; |
| 2622 | + $wgOut->addParserOutputNoText( $parserOutput ); |
| 2623 | + |
| 2624 | + if ( count( $parserOutput->getWarnings() ) ) { |
| 2625 | + $note .= "\n\n" . implode( "\n\n", $parserOutput->getWarnings() ); |
2625 | 2626 | } |
2626 | 2627 | } |
2627 | 2628 | |