merged master some more
[lhc/web/wiklou.git] / includes / EditPage.php
index 94fda9e..98b4d4d 100644 (file)
@@ -1384,7 +1384,8 @@ class EditPage {
 
                                        // Create a link to the new section from the edit summary.
                                        $cleanSummary = $wgParser->stripSectionName( $this->summary );
-                                       $this->summary = wfMessage( 'newsectionsummary', $cleanSummary )->inContentLanguage()->text() ;
+                                       $this->summary = wfMessage( 'newsectionsummary', $cleanSummary )
+                                               ->inContentLanguage()->text();
                                }
                        }
 
@@ -2273,8 +2274,11 @@ class EditPage {
                                );
                        }
                }
+               # Add header copyright warning
+               $this->showHeaderCopyrightWarning();
        }
 
+
        /**
         * Standard summary input and label (wgSummary), abstracted so EditPage
         * subclasses may reorganize the form.
@@ -2585,6 +2589,18 @@ HTML
                $wgOut->addHTML( '<div id="wikiDiff">' . $difftext . '</div>' );
        }
 
+       /**
+        * Show the header copyright warning.
+        */
+       protected function showHeaderCopyrightWarning() {
+               $msg = 'editpage-head-copy-warn';
+               if ( !wfMessage( $msg )->isDisabled() ) {
+                       global $wgOut;
+                       $wgOut->wrapWikiMsg( "<div class='editpage-head-copywarn'>\n$1\n</div>",
+                               'editpage-head-copy-warn' );
+               }
+       }
+
        /**
         * Give a chance for site and per-namespace customizations of
         * terms of service summary link that might exist separately