Merge "mediawiki.skinning: Remove obsolete #firstHeading selector"
[lhc/web/wiklou.git] / includes / EditPage.php
index b83569d..a14191a 100644 (file)
@@ -217,8 +217,13 @@ class EditPage {
        /** @var bool|stdClass */
        protected $lastDelete;
 
-       /** @var bool */
-       protected $mTokenOk = false;
+       /** @var bool
+        * This is public because SemanticForms uses it (bug 67522).
+        * However, please consider using this property publicly
+        * to be deprecated.
+        * @protected
+        */
+       public $mTokenOk = false;
 
        /** @var bool */
        protected $mTokenOkExceptSuffix = false;
@@ -2425,9 +2430,7 @@ class EditPage {
 
                $wgOut->addHTML( $this->editFormTextBeforeContent );
 
-               if ( $this->contentModel === CONTENT_MODEL_WIKITEXT &&
-                       $showToolbar && $wgUser->getOption( 'showtoolbar' ) )
-               {
+               if ( !$this->isCssJsSubpage && $showToolbar && $wgUser->getOption( 'showtoolbar' ) ) {
                        $wgOut->addHTML( EditPage::getEditToolbar() );
                }
 
@@ -2612,9 +2615,18 @@ class EditPage {
                        );
                } elseif ( $wgUser->isAnon() ) {
                        if ( $this->formtype != 'preview' ) {
-                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-edit-warning\">\n$1</div>", 'anoneditwarning' );
+                               $wgOut->wrapWikiMsg(
+                                       "<div id='mw-anon-edit-warning'>\n$1\n</div>",
+                                       array( 'anoneditwarning',
+                                               // Log-in link
+                                               '{{fullurl:Special:UserLogin|returnto={{FULLPAGENAMEE}}}}',
+                                               // Sign-up link
+                                               '{{fullurl:Special:UserLogin/signup|returnto={{FULLPAGENAMEE}}}}' )
+                               );
                        } else {
-                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-preview-warning\">\n$1</div>", 'anonpreviewwarning' );
+                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-preview-warning\">\n$1</div>",
+                                       'anonpreviewwarning'
+                               );
                        }
                } else {
                        if ( $this->isCssJsSubpage ) {