Merge "Fix TestingAccessWrapper::__call"
[lhc/web/wiklou.git] / includes / EditPage.php
index 94ed903..6bdb85c 100644 (file)
@@ -2098,6 +2098,9 @@ class EditPage {
                        $displayTitle = $contextTitle->getPrefixedText();
                }
                $wgOut->setPageTitle( wfMessage( $msg, $displayTitle ) );
+               # Transmit the name of the message to JavaScript for live preview
+               # Keep Resources.php/mediawiki.action.edit.preview in sync with the possible keys
+               $wgOut->addJsConfigVars( 'wgEditMessage', $msg );
        }
 
        /**
@@ -3705,7 +3708,7 @@ HTML
                }
 
                $script .= '});';
-               $wgOut->addScript( ResourceLoader::makeInlineScript( $script ) );
+               $wgOut->addScript( Html::inlineScript( ResourceLoader::makeLoaderConditionalScript( $script ) ) );
 
                $toolbar = '<div id="toolbar"></div>';