* (bug 2548) Keep summary on 'show changes' of section edit
[lhc/web/wiklou.git] / includes / EditPage.php
index 43d9dc5..1b53ba1 100644 (file)
@@ -479,7 +479,7 @@ class EditPage {
                                } else {
                                        $s = wfMsg('editingsection', $this->mTitle->getPrefixedText() );
                                }
-                               if(!$this->preview) {
+                               if( !$this->preview && !$this->diff ) {
                                        preg_match( "/^(=+)(.+)\\1/mi",
                                                $this->textbox1,
                                                $matches );
@@ -495,7 +495,9 @@ class EditPage {
                                $this->mArticle->setOldSubtitle();
                                $wgOut->addWikiText( wfMsg( 'nonunicodebrowser') );
                        }
-                       if ( $this->oldid ) {
+                       if ( isset( $this->mArticle )
+                            && isset( $this->mArticle->mRevision )
+                            && !$this->mArticle->mRevision->isCurrent() ) {
                                $this->mArticle->setOldSubtitle();
                                $wgOut->addWikiText( wfMsg( 'editingold' ) );
                        }