Merge "Revert "Revert "jQuery 1.8"""
[lhc/web/wiklou.git] / includes / EditPage.php
index 528b4a6..0389168 100644 (file)
@@ -2102,8 +2102,11 @@ class EditPage {
                                );
                        }
                }
+               # Add header copyright warning
+               $this->showHeaderCopyrightWarning();
        }
 
+
        /**
         * Standard summary input and label (wgSummary), abstracted so EditPage
         * subclasses may reorganize the form.
@@ -2399,6 +2402,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
@@ -2614,12 +2629,12 @@ HTML
 
                if ( $this->mTriedSave && !$this->mTokenOk ) {
                        if ( $this->mTokenOkExceptSuffix ) {
-                               $note = wfMessage( 'token_suffix_mismatch' )->text();
+                               $note = wfMessage( 'token_suffix_mismatch' )->plain();
                        } else {
-                               $note = wfMessage( 'session_fail_preview' )->text();
+                               $note = wfMessage( 'session_fail_preview' )->plain();
                        }
                } elseif ( $this->incompleteForm ) {
-                       $note = wfMessage( 'edit_form_incomplete' )->text();
+                       $note = wfMessage( 'edit_form_incomplete' )->plain();
                } else {
                        $note = wfMessage( 'previewnote' )->plain() .
                                ' [[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' . wfMessage( 'continue-editing' )->text() . ']]';