Special:Lockdb return error when database is locked.
[lhc/web/wiklou.git] / includes / EditPage.php
index 3522531..02093ff 100644 (file)
@@ -2838,7 +2838,7 @@ class EditPage {
                                                '{{fullurl:Special:UserLogin/signup|returnto={{FULLPAGENAMEE}}}}' ]
                                );
                        } else {
-                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-preview-warning\">\n$1</div>",
+                               $wgOut->wrapWikiMsg( "<div id=\"mw-anon-preview-warning\" class=\"warningbox\">\n$1</div>",
                                        'anonpreviewwarning'
                                );
                        }
@@ -3596,7 +3596,7 @@ HTML
         */
        function getPreviewText() {
                global $wgOut, $wgUser, $wgRawHtml, $wgLang;
-               global $wgAllowUserCss, $wgAllowUserJs;
+               global $wgAllowUserCss, $wgAllowUserJs, $wgAjaxEditStash;
 
                $stats = $wgOut->getContext()->getStats();
 
@@ -3708,10 +3708,12 @@ HTML
 
                        # Try to stash the edit for the final submission step
                        # @todo: different date format preferences cause cache misses
-                       ApiStashEdit::stashEditFromPreview(
-                               $this->getArticle(), $content, $pstContent,
-                               $parserOutput, $parserOptions, $parserOptions, wfTimestampNow()
-                       );
+                       if ( $wgAjaxEditStash ) {
+                               ApiStashEdit::stashEditFromPreview(
+                                       $this->getArticle(), $content, $pstContent,
+                                       $parserOutput, $parserOptions, $parserOptions, wfTimestampNow()
+                               );
+                       }
 
                        $parserOutput->setEditSectionTokens( false ); // no section edit links
                        $previewHTML = $parserOutput->getText();
@@ -3777,7 +3779,7 @@ HTML
         * Shows a bulletin board style toolbar for common editing functions.
         * It can be disabled in the user preferences.
         *
-        * @param $title Title object for the page being edited (optional)
+        * @param Title $title Title object for the page being edited (optional)
         * @return string
         */
        static function getEditToolbar( $title = null ) {