From: jenkins-bot Date: Mon, 25 Jun 2018 09:01:35 +0000 (+0000) Subject: Merge "mediawiki.hook: Move mw.hook tests to new mediawiki.base.test.js file" X-Git-Tag: 1.34.0-rc.0~4979 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=3f8cafd487eb6c0a791276e5b45b6eca518301ae;hp=75cc8d3e0003318cf8a8fb33cb98523f63abcfb9 Merge "mediawiki.hook: Move mw.hook tests to new mediawiki.base.test.js file" --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 731f874d16..c4a8fefd40 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -78,6 +78,9 @@ production. templated parameters. * It is now an error to submit too many values for a multi-valued parameter. This has generated a warning since MediaWiki 1.14. +* Assertion failures from the 'assert' and 'assertuser' parameters will no + longer use the action module's custom response format, for the few modules + that use custom formatters that handle errors. === Action API internal changes in 1.32 === * Added 'ApiParseMakeOutputPage' hook. @@ -129,6 +132,7 @@ because of Phabricator reports. removed. Use JobQueueGroup::singleton()->push() instead. * The jquery.footHovzer module, for mediawiki.debug, was removed. * The es5-shim module, empty and deprecated since 1.29, was removed. +* the dom-level2-shim module, empty and deprecated since 1.29, was removed. * The mediawiki.widgets.visibleByteLimit module alias, deprecated in 1.32, was removed. Use mediawiki.widgets.visibleLengthLimit instead. * The jquery.farbtastic module, unused since 1.18, was removed. diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 4202249578..79ab8b4463 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -581,7 +581,7 @@ class CategoryViewer extends ContextSource { foreach ( $colContents as $char => $articles ) { # Change space to non-breaking space to keep headers aligned - $h3char = $char === ' ' ? ' ' : htmlspecialchars( $char ); + $h3char = $char === ' ' ? "\u{00A0}" : htmlspecialchars( $char ); $ret .= '

' . $h3char; $ret .= "

\n"; diff --git a/includes/EditPage.php b/includes/EditPage.php index 3c97fe66c6..9a8a4a6a09 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1202,6 +1202,7 @@ class EditPage { if ( $undo > 0 && $undoafter > 0 ) { $undorev = Revision::newFromId( $undo ); $oldrev = Revision::newFromId( $undoafter ); + $undoMsg = null; # Sanity check, make sure it's the right page, # the revisions exist and they were not deleted. @@ -1210,12 +1211,19 @@ class EditPage { !$undorev->isDeleted( Revision::DELETED_TEXT ) && !$oldrev->isDeleted( Revision::DELETED_TEXT ) ) { - $content = $this->page->getUndoContent( $undorev, $oldrev ); - - if ( $content === false ) { - # Warn the user that something went wrong - $undoMsg = 'failure'; + if ( WikiPage::hasDifferencesOutsideMainSlot( $undorev, $oldrev ) ) { + // Cannot yet undo edits that involve anything other the main slot. + $undoMsg = 'main-slot-only'; } else { + $content = $this->page->getUndoContent( $undorev, $oldrev ); + + if ( $content === false ) { + # Warn the user that something went wrong + $undoMsg = 'failure'; + } + } + + if ( $undoMsg === null ) { $oldContent = $this->page->getContent( Revision::RAW ); $popts = ParserOptions::newFromUserAndLang( $user, $wgContLang ); $newContent = $content->preSaveTransform( $this->mTitle, $user, $popts ); @@ -1272,7 +1280,8 @@ class EditPage { } $out = $this->context->getOutput(); - // Messages: undo-success, undo-failure, undo-norev, undo-nochange + // Messages: undo-success, undo-failure, undo-main-slot-only, undo-norev, + // undo-nochange. $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}"; $this->editFormPageTop .= $out->parse( "
" . $this->context->msg( 'undo-' . $undoMsg )->plain() . '
', true, /* interface */true ); diff --git a/includes/GitInfo.php b/includes/GitInfo.php index 6270b27fdd..363d7b8050 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -227,6 +227,7 @@ class GitInfo { $date = false; if ( is_file( $wgGitBin ) && is_executable( $wgGitBin ) && + !Shell::isDisabled() && $this->getHead() !== false ) { $cmd = [ diff --git a/includes/Html.php b/includes/Html.php index 2ca52291b5..0016426f54 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -927,7 +927,7 @@ class Html { 'label', [ 'for' => $selectAttribs['id'] ?? null, ], $params['label'] - ) . ' '; + ) . "\u{00A0}"; } // Wrap options in a ' . "\n" . '' . "\n" . '' . "\n" . @@ -359,7 +359,7 @@ class HtmlTest extends MediaWikiTestCase { ); $this->assertEquals( - ' ' . + '' . "\u{00A0}" . '