diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 48fc8fef90..055a9fbbcc 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -56,14 +56,12 @@ class VisualEditorHooks { /** * Adds extra variables to the page config. - * - * This is attached to the MediaWiki 'MakeGlobalVariablesScript' hook. */ - public static function onMakeGlobalVariablesScript( &$vars ) { - global $wgUser, $wgTitle; + public static function onMakeGlobalVariablesScript( array &$vars, OutputPage $out ) { $vars['wgVisualEditor'] = array( - 'isPageWatched' => $wgUser->isWatched( $wgTitle ) + 'isPageWatched' => $out->getUser()->isWatched( $out->getTitle() ) ); + return true; } diff --git a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css index 7ba22f8cd3..6644d9b970 100644 --- a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css +++ b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css @@ -262,6 +262,7 @@ margin-bottom: 1em; border: solid 1px #cccccc; border-radius: 0 0 0.25em 0.25em; + min-height: 2.25em; } .ve-init-mw-viewPageTarget-saveDialog-body label { diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index 2aeeff95af..7923dc2f9d 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -756,6 +756,8 @@ ve.init.mw.ViewPageTarget.prototype.getSaveDialogHtml = function ( callback ) { var viewPage = this, $wrap = $( '