don't try to prefill edit summary when section=new (relevant only for preload=)
authorErik Moeller <erik@users.mediawiki.org>
Thu, 14 Jul 2005 01:36:49 +0000 (01:36 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Thu, 14 Jul 2005 01:36:49 +0000 (01:36 +0000)
includes/EditPage.php

index 5c047e9..f73d5e2 100644 (file)
@@ -511,14 +511,14 @@ class EditPage {
                                        $s = wfMsg('editingcomment', $this->mTitle->getPrefixedText() );
                                } else {
                                        $s = wfMsg('editingsection', $this->mTitle->getPrefixedText() );
-                               }
-                               if( !$this->preview && !$this->diff ) {
-                                       preg_match( "/^(=+)(.+)\\1/mi",
-                                               $this->textbox1,
-                                               $matches );
-                                       if( !empty( $matches[2] ) ) {
-                                               $this->summary = "/* ". trim($matches[2])." */ ";
-                                       }
+                                       if( !$this->preview && !$this->diff ) {
+                                               preg_match( "/^(=+)(.+)\\1/mi",
+                                                       $this->textbox1,
+                                                       $matches );
+                                               if( !empty( $matches[2] ) ) {
+                                                       $this->summary = "/* ". trim($matches[2])." */ ";
+                                               }
+                                       }                                       
                                }
                        } else {
                                $s = wfMsg( 'editing', $this->mTitle->getPrefixedText() );