[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Create users and pages for Selenium tests using action API
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/352567 ) Change subject: Create users and pages for Selenium tests using action API .. Create users and pages for Selenium tests using action API This will make tests slightly more robust. Bug: T164721 Bug: T167502 Change-Id: I9b2fea77b28af4f7f521490a0105e7d04730bc87 --- M package.json M tests/selenium/.eslintrc.json M tests/selenium/README.md M tests/selenium/pageobjects/createaccount.page.js M tests/selenium/pageobjects/edit.page.js D tests/selenium/pageobjects/userlogout.page.js M tests/selenium/specs/page.js M tests/selenium/specs/user.js 8 files changed, 105 insertions(+), 29 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 66c13cd..fe3c910 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "karma-firefox-launcher": "1.0.1", "karma-mocha-reporter": "2.2.3", "karma-qunit": "1.0.0", +"nodemw": "0.10.1", "qunitjs": "1.23.1", "stylelint-config-wikimedia": "0.4.1", "wdio-junit-reporter": "0.2.0", diff --git a/tests/selenium/.eslintrc.json b/tests/selenium/.eslintrc.json index d64ada9..db736b7 100644 --- a/tests/selenium/.eslintrc.json +++ b/tests/selenium/.eslintrc.json @@ -10,5 +10,8 @@ }, "globals": { "browser": false + }, + "rules":{ + "no-console":0 } } diff --git a/tests/selenium/README.md b/tests/selenium/README.md index 479b958..a14cccb 100644 --- a/tests/selenium/README.md +++ b/tests/selenium/README.md @@ -27,8 +27,8 @@ Then in another terminal: -cd mediawiki/tests/selenium -../../node_modules/.bin/wdio --spec page.js +cd tests/selenium +../../node_modules/.bin/wdio --spec specs/page.js The runner reads the config file `wdio.conf.js` and runs the spec listed in `page.js`. diff --git a/tests/selenium/pageobjects/createaccount.page.js b/tests/selenium/pageobjects/createaccount.page.js index a0b9490..f54e31c 100644 --- a/tests/selenium/pageobjects/createaccount.page.js +++ b/tests/selenium/pageobjects/createaccount.page.js @@ -21,5 +21,57 @@ this.create.click(); } + apiCreateAccount( username, password ) { + const url = require( 'url' ), // https://nodejs.org/docs/latest/api/url.html + baseUrl = url.parse( browser.options.baseUrl ), // http://webdriver.io/guide/testrunner/browserobject.html + Bot = require( 'nodemw' ), // https://github.com/macbre/nodemw + client = new Bot( { + protocol: baseUrl.protocol, + server: baseUrl.hostname, + port: baseUrl.port, + path: baseUrl.path, + debug: false + } ); + + return new Promise( ( resolve, reject ) => { + client.api.call( + { + action: 'query', + meta: 'tokens', + type: 'createaccount' + }, + /** +* @param {Error|null} err +* @param {Object} info Processed query result +* @param {Object} next More results? +* @param {Object} data Raw data +*/ + function ( err, info, next, data ) { + if ( err ) { + reject( err ); + return; + } + client.api.call( { + action: 'createaccount', + createreturnurl: browser.options.baseUrl, + createtoken: data.query.tokens.createaccounttoken, + username: username, + password: password, + retype: password + }, function ( err ) { + if ( err ) { + reject( err ); + return; + } + resolve(); + }, 'POST' ); + }, +
[MediaWiki-commits] [Gerrit] mediawiki...PictureGame[master]: eorganize directory structure + file renaming
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363760 ) Change subject: eorganize directory structure + file renaming .. eorganize directory structure + file renaming Also split MiniAjaxUpload.php into: - includes/specials/SpecialPictureGameAjaxUpload.php - includes/upload/PictureGameUploadForm.class.php - includes/upload/PictureGameUpload.class.php Bug: T160849 Change-Id: I2ded75216eced88a136c8c8216156f3c61a74a3a --- D AjaxUploadForm.php M extension.json R includes/PictureGame.alias.php R includes/PictureGame.hooks.php A includes/specials/SpecialPictureGameAjaxUpload.php R includes/specials/SpecialPictureGameHome.php A includes/upload/PictureGameAjaxUploadForm.class.php A includes/upload/PictureGameUpload.class.php R resources/css/adminpanel.css R resources/css/editpanel.css R resources/css/gallery.css R resources/css/maingame.css R resources/css/startgame.css R resources/js/PictureGame.js 14 files changed, 627 insertions(+), 626 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PictureGame refs/changes/60/363760/1 diff --git a/AjaxUploadForm.php b/AjaxUploadForm.php deleted file mode 100644 index ba43f58..000 --- a/AjaxUploadForm.php +++ /dev/null @@ -1,608 +0,0 @@ - - * @date 22 July 2013 - * @note Based on 1.16 core SpecialUpload.php (GPL-licensed) by Bryan et al. - * @see http://bugzilla.shoutwiki.com/show_bug.cgi?id=22 - */ -class SpecialPictureGameAjaxUpload extends SpecialUpload { - /** -* Constructor: initialise object -* Get data POSTed through the form and assign them to the object -* -* @param $request WebRequest: Data posted. -*/ - public function __construct() { - SpecialPage::__construct( 'PictureGameAjaxUpload', 'upload', false ); - } - - /** -* apparently you don't need to (re)declare the protected/public class -* member variables here, so I removed them. -*/ - - /** -* Initialize instance variables from request and create an Upload handler -* -* What was changed here: $this->mIgnoreWarning is now unconditionally true -* and mUpload uses PictureGameUpload instead of UploadBase -*/ - protected function loadRequest() { - $this->mRequest = $request = $this->getRequest(); - $this->mSourceType= $request->getVal( 'wpSourceType', 'file' ); - $this->mUpload= PictureGameUpload::createFromRequest( $request ); - $this->mUploadClicked = $request->wasPosted() - && ( $request->getCheck( 'wpUpload' ) - || $request->getCheck( 'wpUploadIgnoreWarning' ) ); - - // Guess the desired name from the filename if not provided - $this->mDesiredDestName = $request->getText( 'wpDestFile' ); - if( !$this->mDesiredDestName && $request->getFileName( 'wpUploadFile' ) !== null ) { - $this->mDesiredDestName = $request->getFileName( 'wpUploadFile' ); - } - $this->mComment = $request->getText( 'wpUploadDescription' ); - $this->mLicense = $request->getText( 'wpLicense' ); - - $this->mDestWarningAck= $request->getText( 'wpDestFileWarningAck' ); - $this->mIgnoreWarning = true;//$request->getCheck( 'wpIgnoreWarning' ) || $request->getCheck( 'wpUploadIgnoreWarning' ); - $this->mWatchthis = $request->getBool( 'wpWatchthis' ) && $this->getUser()->isLoggedIn(); - $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' ); - $this->mCopyrightSource = $request->getText( 'wpUploadSource' ); - - $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file - $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' ) -|| $request->getCheck( 'wpReUpload' ); // b/w compat - - // If it was posted check for the token (no remote POST'ing with user credentials) - $token = $request->getVal( 'wpEditToken' ); - if( $this->mSourceType == 'file' && $token == null ) { - // Skip token check for file uploads as that can't be faked via JS... - // Some client-side tools don't expect to need to send wpEditToken - // with their submissions, as that's new in 1.16. - $this->mTokenOk = true; - } else { - $this->mTokenOk = $this->getUser()->matchEditToken( $token ); - } - } - - /** -* Special page entry point -* -* What was changed here: the setArticleBodyOnly() line below was
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Fix phrase search
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363572 ) Change subject: Fix phrase search .. Fix phrase search Partially revert I61dc536 that broke phrase search support. Fix phrase search by making explicit that there are two kind of legalSearchChars() usecases : - the chars allowed to be part of the search query (including special syntax chars such as " and *). Used by SearchDatabase::filter() to cleanup the whole query string (the default). - the chars allowed to be part of a search term (excluding special syntax chars) Used by search engine implementaions when parsing with a regex. For future reference: Originally this distinction was made "explicit" by calling directly SearchEngine::legalSearchChars() during the parsing stage. This was broken by Iaabc10c by enabling inheritance. This patch adds a new optional param to legalSearchChars to make this more explicit. Also remove the function I introduced in I61dc536 (I wrongly assumed that the disctinction made between legalSearchChars usecases was due to a difference in behavior between indexing and searching). Added more tests to prevent this from happening in the future. Bug: T167798 Change-Id: Ibdc796bb2881a2ed8194099d8c9f491980010f0f (cherry picked from commit 187ada1cf404f5943f8962c6241aa53eb3fa139c) --- M includes/deferred/SearchUpdate.php M includes/search/SearchDatabase.php M includes/search/SearchEngine.php M includes/search/SearchMssql.php M includes/search/SearchMySQL.php M includes/search/SearchOracle.php M includes/search/SearchSqlite.php M tests/phpunit/includes/search/SearchEngineTest.php 8 files changed, 86 insertions(+), 33 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/deferred/SearchUpdate.php b/includes/deferred/SearchUpdate.php index 8c165bb..62c8b00 100644 --- a/includes/deferred/SearchUpdate.php +++ b/includes/deferred/SearchUpdate.php @@ -125,7 +125,7 @@ # Language-specific strip/conversion $text = $wgContLang->normalizeForSearch( $text ); $se = $se ?: MediaWikiServices::getInstance()->newSearchEngine(); - $lc = $se->legalSearchCharsForUpdate() . '
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Fix phrase search
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363571 ) Change subject: Fix phrase search .. Fix phrase search Partially revert I61dc536 that broke phrase search support. Fix phrase search by making explicit that there are two kind of legalSearchChars() usecases : - the chars allowed to be part of the search query (including special syntax chars such as " and *). Used by SearchDatabase::filter() to cleanup the whole query string (the default). - the chars allowed to be part of a search term (excluding special syntax chars) Used by search engine implementaions when parsing with a regex. For future reference: Originally this distinction was made "explicit" by calling directly SearchEngine::legalSearchChars() during the parsing stage. This was broken by Iaabc10c by enabling inheritance. This patch adds a new optional param to legalSearchChars to make this more explicit. Also remove the function I introduced in I61dc536 (I wrongly assumed that the disctinction made between legalSearchChars usecases was due to a difference in behavior between indexing and searching). Added more tests to prevent this from happening in the future. Bug: T167798 Change-Id: Ibdc796bb2881a2ed8194099d8c9f491980010f0f (cherry picked from commit 187ada1cf404f5943f8962c6241aa53eb3fa139c) --- M includes/deferred/SearchUpdate.php M includes/search/SearchDatabase.php M includes/search/SearchEngine.php M includes/search/SearchMssql.php M includes/search/SearchMySQL.php M includes/search/SearchOracle.php M includes/search/SearchSqlite.php M tests/phpunit/includes/search/SearchEngineTest.php 8 files changed, 86 insertions(+), 33 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/deferred/SearchUpdate.php b/includes/deferred/SearchUpdate.php index 8c165bb..62c8b00 100644 --- a/includes/deferred/SearchUpdate.php +++ b/includes/deferred/SearchUpdate.php @@ -125,7 +125,7 @@ # Language-specific strip/conversion $text = $wgContLang->normalizeForSearch( $text ); $se = $se ?: MediaWikiServices::getInstance()->newSearchEngine(); - $lc = $se->legalSearchCharsForUpdate() . '
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_29]: Fix phrase search
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363573 ) Change subject: Fix phrase search .. Fix phrase search Partially revert I61dc536 that broke phrase search support. Fix phrase search by making explicit that there are two kind of legalSearchChars() usecases : - the chars allowed to be part of the search query (including special syntax chars such as " and *). Used by SearchDatabase::filter() to cleanup the whole query string (the default). - the chars allowed to be part of a search term (excluding special syntax chars) Used by search engine implementaions when parsing with a regex. For future reference: Originally this distinction was made "explicit" by calling directly SearchEngine::legalSearchChars() during the parsing stage. This was broken by Iaabc10c by enabling inheritance. This patch adds a new optional param to legalSearchChars to make this more explicit. Also remove the function I introduced in I61dc536 (I wrongly assumed that the disctinction made between legalSearchChars usecases was due to a difference in behavior between indexing and searching). Added more tests to prevent this from happening in the future. Bug: T167798 Change-Id: Ibdc796bb2881a2ed8194099d8c9f491980010f0f (cherry picked from commit 187ada1cf404f5943f8962c6241aa53eb3fa139c) --- M includes/deferred/SearchUpdate.php M includes/search/SearchDatabase.php M includes/search/SearchEngine.php M includes/search/SearchMssql.php M includes/search/SearchMySQL.php M includes/search/SearchOracle.php M includes/search/SearchSqlite.php M tests/phpunit/includes/search/SearchEngineTest.php 8 files changed, 86 insertions(+), 33 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/deferred/SearchUpdate.php b/includes/deferred/SearchUpdate.php index c94ae2a..b9a259b 100644 --- a/includes/deferred/SearchUpdate.php +++ b/includes/deferred/SearchUpdate.php @@ -124,7 +124,7 @@ # Language-specific strip/conversion $text = $wgContLang->normalizeForSearch( $text ); $se = $se ?: MediaWikiServices::getInstance()->newSearchEngine(); - $lc = $se->legalSearchCharsForUpdate() . '
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser: Add unit tests for parser output flags ('showflags' ...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363758 ) Change subject: parser: Add unit tests for parser output flags ('showflags' option) .. parser: Add unit tests for parser output flags ('showflags' option) Add logic to ParserTestRunner to allow testing of ParserOutput flags, and use it in the existing {{REVISIONID}} test, and for the added flag for user-signature from I77de05849c (T84843). Change-Id: I96e3d050e17a2d7e3d0478c702ecd53310259f56 --- M tests/parser/ParserTestRunner.php M tests/parser/parserTests.txt 2 files changed, 22 insertions(+), 0 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 77717f0..9dce73f 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -778,6 +778,7 @@ if ( isset( $opts['pst'] ) ) { $out = $parser->preSaveTransform( $test['input'], $title, $user, $options ); + $output = $parser->getOutput(); } elseif ( isset( $opts['msg'] ) ) { $out = $parser->transformMsg( $test['input'], $options, $title ); } elseif ( isset( $opts['section'] ) ) { @@ -828,6 +829,12 @@ } } + if ( isset( $output ) && isset( $opts['showflags'] ) ) { + $actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags ); + sort( $actualFlags ); + $out .= "\nflags=" . join( ', ', $actualFlags ); + } + ScopedCallback::consume( $teardownGuard ); $expected = $test['result']; diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 4c48ed5..041b40f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -10421,11 +10421,13 @@ Magic Word: {{REVISIONID}} !! options parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags !! wikitext {{REVISIONID}} !! html/* 1337 +flags=vary-revision-id !! end !! test @@ -13635,6 +13637,19 @@ !! test +ParserOutput flags from signature expansion (T84843) +!! options +pst +showflags +!! wikitext + +!! html/php +[[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC) +flags=user-signature +!! end + + +!! test pre-save transform: Signature expansion in nowiki tags (T2093) !! options pst disabled -- To view, visit https://gerrit.wikimedia.org/r/363758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I96e3d050e17a2d7e3d0478c702ecd53310259f56 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser: Add parser tests for 4 and 5 tildes in PST
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363757 ) Change subject: parser: Add parser tests for 4 and 5 tildes in PST .. parser: Add parser tests for 4 and 5 tildes in PST Add logic in ParserTestRunner that sets the same fake timestamp used by the Parser magic word expansion, also in ParserOptions, which is used by preSaveTransform(). Change-Id: I5adacffccb1212651c3031ca2fc4c20f717ff24a --- M tests/parser/ParserTestRunner.php M tests/parser/parserTests.txt 2 files changed, 16 insertions(+), 5 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index a373142..77717f0 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -266,7 +266,10 @@ $setup['wgSVGConverters'] = [ 'null' => 'echo "1">$output' ]; // Fake constant timestamp - Hooks::register( 'ParserGetVariableValueTs', 'ParserTestRunner::getFakeTimestamp' ); + Hooks::register( 'ParserGetVariableValueTs', function ( &$parser, &$ts ) { + $ts = $this->getFakeTimestamp(); + return true; + } ); $teardown[] = function () { Hooks::clear( 'ParserGetVariableValueTs' ); }; @@ -747,6 +750,7 @@ $context = RequestContext::getMain(); $user = $context->getUser(); $options = ParserOptions::newFromContext( $context ); + $options->setTimestamp( $this->getFakeTimestamp() ); if ( !isset( $opts['wrap'] ) ) { $options->setWrapOutputClass( false ); @@ -1598,11 +1602,14 @@ } /** -* The ParserGetVariableValueTs hook, used to make sure time-related parser +* Fake constant timestamp to make sure time-related parser * functions give a persistent value. +* +* - Parser::getVariableValue (via ParserGetVariableValueTs hook) +* - Parser::preSaveTransform (via ParserOptions) */ - static function getFakeTimestamp( &$parser, &$ts ) { - $ts = 123; // parsed as '1970-01-01T00:02:03Z' - return true; + private function getFakeTimestamp() { + // parsed as '1970-01-01T00:02:03Z' + return 123; } } diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 44bcdff..4c48ed5 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -13619,11 +13619,15 @@ pst !! wikitext * ~~~ +* +* ~ * ~~~ * ~~~ * ~~~ !! html/php * [[Special:Contributions/127.0.0.1|127.0.0.1]] +* [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC) +* 00:02, 1 January 1970 (UTC) * [[Special:Contributions/127.0.0.1|127.0.0.1]] * [[Special:Contributions/127.0.0.1|127.0.0.1]] * [[Special:Contributions/127.0.0.1|127.0.0.1]] -- To view, visit https://gerrit.wikimedia.org/r/363757 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5adacffccb1212651c3031ca2fc4c20f717ff24a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update phpunit to use 5.7
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363291 ) Change subject: Update phpunit to use 5.7 .. Update phpunit to use 5.7 This should be do-able now we are on php 5.6 & will help with Omnimail & using guzzle. Also update phpsec for omnimail, used for ftp downloads Change-Id: Iaba4d843643e7f198b9f7838d7ca87b4a02244ec --- M composer.json M composer.lock 2 files changed, 278 insertions(+), 90 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/composer.json b/composer.json index cabc736..345150b 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "wikimedia/donation-interface": "dev-master", "wikimedia/smash-pig": "dev-master", "phpmailer/phpmailer": "5.2.*", -"phpseclib/phpseclib": "0.3.7", +"phpseclib/phpseclib": "~2.0", "predis/predis": "1.*", "twig/twig": "1.*" }, @@ -33,7 +33,7 @@ } ], "require-dev": { -"phpunit/phpunit": "4.*", +"phpunit/phpunit": "5.*", "jakub-onderka/php-parallel-lint": "~0.9.2", "jakub-onderka/php-console-highlighter": "~0.3.2" }, diff --git a/composer.lock b/composer.lock index bba239f..53b9a37 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"content-hash": "b4d5a67549742ecca7b33afc58860195", +"content-hash": "9d359779ffaa56b80b732235f55a98e9", "packages": [ { "name": "addshore/psr-6-mediawiki-bagostuff-adapter", @@ -507,52 +507,43 @@ }, { "name": "phpseclib/phpseclib", -"version": "0.3.7", +"version": "2.0.6", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git;, -"reference": "8b8c62f278e363b75ddcacaf5803710232fbd3e4" +"reference": "34a7699e6f31b1ef4035ee3607cecf9f56aa" }, "dist": { "type": "zip", -"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/8b8c62f278e363b75ddcacaf5803710232fbd3e4;, -"reference": "8b8c62f278e363b75ddcacaf5803710232fbd3e4", +"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee3607cecf9f56aa;, +"reference": "34a7699e6f31b1ef4035ee3607cecf9f56aa", "shasum": "" }, "require": { -"php": ">=5.0.0" +"php": ">=5.3.3" }, "require-dev": { -"phing/phing": "2.7.*", -"phpunit/phpunit": "4.0.*", -"squizlabs/php_codesniffer": "1.*" +"phing/phing": "~2.7", +"phpunit/phpunit": "~4.0", +"sami/sami": "~2.0", +"squizlabs/php_codesniffer": "~2.0" }, "suggest": { "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", -"ext-mcrypt": "Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.", -"pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP < 4.3.3." +"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", +"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", +"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." }, "type": "library", -"extra": { -"branch-alias": { -"dev-master": "0.3-dev" +"autoload": { +"files": [ +"phpseclib/bootstrap.php" +], +"psr-4": { +"phpseclib\\": "phpseclib/" } }, -"autoload": { -"psr-0": { -"Crypt": "phpseclib/", -"File": "phpseclib/", -"Math": "phpseclib/", -"Net": "phpseclib/", -"System": "phpseclib/" -}, -"files": [ -"phpseclib/Crypt/Random.php" -] -}, -"include-path": [ -"phpseclib/" -], +"notification-url": "https://packagist.org/downloads/;, "license": [ "MIT" ], @@ -575,6
[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Sniff that the short type form is used in @return tags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362593 ) Change subject: Sniff that the short type form is used in @return tags .. Sniff that the short type form is used in @return tags Require that we use "int" and "bool" instead of their longer forms in @return tags. Bug: T145162 Change-Id: I2aa3ba28c11a85e688e2478135703ec08e1a5aae --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Tests/files/Commenting/commenting_function.php M MediaWiki/Tests/files/Commenting/commenting_function.php.expect M MediaWiki/Tests/files/Commenting/commenting_function.php.fixed M MediaWiki/Tests/files/generic_pass.php 5 files changed, 87 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index baaddee..4e35187 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -190,11 +190,38 @@ } } if ( $return !== null ) { - $content = $tokens[( $return + 2 )]['content']; - if ( empty( $content ) === true || $tokens[( $return + 2 )]['code'] !== T_DOC_COMMENT_STRING ) { + $retType = $return + 2; + $content = $tokens[$retType]['content']; + if ( empty( $content ) === true || $tokens[$retType]['code'] !== T_DOC_COMMENT_STRING ) { $error = 'Return type missing for @return tag in function comment'; $phpcsFile->addError( $error, $return, 'MissingReturnType' ); } + // The first word of the return type is the actual type + $exploded = explode( ' ', $content, 2 ); + $first = $exploded[0]; + if ( $first === 'boolean' ) { + $fix = $phpcsFile->addFixableError( + 'Short type of "bool" should be used for @return tag', + $retType, + 'NotShortBoolReturn' + ); + if ( $fix === true ) { + $phpcsFile->fixer->replaceToken( + $retType, 'bool ' . $exploded[1] + ); + } + } elseif ( $first === 'integer' ) { + $fix = $phpcsFile->addFixableError( + 'Short type of "int" should be used for @return tag', + $retType, + 'NotShortIntReturn' + ); + if ( $fix === true ) { + $phpcsFile->fixer->replaceToken( + $retType, 'int ' . $exploded[1] + ); + } + } } else { $error = 'Missing @return tag in function comment'; $phpcsFile->addError( $error, $tokens[$commentStart]['comment_closer'], 'MissingReturn' ); diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php b/MediaWiki/Tests/files/Commenting/commenting_function.php index b532104..cddeabd 100644 --- a/MediaWiki/Tests/files/Commenting/commenting_function.php +++ b/MediaWiki/Tests/files/Commenting/commenting_function.php @@ -26,6 +26,22 @@ public function testSingleSpaces( $testVar, $t ) { return $testVar; } + + /** +* @param boolean $aBool A bool +* @param integer $anInt An int +* @return boolean And some text +*/ + public function testLongTypes( $aBool, $anInt ) { + return $aBool; + } + + /** +* @return integer More text +*/ + public function testIntReturn() { + return 0; + } } class TestPassedExamples { @@ -74,6 +90,15 @@ public function __toString() { return 'no documentation because obvious'; } + + /** +* @param bool $aBool A bool +* @param int $anInt An int +* @return bool +*/ + public function testShortTypes( $aBool, $anInt ) { + return $aBool; + } } class TestSimpleConstructor { diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect index
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Move TranslationTests to plain JUnit, pt. 1
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363759 ) Change subject: Move TranslationTests to plain JUnit, pt. 1 .. Move TranslationTests to plain JUnit, pt. 1 Stops depending on an Android system context for Resource handling and instead iterates over the various strings.xml files, leveraging jsoup to parse the strings directly from the XML and test them. To follow: restore plurals testing. (I'm sure jsoup can handle this similarly, just trying to break things up a bit for ease of reviewing.) Bug: T139546 Change-Id: Ie743651ac5a87f5956471759ec614c7a834a0fef --- D app/src/androidTest/java/org/wikipedia/test/TranslationTests.java M app/src/main/res/values-ckb/strings.xml A app/src/test/java/org/wikipedia/language/TranslationTests.java M app/src/test/java/org/wikipedia/test/TestFileUtil.java 4 files changed, 351 insertions(+), 417 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/59/363759/1 diff --git a/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java b/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java deleted file mode 100644 index 9e479e5..000 --- a/app/src/androidTest/java/org/wikipedia/test/TranslationTests.java +++ /dev/null @@ -1,416 +0,0 @@ -package org.wikipedia.test; - -import android.content.res.AssetManager; -import android.content.res.Configuration; -import android.content.res.Resources; -import android.support.annotation.NonNull; -import android.support.annotation.PluralsRes; -import android.support.annotation.StringRes; -import android.util.DisplayMetrics; - -import org.apache.commons.lang3.StringUtils; -import org.junit.Test; -import org.wikipedia.R; -import org.wikipedia.model.BaseModel; -import org.wikipedia.util.ConfigurationCompat; -import org.wikipedia.util.log.L; - -import java.lang.reflect.Field; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; - -import static android.support.test.InstrumentationRegistry.getTargetContext; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.fail; - -/** - * Tests to make sure that the string resources don't cause any issues. Mainly the goal is to test - * all translations, but even the default strings are tested. - * - * TODO: check content_license_html is valid HTML - */ -public class TranslationTests { -// todo: consider regular expressions. -private static final String POSSIBLE_PARAM_FLOAT_FIRST = "%1$.2f"; -private static final String POSSIBLE_PARAM_FLOAT_THIRD = "%3$.2f"; - -/** Add more if needed, but then also add some tests. */ -private static final String[] POSSIBLE_PARAMS = new String[] {"%s", "%1$s", "%2$s", "%d", -"%1$d", "%2$d", "%.2f", POSSIBLE_PARAM_FLOAT_FIRST, POSSIBLE_PARAM_FLOAT_THIRD, "^1"}; - -private final StringBuilder mismatches = new StringBuilder(); - -@Test public void testAllTranslations() { -setLocale(Locale.ROOT.toString()); -String defaultLang = Locale.getDefault().getLanguage(); -List tagRes = new ResourceCollector("<", "").collectParameterResources(defaultLang); -List noTagRes = new ResourceCollector("<", "").not().collectParameterResources(defaultLang); -List stringParamRes = new ResourceCollector("%s").collectParameterResources(defaultLang); -List twoStringParamRes = new ResourceCollector("%2$s").collectParameterResources(defaultLang); -List twoDecimalParamRes = new ResourceCollector("%2$d").collectParameterResources(defaultLang); -List decimalParamRes = new ResourceCollector("%d").collectParameterResources(defaultLang); -List floatParamRes = new ResourceCollector("%.2f").collectParameterResources(defaultLang); -List floatFirstParamRes = new ResourceCollector(POSSIBLE_PARAM_FLOAT_FIRST).collectParameterResources(defaultLang); -List floatThirdParamRes = new ResourceCollector(POSSIBLE_PARAM_FLOAT_THIRD).collectParameterResources(defaultLang); -List textUtilTemplateParamRes = new ResourceCollector("^1").collectParameterResources(defaultLang); -List pluralRes = collectPluralResources(); -// todo: flag usage of templates {{}}. - -AssetManager assetManager = getResources().getAssets(); -for (String lang : assetManager.getLocales()) { -L.i("locale=" + (lang.equals("") ? "DEFAULT" : lang)); -setLocale(lang); -checkAllStrings(lang); - -// commented out during the transition from 1 param to 0 -// checkTranslationHasNoParameter(R.string.saved_pages_search_empty_message); -// checkTranslationHasNoParameter(R.string.history_search_empty_message); - -if (!lang.startsWith("qq")) { -// tag (html)
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Push all DeferredUpdates to POSTSEND queue when running that...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363109 ) Change subject: Push all DeferredUpdates to POSTSEND queue when running that queue .. Push all DeferredUpdates to POSTSEND queue when running that queue This avoids putting updates in the PRESEND queue at a point where they may never get run later in the request. The peculiarity lead to a regression in 24842cfac. Move "enqueue" logic to runUpdate() to simplify execute(). If job insertion batching is strongly desired for a class, then it can use MergeableUpdate. Removed unused "update" field in $executeContext. Bug: T168723 Change-Id: I40d16f6cd0adc8583797b99d859b76a836d362a8 --- M includes/deferred/DeferredUpdates.php M tests/phpunit/includes/deferred/DeferredUpdatesTest.php 2 files changed, 48 insertions(+), 23 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index a3a37f6..e8f27ef 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -76,9 +76,12 @@ public static function addUpdate( DeferrableUpdate $update, $stage = self::POSTSEND ) { global $wgCommandLineMode; - // This is a sub-DeferredUpdate, run it right after its parent update if ( self::$executeContext && self::$executeContext['stage'] >= $stage ) { + // This is a sub-DeferredUpdate; run it right after its parent update. + // Also, while post-send updates are running, push any "pre-send" jobs to the + // active post-send queue to make sure they get run this round (or at all). self::$executeContext['subqueue'][] = $update; + return; } @@ -183,16 +186,6 @@ while ( $updates ) { $queue = []; // clear the queue - if ( $mode === 'enqueue' ) { - try { - // Push enqueuable updates to the job queue and get the rest - $updates = self::enqueueUpdates( $updates ); - } catch ( Exception $e ) { - // Let other updates have a chance to run if this failed - MWExceptionHandler::rollbackMasterChangesAndLog( $e ); - } - } - // Order will be DataUpdate followed by generic DeferrableUpdate tasks $updatesByType = [ 'data' => [], 'generic' => [] ]; foreach ( $updates as $du ) { @@ -212,13 +205,9 @@ // Execute all remaining tasks... foreach ( $updatesByType as $updatesForType ) { foreach ( $updatesForType as $update ) { - self::$executeContext = [ - 'update' => $update, - 'stage' => $stage, - 'subqueue' => [] - ]; + self::$executeContext = [ 'stage' => $stage, 'subqueue' => [] ]; /** @var DeferrableUpdate $update */ - $guiError = self::runUpdate( $update, $lbFactory, $stage ); + $guiError = self::runUpdate( $update, $lbFactory, $mode, $stage ); $reportableError = $reportableError ?: $guiError; // Do the subqueue updates for $update until there are none while ( self::$executeContext['subqueue'] ) { @@ -230,7 +219,7 @@ $subUpdate->setTransactionTicket( $ticket ); } - $guiError = self::runUpdate( $subUpdate, $lbFactory, $stage ); + $guiError = self::runUpdate( $subUpdate, $lbFactory, $mode, $stage ); $reportableError = $reportableError ?: $guiError; } self::$executeContext = null; @@ -248,16 +237,26 @@ /** * @param DeferrableUpdate $update * @param LBFactory $lbFactory +* @param string $mode * @param integer $stage * @return ErrorPageError|null */ - private static function runUpdate(
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid high edit stash TTLs when a user signature was used
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363753 ) Change subject: Avoid high edit stash TTLs when a user signature was used .. Avoid high edit stash TTLs when a user signature was used This adds a new ParserOuput user-signature tracking flag. Bug: T84843 Change-Id: I77de05849c15e17ee2b9b31b34172f4b6a49a38e --- M includes/api/ApiStashEdit.php M includes/parser/Parser.php 2 files changed, 17 insertions(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index c7a00c6..d03fca8 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -44,6 +44,7 @@ const PRESUME_FRESH_TTL_SEC = 30; const MAX_CACHE_TTL = 300; // 5 minutes + const MAX_SIGNATURE_TTL = 60; public function execute() { $user = $this->getUser(); @@ -391,6 +392,12 @@ // Put an upper limit on the TTL for sanity to avoid extreme template/file staleness. $since = time() - wfTimestamp( TS_UNIX, $parserOutput->getTimestamp() ); $ttl = min( $parserOutput->getCacheExpiry() - $since, self::MAX_CACHE_TTL ); + + // Avoid extremely stale user signature timestamps (T84843) + if ( $parserOutput->getFlag( 'user-signature' ) ) { + $ttl = min( $ttl, self::MAX_SIGNATURE_TTL ); + } + if ( $ttl <= 0 ) { return [ null, 0, 'no_ttl' ]; } diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 9ea65e0..4a78ff8 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4502,12 +4502,16 @@ # which may corrupt this parser instance via its wfMessage()->text() call- # Signatures - $sigText = $this->getUserSig( $user ); - $text = strtr( $text, [ - '~' => $d, - '' => "$sigText $d", - '~~~' => $sigText - ] ); + if ( strpos( $text, '~~~' ) !== false ) { + $sigText = $this->getUserSig( $user ); + $text = strtr( $text, [ + '~' => $d, + '' => "$sigText $d", + '~~~' => $sigText + ] ); + # The main two signature forms used above are time-sensitive + $this->mOutput->setFlag( 'user-signature' ); + } # Context links ("pipe tricks"): [[|name]] and [[name (context)|]] $tc = '[' . Title::legalChars() . ']'; -- To view, visit https://gerrit.wikimedia.org/r/363753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77de05849c15e17ee2b9b31b34172f4b6a49a38e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: Tim Starling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: grafana: Add legend to dashboard varnish-aggregate-client-st...
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363111 ) Change subject: grafana: Add legend to dashboard varnish-aggregate-client-status-codes .. grafana: Add legend to dashboard varnish-aggregate-client-status-codes Change-Id: I3f9c47828ebc7408685218c72592b7bb64257720 --- M modules/grafana/files/dashboards/varnish-aggregate-client-status-codes 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: Ema: Looks good to me, but someone else must approve Alexandros Kosiaris: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes b/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes index 86c880f..6c142de 100644 --- a/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes +++ b/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes @@ -18,6 +18,28 @@ "rows": [ { "collapse": false, + "height": "50px", + "panels": [ +{ + "content": "Data comes from `varnishreqstats` ([varnish::logging::reqstats](https://github.com/wikimedia/puppet/blob/HEAD/modules/varnish/manifests/logging/reqstats.pp)) and is sent to Graphite via [statsd](https://wikitech.wikimedia.org/wiki/Statsd).", + "height": "", + "id": 8, + "links": [], + "mode": "markdown", + "span": 12, + "title": "", + "type": "text" +} + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Legend", + "titleSize": "h6" +}, +{ + "collapse": false, "height": "300px", "panels": [ { -- To view, visit https://gerrit.wikimedia.org/r/363111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f9c47828ebc7408685218c72592b7bb64257720 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KrinkleGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: BBlack Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Ema Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser: Add unit tests for parser output flags ('showflags' ...
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363758 ) Change subject: parser: Add unit tests for parser output flags ('showflags' option) .. parser: Add unit tests for parser output flags ('showflags' option) Add logic to ParserTestRunner to allow testing of ParserOutput flags, and use it in the existing {{REVISIONID}} test, and for the added flag for user-signature from I77de05849c (T84843). Change-Id: I96e3d050e17a2d7e3d0478c702ecd53310259f56 --- M tests/parser/ParserTestRunner.php M tests/parser/parserTests.txt 2 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/363758/1 diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 77717f0..9dce73f 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -778,6 +778,7 @@ if ( isset( $opts['pst'] ) ) { $out = $parser->preSaveTransform( $test['input'], $title, $user, $options ); + $output = $parser->getOutput(); } elseif ( isset( $opts['msg'] ) ) { $out = $parser->transformMsg( $test['input'], $options, $title ); } elseif ( isset( $opts['section'] ) ) { @@ -828,6 +829,12 @@ } } + if ( isset( $output ) && isset( $opts['showflags'] ) ) { + $actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags ); + sort( $actualFlags ); + $out .= "\nflags=" . join( ', ', $actualFlags ); + } + ScopedCallback::consume( $teardownGuard ); $expected = $test['result']; diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 4c48ed5..041b40f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -10421,11 +10421,13 @@ Magic Word: {{REVISIONID}} !! options parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags !! wikitext {{REVISIONID}} !! html/* 1337 +flags=vary-revision-id !! end !! test @@ -13635,6 +13637,19 @@ !! test +ParserOutput flags from signature expansion (T84843) +!! options +pst +showflags +!! wikitext + +!! html/php +[[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC) +flags=user-signature +!! end + + +!! test pre-save transform: Signature expansion in nowiki tags (T2093) !! options pst disabled -- To view, visit https://gerrit.wikimedia.org/r/363758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96e3d050e17a2d7e3d0478c702ecd53310259f56 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: parser: Add parser tests for 4 and 5 tildes in PST
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363757 ) Change subject: parser: Add parser tests for 4 and 5 tildes in PST .. parser: Add parser tests for 4 and 5 tildes in PST Add logic in ParserTestRunner that sets the same fake timestamp used by the Parser magic word expansion, also in ParserOptions, which is used by preSaveTransform(). Change-Id: I5adacffccb1212651c3031ca2fc4c20f717ff24a --- M tests/parser/ParserTestRunner.php M tests/parser/parserTests.txt 2 files changed, 16 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/57/363757/1 diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index a373142..77717f0 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -266,7 +266,10 @@ $setup['wgSVGConverters'] = [ 'null' => 'echo "1">$output' ]; // Fake constant timestamp - Hooks::register( 'ParserGetVariableValueTs', 'ParserTestRunner::getFakeTimestamp' ); + Hooks::register( 'ParserGetVariableValueTs', function ( &$parser, &$ts ) { + $ts = $this->getFakeTimestamp(); + return true; + } ); $teardown[] = function () { Hooks::clear( 'ParserGetVariableValueTs' ); }; @@ -747,6 +750,7 @@ $context = RequestContext::getMain(); $user = $context->getUser(); $options = ParserOptions::newFromContext( $context ); + $options->setTimestamp( $this->getFakeTimestamp() ); if ( !isset( $opts['wrap'] ) ) { $options->setWrapOutputClass( false ); @@ -1598,11 +1602,14 @@ } /** -* The ParserGetVariableValueTs hook, used to make sure time-related parser +* Fake constant timestamp to make sure time-related parser * functions give a persistent value. +* +* - Parser::getVariableValue (via ParserGetVariableValueTs hook) +* - Parser::preSaveTransform (via ParserOptions) */ - static function getFakeTimestamp( &$parser, &$ts ) { - $ts = 123; // parsed as '1970-01-01T00:02:03Z' - return true; + private function getFakeTimestamp() { + // parsed as '1970-01-01T00:02:03Z' + return 123; } } diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 44bcdff..4c48ed5 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -13619,11 +13619,15 @@ pst !! wikitext * ~~~ +* +* ~ * ~~~ * ~~~ * ~~~ !! html/php * [[Special:Contributions/127.0.0.1|127.0.0.1]] +* [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC) +* 00:02, 1 January 1970 (UTC) * [[Special:Contributions/127.0.0.1|127.0.0.1]] * [[Special:Contributions/127.0.0.1|127.0.0.1]] * [[Special:Contributions/127.0.0.1|127.0.0.1]] -- To view, visit https://gerrit.wikimedia.org/r/363757 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5adacffccb1212651c3031ca2fc4c20f717ff24a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Make Phan tests pass
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363756 ) Change subject: Make Phan tests pass .. Make Phan tests pass Change-Id: Iba9d41e30a68a2ce17ec890e1708a1196eda783d --- M includes/LoginNotify.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LoginNotify refs/changes/56/363756/1 diff --git a/includes/LoginNotify.php b/includes/LoginNotify.php index ad2014f..bb911e5 100644 --- a/includes/LoginNotify.php +++ b/includes/LoginNotify.php @@ -271,6 +271,8 @@ /** * Actually do the query of the check user table. * +* @suppress PhanTypeMismatchArgument +* * @note This catches and ignores database errors. * @param int $userId User id number (Not necessarily for the local wiki) * @param string $ipFragment Prefix to match against cuc_ip (from $this->getIPNetwork()) @@ -304,6 +306,8 @@ * If we have no info for user, we maybe don't treat it as * an unknown IP, since user has no known IPs. * +* @suppress PhanTypeMismatchArgument +* * @todo FIXME Does this behaviour make sense, esp. with cookie check? * @param int $userId User id number (possibly on foreign wiki) * @param Database $dbr DB connection (possibly to foreign wiki) -- To view, visit https://gerrit.wikimedia.org/r/363756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba9d41e30a68a2ce17ec890e1708a1196eda783d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LoginNotify Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] deferred: Trying new tests without postActive flag
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363664 ) Change subject: [WIP] deferred: Trying new tests without postActive flag .. [WIP] deferred: Trying new tests without postActive flag Change-Id: I798227a726f303338f7f6acc89854e19f5113d52 --- M includes/deferred/DeferredUpdates.php 1 file changed, 2 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/363664/3 diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index 4bac89d..a3a37f6 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -64,8 +64,6 @@ /** @var array|null Information about the current execute() call or null if not running */ private static $executeContext; - /** @var bool Whether post-send job are being executed */ - private static $postSendActive = false; /** * Add an update to the deferred list to be run later by execute() @@ -84,9 +82,7 @@ return; } - // While post-send updates are running, push any "pre-send" jobs to the - // active post-send queue to make sure they get run this round (or at all) - if ( $stage === self::PRESEND && !self::$postSendActive ) { + if ( $stage === self::PRESEND ) { self::push( self::$preSendUpdates, $update ); } else { self::push( self::$postSendUpdates, $update ); @@ -129,12 +125,7 @@ } if ( $stage === self::ALL || $stage == self::POSTSEND ) { - self::$postSendActive = true; - try { - self::execute( self::$postSendUpdates, $mode, $stageEffective ); - } finally { - self::$postSendActive = false; - } + self::execute( self::$postSendUpdates, $mode, $stageEffective ); } } -- To view, visit https://gerrit.wikimedia.org/r/363664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I798227a726f303338f7f6acc89854e19f5113d52 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clarify what $params is for ApiBase methods to get Title/Wik...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363754 ) Change subject: Clarify what $params is for ApiBase methods to get Title/WikiPage .. Clarify what $params is for ApiBase methods to get Title/WikiPage Change-Id: I1bfae270072ba08db967a02a8e30047bc607e3a2 --- M includes/api/ApiBase.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 2dcece1..bc3def8 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -894,7 +894,7 @@ * Get a WikiPage object from a title or pageid param, if possible. * Can die, if no param is set or if the title or page id is not valid. * -* @param array $params +* @param array $params User provided set of parameters, as from $this->extractRequestParams() * @param bool|string $load Whether load the object's state from the database: *- false: don't load (if the pageid is given, it will still be loaded) *- 'fromdb': load from a replica DB @@ -935,7 +935,7 @@ * Can die, if no param is set or if the title or page id is not valid. * * @since 1.29 -* @param array $params +* @param array $params User provided set of parameters, as from $this->extractRequestParams() * @return Title */ public function getTitleFromTitleOrPageId( $params ) { -- To view, visit https://gerrit.wikimedia.org/r/363754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1bfae270072ba08db967a02a8e30047bc607e3a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: Mattflaschen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/private[master]: Gerrit: Add gerrit pub key for ssh
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363755 ) Change subject: Gerrit: Add gerrit pub key for ssh .. Gerrit: Add gerrit pub key for ssh This is for scap, which will fail puppet without an ssh key in puppet. Change-Id: Iccb978c7471a977ee3ba74c2da80dc9684a4c541 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/private refs/changes/55/363755/1 -- To view, visit https://gerrit.wikimedia.org/r/363755 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iccb978c7471a977ee3ba74c2da80dc9684a4c541 Gerrit-PatchSet: 1 Gerrit-Project: labs/private Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: Use a separate postgres connection in SqlBagOStuff
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363727 ) Change subject: objectcache: Use a separate postgres connection in SqlBagOStuff .. objectcache: Use a separate postgres connection in SqlBagOStuff The flags to the driver use new connections for new LBs since fda4d46fc4f810. This makes it consistent with what we do for MySQL already. This should fix warnings about TransactionProfiler in objectcache, as well as warnings about "Pending writes" in WANObjectCache. Bug: T167946 Bug: T154424 Change-Id: I0b0d9a7210b6a3270d32df778fcc4b9918d3dcd1 --- M includes/objectcache/SqlBagOStuff.php 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Aaron Schulz: Looks good to me, but someone else must approve Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 6c10301..70795ec 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -148,7 +148,7 @@ protected function getSeparateMainLB() { global $wgDBtype; - if ( $wgDBtype === 'mysql' && $this->usesMainDB() ) { + if ( $this->usesMainDB() && $wgDBtype !== 'sqlite' ) { if ( !$this->separateMainLB ) { // We must keep a separate connection to MySQL in order to avoid deadlocks $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); @@ -156,8 +156,7 @@ } return $this->separateMainLB; } else { - // However, SQLite has an opposite behavior. And PostgreSQL needs to know - // if we are in transaction or not (@TODO: find some PostgreSQL work-around). + // However, SQLite has an opposite behavior due to DB-level locking return null; } } -- To view, visit https://gerrit.wikimedia.org/r/363727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b0d9a7210b6a3270d32df778fcc4b9918d3dcd1 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mwjames Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clarify what $params is for ApiBase methods to get Title/Wik...
Mattflaschen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363754 ) Change subject: Clarify what $params is for ApiBase methods to get Title/WikiPage .. Clarify what $params is for ApiBase methods to get Title/WikiPage Change-Id: I1bfae270072ba08db967a02a8e30047bc607e3a2 --- M includes/api/ApiBase.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/363754/1 diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 2dcece1..bc3def8 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -894,7 +894,7 @@ * Get a WikiPage object from a title or pageid param, if possible. * Can die, if no param is set or if the title or page id is not valid. * -* @param array $params +* @param array $params User provided set of parameters, as from $this->extractRequestParams() * @param bool|string $load Whether load the object's state from the database: *- false: don't load (if the pageid is given, it will still be loaded) *- 'fromdb': load from a replica DB @@ -935,7 +935,7 @@ * Can die, if no param is set or if the title or page id is not valid. * * @since 1.29 -* @param array $params +* @param array $params User provided set of parameters, as from $this->extractRequestParams() * @return Title */ public function getTitleFromTitleOrPageId( $params ) { -- To view, visit https://gerrit.wikimedia.org/r/363754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bfae270072ba08db967a02a8e30047bc607e3a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CurrencyRates template: add SmashPig namespace
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/352047 ) Change subject: CurrencyRates template: add SmashPig namespace .. CurrencyRates template: add SmashPig namespace Bug: T163868 Change-Id: Ie05d0b1db1eed7e0fe5ab397e406a9c4557d0f28 --- M sites/all/modules/exchange_rates/templates/ref_source.php.twig 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/exchange_rates/templates/ref_source.php.twig b/sites/all/modules/exchange_rates/templates/ref_source.php.twig index 19d7b3a..4e4 100644 --- a/sites/all/modules/exchange_rates/templates/ref_source.php.twig +++ b/sites/all/modules/exchange_rates/templates/ref_source.php.twig @@ -4,6 +4,7 @@ * -- do not edit! -- * Instead, run drush make-exchange-refs /output/dir and look in the specified folder. */ +namespace SmashPig\PaymentData\ReferenceData; class CurrencyRates { /** -- To view, visit https://gerrit.wikimedia.org/r/352047 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie05d0b1db1eed7e0fe5ab397e406a9c4557d0f28 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Mepps Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Add support for scap
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363726 ) Change subject: Gerrit: Add support for scap .. Gerrit: Add support for scap This adds support for scap using a config for now to prevent problems and allow testing in labs before doing it in prod. Change-Id: I73ef6bddd6c6450ce2543c20657e837d9a7baffe --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/26/363726/1 -- To view, visit https://gerrit.wikimedia.org/r/363726 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73ef6bddd6c6450ce2543c20657e837d9a7baffe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PaladoxGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid high edit stash TTLs when a user signature was used
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363753 ) Change subject: Avoid high edit stash TTLs when a user signature was used .. Avoid high edit stash TTLs when a user signature was used This adds a new ParserOuput user-signature tracking flag. Bug: T84843 Change-Id: I77de05849c15e17ee2b9b31b34172f4b6a49a38e --- M includes/api/ApiStashEdit.php M includes/parser/Parser.php 2 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/363753/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index c7a00c6..d03fca8 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -44,6 +44,7 @@ const PRESUME_FRESH_TTL_SEC = 30; const MAX_CACHE_TTL = 300; // 5 minutes + const MAX_SIGNATURE_TTL = 60; public function execute() { $user = $this->getUser(); @@ -391,6 +392,12 @@ // Put an upper limit on the TTL for sanity to avoid extreme template/file staleness. $since = time() - wfTimestamp( TS_UNIX, $parserOutput->getTimestamp() ); $ttl = min( $parserOutput->getCacheExpiry() - $since, self::MAX_CACHE_TTL ); + + // Avoid extremely stale user signature timestamps (T84843) + if ( $parserOutput->getFlag( 'user-signature' ) ) { + $ttl = min( $ttl, self::MAX_SIGNATURE_TTL ); + } + if ( $ttl <= 0 ) { return [ null, 0, 'no_ttl' ]; } diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 9ea65e0..4a78ff8 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -4502,12 +4502,16 @@ # which may corrupt this parser instance via its wfMessage()->text() call- # Signatures - $sigText = $this->getUserSig( $user ); - $text = strtr( $text, [ - '~' => $d, - '' => "$sigText $d", - '~~~' => $sigText - ] ); + if ( strpos( $text, '~~~' ) !== false ) { + $sigText = $this->getUserSig( $user ); + $text = strtr( $text, [ + '~' => $d, + '' => "$sigText $d", + '~~~' => $sigText + ] ); + # The main two signature forms used above are time-sensitive + $this->mOutput->setFlag( 'user-signature' ); + } # Context links ("pipe tricks"): [[|name]] and [[name (context)|]] $tc = '[' . Title::legalChars() . ']'; -- To view, visit https://gerrit.wikimedia.org/r/363753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77de05849c15e17ee2b9b31b34172f4b6a49a38e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[wmf/1.30.0-wmf.7]: Only message box styles should be loaded on editor
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363741 ) Change subject: Only message box styles should be loaded on editor .. Only message box styles should be loaded on editor Bug: T164892 Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 (cherry picked from commit b53e2a2c2fd4de9da0926171999e1760e8192bec) --- M includes/MobileFrontend.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 495d866..ffb3fa9 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -772,7 +772,7 @@ $requestAction = $out->getRequest()->getVal( 'action' ); if ( $noJsEditing && ( $requestAction === 'edit' || $requestAction === 'submit' ) ) { $out->addModuleStyles( [ - 'mobile.messageBox' + 'mobile.messageBox.styles' ] ); } } -- To view, visit https://gerrit.wikimedia.org/r/363741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.30.0-wmf.7 Gerrit-Owner: JdlrobsonGerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: Sister search traffic changes per Deb's feedback
Bearloga has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363752 ) Change subject: Sister search traffic changes per Deb's feedback .. Sister search traffic changes per Deb's feedback - Corrects referenced ticket - Changes title and summary - Adds more notes and explanations - Changes the UI/UX to a "choose-your-own-split-by-combo" adventure using checkboxes - Adds annotations for sister search on KPI::LoadTimes and Desktop::LoadTimes dashboards because it's relevant Bug: T164854 Change-Id: I5c1e4db0b2b92ad3b28d74b8113a511704946326 --- M server.R M tab_documentation/desktop_load.md M tab_documentation/kpi_load_time.md M tab_documentation/sister_search_traffic.md M ui.R A www/js4checkbox.js 6 files changed, 67 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow refs/changes/52/363752/1 diff --git a/server.R b/server.R index 49c429b..972cd74 100644 --- a/server.R +++ b/server.R @@ -83,7 +83,8 @@ polloi::make_dygraph(xlab = "Date", ylab = "Load time (ms)", title = "Desktop load times, by day", use_si = FALSE) %>% dyRangeSelector %>% dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = "bottom") %>% - dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") + dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") %>% + dyEvent(as.Date("2017-06-15"), "B (sister search)", labelLoc = "bottom") }) output$paulscore_approx_plot_fulltext <- renderDygraph({ @@ -363,34 +364,37 @@ # Sister Search output$sister_search_traffic_plot <- renderDygraph({ -switch( - input$sister_search_traffic_split, - "none" = { -sister_search_traffic %>% +# Code that prepares a custom data.frame 'sst' +# that will then be processed in a generic way: +if (length(input$sister_search_traffic_split) == 0) { + sst <- sister_search_traffic %>% dplyr::mutate(split = "Sister search traffic") - }, - "project" = { -sister_search_traffic %>% - dplyr::rename(split = project) - }, - "destination" = { -sister_search_traffic %>% - dplyr::mutate(split = dplyr::if_else(is_serp, "Search results page", "Article")) - }, - "language" = { -sister_search_traffic %>% - dplyr::filter(project != "wikimedia commons", !is.na(language)) %>% - dplyr::mutate(split = language) - }, - "access_method" = { -sister_search_traffic %>% - dplyr::mutate(split = access_method) +} else { + split_by <- head(input$sister_search_traffic_split, 2) + sst <- sister_search_traffic + if ("language" %in% split_by) { +sst <- dplyr::filter(sst, !is.na(language)) } -) %>% + if ("destination" %in% split_by) { +sst <- dplyr::mutate(sst, destination = dplyr::if_else(is_serp, "Search results page", "Article")) + } + if (length(split_by) == 1) { +sst$split <- sst[[split_by[1]]] + } else { +sst$split <- paste0(sst[[split_by[1]]], " (", sst[[split_by[2]]], ")") + } +} +# Code that works on the prepared dataet: +sst %>% dplyr::group_by(date, split) %>% dplyr::summarize(pageviews = sum(pageviews)) %>% tidyr::spread(split, pageviews, fill = 0) %>% - polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_sister_search_traffic_plot)) %>% + { +# Reorder columns according to the last observed values: +cols <- unlist(polloi::safe_tail(., 1)[, -1]) +.[, c(1, order(cols, decreasing = TRUE) + 1)] + } %>% + polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_sister_search_traffic_plot), rename = FALSE) %>% polloi::make_dygraph(xlab = "Date", ylab = "Pageviews", title = "Traffic to sister projects from Wikipedia SERPs") %>% dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = polloi::custom_axis_formatter, axisLabelWidth = 100, pixelsPerLabel = 80) %>% @@ -735,7 +739,8 @@ dyCSS(css = system.file("custom.css", package = "polloi")) %>% dyRangeSelector %>% dyEvent(as.Date("2016-07-12"), "A (schema switch)", labelLoc = "bottom") %>% - dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")) + dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") %>% + dyEvent(as.Date("2017-06-15"), "B (sister search)", labelLoc = "bottom")) }) output$kpi_zero_results_series <- renderDygraph({ smooth_level <- input$smoothing_kpi_zero_results diff --git a/tab_documentation/desktop_load.md b/tab_documentation/desktop_load.md index be3d643..dcd55c0 100644 --- a/tab_documentation/desktop_load.md +++
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use shell_exec instead of backtick
Mattflaschen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363751 ) Change subject: Use shell_exec instead of backtick .. Use shell_exec instead of backtick They are exactly equivalent, but shell_exec is more readable. We just imported a sniff to forbid backtick into mediawiki-codesniffer. It's not deployed here yet, but this will facilitate it. Change-Id: I4b58ed78e1792ff83e1bf99425f8f19123cfe911 --- M maintenance/mwdocgen.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/51/363751/1 diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index d005629..43041a43d 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -105,7 +105,7 @@ $this->excludePatterns[] = 'extensions'; } - $this->doDot = `which dot`; + $this->doDot = shell_exec( 'which dot' ); $this->doMan = $this->hasOption( 'generate-man' ); } -- To view, visit https://gerrit.wikimedia.org/r/363751 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b58ed78e1792ff83e1bf99425f8f19123cfe911 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Wikivoyage projects can show more than 3 related articles
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363742 ) Change subject: Wikivoyage projects can show more than 3 related articles .. Wikivoyage projects can show more than 3 related articles Bug: T164765 Change-Id: I7f2a95ecbd08a33a2653fcc7b578582ebadd9c8d --- M wmf-config/InitialiseSettings.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Chad: Looks good to me, approved Bmansurov: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2cc5d10..6edc83a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -17276,6 +17276,11 @@ 'default' => true, // T164391, T143480 ], +'wgRelatedArticlesCardLimit' => [ + 'default' => 3, + 'wikivoyage' => 9, +], + 'wmgRelatedArticlesUseCirrusSearch' => [ 'default' => true, 'wikivoyage' => false, // T164391 -- To view, visit https://gerrit.wikimedia.org/r/363742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f2a95ecbd08a33a2653fcc7b578582ebadd9c8d Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bmansurov Gerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Show correct icon in EditorOverlay
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363732 ) Change subject: Show correct icon in EditorOverlay .. Show correct icon in EditorOverlay Replace the `back` icon on the first screen of EditorOverlay with a 'close' icon as this behavior is consistent with how other overlays such as the language overlay and the categories overlay work. Bug: T73203 Change-Id: I09d0d63b488314160a7bdbd8f4974744f0a60c34 --- M resources/mobile.editor.common/EditorOverlayBase.js M resources/mobile.editor.common/editHeader.hogan M tests/browser/features/support/pages/article_page.rb 3 files changed, 2 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/resources/mobile.editor.common/EditorOverlayBase.js b/resources/mobile.editor.common/EditorOverlayBase.js index f032cbe..ebb2f9f 100644 --- a/resources/mobile.editor.common/EditorOverlayBase.js +++ b/resources/mobile.editor.common/EditorOverlayBase.js @@ -138,7 +138,6 @@ /** @inheritdoc **/ className: 'overlay editor-overlay', events: $.extend( {}, Overlay.prototype.events, { - // FIXME: This should be .close (see bug 71203) 'click .back': 'onClickBack', 'click .continue': 'onClickContinue', 'click .submit': 'onClickSubmit' diff --git a/resources/mobile.editor.common/editHeader.hogan b/resources/mobile.editor.common/editHeader.hogan index 1b8bcd0..64035ac 100644 --- a/resources/mobile.editor.common/editHeader.hogan +++ b/resources/mobile.editor.common/editHeader.hogan @@ -1,6 +1,6 @@ - {{{backButton}}} + {{{cancelButton}}} {{^hasToolbar}} diff --git a/tests/browser/features/support/pages/article_page.rb b/tests/browser/features/support/pages/article_page.rb index 68f58f0..ef955ca 100644 --- a/tests/browser/features/support/pages/article_page.rb +++ b/tests/browser/features/support/pages/article_page.rb @@ -37,7 +37,7 @@ div(:anon_editor_warning, css: '.anon-msg') div(:editor_overlay, class: 'editor-overlay') button(:editor_overlay_close_button) do |page| -page.editor_overlay_element.button_element(css: '.back') +page.editor_overlay_element.button_element(css: '.cancel') end ## upload -- To view, visit https://gerrit.wikimedia.org/r/363732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09d0d63b488314160a7bdbd8f4974744f0a60c34 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: BmansurovGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix infinite loop in ve.BranchNode#getNodeFromOffset
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363743 ) Change subject: Fix infinite loop in ve.BranchNode#getNodeFromOffset .. Fix infinite loop in ve.BranchNode#getNodeFromOffset This is a minor clean up of the refactoring done in 1cbcc2f0bf66fd824c255a7e6ca1e87fdacd46e9. If the document is empty (consisting only of ve.ce.InternalListNode) then it is possible for `currentNode.children.length > 0` and `currentNode.children[ 0 ] instanceof ve.ce.InternalListNode`. This sets up an infinite loop, unless `offset === nodeOffset`. This was being triggered when an empty document consisting only of `, , , ` was p-unwrapped; for example, prior to paste in ve.ui.MWWikitextStringTransferHandler.js or prior to update of a `-{}-` construct by ve.ui.MWLanguageVariantInspector. Change-Id: I933bf28637f3b3c235aa4b9f8d96d1d09a7b3085 --- M src/ve.BranchNode.js M src/ve.Document.js M tests/ce/ve.ce.Document.test.js 3 files changed, 37 insertions(+), 19 deletions(-) Approvals: Divec: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ve.BranchNode.js b/src/ve.BranchNode.js index c2404db..477bb4b 100644 --- a/src/ve.BranchNode.js +++ b/src/ve.BranchNode.js @@ -155,14 +155,14 @@ while ( currentNode.children.length ) { for ( i = 0, length = currentNode.children.length; i < length; i++ ) { childNode = currentNode.children[ i ]; - if ( childNode instanceof ve.ce.InternalListNode ) { - break; - } if ( offset === nodeOffset ) { // The requested offset is right before childNode, so it's not // inside any of currentNode's children, but is inside currentNode return currentNode; } + if ( childNode instanceof ve.ce.InternalListNode ) { + break SIBLINGS; + } nodeLength = childNode.getOuterLength(); if ( offset >= nodeOffset && offset < nodeOffset + nodeLength ) { if ( !shallow && childNode.hasChildren() && childNode.getChildren().length ) { diff --git a/src/ve.Document.js b/src/ve.Document.js index 58d7218..5e909c4 100644 --- a/src/ve.Document.js +++ b/src/ve.Document.js @@ -39,7 +39,7 @@ }; /** - * Get a node a an offset. + * Get a node at an offset. * * @method * @param {number} offset Offset to get node at diff --git a/tests/ce/ve.ce.Document.test.js b/tests/ce/ve.ce.Document.test.js index 4984c98..c1eebc8 100644 --- a/tests/ce/ve.ce.Document.test.js +++ b/tests/ce/ve.ce.Document.test.js @@ -35,7 +35,7 @@ // TODO: getDirectionFromRange QUnit.test( 'getNodeAndOffset', function ( assert ) { - var tests, i, iLen, test, parts, view, data, ceDoc, rootNode, offsetCount, offset, j, jLen, node; + var tests, i, iLen, test, parts, view, data, dmDoc, ceDoc, rootNode, offsetCount, offset, j, jLen, node, ex; // Each test below has the following: // html: an input document @@ -63,6 +63,14 @@ html: 'x', data: [ '', '', 'x', '', '' ], positions: "||<#text>|x||" + }, + { + title: 'Empty document', + html: '', + unwrap: [ { type: 'paragraph' } ], + data: [], + positions: "", + dies: [ 1 ] }, { title: 'Slugless emptied paragraph', @@ -121,7 +129,20 @@ test = tests[ i ]; parts = test.positions.split( /[|]/ ); view = ve.test.utils.createSurfaceViewFromHtml( test.html ); - data = view.getModel().getDocument().data.data + dmDoc = view.getModel().getDocument(); + if ( test.unwrap ) { + new ve.dm.Surface( dmDoc ).change( + ve.dm.TransactionBuilder.static.newFromWrap( + dmDoc, + new ve.Range( 0, dmDoc.data.countNonInternalElements() ), + [], + [], + test.unwrap, + [] + ) + ); + } + data = dmDoc.data.data .slice( 0, -2 ) .map( showModelItem ); ceDoc = view.documentView; @@ -147,19 +168,6 @@ } for ( offset = 0; offset < offsetCount;
[MediaWiki-commits] [Gerrit] mediawiki...UnusedRedirects[master]: Add special page alias in Spanish language
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362803 ) Change subject: Add special page alias in Spanish language .. Add special page alias in Spanish language Change-Id: If7bbc6ab89457df8fece5339d363b313776b03dd --- M UnusedRedirects.alias.php 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: SamanthaNguyen: Looks good to me, approved jenkins-bot: Verified diff --git a/UnusedRedirects.alias.php b/UnusedRedirects.alias.php index 4a8c3ef..2292910 100644 --- a/UnusedRedirects.alias.php +++ b/UnusedRedirects.alias.php @@ -22,3 +22,8 @@ $specialPageAliases['fr'] = array( 'UnusedRedirects' => array( 'Redirections_inutilisées', 'RedirectionsInutilisées', 'Redirections_inutilisees', 'RedirectionsInutilisees', 'Redirections_non_utilisées', 'RedirectionsNonUtilisées', 'Redirections_non_utilisees', 'RedirectionsNonUtilisees' ), ); + +/** Spanish (español) */ +$specialPageAliases['es'] = array( + 'UnusedRedirects' => array( 'Redirecciones_sin_uso' ), +); \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/362803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7bbc6ab89457df8fece5339d363b313776b03dd Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/UnusedRedirects Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-Reviewer: MarcoAurelio Gerrit-Reviewer: SamanthaNguyen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...cumin[master]: Move configuration loader from cli to main module
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363746 ) Change subject: Move configuration loader from cli to main module .. Move configuration loader from cli to main module * add a cumin.Config class * move the parse_config helper to cumin's main module from the cli one, to allow to easily load the configuration also when it's used as a library. Bug: T169640 Change-Id: I924f0731268e15249be30e5b5482918f2d853265 --- M cumin/__init__.py M cumin/cli.py M cumin/tests/unit/test_cli.py A cumin/tests/unit/test_init.py 4 files changed, 94 insertions(+), 52 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/46/363746/1 diff --git a/cumin/__init__.py b/cumin/__init__.py index 9e70e4c..941208c 100644 --- a/cumin/__init__.py +++ b/cumin/__init__.py @@ -1,6 +1,8 @@ """Automation and orchestration framework written in Python.""" from pkg_resources import DistributionNotFound, get_distribution +import yaml + try: __version__ = get_distribution(__name__).version @@ -10,3 +12,43 @@ class CuminError(Exception): """Base Exception class for all Cumin's custom Exceptions.""" + + +class Config(dict): +"""Singleton-like dictionary class to load the configuration from a given path only once.""" + +_instances = {} # Keep track of different loaded configurations + +def __new__(cls, config='/etc/cumin/config.yaml'): +"""Load the given configuration if not already loaded and return it. + +Called by Python's data model for each new instantiation of the class. + +Arguments: +config -- path to the configuration file to load. [optional, default: /etc/cumin/config.yaml] +""" +if config not in cls._instances: +cls._instances[config] = parse_config(config) + +return cls._instances[config] + + +def parse_config(config_file): +"""Parse the YAML configuration file. + +Arguments: +config_file -- the path of the configuration file to load +""" +try: +with open(config_file, 'r') as f: +config = yaml.safe_load(f) +except IOError as e: +raise CuminError('Unable to read configuration file: {message}'.format(message=e)) +except yaml.parser.ParserError as e: +raise CuminError("Unable to parse configuration file '{config}':\n{message}".format( +config=config_file, message=e)) + +if config is None: +raise CuminError("Empty configuration found in '{config}'".format(config=config_file)) + +return config diff --git a/cumin/cli.py b/cumin/cli.py index ae88a28..5bc038b 100644 --- a/cumin/cli.py +++ b/cumin/cli.py @@ -12,7 +12,6 @@ from logging.handlers import RotatingFileHandler # pylint: disable=ungrouped-imports import colorama -import yaml from ClusterShell.NodeSet import NodeSet from tqdm import tqdm @@ -171,27 +170,6 @@ logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.INFO) - - -def parse_config(config_file): -"""Parse the YAML configuration file. - -Arguments: -config_file -- the path of the configuration file to load -""" -try: -with open(config_file, 'r') as f: -config = yaml.safe_load(f) -except IOError as e: -raise cumin.CuminError('Unable to read configuration file: {message}'.format(message=e)) -except yaml.parser.ParserError as e: -raise cumin.CuminError("Unable to parse configuration file '{config}':\n{message}".format( -config=config_file, message=e)) - -if config is None: -raise cumin.CuminError("Empty configuration found in '{config}'".format(config=config_file)) - -return config def sigint_handler(*args): # pylint: disable=unused-argument @@ -375,7 +353,7 @@ return 0 user = get_running_user() -config = parse_config(args.config) +config = cumin.Config(args.config) setup_logging(config['log_file'], debug=args.debug) except cumin.CuminError as e: stderr(e) diff --git a/cumin/tests/unit/test_cli.py b/cumin/tests/unit/test_cli.py index cd9ace9..d7606fd 100644 --- a/cumin/tests/unit/test_cli.py +++ b/cumin/tests/unit/test_cli.py @@ -1,7 +1,4 @@ """CLI tests.""" -import os -import tempfile - from logging import DEBUG, INFO import mock @@ -78,32 +75,6 @@ cli.setup_logging('filename', debug=True) logging.setLevel.assert_called_with(DEBUG) assert file_handler.called - - -def test_parse_config_ok(): -"""The configuration file is properly parsed and accessible.""" -config = cli.parse_config('doc/examples/config.yaml') -assert 'log_file' in config - - -def test_parse_config_non_existent(): -"""A CuminError is raised if the configuration file is not available.""" -with pytest.raises(CuminError, match='Unable to read configuration file'): -
[MediaWiki-commits] [Gerrit] operations...cumin[master]: Configuration: automatically load backend's aliases
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363747 ) Change subject: Configuration: automatically load backend's aliases .. Configuration: automatically load backend's aliases * when loading the configuration, automatically load also any backend's aliases file present in the same directory of the configuration file. Support for aliases into the backends will be added next. * improved tests fixture usage and removed usage of the example configuration present in the documentation from the tests. Bug: T169640 Change-Id: Ief4c374408741af0e29d9bf07d8976b8f753d78d --- M cumin/__init__.py M cumin/tests/__init__.py A cumin/tests/fixtures/config/empty/config.yaml A cumin/tests/fixtures/config/invalid/config.yaml A cumin/tests/fixtures/config/valid/config.yaml A cumin/tests/fixtures/config/valid_with_aliases/config.yaml A cumin/tests/fixtures/config/valid_with_aliases/direct_aliases.yaml A cumin/tests/fixtures/config/valid_with_aliases/puppetdb_aliases.yaml A cumin/tests/fixtures/config/valid_with_empty_aliases/config.yaml A cumin/tests/fixtures/config/valid_with_empty_aliases/direct_aliases.yaml A cumin/tests/fixtures/config/valid_with_empty_aliases/puppetdb_aliases.yaml A cumin/tests/fixtures/config/valid_with_invalid_aliases/config.yaml A cumin/tests/fixtures/config/valid_with_invalid_aliases/puppetdb_aliases.yaml R cumin/tests/fixtures/grammar/invalid_grammars.txt R cumin/tests/fixtures/grammar/valid_grammars.txt M cumin/tests/unit/test_grammar.py M cumin/tests/unit/test_init.py 17 files changed, 156 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/47/363747/1 diff --git a/cumin/__init__.py b/cumin/__init__.py index 941208c..7d450dd 100644 --- a/cumin/__init__.py +++ b/cumin/__init__.py @@ -1,4 +1,7 @@ """Automation and orchestration framework written in Python.""" +import os +import pkgutil + from pkg_resources import DistributionNotFound, get_distribution import yaml @@ -29,6 +32,7 @@ """ if config not in cls._instances: cls._instances[config] = parse_config(config) +load_backend_aliases(cls._instances[config], os.path.dirname(config)) return cls._instances[config] @@ -52,3 +56,26 @@ raise CuminError("Empty configuration found in '{config}'".format(config=config_file)) return config + + +def load_backend_aliases(config, base_path): +"""Given a configuration, automatically add backend aliases from configuration files in the base_path directory. + +It will look for files named {backend}_aliases.yaml in the base_path directory and will load it's content into the +main configuration under the 'aliases' key under the backend specific configuration, so that it will be accessible +by config[backend]['aliases']. + +Arguments: +config-- the configuration object to add the aliases to. +base_path -- the base path where to look for the aliases files. +""" +abs_path = os.path.dirname(os.path.abspath(__file__)) +backends = [name for _, name, _ in pkgutil.iter_modules([os.path.join(abs_path, 'backends')])] + +for backend in backends: +alias_file = os.path.join(base_path, '{backend}_aliases.yaml'.format(backend=backend)) +if os.path.isfile(alias_file): # Do not fail if the alias file doesn't exists +if config.get(backend) is None: +config[backend] = {} + +config[backend]['aliases'] = parse_config(alias_file) diff --git a/cumin/tests/__init__.py b/cumin/tests/__init__.py index 742e027..de0b2a3 100644 --- a/cumin/tests/__init__.py +++ b/cumin/tests/__init__.py @@ -7,17 +7,26 @@ _TESTS_BASE_PATH = os.path.realpath(os.path.dirname(__file__)) -def get_fixture(filename, as_string=False): +def get_fixture(path, as_string=False): """Return the content of a fixture file. Arguments: -filename -- the file to be opened in the test's fixture directory +path -- the relative path to the test's fixture directory to be opened. as_string -- return the content as a multiline string instead of a list of lines [optional, default: False] """ -with open(os.path.join(_TESTS_BASE_PATH, 'fixtures', filename)) as f: +with open(get_fixture_path(path)) as f: if as_string: content = f.read() else: content = f.readlines() return content + + +def get_fixture_path(path): +"""Return the absolute path of the given fixture. + +Arguments: +path -- the relative path to the test's fixture directory. +""" +return os.path.join(_TESTS_BASE_PATH, 'fixtures', path) diff --git a/cumin/tests/fixtures/config/empty/config.yaml b/cumin/tests/fixtures/config/empty/config.yaml new file mode 100644 index 000..e69de29 --- /dev/null +++ b/cumin/tests/fixtures/config/empty/config.yaml
[MediaWiki-commits] [Gerrit] operations...cumin[master]: Query and grammar: add support for aliases
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363748 ) Change subject: Query and grammar: add support for aliases .. Query and grammar: add support for aliases - allow aliases of the form A:alias_name into the grammar. - automatically replace recursively all the aliases directly in the QueryBuilder, to make it completely transparent for the backends. - In this first iteration the Direct backend do not support aliases because it doesn't support subgroups. It will automatically support them with the introduction of the multi-backend queries. Bug: T169640 Change-Id: I3d6859b052cbafd7786c9b0b96f0abc0e965f87a --- M README.md M cumin/backends/__init__.py M cumin/grammar.py M cumin/query.py M cumin/tests/fixtures/grammar/invalid_grammars.txt M cumin/tests/fixtures/grammar/valid_grammars.txt M cumin/tests/unit/test_query.py 7 files changed, 96 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/48/363748/1 diff --git a/README.md b/README.md index 6939b4e..b4edde5 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ The available categories are: +- `A`: for aliases. Aliases are automatically loaded from `{backend_name}_aliases.yaml` files, if they are present in + the same directory of the main configuration file. They are also automatically replaced with their values and nesting + aliases is allowed. - `F`: for querying facts - `R`: for querying resources @@ -64,6 +67,7 @@ - Category based key-value selection: `R:ResourceName = ResourceValue` - A complex selection for facts: `host10[10-42].*.domain or (not F:key1 = value1 and host10*) or (F:key2 > value2 and F:key3 ~ '^value[0-9]+')` +- Alias selection: `A:group1` Backus-Naur form (BNF) of the grammar: diff --git a/cumin/backends/__init__.py b/cumin/backends/__init__.py index 120afb9..bdbb231 100644 --- a/cumin/backends/__init__.py +++ b/cumin/backends/__init__.py @@ -31,7 +31,7 @@ """Add a category token to the query 'F:key = value'. Arguments: -category -- the category of the token, one of cumin.grammar.CATEGORIES +category -- the category of the token, one of cumin.grammar.CATEGORIES excluding the alias one. key -- the key for this category value-- the value to match, if not specified the key itself will be matched [optional, default: None] operator -- the comparison operator to use, one of cumin.grammar.OPERATORS [optional: default: =] diff --git a/cumin/grammar.py b/cumin/grammar.py index 95de3ef..d60759f 100644 --- a/cumin/grammar.py +++ b/cumin/grammar.py @@ -4,6 +4,7 @@ # Available categories CATEGORIES = ( +'A', # Alias, it will be automatically replaced, the backends will never see it. 'F', # Fact 'R', # Resource ) diff --git a/cumin/query.py b/cumin/query.py index 12fc199..a816882 100644 --- a/cumin/query.py +++ b/cumin/query.py @@ -6,6 +6,7 @@ from ClusterShell.NodeSet import NodeSet from pyparsing import ParseResults +from cumin.backends import InvalidQueryError from cumin.grammar import grammar @@ -45,6 +46,7 @@ self.logger = logger or logging.getLogger(__name__) self.query_string = query_string.strip() self.query = Query.new(config, logger=self.logger) +self.aliases = config.get(config['backend'], {}).get('aliases', {}) self.level = 0 # Nesting level for sub-groups def build(self): @@ -60,10 +62,10 @@ Arguments: token -- a single token returned by the grammar parsing -level -- Nesting level in case of sub-groups in the query [optional, default: 0] +level -- nesting level in case of sub-groups in the query [optional, default: 0] """ if not isinstance(token, ParseResults): -raise RuntimeError("Invalid query string syntax '{query}'. Token is '{token}'".format( +raise InvalidQueryError("Invalid query string syntax '{query}'. Token is '{token}'".format( query=self.query_string, token=token)) token_dict = token.asDict() @@ -71,14 +73,15 @@ for subtoken in token: self._parse_token(subtoken, level=(level + 1)) else: -self._build_token(token_dict, level) +if not self._replace_alias(token_dict, level): +self._build_token(token_dict, level) def _build_token(self, token_dict, level): """Build a token into the query object for the configured backend. Arguments: token_dict -- the dictionary of the parsed token returned by the grammar parsing -level -- Nesting level in the query +level -- nesting level in the query """ keys = token_dict.keys() @@ -103,3 +106,32 @@ elif 'category' in keys:
[MediaWiki-commits] [Gerrit] operations...cumin[master]: QueryBuilder: move query string to build() method
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363750 ) Change subject: QueryBuilder: move query string to build() method .. QueryBuilder: move query string to build() method * Breaking change: the constructor of the QueryBuilder was changed to not accept anymore a query string directly, but just the configuration and the optional logger. The query string is now a required parameter of the build() method. This properly split configuration and parameters, allowing to easily build() multiple queries with the same QueryBuilder instance. Change-Id: I27e4576d44b0772ab9b843b5816a932fb352a962 --- M cumin/cli.py M cumin/query.py M cumin/tests/unit/test_query.py 3 files changed, 63 insertions(+), 77 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/50/363750/1 diff --git a/cumin/cli.py b/cumin/cli.py index 5bc038b..a318cbe 100644 --- a/cumin/cli.py +++ b/cumin/cli.py @@ -231,7 +231,7 @@ args -- ArgumentParser instance with parsed command line arguments config -- a dictionary with the parsed configuration file """ -query = QueryBuilder(args.hosts, config, logger).build() +query = QueryBuilder(config, logger).build(args.hosts) hosts = query.execute() if not hosts: diff --git a/cumin/query.py b/cumin/query.py index bf2ff59..26a5e1d 100644 --- a/cumin/query.py +++ b/cumin/query.py @@ -35,23 +35,26 @@ Parse a given query string and converts it into a query object for the configured backend """ -def __init__(self, query_string, config, logger=None): +def __init__(self, config, logger=None): """Query builder constructor. Arguments: -query_string -- the query string to be parsed and passed to the query builder config -- the configuration dictionary logger -- an optional logging instance [optional, default: None] """ self.logger = logger or logging.getLogger(__name__) -self.query_string = query_string.strip() self.query = Query.new(config, logger=self.logger) self.aliases = config.get(config['backend'], {}).get('aliases', {}) -self.level = 0 # Nesting level for sub-groups +self.level = None # Nesting level for sub-groups -def build(self): -"""Parse the query string according to the grammar and build the query object for the configured backend.""" -parsed = grammar.parseString(self.query_string, parseAll=True) +def build(self, query_string): +"""Parse the query string according to the grammar and build the query object for the configured backend. + +Arguments: +query_string -- the query string to be parsed and passed to the query builder +""" +self.level = 0 +parsed = grammar.parseString(query_string.strip(), parseAll=True) for token in parsed: self._parse_token(token) @@ -64,9 +67,9 @@ token -- a single token returned by the grammar parsing level -- nesting level in case of sub-groups in the query [optional, default: 0] """ -if not isinstance(token, ParseResults): -raise InvalidQueryError("Invalid query string syntax '{query}'. Token is '{token}'".format( -query=self.query_string, token=token)) +if not isinstance(token, ParseResults): # Non-testable block, this should never happen +raise InvalidQueryError('Expected an instance of pyparsing.ParseResults, got {instance}: {token}'.format( +instance=type(token), token=token)) token_dict = token.asDict() if not token_dict: @@ -103,6 +106,8 @@ self.query.add_and() elif token_dict['bool'] == 'or': self.query.add_or() +else: # Non-testable block, this should never happen with the current grammar +raise InvalidQueryError("Got bool '{bool}', one of and|or expected".format(bool=token_dict['bool'])) elif 'hosts' in keys: token_dict['hosts'] = NodeSet(token_dict['hosts']) @@ -111,6 +116,10 @@ elif 'category' in keys: self.query.add_category(**token_dict) +else: # Non-testable block, this should never happen with the current grammar +raise InvalidQueryError( +"No valid key found in token, one of bool|hosts|category expected: {token}".format(token=token_dict)) + def _replace_alias(self, token_dict, level): """Replace any alias in the query in a recursive way, alias can reference other aliases. diff --git a/cumin/tests/unit/test_query.py b/cumin/tests/unit/test_query.py index 7ea6a08..1a2d67e 100644 --- a/cumin/tests/unit/test_query.py +++ b/cumin/tests/unit/test_query.py @@ -69,115 +69,92 @@ } @mock.patch('cumin.query.Query', QueryFactory)
[MediaWiki-commits] [Gerrit] operations...cumin[master]: QueryBuilder: fix subgroup close at the end of query
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363749 ) Change subject: QueryBuilder: fix subgroup close at the end of query .. QueryBuilder: fix subgroup close at the end of query * When a query was having subgroups that were closed at the end of the query, QueryBuilder was not calling the close_subgroup() method of the related backend as it should have. For example in a query like: host1* and (R:Class = Foo or R:Class = Bar) Change-Id: I53c7aa6cb61f1ebbfa217fadce326c8af39c --- M cumin/query.py M cumin/tests/unit/test_query.py 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/49/363749/1 diff --git a/cumin/query.py b/cumin/query.py index a816882..bf2ff59 100644 --- a/cumin/query.py +++ b/cumin/query.py @@ -76,6 +76,10 @@ if not self._replace_alias(token_dict, level): self._build_token(token_dict, level) +while self.level > level: +self.query.close_subgroup() +self.level -= 1 + def _build_token(self, token_dict, level): """Build a token into the query object for the configured backend. diff --git a/cumin/tests/unit/test_query.py b/cumin/tests/unit/test_query.py index aefe8b8..7ea6a08 100644 --- a/cumin/tests/unit/test_query.py +++ b/cumin/tests/unit/test_query.py @@ -92,6 +92,7 @@ mock.call(category='R', key='key2', operator='~', value='regex')]) query_builder.query.add_and.assert_called_once_with() query_builder.query.close_subgroup.assert_called_once_with() +assert query_builder.level == 0 @mock.patch('cumin.query.Query', QueryFactory) def test_build_valid_with_aliases(self): @@ -105,6 +106,7 @@ query_builder.query.add_or.assert_has_calls([mock.call(), mock.call(), mock.call()]) query_builder.query.open_subgroup.assert_called_once_with() query_builder.query.close_subgroup.assert_called_once_with() +assert query_builder.level == 0 @mock.patch('cumin.query.Query', QueryFactory) def test_build_valid_with_nested_aliases(self): # pylint: disable=invalid-name @@ -117,6 +119,8 @@ mock.call(hosts=NodeSet('host1')), mock.call(hosts=NodeSet('host10[10-22]'))]) query_builder.query.add_or.assert_has_calls([mock.call(), mock.call()]) query_builder.query.open_subgroup.assert_has_calls([mock.call(), mock.call()]) +query_builder.query.close_subgroup.assert_has_calls([mock.call(), mock.call()]) +assert query_builder.level == 0 @mock.patch('cumin.query.Query', QueryFactory) def test_build_invalid_alias_syntax(self): @@ -138,6 +142,7 @@ query_builder = QueryBuilder('host1*', self.config) query_builder.build() query_builder.query.add_hosts.assert_called_once_with(hosts=NodeSet('host1*')) +assert query_builder.level == 0 @mock.patch('cumin.query.Query', QueryFactory) def test_build_invalid(self): @@ -147,6 +152,30 @@ query_builder.build() @mock.patch('cumin.query.Query', QueryFactory) +def test_build_subgroup(self): +"""QueryBuilder.build() should open and close a subgroup properly.""" +query_builder = QueryBuilder('(host1)', self.config) +query_builder.build() + + query_builder.query.add_hosts.assert_has_calls([mock.call(hosts=NodeSet('host1'))]) +query_builder.query.open_subgroup.assert_called_once_with() +query_builder.query.close_subgroup.assert_called_once_with() +assert query_builder.level == 0 + +@mock.patch('cumin.query.Query', QueryFactory) +def test_build_subgroups(self): +"""QueryBuilder.build() should open and close multiple subgroups properly.""" +query_builder = QueryBuilder('(host1 or (host2 or host3))', self.config) +query_builder.build() + +query_builder.query.add_hosts.assert_has_calls( +[mock.call(hosts=NodeSet('host1')), mock.call(hosts=NodeSet('host2')), + mock.call(hosts=NodeSet('host3'))]) +query_builder.query.open_subgroup.assert_has_calls([mock.call(), mock.call()]) +query_builder.query.close_subgroup.assert_has_calls([mock.call(), mock.call()]) +assert query_builder.level == 0 + +@mock.patch('cumin.query.Query', QueryFactory) def test__parse_token(self): """QueryBuilder._parse_token() should raise RuntimeError for an invalid token.""" query_builder = QueryBuilder(self.invalid_query_string, self.config) -- To view, visit https://gerrit.wikimedia.org/r/363749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53c7aa6cb61f1ebbfa217fadce326c8af39c Gerrit-PatchSet: 1 Gerrit-Project: operations/software/cumin Gerrit-Branch: master Gerrit-Owner: Volans
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove Programs and Participation namespaces from meta.wikim...
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363745 ) Change subject: Remove Programs and Participation namespaces from meta.wikimedia .. Remove Programs and Participation namespaces from meta.wikimedia Bug: T61837 Change-Id: I87089371b6e6bec9bd6722a9c4e2dcef5cf0de09 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/45/363745/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2cc5d10..668742c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -5047,12 +5047,8 @@ 201 => 'Grants_talk', 202 => 'Research', // T30742 203 => 'Research_talk', - 204 => 'Participation', - 205 => 'Participation_talk', 206 => 'Iberocoop', // T40398 207 => 'Iberocoop_talk', - 208 => 'Programs', // T51312 - 209 => 'Programs_talk', ], // @} -- To view, visit https://gerrit.wikimedia.org/r/363745 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87089371b6e6bec9bd6722a9c4e2dcef5cf0de09 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelio___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use SmashPig version of Currency classes
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363744 ) Change subject: Use SmashPig version of Currency classes .. Use SmashPig version of Currency classes Bug:163868 Change-Id: If9bdaa9f7128d85c13dc0b5f15c0cb7452f1aa80 --- M extension.json M gateway_common/Amount.php D gateway_common/CurrencyRates.php M gateway_common/DonationData.php D gateway_common/NationalCurrencies.php M gateway_common/gateway.adapter.php M modules/CurrencyRatesModule.php M tests/phpunit/Adapter/Amazon/AmazonTest.php 8 files changed, 9 insertions(+), 443 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/44/363744/1 diff --git a/extension.json b/extension.json index d6367ad..0c35e95 100644 --- a/extension.json +++ b/extension.json @@ -67,7 +67,6 @@ "FiscalNumber": "gateway_common/FiscalNumber.php", "ClientSideValidationHelper": "gateway_common/ClientSideValidationHelper.php", "ContributionTrackingPlusUnique": "gateway_common/ContributionTrackingPlusUnique.php", - "CurrencyRates": "gateway_common/CurrencyRates.php", "CurrencyRatesModule": "modules/CurrencyRatesModule.php", "DonationData": "gateway_common/DonationData.php", "DonationInterface": "DonationInterface.class.php", @@ -91,7 +90,6 @@ "LocalClusterPsr6Cache": "gateway_common/LocalClusterPsr6Cache.php", "LogPrefixProvider": "gateway_common/LogPrefixProvider.php", "MessageUtils": "gateway_common/MessageUtils.php", - "NationalCurrencies": "gateway_common/NationalCurrencies.php", "PaymentError": "gateway_common/PaymentError.php", "PaymentMethod": "gateway_common/PaymentMethod.php", "PaymentResult": "gateway_common/PaymentResult.php", diff --git a/gateway_common/Amount.php b/gateway_common/Amount.php index 434223c..924e2ff 100644 --- a/gateway_common/Amount.php +++ b/gateway_common/Amount.php @@ -1,5 +1,7 @@ 6.11, - 'ADP' => 155, - 'AED' => 3.67, - 'AFA' => 67, - 'AFN' => 67, - 'ALL' => 126, - 'AMD' => 486, - 'ANG' => 1.78, - 'AOA' => 165, - 'AON' => 165, - 'ARS' => 16, - 'ATS' => 13, - 'AUD' => 1.32, - 'AWG' => 1.79, - 'AZM' => 9583, - 'AZN' => 1.92, - 'BAM' => 1.82, - 'BBD' => 2, - 'BDT' => 78, - 'BEF' => 38, - 'BGL' => 1.81, - 'BGN' => 1.81, - 'BHD' => 0.37423, - 'BIF' => 1663, - 'BMD' => 0.999603, - 'BND' => 1.41, - 'BOB' => 6.73, - 'BRL' => 3.13, - 'BSD' => 0.995552, - 'BTN' => 68, - 'BWP' => 10, - 'BYR' => 20020, - 'BZD' => 1.96, - 'CAD' => 1.31, - 'CDF' => 1250, - 'CHF' => 0.992983, - 'CLP' => 647, - 'CNY' => 6.88, - 'COP' => 2922, - 'CRC' => 537, - 'CUC' => 1, - 'CUP' => 23, - 'CVE' => 103, - 'CYP' => 0.5453490001, - 'CZK' => 25, - 'DEM' => 1.82, - 'DJF' => 178, - 'DKK' => 6.93, - 'DOP' => 46, - 'DZD' => 109, - 'ECS' => 25589, - 'EEK' => 15, - 'EGP' => 19, - 'ESP' => 155, - 'ETB' => 22, - 'EUR' => 0.931784, - 'FIM' => 5.54, - 'FJD' => 2.05, - 'FKP' => 0.798973, - 'FRF' => 6.11, - 'GBP' => 0.7991879998, - 'GEL' => 2.69, - 'GHC' => 43112, - 'GHS' => 4.31, - 'GIP' => 0.798973, - 'GMD' => 43, - 'GNF' => 9274, - 'GRD' => 318, - 'GTQ' => 7.27, - 'GYD' => 198, - 'HKD' => 7.76, - 'HNL' => 23, -
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix infinite loop in ve.BranchNode#getNodeFromOffset
C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363743 ) Change subject: Fix infinite loop in ve.BranchNode#getNodeFromOffset .. Fix infinite loop in ve.BranchNode#getNodeFromOffset This is a minor clean up of the refactoring done in 1cbcc2f0bf66fd824c255a7e6ca1e87fdacd46e9. If the document is empty (consisting only of ve.ce.InternalListNode) then it is possible for `currentNode.children.length > 0` and `currentNode.children[ 0 ] instanceof ve.ce.InternalListNode`. This sets up an infinite loop, unless `offset === nodeOffset`. This was being triggered when an empty document consisting only of `, , , ` was p-unwrapped; for example, prior to paste in ve.ui.MWWikitextStringTransferHandler.js or prior to update of a `-{}-` construct by ve.ui.MWLanguageVariantInspector. Change-Id: I933bf28637f3b3c235aa4b9f8d96d1d09a7b3085 --- M src/ve.BranchNode.js M src/ve.Document.js M tests/ce/ve.ce.Document.test.js 3 files changed, 37 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/43/363743/1 diff --git a/src/ve.BranchNode.js b/src/ve.BranchNode.js index c2404db..477bb4b 100644 --- a/src/ve.BranchNode.js +++ b/src/ve.BranchNode.js @@ -155,14 +155,14 @@ while ( currentNode.children.length ) { for ( i = 0, length = currentNode.children.length; i < length; i++ ) { childNode = currentNode.children[ i ]; - if ( childNode instanceof ve.ce.InternalListNode ) { - break; - } if ( offset === nodeOffset ) { // The requested offset is right before childNode, so it's not // inside any of currentNode's children, but is inside currentNode return currentNode; } + if ( childNode instanceof ve.ce.InternalListNode ) { + break SIBLINGS; + } nodeLength = childNode.getOuterLength(); if ( offset >= nodeOffset && offset < nodeOffset + nodeLength ) { if ( !shallow && childNode.hasChildren() && childNode.getChildren().length ) { diff --git a/src/ve.Document.js b/src/ve.Document.js index 58d7218..5e909c4 100644 --- a/src/ve.Document.js +++ b/src/ve.Document.js @@ -39,7 +39,7 @@ }; /** - * Get a node a an offset. + * Get a node at an offset. * * @method * @param {number} offset Offset to get node at diff --git a/tests/ce/ve.ce.Document.test.js b/tests/ce/ve.ce.Document.test.js index 4984c98..c1eebc8 100644 --- a/tests/ce/ve.ce.Document.test.js +++ b/tests/ce/ve.ce.Document.test.js @@ -35,7 +35,7 @@ // TODO: getDirectionFromRange QUnit.test( 'getNodeAndOffset', function ( assert ) { - var tests, i, iLen, test, parts, view, data, ceDoc, rootNode, offsetCount, offset, j, jLen, node; + var tests, i, iLen, test, parts, view, data, dmDoc, ceDoc, rootNode, offsetCount, offset, j, jLen, node, ex; // Each test below has the following: // html: an input document @@ -63,6 +63,14 @@ html: 'x', data: [ '', '', 'x', '', '' ], positions: "||<#text>|x||" + }, + { + title: 'Empty document', + html: '', + unwrap: [ { type: 'paragraph' } ], + data: [], + positions: "", + dies: [ 1 ] }, { title: 'Slugless emptied paragraph', @@ -121,7 +129,20 @@ test = tests[ i ]; parts = test.positions.split( /[|]/ ); view = ve.test.utils.createSurfaceViewFromHtml( test.html ); - data = view.getModel().getDocument().data.data + dmDoc = view.getModel().getDocument(); + if ( test.unwrap ) { + new ve.dm.Surface( dmDoc ).change( + ve.dm.TransactionBuilder.static.newFromWrap( + dmDoc, + new ve.Range( 0, dmDoc.data.countNonInternalElements() ), + [], + [], + test.unwrap, + [] + ) + ); + } + data = dmDoc.data.data .slice( 0, -2 ) .map( showModelItem ); ceDoc = view.documentView; @@ -147,19 +168,6 @@ } for ( offset = 0; offset
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Wikivoyage projects can show more than 1 related article
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363742 ) Change subject: Wikivoyage projects can show more than 1 related article .. Wikivoyage projects can show more than 1 related article Bug: T164765 Change-Id: I7f2a95ecbd08a33a2653fcc7b578582ebadd9c8d --- M wmf-config/InitialiseSettings.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/42/363742/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2cc5d10..6edc83a 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -17276,6 +17276,11 @@ 'default' => true, // T164391, T143480 ], +'wgRelatedArticlesCardLimit' => [ + 'default' => 3, + 'wikivoyage' => 9, +], + 'wmgRelatedArticlesUseCirrusSearch' => [ 'default' => true, 'wikivoyage' => false, // T164391 -- To view, visit https://gerrit.wikimedia.org/r/363742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f2a95ecbd08a33a2653fcc7b578582ebadd9c8d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Stop emitting global events that are not being used...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363658 ) Change subject: Hygiene: Stop emitting global events that are not being used anywhere .. Hygiene: Stop emitting global events that are not being used anywhere Remove unused events WatchstarGateway (watched) and EditorOverlay (edit-preview) Change-Id: I4bd2b73223f58f1000cfb26454ac6dd92673517d --- M resources/mobile.editor.overlay/EditorOverlay.js M resources/mobile.watchstar/WatchstarGateway.js 2 files changed, 0 insertions(+), 3 deletions(-) Approvals: Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mobile.editor.overlay/EditorOverlay.js b/resources/mobile.editor.overlay/EditorOverlay.js index 145a73e..3713e5f 100644 --- a/resources/mobile.editor.overlay/EditorOverlay.js +++ b/resources/mobile.editor.overlay/EditorOverlay.js @@ -270,8 +270,6 @@ el: self.$preview, text: parsedText } ).$( 'a' ).on( 'click', false ); - // Emit event so we can perform enhancements to page - M.emit( 'edit-preview', self ); } ).fail( function () { self.$preview.addClass( 'error' ).text( mw.msg( 'mobile-frontend-editor-error-preview' ) ); } ).always( function () { diff --git a/resources/mobile.watchstar/WatchstarGateway.js b/resources/mobile.watchstar/WatchstarGateway.js index 0177ce2..14cb643 100644 --- a/resources/mobile.watchstar/WatchstarGateway.js +++ b/resources/mobile.watchstar/WatchstarGateway.js @@ -106,7 +106,6 @@ return this.api.postWithToken( 'watch', data ).done( function () { var newStatus = !self.isWatchedPage( page ); self.setWatchedPage( page, newStatus ); - M.emit( 'watched', page, newStatus ); } ); } }; -- To view, visit https://gerrit.wikimedia.org/r/363658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bd2b73223f58f1000cfb26454ac6dd92673517d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bmansurov Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Remove the unused mobile.mixins file
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363016 ) Change subject: Hygiene: Remove the unused mobile.mixins file .. Hygiene: Remove the unused mobile.mixins file Change-Id: Icdd14ecccaa1efa753aa6bb479744c48d5c8ec6d --- D mobile.less/mobile.mixins.less 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/mobile.less/mobile.mixins.less b/mobile.less/mobile.mixins.less deleted file mode 100644 index d81c91d..000 --- a/mobile.less/mobile.mixins.less +++ /dev/null @@ -1,4 +0,0 @@ -@import 'mediawiki.mixins.animation'; -@import 'mediawiki.mixins.less'; - -// FIXME: Do not add anything to this file. It is temporary until all usages have been removed. \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/363016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icdd14ecccaa1efa753aa6bb479744c48d5c8ec6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bmansurov Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Remove the micro.js folder
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363018 ) Change subject: Hygiene: Remove the micro.js folder .. Hygiene: Remove the micro.js folder Library is no longer used. Not needed. Change-Id: Iffaec3e3d6ca411375fa69007cee19f9d91f361b --- D libs/micro.js/LICENSE 1 file changed, 0 insertions(+), 22 deletions(-) Approvals: Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/libs/micro.js/LICENSE b/libs/micro.js/LICENSE deleted file mode 100644 index 027cab6..000 --- a/libs/micro.js/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 Juliusz Gonera - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -- To view, visit https://gerrit.wikimedia.org/r/363018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iffaec3e3d6ca411375fa69007cee19f9d91f361b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bmansurov Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...gerrit[master]: gerrit: DO NOT MERGE
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363738 ) Change subject: gerrit: DO NOT MERGE .. gerrit: DO NOT MERGE Change-Id: I84e96d8b9bf761353b10008bc0535a1b08e87ac0 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/gerrit refs/changes/38/363738/1 -- To view, visit https://gerrit.wikimedia.org/r/363738 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84e96d8b9bf761353b10008bc0535a1b08e87ac0 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/gerrit Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[wmf/1.30.0-wmf.7]: Only message box styles should be loaded on editor
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363741 ) Change subject: Only message box styles should be loaded on editor .. Only message box styles should be loaded on editor Bug: T164892 Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 (cherry picked from commit b53e2a2c2fd4de9da0926171999e1760e8192bec) --- M includes/MobileFrontend.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/41/363741/1 diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 495d866..ffb3fa9 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -772,7 +772,7 @@ $requestAction = $out->getRequest()->getVal( 'action' ); if ( $noJsEditing && ( $requestAction === 'edit' || $requestAction === 'submit' ) ) { $out->addModuleStyles( [ - 'mobile.messageBox' + 'mobile.messageBox.styles' ] ); } } -- To view, visit https://gerrit.wikimedia.org/r/363741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: wmf/1.30.0-wmf.7 Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgCategoryCollation to 'uca-default' for fr.wiktionary
MarcoAurelio has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363740 ) Change subject: Set $wgCategoryCollation to 'uca-default' for fr.wiktionary .. Set $wgCategoryCollation to 'uca-default' for fr.wiktionary Bug: T169810 Change-Id: I0eb4617865820b9afc696d83377bf5e98423b4e4 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/40/363740/1 -- To view, visit https://gerrit.wikimedia.org/r/363740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0eb4617865820b9afc696d83377bf5e98423b4e4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MarcoAurelioGerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DebateTree[master]: General update for a cleaner syntax compatible with VisualEd...
Sophivorus has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363739 ) Change subject: General update for a cleaner syntax compatible with VisualEditor .. General update for a cleaner syntax compatible with VisualEditor Change-Id: I5afebd177c1a1c0ccaf21fe3bec94c80f9ae9bb5 --- M DebateTree.css M DebateTree.js M DebateTree.php M extension.json M i18n/en.json M i18n/es.json M i18n/qqq.json 7 files changed, 56 insertions(+), 63 deletions(-) Approvals: Sophivorus: Verified; Looks good to me, approved diff --git a/DebateTree.css b/DebateTree.css index ed1bad1..b6588a1 100644 --- a/DebateTree.css +++ b/DebateTree.css @@ -1,23 +1,20 @@ -.debatetree-argument, -.debatetree-dummy { - background: #f9f9f9; - border: 1px solid #aaa; - border-radius: 10px; - box-shadow: 5px 5px 10px #aaa; +.debatetree ul { + list-style: none; + margin: 0 !important; +} + +.debatetree ul li { + background: #f8f9fa; + border: 1px solid #a2a9b1; cursor: pointer; - margin: 1em 0; + margin: 1em 0 0 0 !important; padding: 1em; - overflow: hidden; } .debatetree-status { float: right; - margin-left: 10px; - padding: 0 5px; -} - -.debatetree-counts { - color: #aaa; + margin-left: 1em; + padding: 0 .5em; } .debatetree-sustained { @@ -26,4 +23,9 @@ .debatetree-refuted { background: #f55; +} + +.debatetree-counts { + color: #a2a9b1; + font-size: small; } \ No newline at end of file diff --git a/DebateTree.js b/DebateTree.js index 3ad6bfc..d22 100644 --- a/DebateTree.js +++ b/DebateTree.js @@ -1,30 +1,39 @@ var DebateTree = { - // GETTERS - + /** +* Get all the arguments in the page +*/ getArguments: function () { - return $( '.debatetree-argument' ); + return $( '.debatetree ul li' ); }, + /** +* Get the objections to the given argument +*/ getObjections: function ( argument ) { - return $( argument ).children( '.debatetree-argument' ); + return $( argument ).children( 'ul' ).children( 'li' ); }, - getDescendants: function ( argument ) { - return $( '.debatetree-argument', argument ); - }, - + /** +* Get the sustained objections to the given argument +*/ getSustainedObjections: function ( argument ) { return DebateTree.getObjections( argument ).filter( DebateTree.isSustained ); }, - // FILTERS + /** +* Get the nested objections of the given argument +*/ + getNestedObjections: function ( argument ) { + return $( 'li', argument ); + }, + /** +* Return true if the given argument is sustained +*/ isSustained: function ( index, argument ) { return DebateTree.getSustainedObjections( argument ).length ? false : true; }, - - // DOM MODIFIERS /** * Prepend the status to the argument @@ -38,49 +47,38 @@ }, /** -* Append the stats to the argument +* Append the counts to the argument */ addCounts: function ( index, argument ) { var objectionCount = DebateTree.getObjections( argument ).length, sustainedObjectionCount = DebateTree.getSustainedObjections( argument ).length, - descendantCount = DebateTree.getDescendants( argument ).length, - text = mw.message( 'debatetree-counts', objectionCount, sustainedObjectionCount, descendantCount ), + nestedObjectionCount = DebateTree.getNestedObjections( argument ).length, + text = mw.message( 'debatetree-counts', objectionCount, sustainedObjectionCount, nestedObjectionCount ), span = $( '' ).addClass( 'debatetree-counts' ).text( text ); if ( objectionCount ) { - DebateTree.getObjections( argument ).first().before( span ); + $( argument ).children( 'ul' ).first().before( span ); } else { $( argument ).append( ' ', span ); } }, /** -* Add a dummy objection to the argument +* Toggle the objections of the clicked argument */ - addDummyObjection: function ( index, argument ) { - var editLink = $( '#ca-edit a' ).attr( 'href' ), - dummyContent = mw.message( 'debatetree-dummy', editLink ).parse(), - dummyObjection = $( '' ).addClass( 'debatetree-argument' ).html( dummyContent ); - - $( argument ).append( dummyObjection ); - }, - - // EVENT HANDLERS -
[MediaWiki-commits] [Gerrit] mediawiki...DebateTree[master]: General update for a cleaner syntax compatible with VisualEd...
Sophivorus has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363739 ) Change subject: General update for a cleaner syntax compatible with VisualEditor .. General update for a cleaner syntax compatible with VisualEditor Change-Id: I5afebd177c1a1c0ccaf21fe3bec94c80f9ae9bb5 --- M DebateTree.css M DebateTree.js M DebateTree.php M extension.json M i18n/en.json M i18n/es.json M i18n/qqq.json 7 files changed, 56 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DebateTree refs/changes/39/363739/1 diff --git a/DebateTree.css b/DebateTree.css index ed1bad1..b6588a1 100644 --- a/DebateTree.css +++ b/DebateTree.css @@ -1,23 +1,20 @@ -.debatetree-argument, -.debatetree-dummy { - background: #f9f9f9; - border: 1px solid #aaa; - border-radius: 10px; - box-shadow: 5px 5px 10px #aaa; +.debatetree ul { + list-style: none; + margin: 0 !important; +} + +.debatetree ul li { + background: #f8f9fa; + border: 1px solid #a2a9b1; cursor: pointer; - margin: 1em 0; + margin: 1em 0 0 0 !important; padding: 1em; - overflow: hidden; } .debatetree-status { float: right; - margin-left: 10px; - padding: 0 5px; -} - -.debatetree-counts { - color: #aaa; + margin-left: 1em; + padding: 0 .5em; } .debatetree-sustained { @@ -26,4 +23,9 @@ .debatetree-refuted { background: #f55; +} + +.debatetree-counts { + color: #a2a9b1; + font-size: small; } \ No newline at end of file diff --git a/DebateTree.js b/DebateTree.js index 3ad6bfc..d22 100644 --- a/DebateTree.js +++ b/DebateTree.js @@ -1,30 +1,39 @@ var DebateTree = { - // GETTERS - + /** +* Get all the arguments in the page +*/ getArguments: function () { - return $( '.debatetree-argument' ); + return $( '.debatetree ul li' ); }, + /** +* Get the objections to the given argument +*/ getObjections: function ( argument ) { - return $( argument ).children( '.debatetree-argument' ); + return $( argument ).children( 'ul' ).children( 'li' ); }, - getDescendants: function ( argument ) { - return $( '.debatetree-argument', argument ); - }, - + /** +* Get the sustained objections to the given argument +*/ getSustainedObjections: function ( argument ) { return DebateTree.getObjections( argument ).filter( DebateTree.isSustained ); }, - // FILTERS + /** +* Get the nested objections of the given argument +*/ + getNestedObjections: function ( argument ) { + return $( 'li', argument ); + }, + /** +* Return true if the given argument is sustained +*/ isSustained: function ( index, argument ) { return DebateTree.getSustainedObjections( argument ).length ? false : true; }, - - // DOM MODIFIERS /** * Prepend the status to the argument @@ -38,49 +47,38 @@ }, /** -* Append the stats to the argument +* Append the counts to the argument */ addCounts: function ( index, argument ) { var objectionCount = DebateTree.getObjections( argument ).length, sustainedObjectionCount = DebateTree.getSustainedObjections( argument ).length, - descendantCount = DebateTree.getDescendants( argument ).length, - text = mw.message( 'debatetree-counts', objectionCount, sustainedObjectionCount, descendantCount ), + nestedObjectionCount = DebateTree.getNestedObjections( argument ).length, + text = mw.message( 'debatetree-counts', objectionCount, sustainedObjectionCount, nestedObjectionCount ), span = $( '' ).addClass( 'debatetree-counts' ).text( text ); if ( objectionCount ) { - DebateTree.getObjections( argument ).first().before( span ); + $( argument ).children( 'ul' ).first().before( span ); } else { $( argument ).append( ' ', span ); } }, /** -* Add a dummy objection to the argument +* Toggle the objections of the clicked argument */ - addDummyObjection: function ( index, argument ) { - var editLink = $( '#ca-edit a' ).attr( 'href' ), - dummyContent = mw.message( 'debatetree-dummy', editLink ).parse(), - dummyObjection = $( '' ).addClass( 'debatetree-argument' ).html( dummyContent ); - - $( argument ).append( dummyObjection ); - }, - -
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Only message box styles should be loaded on editor
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363651 ) Change subject: Only message box styles should be loaded on editor .. Only message box styles should be loaded on editor Bug: T164892 Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 --- M includes/MobileFrontend.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 5182ab4..8e09cb5 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -781,7 +781,7 @@ $requestAction = $out->getRequest()->getVal( 'action' ); if ( $noJsEditing && ( $requestAction === 'edit' || $requestAction === 'submit' ) ) { $out->addModuleStyles( [ - 'mobile.messageBox' + 'mobile.messageBox.styles' ] ); } } -- To view, visit https://gerrit.wikimedia.org/r/363651 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bmansurov Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Give some idea of time remaining
MarkAHershberger has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363737 ) Change subject: Give some idea of time remaining .. Give some idea of time remaining Bug: T169931 Change-Id: I3c80727516c329e5b911e9f29d17a2a9e860f44d --- M maintenance/updateRestrictions.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/363737/1 diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php index 96eaf82..02b4405 100644 --- a/maintenance/updateRestrictions.php +++ b/maintenance/updateRestrictions.php @@ -57,7 +57,7 @@ $blockEnd = $start + $this->mBatchSize - 1; $encodedExpiry = 'infinity'; while ( $blockEnd <= $end ) { - $this->output( "...doing page_id from $blockStart to $blockEnd\n" ); + $this->output( "...doing page_id from $blockStart to $blockEnd out of $end\n" ); $cond = "page_id BETWEEN $blockStart AND $blockEnd AND page_restrictions !=''"; $res = $db->select( 'page', -- To view, visit https://gerrit.wikimedia.org/r/363737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c80727516c329e5b911e9f29d17a2a9e860f44d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MarkAHershberger___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Fix .gitfat config, I was an idiot
Chad has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363736 ) Change subject: Fix .gitfat config, I was an idiot .. Fix .gitfat config, I was an idiot Change-Id: Idfaafe6c7b9793ccf56b6549f49954cc76111eb1 --- M .gitfat 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Chad: Verified; Looks good to me, approved diff --git a/.gitfat b/.gitfat index 2f1eb33..0b69f2d 100644 --- a/.gitfat +++ b/.gitfat @@ -1,4 +1,4 @@ [rsync] -.gitremote = archiva.wikimedia.org::archiva/git-fat -.gitoptions = --copy-links --verbose +remote = archiva.wikimedia.org::archiva/git-fat +options = --copy-links --verbose -- To view, visit https://gerrit.wikimedia.org/r/363736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idfaafe6c7b9793ccf56b6549f49954cc76111eb1 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/gerrit Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Chad ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Fix .gitfat config, I was an idiot
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363736 ) Change subject: Fix .gitfat config, I was an idiot .. Fix .gitfat config, I was an idiot Change-Id: Idfaafe6c7b9793ccf56b6549f49954cc76111eb1 --- M .gitfat 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/gerrit refs/changes/36/363736/1 diff --git a/.gitfat b/.gitfat index 2f1eb33..0b69f2d 100644 --- a/.gitfat +++ b/.gitfat @@ -1,4 +1,4 @@ [rsync] -.gitremote = archiva.wikimedia.org::archiva/git-fat -.gitoptions = --copy-links --verbose +remote = archiva.wikimedia.org::archiva/git-fat +options = --copy-links --verbose -- To view, visit https://gerrit.wikimedia.org/r/363736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfaafe6c7b9793ccf56b6549f49954cc76111eb1 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/gerrit Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Temporarily block ceb.wikipedia.org
GWicke has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363645 ) Change subject: Config: Temporarily block ceb.wikipedia.org .. Config: Temporarily block ceb.wikipedia.org Recently ceb wiki protected all of tehir templates which made change-prop accumulate an enormous backlog for that wiki. Sadly, the if-modified-since optimisation didn't work as it clashed with the no-content-change optimisation (already fixed for the future for this case). To quickly reduce the backlog let's just ignore the ceb.wiki for some time, it's almost entirely bot generated, also these reparses are no-op. Change-Id: I31dde948f4c49251e3d594f8d2ea29778c5cd236 --- M scap/templates/config.yaml.j2 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: GWicke: Verified; Looks good to me, approved diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2 index 7ffa612..d5b32f4 100644 --- a/scap/templates/config.yaml.j2 +++ b/scap/templates/config.yaml.j2 @@ -335,9 +335,15 @@ x-restbase-mode: '{{message.tags[1]}}' query: redirect: false +match_not: + meta: +domain: ceb.wikipedia.org - match: meta: schema_uri: 'continue/1' +match_not: + meta: +domain: ceb.wikipedia.org exec: method: post uri: '/sys/links/transcludes/{message.original_event.page_title}' -- To view, visit https://gerrit.wikimedia.org/r/363645 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31dde948f4c49251e3d594f8d2ea29778c5cd236 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/change-propagation/deploy Gerrit-Branch: master Gerrit-Owner: PpchelkoGerrit-Reviewer: GWicke Gerrit-Reviewer: Mobrovac ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Implement sqooping with mappers > 1
Milimetric has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363735 ) Change subject: Implement sqooping with mappers > 1 .. Implement sqooping with mappers > 1 Bug: T169782 Change-Id: I4b6c496d77f855d5d6f2025297c94dcc39de3a37 --- M bin/sqoop-mediawiki-tables 1 file changed, 35 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery refs/changes/35/363735/1 diff --git a/bin/sqoop-mediawiki-tables b/bin/sqoop-mediawiki-tables index 176728e..1b30bac 100755 --- a/bin/sqoop-mediawiki-tables +++ b/bin/sqoop-mediawiki-tables @@ -146,6 +146,8 @@ 'ar_minor_edit=Boolean', 'ar_deleted=Integer', ])), + +'split-by': 'ar_id', } queries['ipblocks'] = { @@ -181,6 +183,8 @@ 'ipb_block_email=Boolean', 'ipb_allow_usertalk=Boolean', ])), + +'split-by': 'ipb_id', } queries['logging'] = { @@ -201,6 +205,8 @@ from logging where $CONDITIONS ''', + +'split-by': 'log_id', } queries['page'] = { @@ -225,6 +231,8 @@ 'page_is_redirect=Boolean', 'page_is_new=Boolean', ])), + +'split-by': 'page_id', } queries['pagelinks'] = { @@ -237,6 +245,8 @@ from pagelinks where $CONDITIONS ''', + +'split-by': 'pl_from', } queries['redirect'] = { @@ -250,6 +260,8 @@ from redirect where $CONDITIONS ''', + +'split-by': 'rd_from', } queries['revision'] = { @@ -277,6 +289,8 @@ 'rev_minor_edit=Boolean', 'rev_deleted=Integer', ])), + +'split-by': 'rev_id', } queries['user'] = { @@ -294,6 +308,8 @@ from user where $CONDITIONS ''', + +'split-by': 'user_id', } queries['user_groups'] = { @@ -304,13 +320,16 @@ from user_groups where $CONDITIONS ''', + +'split-by': 'ug_user', } class SqoopConfig: def __init__(self, yarn_job_name_prefix, user, password_file, jdbc_host, num_mappers, - table_path_template, dbname, dbpostfix, table, query, map_types, + table_path_template, dbname, dbpostfix, table, + query, split_by, map_types, generate_jar, jar_file, current_try): @@ -318,12 +337,13 @@ self.user = user self.password_file = password_file self.jdbc_host = jdbc_host -self.num_mappers, = num_mappers +self.num_mappers = num_mappers self.table_path_template = table_path_template self.dbname = dbname self.dbpostfix = dbpostfix self.table = table self.query = query +self.split_by = split_by self.map_types = map_types self.generate_jar = generate_jar self.jar_file = jar_file @@ -341,6 +361,10 @@ True if the sqoop worked False if the sqoop errored or failed in any way """ +# debug +if config.table != 'revision': +return None + full_table = '.'.join([config.dbname, config.table]) log_message = '{} (try {})'.format(full_table, config.current_try) logging.info('STARTING: {}'.format(log_message)) @@ -374,9 +398,13 @@ else: sqoop_arguments += [ '--target-dir' , target_directory, -'--num-mappers' , config.num_mappers, +'--num-mappers' , str(config.num_mappers), '--as-avrodatafile' , ] +if config.num_mappers > 1: +sqoop_arguments += [ +'--split-by', config.split_by, +] if config.jar_file: sqoop_arguments += [ @@ -435,7 +463,7 @@ snapshot= arguments.get('--snapshot') user= arguments.get('--user') password_file = arguments.get('--password-file') -num_mappers = arguments.get('--mappers') or '1' +num_mappers = int(arguments.get('--mappers') or '1') num_processors = int(arguments.get('--processors')) if arguments.get('--processors') else None max_tries = int(arguments.get('--max-tries')) force = arguments.get('--force') @@ -488,8 +516,10 @@ for table in queries.keys(): query = queries[table].get('query') map_types = queries[table]['map-types'] if ('map-types' in queries[table]) else None +split_by = queries[table]['split-by']
[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Gerrit: Upgrade gerrit to 2.14.2-pre (DO NOT MERGE)
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363734 ) Change subject: Gerrit: Upgrade gerrit to 2.14.2-pre (DO NOT MERGE) .. Gerrit: Upgrade gerrit to 2.14.2-pre (DO NOT MERGE) Change-Id: Ia9291c9f59b3c88cd8ab5d45ef2eb077d4375dc8 --- M gerrit.war M plugins/commit-message-length-validator.jar M plugins/download-commands.jar A plugins/its-phabricator.jar M plugins/replication.jar M plugins/reviewnotes.jar 6 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/gerrit refs/changes/34/363734/1 diff --git a/gerrit.war b/gerrit.war old mode 100644 new mode 100755 index af2de9c..8303ed7 --- a/gerrit.war +++ b/gerrit.war @@ -1 +1 @@ -#$# git-fat 5d688379e7c6b219645d874de54edac833b4e37a 51262165 +#$# git-fat 44ca13e542aa236dd6e421c6288594aae7e7 85869059 diff --git a/plugins/commit-message-length-validator.jar b/plugins/commit-message-length-validator.jar old mode 100644 new mode 100755 index 9bc6e96..cd788a3 --- a/plugins/commit-message-length-validator.jar +++ b/plugins/commit-message-length-validator.jar @@ -1 +1 @@ -#$# git-fat cc93672c7896532e8e11d7538ece712397663454 4316 +#$# git-fat 95d2ef326aa7bb67e0717e0adadf83ad9767ceb4 5117 diff --git a/plugins/download-commands.jar b/plugins/download-commands.jar old mode 100644 new mode 100755 index ff58052..cd6847a --- a/plugins/download-commands.jar +++ b/plugins/download-commands.jar @@ -1 +1 @@ -#$# git-fat 310414c4ed82d4b7a6505800b240be02fdb11e7b24970 +#$# git-fat 449230dbe710f4f5c19c51978e2b2a103b98ad0424337 diff --git a/plugins/its-phabricator.jar b/plugins/its-phabricator.jar new file mode 100755 index 000..37f6a18 --- /dev/null +++ b/plugins/its-phabricator.jar @@ -0,0 +1 @@ +#$# git-fat f68fae55afbfcb9e97ab44da020db9f8bcc7db8f 109527 diff --git a/plugins/replication.jar b/plugins/replication.jar old mode 100644 new mode 100755 index 91ca080..755259e --- a/plugins/replication.jar +++ b/plugins/replication.jar @@ -1 +1 @@ -#$# git-fat 1aba9efd991aa924b7d0c98915b771dcb24e510d 210135 +#$# git-fat 2c2f686868133bfdcc5ed529ebe0894afd834281 208645 diff --git a/plugins/reviewnotes.jar b/plugins/reviewnotes.jar old mode 100644 new mode 100755 index 07267b3..4a2dc04 --- a/plugins/reviewnotes.jar +++ b/plugins/reviewnotes.jar @@ -1 +1 @@ -#$# git-fat 1dcfc64ff86760c737a815ed3587515380ae049824583 +#$# git-fat 4d40b7fbb2fd31ec1a20cc0294ebda9995a9bbd122682 -- To view, visit https://gerrit.wikimedia.org/r/363734 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9291c9f59b3c88cd8ab5d45ef2eb077d4375dc8 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/gerrit Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Dont generate pointless remove script on reindex
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363733 ) Change subject: Dont generate pointless remove script on reindex .. Dont generate pointless remove script on reindex When reindexing we have a special flag for removing unused fields from the index. If this flag is not provided we end up generating a list of [''], which generates the script: ctx._source.remove(''); This is pointless, so filter out empty strings before generating the script. Change-Id: I1a61e361d35d2fa6bac5977d3bab55c9c954f297 --- M includes/Maintenance/Reindexer.php M maintenance/updateOneSearchIndexConfig.php 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/33/363733/1 diff --git a/includes/Maintenance/Reindexer.php b/includes/Maintenance/Reindexer.php index 616afbc..7346489 100644 --- a/includes/Maintenance/Reindexer.php +++ b/includes/Maintenance/Reindexer.php @@ -380,8 +380,13 @@ 'lang' => 'painless', ]; foreach ( $this->fieldsToDelete as $field ) { - // Does this actually work? - $script['inline'] .= "ctx._source.remove('$field');"; + $field = trim( $field ); + if ( strlen( $field ) ) { + $script['inline'] .= "ctx._source.remove('$field');"; + } + } + if ( $script['inline'] === '' ) { + return null; } return $script; diff --git a/maintenance/updateOneSearchIndexConfig.php b/maintenance/updateOneSearchIndexConfig.php index 21a23c7..c42dfe8 100644 --- a/maintenance/updateOneSearchIndexConfig.php +++ b/maintenance/updateOneSearchIndexConfig.php @@ -407,6 +407,7 @@ private function validateSpecificAlias() { $connection = $this->getConnection(); + $fieldsToDeleteString = $this->getOption( 'fieldsToDelete', '' ); $reindexer = new Reindexer( $this->getSearchConfig(), $connection, @@ -417,7 +418,7 @@ $this->getReplicaCount(), $this->getMergeSettings(), $this, - explode( ',', $this->getOption( 'fieldsToDelete', '' ) ) + array_filter( explode( ',', $this->getOption( 'fieldsToDelete', '' ) ) ) ); $validator = new \CirrusSearch\Maintenance\Validators\SpecificAliasValidator( -- To view, visit https://gerrit.wikimedia.org/r/363733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a61e361d35d2fa6bac5977d3bab55c9c954f297 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Extend automatic blacklisting to derived content upd...
Ppchelko has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363731 ) Change subject: Config: Extend automatic blacklisting to derived content updates. .. Config: Extend automatic blacklisting to derived content updates. See https://github.com/wikimedia/change-propagation/pull/196 Bug: T169911 Change-Id: I763f99035c814aed9fefb2242cf810945251a86b --- M scap/templates/config.yaml.j2 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: Ppchelko: Verified; Looks good to me, approved diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2 index 7ffa612..0281a64 100644 --- a/scap/templates/config.yaml.j2 +++ b/scap/templates/config.yaml.j2 @@ -57,6 +57,8 @@ templates: summary_definition_rerender: _definition_rerender_spec topic: '/^(?:change-prop\.transcludes\.)?resource[-_]change$/' +limiters: + blacklist: 'summary:{message.meta.uri}' cases: - match: meta: @@ -95,6 +97,8 @@ mobile_rerender: _rerender_spec topic: '/^(?:change-prop\.transcludes\.)?resource[-_]change$/' +limiters: + blacklist: 'mobile:{message.meta.uri}' match: meta: uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^/]+)$/' @@ -132,6 +136,8 @@ # RESTBase update jobs mw_purge: topic: resource_change +limiters: + blacklist: 'html:{message.meta.uri}' match: meta: uri: '/^https?:\/\/[^\/]+\/wiki\/(?.+)$/' @@ -157,6 +163,8 @@ status: - 403 # Ignoring 403 since some of the pages with high number of null_edit events are blacklisted - 412 +limiters: + blacklist: 'html:{message.meta.uri}' match: meta: uri: '/^https?:\/\/[^\/]+\/wiki\/(?.+)$/' @@ -179,7 +187,7 @@ page_edit: topic: mediawiki.revision-create limiters: - blacklist: '{message.meta.uri}' + blacklist: 'html:{message.meta.uri}' retry_on: status: - '5xx' @@ -319,7 +327,7 @@ concurrency: <%= concurrency * 8 %> topic: change-prop.transcludes.resource-change limiters: - blacklist: '{message.meta.uri}' + blacklist: 'html:{message.meta.uri}' cases: - match: meta: @@ -364,7 +372,7 @@ on_backlinks_update: topic: change-prop.backlinks.resource-change limiters: - blacklist: '{message.meta.uri}' + blacklist: 'html:{message.meta.uri}' cases: - match: meta: -- To view, visit https://gerrit.wikimedia.org/r/363731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I763f99035c814aed9fefb2242cf810945251a86b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/change-propagation/deploy Gerrit-Branch: master Gerrit-Owner: PpchelkoGerrit-Reviewer: GWicke Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ppchelko ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Temporarily remove wtp2019 from the target for a memtest
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363689 ) Change subject: Temporarily remove wtp2019 from the target for a memtest .. Temporarily remove wtp2019 from the target for a memtest Bug: T146113 Change-Id: Ie7cc9d6ac9f5f23b06987624d5ffd2e41954b806 --- M scap/targets 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/scap/targets b/scap/targets index 12934ef..2dc1f8e 100644 --- a/scap/targets +++ b/scap/targets @@ -38,5 +38,4 @@ wtp2016.codfw.wmnet wtp2017.codfw.wmnet wtp2018.codfw.wmnet -wtp2019.codfw.wmnet wtp2020.codfw.wmnet -- To view, visit https://gerrit.wikimedia.org/r/363689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7cc9d6ac9f5f23b06987624d5ffd2e41954b806 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: MobrovacGerrit-Reviewer: Arlolra Gerrit-Reviewer: RobH Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Show correct icon in EditorOverlay
Bmansurov has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363732 ) Change subject: Show correct icon in EditorOverlay .. Show correct icon in EditorOverlay Replace the `back` icon on the first screen of EditorOverlay with a 'close' icon as this behavior is consistent with how other overlays such as the language overlay and the categories overlay work. Bug: T73203 Change-Id: I09d0d63b488314160a7bdbd8f4974744f0a60c34 --- M resources/mobile.editor.common/EditorOverlayBase.js M resources/mobile.editor.common/editHeader.hogan M tests/browser/features/support/pages/article_page.rb 3 files changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/32/363732/1 diff --git a/resources/mobile.editor.common/EditorOverlayBase.js b/resources/mobile.editor.common/EditorOverlayBase.js index f032cbe..ebb2f9f 100644 --- a/resources/mobile.editor.common/EditorOverlayBase.js +++ b/resources/mobile.editor.common/EditorOverlayBase.js @@ -138,7 +138,6 @@ /** @inheritdoc **/ className: 'overlay editor-overlay', events: $.extend( {}, Overlay.prototype.events, { - // FIXME: This should be .close (see bug 71203) 'click .back': 'onClickBack', 'click .continue': 'onClickContinue', 'click .submit': 'onClickSubmit' diff --git a/resources/mobile.editor.common/editHeader.hogan b/resources/mobile.editor.common/editHeader.hogan index 1b8bcd0..64035ac 100644 --- a/resources/mobile.editor.common/editHeader.hogan +++ b/resources/mobile.editor.common/editHeader.hogan @@ -1,6 +1,6 @@ - {{{backButton}}} + {{{cancelButton}}} {{^hasToolbar}} diff --git a/tests/browser/features/support/pages/article_page.rb b/tests/browser/features/support/pages/article_page.rb index 68f58f0..ef955ca 100644 --- a/tests/browser/features/support/pages/article_page.rb +++ b/tests/browser/features/support/pages/article_page.rb @@ -37,7 +37,7 @@ div(:anon_editor_warning, css: '.anon-msg') div(:editor_overlay, class: 'editor-overlay') button(:editor_overlay_close_button) do |page| -page.editor_overlay_element.button_element(css: '.back') +page.editor_overlay_element.button_element(css: '.cancel') end ## upload -- To view, visit https://gerrit.wikimedia.org/r/363732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I09d0d63b488314160a7bdbd8f4974744f0a60c34 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Extend automatic blacklisting to derived content upd...
Ppchelko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363731 ) Change subject: Config: Extend automatic blacklisting to derived content updates. .. Config: Extend automatic blacklisting to derived content updates. See https://github.com/wikimedia/change-propagation/pull/196 Bug: T169911 Change-Id: I763f99035c814aed9fefb2242cf810945251a86b --- M scap/templates/config.yaml.j2 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy refs/changes/31/363731/1 diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2 index 7ffa612..0281a64 100644 --- a/scap/templates/config.yaml.j2 +++ b/scap/templates/config.yaml.j2 @@ -57,6 +57,8 @@ templates: summary_definition_rerender: _definition_rerender_spec topic: '/^(?:change-prop\.transcludes\.)?resource[-_]change$/' +limiters: + blacklist: 'summary:{message.meta.uri}' cases: - match: meta: @@ -95,6 +97,8 @@ mobile_rerender: _rerender_spec topic: '/^(?:change-prop\.transcludes\.)?resource[-_]change$/' +limiters: + blacklist: 'mobile:{message.meta.uri}' match: meta: uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^/]+)$/' @@ -132,6 +136,8 @@ # RESTBase update jobs mw_purge: topic: resource_change +limiters: + blacklist: 'html:{message.meta.uri}' match: meta: uri: '/^https?:\/\/[^\/]+\/wiki\/(?.+)$/' @@ -157,6 +163,8 @@ status: - 403 # Ignoring 403 since some of the pages with high number of null_edit events are blacklisted - 412 +limiters: + blacklist: 'html:{message.meta.uri}' match: meta: uri: '/^https?:\/\/[^\/]+\/wiki\/(?.+)$/' @@ -179,7 +187,7 @@ page_edit: topic: mediawiki.revision-create limiters: - blacklist: '{message.meta.uri}' + blacklist: 'html:{message.meta.uri}' retry_on: status: - '5xx' @@ -319,7 +327,7 @@ concurrency: <%= concurrency * 8 %> topic: change-prop.transcludes.resource-change limiters: - blacklist: '{message.meta.uri}' + blacklist: 'html:{message.meta.uri}' cases: - match: meta: @@ -364,7 +372,7 @@ on_backlinks_update: topic: change-prop.backlinks.resource-change limiters: - blacklist: '{message.meta.uri}' + blacklist: 'html:{message.meta.uri}' cases: - match: meta: -- To view, visit https://gerrit.wikimedia.org/r/363731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I763f99035c814aed9fefb2242cf810945251a86b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/change-propagation/deploy Gerrit-Branch: master Gerrit-Owner: Ppchelko___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Use client-js class to set JS element visibility
WMDE-Fisch has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363028 ) Change subject: Use client-js class to set JS element visibility .. Use client-js class to set JS element visibility This will avoid some of the "jumping" when loading the page with JS. The patch also adds a min height for the non JS editor description so the editors are almost perfectly aligned by default there. Bug: T167132 Change-Id: Ie1f0194aa7c92f58909163713a9e904b3e1f6a3f --- M modules/ext.TwoColConflict.filterOptions.js M modules/ext.TwoColConflict.init.js M modules/ext.TwoColConflict.less 3 files changed, 17 insertions(+), 8 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.TwoColConflict.filterOptions.js b/modules/ext.TwoColConflict.filterOptions.js index 34dea4a..f5296f7 100644 --- a/modules/ext.TwoColConflict.filterOptions.js +++ b/modules/ext.TwoColConflict.filterOptions.js @@ -3,11 +3,6 @@ expandBtn, collapseBtn; $( function () { - // show filter options when js is available - $( '.mw-twocolconflict-filter-options-container' ).css( 'display', 'block' ); - // set some styles only with js enabled - $( '.mw-twocolconflict-editor-col' ).addClass( 'mw-twocolconflict-js' ); - $( 'input[name="mw-twocolconflict-show-changes"]' ).change( function () { if ( $( this ).val() === 'mine' ) { $( '.mw-twocolconflict-diffchange-foreign' ).slideUp(); diff --git a/modules/ext.TwoColConflict.init.js b/modules/ext.TwoColConflict.init.js index d8413d5..5947e2a 100644 --- a/modules/ext.TwoColConflict.init.js +++ b/modules/ext.TwoColConflict.init.js @@ -164,8 +164,6 @@ function beforeBaseVersionSelection() { disableEditButtons(); - $( '.mw-twocolconflict-edit-desc' ).hide(); - $( '.mw-twocolconflict-base-selection-desc' ).show(); } function afterBaseVersionSelection() { diff --git a/modules/ext.TwoColConflict.less b/modules/ext.TwoColConflict.less index 87c9882..20d370a 100644 --- a/modules/ext.TwoColConflict.less +++ b/modules/ext.TwoColConflict.less @@ -49,7 +49,19 @@ margin: 0; } +.mw-twocolconflict-edit-desc { + min-height: 90px; +} + .mw-twocolconflict-base-selection-desc { + display: none; +} + +.client-js .mw-twocolconflict-base-selection-desc { + display: block; +} + +.client-js .mw-twocolconflict-edit-desc { display: none; } @@ -250,7 +262,11 @@ .mw-twocolconflict-filter-options-container { margin-bottom: 10px; - display: none; /* will be hidden unless JS is available */ + display: none; +} + +.client-js .mw-twocolconflict-filter-options-container { + display: block; } .mw-twocolconflict-filter-options-row { -- To view, visit https://gerrit.wikimedia.org/r/363028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1f0194aa7c92f58909163713a9e904b3e1f6a3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TwoColConflict Gerrit-Branch: master Gerrit-Owner: WMDE-FischGerrit-Reviewer: Addshore Gerrit-Reviewer: Andrew-WMDE Gerrit-Reviewer: Gabriel Birke Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: WMDE-Fisch Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Always provide raw texts for the base version selection
WMDE-Fisch has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363019 ) Change subject: Always provide raw texts for the base version selection .. Always provide raw texts for the base version selection Also minor renaming in the selection code. Bug: T167151 Change-Id: I215f8153ee5af350babc282dbcfe0ca569c98910 --- M includes/TwoColConflictPage.php M modules/ext.TwoColConflict.BaseVersionSelector.js M tests/browser/features/support/step_definitions/base_selection_steps.rb 3 files changed, 13 insertions(+), 9 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php index 8b55d35..91e6914 100644 --- a/includes/TwoColConflictPage.php +++ b/includes/TwoColConflictPage.php @@ -91,7 +91,7 @@ } $out .= ''; $out .= $this->buildConflictPageEditorCol(); - $out .= $this->buildMyVersionTextHiddenField(); + $out .= $this->buildRawTextsHiddenFields(); return $out; } @@ -315,9 +315,11 @@ * * @return string */ - private function buildMyVersionTextHiddenField() { - $editableMyVersionText = $this->toEditText( $this->textbox1 ); - return HTML::input( 'mw-twocolconflict-mytext', $editableMyVersionText, 'hidden' ); + private function buildRawTextsHiddenFields() { + $editableYourVersionText = $this->toEditText( $this->textbox1 ); + $editableCurrentVersionText = $this->toEditText( $this->getCurrentContent() ); + return HTML::input( 'mw-twocolconflict-your-text', $editableYourVersionText, 'hidden' ) . + HTML::input( 'mw-twocolconflict-current-text', $editableCurrentVersionText, 'hidden' ); } /** diff --git a/modules/ext.TwoColConflict.BaseVersionSelector.js b/modules/ext.TwoColConflict.BaseVersionSelector.js index 575f877..77f46ff 100644 --- a/modules/ext.TwoColConflict.BaseVersionSelector.js +++ b/modules/ext.TwoColConflict.BaseVersionSelector.js @@ -43,11 +43,11 @@ name: 'mw-twocolconflict-base-version', options: [ { - data: 'yours', + data: 'current', label: mw.msg( 'twoColConflict-base-selection-foreign-label' ) }, { - data: 'mine', + data: 'your', label: mw.msg( 'twoColConflict-base-selection-own-label' ) } ] @@ -81,8 +81,10 @@ }, setBaseVersion: function () { - if ( $( '.mw-twocolconflict-base-dialog-radio input:checked' ).val() === 'mine' ) { - $( '#wpTextbox1' ).val( $( 'input[name="mw-twocolconflict-mytext"]' ).val() ); + if ( $( '.mw-twocolconflict-base-dialog-radio input:checked' ).val() === 'your' ) { + $( '#wpTextbox1' ).val( $( 'input[name="mw-twocolconflict-your-text"]' ).val() ); + } else { + $( '#wpTextbox1' ).val( $( 'input[name="mw-twocolconflict-current-text"]' ).val() ); } }, diff --git a/tests/browser/features/support/step_definitions/base_selection_steps.rb b/tests/browser/features/support/step_definitions/base_selection_steps.rb index d89597d..fd52c6c 100644 --- a/tests/browser/features/support/step_definitions/base_selection_steps.rb +++ b/tests/browser/features/support/step_definitions/base_selection_steps.rb @@ -7,7 +7,7 @@ end Then(/^The use currently published version option should be selected$/) do - expect(on(EditConflictPage).twocolconflict_base_option_element.value).to match('yours') + expect(on(EditConflictPage).twocolconflict_base_option_element.value).to match('current') end When(/^I click the ok button in the base selection dialog$/) do -- To view, visit https://gerrit.wikimedia.org/r/363019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I215f8153ee5af350babc282dbcfe0ca569c98910 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TwoColConflict Gerrit-Branch: master Gerrit-Owner: WMDE-FischGerrit-Reviewer: Addshore Gerrit-Reviewer: Andrew-WMDE Gerrit-Reviewer: Tobias Gritschacher
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Authors: improved "more users" image
Mglaser has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363730 ) Change subject: Authors: improved "more users" image .. Authors: improved "more users" image Image is now without a passepartout. Change-Id: I86ed61f37d8736dcfdb3bf48fea44e42985f1ead --- M Authors/resources/images/more-users_v2.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/30/363730/1 diff --git a/Authors/resources/images/more-users_v2.png b/Authors/resources/images/more-users_v2.png index 048cdba..04d0d3c 100644 --- a/Authors/resources/images/more-users_v2.png +++ b/Authors/resources/images/more-users_v2.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/363730 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I86ed61f37d8736dcfdb3bf48fea44e42985f1ead Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Mglaser___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: User images: do not use a passepartout
Mglaser has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363729 ) Change subject: User images: do not use a passepartout .. User images: do not use a passepartout Most user avatars do not have a passepartout, so standard images were adapted to this Change-Id: Ic809150d8017278eb174a75121b20a1ca5ae0a67 --- M resources/bluespice/images/bs-user-anon-image.png M resources/bluespice/images/bs-user-default-image.png M resources/bluespice/images/bs-user-deleted-image.png 3 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/29/363729/1 diff --git a/resources/bluespice/images/bs-user-anon-image.png b/resources/bluespice/images/bs-user-anon-image.png index 2c3a385..7698913 100644 --- a/resources/bluespice/images/bs-user-anon-image.png +++ b/resources/bluespice/images/bs-user-anon-image.png Binary files differ diff --git a/resources/bluespice/images/bs-user-default-image.png b/resources/bluespice/images/bs-user-default-image.png index 8fa79f1..0afd390 100644 --- a/resources/bluespice/images/bs-user-default-image.png +++ b/resources/bluespice/images/bs-user-default-image.png Binary files differ diff --git a/resources/bluespice/images/bs-user-deleted-image.png b/resources/bluespice/images/bs-user-deleted-image.png index 31a894f..c74abd4 100644 --- a/resources/bluespice/images/bs-user-deleted-image.png +++ b/resources/bluespice/images/bs-user-deleted-image.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/363729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic809150d8017278eb174a75121b20a1ca5ae0a67 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Mglaser___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Gerrit: Upgrade to 2.14.2-pre (DO NOT MERGE)
Paladox has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363728 ) Change subject: Gerrit: Upgrade to 2.14.2-pre (DO NOT MERGE) .. Gerrit: Upgrade to 2.14.2-pre (DO NOT MERGE) Change-Id: I4e962435bd3b9631c9b9e76b898295b6b14543a0 --- M gerrit.war M plugins/commit-message-length-validator.jar M plugins/download-commands.jar A plugins/its-phabricator.jar M plugins/replication.jar M plugins/reviewnotes.jar 6 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/gerrit refs/changes/28/363728/1 diff --git a/gerrit.war b/gerrit.war old mode 100644 new mode 100755 index af2de9c..65e3ae2 --- a/gerrit.war +++ b/gerrit.war Binary files differ diff --git a/plugins/commit-message-length-validator.jar b/plugins/commit-message-length-validator.jar old mode 100644 new mode 100755 index 9bc6e96..2a32363 --- a/plugins/commit-message-length-validator.jar +++ b/plugins/commit-message-length-validator.jar Binary files differ diff --git a/plugins/download-commands.jar b/plugins/download-commands.jar old mode 100644 new mode 100755 index ff58052..8c38186 --- a/plugins/download-commands.jar +++ b/plugins/download-commands.jar Binary files differ diff --git a/plugins/its-phabricator.jar b/plugins/its-phabricator.jar new file mode 100755 index 000..fb2bba5 --- /dev/null +++ b/plugins/its-phabricator.jar Binary files differ diff --git a/plugins/replication.jar b/plugins/replication.jar old mode 100644 new mode 100755 index 91ca080..67fb20c --- a/plugins/replication.jar +++ b/plugins/replication.jar Binary files differ diff --git a/plugins/reviewnotes.jar b/plugins/reviewnotes.jar old mode 100644 new mode 100755 index 07267b3..8704686 --- a/plugins/reviewnotes.jar +++ b/plugins/reviewnotes.jar Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/363728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e962435bd3b9631c9b9e76b898295b6b14543a0 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/gerrit Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Use a separate postgres connection in SqlBagOStuff
Aaron Schulz has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363727 ) Change subject: [WIP] Use a separate postgres connection in SqlBagOStuff .. [WIP] Use a separate postgres connection in SqlBagOStuff The flags to the driver use new connections for new LBs since fda4d46fc4f810. Bug: T167946 Change-Id: I0b0d9a7210b6a3270d32df778fcc4b9918d3dcd1 --- M includes/objectcache/SqlBagOStuff.php 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/363727/1 diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 6c10301..5951469 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -148,7 +148,7 @@ protected function getSeparateMainLB() { global $wgDBtype; - if ( $wgDBtype === 'mysql' && $this->usesMainDB() ) { + if ( $this->usesMainDB() && $wgDBtype !== 'sqlite' ) { if ( !$this->separateMainLB ) { // We must keep a separate connection to MySQL in order to avoid deadlocks $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); @@ -156,8 +156,7 @@ } return $this->separateMainLB; } else { - // However, SQLite has an opposite behavior. And PostgreSQL needs to know - // if we are in transaction or not (@TODO: find some PostgreSQL work-around). + // However, SQLite has an opposite behavior due to DB-level locking return null; } } -- To view, visit https://gerrit.wikimedia.org/r/363727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b0d9a7210b6a3270d32df778fcc4b9918d3dcd1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: registration: Provide credits information to callbacks
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/325081 ) Change subject: registration: Provide credits information to callbacks .. registration: Provide credits information to callbacks Registration callbacks now provide basic credits information (name, path, type, authors, license-name, version, etc.) as the first argument. The main use case right now for this is to support extension VERSION constants for backwards-compatibility. In addition, callbacks now run *after* attributes are exposed, so callbacks could use data from them if they wanted to. Bug: T151136 Change-Id: Ic5965dd4e259e1f46222ac92b8e78750e67b51d6 (cherry picked from commit b54acaf847131fdac9352aa35e4b82327751a3de) --- M includes/registration/ExtensionProcessor.php M includes/registration/ExtensionRegistry.php 2 files changed, 11 insertions(+), 6 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 3763960..cbe0949 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -132,6 +132,7 @@ /** * Things to be called once registration of these extensions are done +* keyed by the name of the extension that it belongs to * * @var callable[] */ @@ -165,11 +166,11 @@ $this->extractNamespaces( $info ); $this->extractResourceLoaderModules( $dir, $info ); $this->extractParserTestFiles( $dir, $info ); + $name = $this->extractCredits( $path, $info ); if ( isset( $info['callback'] ) ) { - $this->callbacks[] = $info['callback']; + $this->callbacks[$name] = $info['callback']; } - $this->extractCredits( $path, $info ); foreach ( $info as $key => $val ) { if ( in_array( $key, self::$globalSettings ) ) { $this->storeToArray( $path, "wg$key", $val, $this->globals ); @@ -320,6 +321,7 @@ /** * @param string $path * @param array $info +* @return string Name of thing * @throws Exception */ protected function extractCredits( $path, array $info ) { @@ -345,6 +347,8 @@ $this->credits[$name] = $credits; $this->globals['wgExtensionCredits'][$credits['type']][] = $credits; + + return $name; } /** diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index dc53ca4..ebcddb2 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -29,7 +29,7 @@ /** * Bump whenever the registration cache needs resetting */ - const CACHE_VERSION = 3; + const CACHE_VERSION = 4; /** * Special key that defines the merge strategy @@ -277,9 +277,6 @@ foreach ( $info['autoloaderPaths'] as $path ) { require_once $path; } - foreach ( $info['callbacks'] as $cb ) { - call_user_func( $cb ); - } $this->loaded += $info['credits']; if ( $info['attributes'] ) { @@ -289,6 +286,10 @@ $this->attributes = array_merge_recursive( $this->attributes, $info['attributes'] ); } } + + foreach ( $info['callbacks'] as $name => $cb ) { + call_user_func( $cb, $info['credits'][$name] ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/325081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5965dd4e259e1f46222ac92b8e78750e67b51d6 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_27 Gerrit-Owner: PaladoxGerrit-Reviewer: Chad Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Mwjames Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Make number of RelatedArticles configurable
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/355636 ) Change subject: Make number of RelatedArticles configurable .. Make number of RelatedArticles configurable Wikivoyage pages have more than 3 related articles as they make use of the {{#related:}} magic word. After speaking with Nirzar we should allow this project to show more than 3. This change allows this while keeping the existing behaviour on other wikis and will pave the way for removing a bunch of code from this extension. Additional changes: * Cleanup skinStyles definitions * Limit cards to 30% maximum width and give margin top to account for situations where the number of cards are multiple of 3 ** In Minerva hardcode the max-width to pixels. * Margins are switched from hardcoded 10px to percentage based. Yes this changes the right margin slightly but is more maintable and visually the same. Bug: T164765 Change-Id: I41119de3228c2df799f740d4bd00082101c21b97 --- M extension.json M includes/FooterHooks.php M resources/ext.relatedArticles.cards/styles.less M resources/ext.relatedArticles.readMore.bootstrap/index.js M resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js M tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js 6 files changed, 63 insertions(+), 10 deletions(-) Approvals: Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index fdb7471..02cccf2 100644 --- a/extension.json +++ b/extension.json @@ -163,6 +163,8 @@ } }, "config": { + "@RelatedArticlesCardLimit": "Maximum number of articles that should be shown in RelatedArticles widget. This limit is derived from limits in TextExtracts and PageImages extensions. Number should be between 1 and 20.", + "RelatedArticlesCardLimit": 3, "RelatedArticlesShowInSidebar": true, "RelatedArticlesShowInFooter": false, "RelatedArticlesUseCirrusSearch": false, diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php index 61ac275..3eb5b22 100644 --- a/includes/FooterHooks.php +++ b/includes/FooterHooks.php @@ -28,6 +28,13 @@ ->makeConfig( 'RelatedArticles' ); $vars['wgRelatedArticles'] = $out->getProperty( 'RelatedArticles' ); + $limit = $config->get( 'RelatedArticlesCardLimit' ); + $vars['wgRelatedArticlesCardLimit'] = $limit; + if ( $limit < 1 || $limit > 20 ) { + throw new \RuntimeException( + 'The value of wgRelatedArticlesCardLimit is not valid. It should be between 1 and 20.' + ); + } $vars['wgRelatedArticlesUseCirrusSearch'] = $config->get( 'RelatedArticlesUseCirrusSearch' ); $vars['wgRelatedArticlesOnlyUseCirrusSearch'] = $config->get( 'RelatedArticlesOnlyUseCirrusSearch' ); diff --git a/resources/ext.relatedArticles.cards/styles.less b/resources/ext.relatedArticles.cards/styles.less index 2a09ea5..6164eeb 100644 --- a/resources/ext.relatedArticles.cards/styles.less +++ b/resources/ext.relatedArticles.cards/styles.less @@ -9,16 +9,15 @@ .ext-related-articles-card-list { .flex-display(); flex-flow: row wrap; - justify-content: flex-start; font-size: @baseFontSize; list-style: none; overflow: hidden; position: relative; + // flex-item .ext-related-articles-card { background-color: #fff; box-sizing: border-box; - flex: 1 0 auto; margin: 0; height: @thumbWidth; position: relative; @@ -130,8 +129,11 @@ border-top: 0; .ext-related-articles-card { border: @cardBorder; - margin-right: 10px; - width: 30%; + @rightMargin: 1%; + margin-right: @rightMargin; + margin-bottom: 10px; + // max space is 100-2/3 + width: ( 100 - ( 2 * @rightMargin ) ) / 3; // Individual border-radius when cards side by side (not stacked) &, @@ -146,6 +148,10 @@ & + .ext-related-articles-card { border: @cardBorder; } + // every 3rd child drop the right margin + &:nth-child( 3n+3 ) { + margin-right: 0; + } } } } diff --git a/resources/ext.relatedArticles.readMore.bootstrap/index.js b/resources/ext.relatedArticles.readMore.bootstrap/index.js index
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: build: Bump a couple of devDependencies to latest
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363692 ) Change subject: build: Bump a couple of devDependencies to latest .. build: Bump a couple of devDependencies to latest grunt-banana-checker 0.5.0 → 0.6.0 grunt-stylelint0.7.0 → 0.8.0 Added stylelint peerdependency directly. Change-Id: Ib5da82ae60f4f49e572459c8e53f9125ad422ee8 --- M package.json 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/package.json b/package.json index 255aea0..56826cc 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,19 @@ "babel-polyfill": "6.9.1", "eslint-config-wikimedia": "0.4.0", "grunt": "1.0.1", - "grunt-banana-checker": "0.5.0", + "grunt-banana-checker": "0.6.0", "grunt-contrib-copy": "1.0.0", "grunt-contrib-watch": "1.0.0", "grunt-eslint": "19.0.0", "grunt-jsonlint": "1.1.0", "grunt-image": "2.2.3", "grunt-mocha-test": "0.12.7", - "grunt-stylelint": "0.7.0", + "grunt-stylelint": "0.8.0", "grunt-tyops": "0.1.0", "jimp": "0.2.24", "mocha": "2.5.3", "selenium-webdriver": "2.53.2", + "stylelint": "7.8.0", "stylelint-config-wikimedia": "0.4.1" } } -- To view, visit https://gerrit.wikimedia.org/r/363692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib5da82ae60f4f49e572459c8e53f9125ad422ee8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: registration: Provide credits information to callbacks
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/325080 ) Change subject: registration: Provide credits information to callbacks .. registration: Provide credits information to callbacks Registration callbacks now provide basic credits information (name, path, type, authors, license-name, version, etc.) as the first argument. The main use case right now for this is to support extension VERSION constants for backwards-compatibility. In addition, callbacks now run *after* attributes are exposed, so callbacks could use data from them if they wanted to. Bug: T151136 Change-Id: Ic5965dd4e259e1f46222ac92b8e78750e67b51d6 (cherry picked from commit b54acaf847131fdac9352aa35e4b82327751a3de) --- M includes/registration/ExtensionProcessor.php M includes/registration/ExtensionRegistry.php 2 files changed, 11 insertions(+), 6 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 8600851..8b942aa 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -138,6 +138,7 @@ /** * Things to be called once registration of these extensions are done +* keyed by the name of the extension that it belongs to * * @var callable[] */ @@ -172,11 +173,11 @@ $this->extractResourceLoaderModules( $dir, $info ); $this->extractServiceWiringFiles( $dir, $info ); $this->extractParserTestFiles( $dir, $info ); + $name = $this->extractCredits( $path, $info ); if ( isset( $info['callback'] ) ) { - $this->callbacks[] = $info['callback']; + $this->callbacks[$name] = $info['callback']; } - $this->extractCredits( $path, $info ); foreach ( $info as $key => $val ) { if ( in_array( $key, self::$globalSettings ) ) { $this->storeToArray( $path, "wg$key", $val, $this->globals ); @@ -327,6 +328,7 @@ /** * @param string $path * @param array $info +* @return string Name of thing * @throws Exception */ protected function extractCredits( $path, array $info ) { @@ -352,6 +354,8 @@ $this->credits[$name] = $credits; $this->globals['wgExtensionCredits'][$credits['type']][] = $credits; + + return $name; } /** diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 5da4be3..c795c23 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -31,7 +31,7 @@ /** * Bump whenever the registration cache needs resetting */ - const CACHE_VERSION = 3; + const CACHE_VERSION = 4; /** * Special key that defines the merge strategy @@ -281,9 +281,6 @@ foreach ( $info['autoloaderPaths'] as $path ) { require_once $path; } - foreach ( $info['callbacks'] as $cb ) { - call_user_func( $cb ); - } $this->loaded += $info['credits']; if ( $info['attributes'] ) { @@ -293,6 +290,10 @@ $this->attributes = array_merge_recursive( $this->attributes, $info['attributes'] ); } } + + foreach ( $info['callbacks'] as $name => $cb ) { + call_user_func( $cb, $info['credits'][$name] ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/325080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5965dd4e259e1f46222ac92b8e78750e67b51d6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_28 Gerrit-Owner: PaladoxGerrit-Reviewer: Chad Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Mwjames Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (1934b77e7)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363691 ) Change subject: Update VE core submodule to master (1934b77e7) .. Update VE core submodule to master (1934b77e7) New changes: 2ffadb015 ui.FormatAction: fixup selection for empty conversions eb1c82b57 Minimal demo: update deprecated TextInputWidget e9951799c Localisation updates from https://translatewiki.net. 7e80419bb ve.fixBase: Fix protocol-relative base href for Chrome 6b0fa8b40 Localisation updates from https://translatewiki.net. a4a0be2da ve.ui.TableLineContext: restore the z-index hack Bug: T151594 Bug: T167936 Bug: T169389 Change-Id: If9c8208f4c549800488acc799c677875bd233283 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/ve b/lib/ve index 65ea4cf..1934b77 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 65ea4cf36d125ac95de1d658fe10f0664d3a4e69 +Subproject commit 1934b77e72f79d7bceb9d21dd6c0a90dadc61b0e -- To view, visit https://gerrit.wikimedia.org/r/363691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9c8208f4c549800488acc799c677875bd233283 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: build: Exclude /vendor from stylelint to avoid errors
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363690 ) Change subject: build: Exclude /vendor from stylelint to avoid errors .. build: Exclude /vendor from stylelint to avoid errors Change-Id: I0505925ada34d951fd8d0cc810b47ebeccadf6bb --- M Gruntfile.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 0ed9734..db86d70 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -136,7 +136,8 @@ '!dist/**', '!docs/**', '!lib/**', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] }, banana: { -- To view, visit https://gerrit.wikimedia.org/r/363690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0505925ada34d951fd8d0cc810b47ebeccadf6bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Add null port to fix install requirements
Mepps has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363717 ) Change subject: Add null port to fix install requirements .. Add null port to fix install requirements Change-Id: I2ad9c788a06b0f3fff7fe15ae1450d53db621129 --- M install/index.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/17/363717/1 diff --git a/install/index.php b/install/index.php index 79010ff..ccdbed1 100644 --- a/install/index.php +++ b/install/index.php @@ -569,7 +569,7 @@ $host = implode(':', $hostParts); } else { - $port = ''; + $port = null; } $conn = @mysqli_connect($host, $username, $password, $database, $port); return $conn; @@ -1268,7 +1268,6 @@ ) { $this->testing($testDetails); $conn = $this->connect($server, $username, $password); - $okay = NULL; if (@mysqli_select_db($conn, $database)) { $okay = "Database '$database' exists"; -- To view, visit https://gerrit.wikimedia.org/r/363717 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ad9c788a06b0f3fff7fe15ae1450d53db621129 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Mepps___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: build: Bump a couple of devDependencies to latest
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363692 ) Change subject: build: Bump a couple of devDependencies to latest .. build: Bump a couple of devDependencies to latest grunt-banana-checker 0.5.0 → 0.6.0 grunt-stylelint0.7.0 → 0.8.0 Added stylelint peerdependency directly. Change-Id: Ib5da82ae60f4f49e572459c8e53f9125ad422ee8 --- M package.json 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/92/363692/1 diff --git a/package.json b/package.json index 255aea0..56826cc 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,19 @@ "babel-polyfill": "6.9.1", "eslint-config-wikimedia": "0.4.0", "grunt": "1.0.1", - "grunt-banana-checker": "0.5.0", + "grunt-banana-checker": "0.6.0", "grunt-contrib-copy": "1.0.0", "grunt-contrib-watch": "1.0.0", "grunt-eslint": "19.0.0", "grunt-jsonlint": "1.1.0", "grunt-image": "2.2.3", "grunt-mocha-test": "0.12.7", - "grunt-stylelint": "0.7.0", + "grunt-stylelint": "0.8.0", "grunt-tyops": "0.1.0", "jimp": "0.2.24", "mocha": "2.5.3", "selenium-webdriver": "2.53.2", + "stylelint": "7.8.0", "stylelint-config-wikimedia": "0.4.1" } } -- To view, visit https://gerrit.wikimedia.org/r/363692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5da82ae60f4f49e572459c8e53f9125ad422ee8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (1934b77e7)
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363691 ) Change subject: Update VE core submodule to master (1934b77e7) .. Update VE core submodule to master (1934b77e7) New changes: 2ffadb015 ui.FormatAction: fixup selection for empty conversions eb1c82b57 Minimal demo: update deprecated TextInputWidget e9951799c Localisation updates from https://translatewiki.net. 7e80419bb ve.fixBase: Fix protocol-relative base href for Chrome 6b0fa8b40 Localisation updates from https://translatewiki.net. a4a0be2da ve.ui.TableLineContext: restore the z-index hack Bug: T151594 Bug: T167936 Bug: T169389 Change-Id: If9c8208f4c549800488acc799c677875bd233283 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/91/363691/1 diff --git a/lib/ve b/lib/ve index 65ea4cf..1934b77 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit 65ea4cf36d125ac95de1d658fe10f0664d3a4e69 +Subproject commit 1934b77e72f79d7bceb9d21dd6c0a90dadc61b0e -- To view, visit https://gerrit.wikimedia.org/r/363691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9c8208f4c549800488acc799c677875bd233283 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: build: Exclude /vendor from stylelint to avoid errors
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363690 ) Change subject: build: Exclude /vendor from stylelint to avoid errors .. build: Exclude /vendor from stylelint to avoid errors Change-Id: I0505925ada34d951fd8d0cc810b47ebeccadf6bb --- M Gruntfile.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/90/363690/1 diff --git a/Gruntfile.js b/Gruntfile.js index 0ed9734..db86d70 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -136,7 +136,8 @@ '!dist/**', '!docs/**', '!lib/**', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] }, banana: { -- To view, visit https://gerrit.wikimedia.org/r/363690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0505925ada34d951fd8d0cc810b47ebeccadf6bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Temporarily remove wtp2019 from the target for a memtest
Mobrovac has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363689 ) Change subject: Temporarily remove wtp2019 from the target for a memtest .. Temporarily remove wtp2019 from the target for a memtest Bug: T146113 Change-Id: Ie7cc9d6ac9f5f23b06987624d5ffd2e41954b806 --- M scap/targets 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy refs/changes/89/363689/1 diff --git a/scap/targets b/scap/targets index 12934ef..2dc1f8e 100644 --- a/scap/targets +++ b/scap/targets @@ -38,5 +38,4 @@ wtp2016.codfw.wmnet wtp2017.codfw.wmnet wtp2018.codfw.wmnet -wtp2019.codfw.wmnet wtp2020.codfw.wmnet -- To view, visit https://gerrit.wikimedia.org/r/363689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7cc9d6ac9f5f23b06987624d5ffd2e41954b806 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: Mobrovac___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix field name in entity search
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363655 ) Change subject: Fix field name in entity search .. Fix field name in entity search Should be labels_all.near_match_folded Bug: T125500 Change-Id: Ie5883a975bd001a78504269a3790223f806fbc74 --- M repo/includes/Search/Elastic/EntitySearchElastic.php M repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected M repo/tests/phpunit/data/entitySearch/search_de-ch.expected M repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected M repo/tests/phpunit/data/entitySearch/search_en.expected M repo/tests/phpunit/data/entitySearch/search_en_strict.expected M repo/tests/phpunit/data/entitySearch/search_zh-de-ch.expected M repo/tests/phpunit/data/entitySearch/search_zh.expected 8 files changed, 13 insertions(+), 13 deletions(-) Approvals: jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, approved diff --git a/repo/includes/Search/Elastic/EntitySearchElastic.php b/repo/includes/Search/Elastic/EntitySearchElastic.php index 2499534..90de5bf 100644 --- a/repo/includes/Search/Elastic/EntitySearchElastic.php +++ b/repo/includes/Search/Elastic/EntitySearchElastic.php @@ -164,7 +164,7 @@ $langChain = $this->languageChainFactory->newFromLanguageCode( $languageCode ); $this->searchLanguageCodes = $langChain->getFetchLanguageCodes(); if ( !$strictLanguage ) { - $fields[] = "labels_all.near_match^{$profile['any']}"; + $fields[] = "labels_all.near_match_folded^{$profile['any']}"; $discount = 1; foreach ( $this->searchLanguageCodes as $fallbackCode ) { if ( $fallbackCode === $languageCode ) { diff --git a/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected b/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected index f458654..8230968 100644 --- a/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected +++ b/repo/tests/phpunit/data/entitySearch/search_de-ch-en.expected @@ -26,7 +26,7 @@ "labels.de-ch.near_match^40", "labels.de-ch.near_match_folded^30", "labels.de-ch.prefix^15", -"labels_all.near_match^1", +"labels_all.near_match_folded^1", "labels.de.near_match^25", "labels.de.near_match_folded^20", "labels.de.prefix^10", @@ -147,4 +147,4 @@ "options": { "timeout": "20s" } -} \ No newline at end of file +} diff --git a/repo/tests/phpunit/data/entitySearch/search_de-ch.expected b/repo/tests/phpunit/data/entitySearch/search_de-ch.expected index 4b15d63..bd3a853 100644 --- a/repo/tests/phpunit/data/entitySearch/search_de-ch.expected +++ b/repo/tests/phpunit/data/entitySearch/search_de-ch.expected @@ -26,7 +26,7 @@ "labels.de-ch.near_match^40", "labels.de-ch.near_match_folded^30", "labels.de-ch.prefix^15", -"labels_all.near_match^1", +"labels_all.near_match_folded^1", "labels.de.near_match^25", "labels.de.near_match_folded^20", "labels.de.prefix^10", @@ -151,4 +151,4 @@ "options": { "timeout": "20s" } -} \ No newline at end of file +} diff --git a/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected b/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected index 2904cb2..b75b2d6 100644 --- a/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected +++ b/repo/tests/phpunit/data/entitySearch/search_de-ch_strict.expected @@ -144,4 +144,4 @@ "options": { "timeout": "20s" } -} \ No newline at end of file +} diff --git a/repo/tests/phpunit/data/entitySearch/search_en.expected b/repo/tests/phpunit/data/entitySearch/search_en.expected index 3eddbce..5d7f639 100644 --- a/repo/tests/phpunit/data/entitySearch/search_en.expected +++ b/repo/tests/phpunit/data/entitySearch/search_en.expected @@ -26,7 +26,7 @@ "labels.en.near_match^40", "labels.en.near_match_folded^30", "labels.en.prefix^15", -"labels_all.near_match^1" +
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_29]: Fix/hack ErrorPageError to work from non-UI contexts
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363665 ) Change subject: Fix/hack ErrorPageError to work from non-UI contexts .. Fix/hack ErrorPageError to work from non-UI contexts Right now, ErrorPageError *assumes* you're never running on the cli or the API. It's kinda a crappy superclass to use for errors unless you're 1000% sure you'll never hit that code path. Yay assumptions! Ideally, all of this report() crap is cleaned up and unified across the like 1192902117 places we have it spread out, but for now just detect the scenario and delegate back to MWException, which does the right thing Bug: T168337 Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 --- M includes/exception/ErrorPageError.php M tests/phpunit/includes/exception/ErrorPageErrorTest.php 2 files changed, 8 insertions(+), 4 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php index 2bed87a..4b18126 100644 --- a/includes/exception/ErrorPageError.php +++ b/includes/exception/ErrorPageError.php @@ -61,9 +61,12 @@ } public function report() { - global $wgOut; - - $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); - $wgOut->output(); + if ( self::isCommandLine() || defined( 'MW_API' ) ) { + parent::report(); + } else { + global $wgOut; + $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); + $wgOut->output(); + } } } diff --git a/tests/phpunit/includes/exception/ErrorPageErrorTest.php b/tests/phpunit/includes/exception/ErrorPageErrorTest.php index 71398e3..e72865f 100644 --- a/tests/phpunit/includes/exception/ErrorPageErrorTest.php +++ b/tests/phpunit/includes/exception/ErrorPageErrorTest.php @@ -43,6 +43,7 @@ $mock->expects( $this->once() ) ->method( 'output' ); $this->setMwGlobals( 'wgOut', $mock ); + $this->setMwGlobals( 'wgCommandLineMode', false ); $e = new ErrorPageError( $title, $mockMessage, $params ); $e->report(); -- To view, visit https://gerrit.wikimedia.org/r/363665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_29 Gerrit-Owner: ChadGerrit-Reviewer: Chad Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix/hack ErrorPageError to work from non-UI contexts
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363660 ) Change subject: Fix/hack ErrorPageError to work from non-UI contexts .. Fix/hack ErrorPageError to work from non-UI contexts Right now, ErrorPageError *assumes* you're never running on the cli or the API. It's kinda a crappy superclass to use for errors unless you're 1000% sure you'll never hit that code path. Yay assumptions! Ideally, all of this report() crap is cleaned up and unified across the like 1192902117 places we have it spread out, but for now just detect the scenario and delegate back to MWException, which does the right thing Bug: T168337 Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 --- M includes/exception/ErrorPageError.php M tests/phpunit/includes/exception/ErrorPageErrorTest.php 2 files changed, 8 insertions(+), 4 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php index 2bed87a..4b18126 100644 --- a/includes/exception/ErrorPageError.php +++ b/includes/exception/ErrorPageError.php @@ -61,9 +61,12 @@ } public function report() { - global $wgOut; - - $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); - $wgOut->output(); + if ( self::isCommandLine() || defined( 'MW_API' ) ) { + parent::report(); + } else { + global $wgOut; + $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); + $wgOut->output(); + } } } diff --git a/tests/phpunit/includes/exception/ErrorPageErrorTest.php b/tests/phpunit/includes/exception/ErrorPageErrorTest.php index 71398e3..e72865f 100644 --- a/tests/phpunit/includes/exception/ErrorPageErrorTest.php +++ b/tests/phpunit/includes/exception/ErrorPageErrorTest.php @@ -43,6 +43,7 @@ $mock->expects( $this->once() ) ->method( 'output' ); $this->setMwGlobals( 'wgOut', $mock ); + $this->setMwGlobals( 'wgCommandLineMode', false ); $e = new ErrorPageError( $title, $mockMessage, $params ); $e->report(); -- To view, visit https://gerrit.wikimedia.org/r/363660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: ChadGerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: DONOTMERGE: Testing unicode sections
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363668 ) Change subject: DONOTMERGE: Testing unicode sections .. DONOTMERGE: Testing unicode sections Change-Id: Iad470a9aeecd8a5e96bd0f4107c231764c0756bb Depends-On: Id304010a0342efbb7ef2d56c5b8b244f2e4fb2c5 --- M extension.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/68/363668/1 diff --git a/extension.json b/extension.json index 1abf146..23aa3ad 100644 --- a/extension.json +++ b/extension.json @@ -1774,7 +1774,7 @@ "h6" ], "MFSpecialCaseMainPage": false, - "MinervaEnableSiteNotice": false, + "MinervaEnableSiteNotice": true, "MFTidyMobileViewSections": true, "MFMobileHeader": "X-Subdomain", "MFRemovableClasses": { -- To view, visit https://gerrit.wikimedia.org/r/363668 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad470a9aeecd8a5e96bd0f4107c231764c0756bb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Use a better page for the beta feature discussion link
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363666 ) Change subject: Use a better page for the beta feature discussion link .. Use a better page for the beta feature discussion link Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f1234 --- M CodeMirror.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/66/363666/1 diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php index 34364fa..53f1306 100644 --- a/CodeMirror.hooks.php +++ b/CodeMirror.hooks.php @@ -165,7 +165,7 @@ 'rtl' => $wgExtensionAssetsPath . '/CodeMirror/resources/images/codemirror-beta-RTL.svg' ], 'info-link' => 'https://meta.wikimedia.org/wiki/Community_Tech/Wikitext_editor_syntax_highlighting', - 'discussion-link' => 'https://meta.wikimedia.org/wiki/Talk:Community_Tech/Wikitext_editor_syntax_highlighting' + 'discussion-link' => 'https://www.mediawiki.org/wiki/Extension_talk:CodeMirror/BetaFeature' ]; } } -- To view, visit https://gerrit.wikimedia.org/r/363666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f1234 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Crush the beta feature screenshot images using svgo
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363667 ) Change subject: Crush the beta feature screenshot images using svgo .. Crush the beta feature screenshot images using svgo Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f4321 --- M resources/images/codemirror-beta-LTR.svg M resources/images/codemirror-beta-RTL.svg 2 files changed, 44 insertions(+), 193 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror refs/changes/67/363667/1 diff --git a/resources/images/codemirror-beta-LTR.svg b/resources/images/codemirror-beta-LTR.svg index 36e08df..bc08caf 100644 --- a/resources/images/codemirror-beta-LTR.svg +++ b/resources/images/codemirror-beta-LTR.svg @@ -1,97 +1,23 @@ -http://www.w3.org/2000/svg; viewBox="0 0 264 162" width="264" height="162"> - - .st0{fill:#3466CC;} - .st1{fill:#E5E5E5;} - .st2{fill:#FF;} - .st3{opacity:6.00e-02;enable-background:new;} - .st4{opacity:7.00e-02;enable-background:new;} - .st5{opacity:0.25;fill:none;stroke:#FF;stroke-width:0.5;stroke-miterlimit:10;enable-background:new ;} - .st6{fill:#00AF89;} - .st7{opacity:0.23;fill:#F5A623;enable-background:new;} - .st8{fill:#F5A623;} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +http://www.w3.org/2000/svg; viewBox="0 0 264 162" width="264" height="162"> + + .st0{fill:#3466cc}.st1{fill:#e5e5e5}.st2{fill:#fff}.st3{opacity:6e-2}.st3,.st4,.st5{enable-background:new}.st4{opacity:7e-2}.st5{opacity:.25;fill:none;stroke:#fff;stroke-width:.5;stroke-miterlimit:10}.st6{fill:#00af89}.st7{opacity:.23;enable-background:new}.st7,.st8{fill:#f5a623} + + + + + + + + + + + + + + + + + + diff --git a/resources/images/codemirror-beta-RTL.svg b/resources/images/codemirror-beta-RTL.svg index c791296..17efeed 100644 --- a/resources/images/codemirror-beta-RTL.svg +++ b/resources/images/codemirror-beta-RTL.svg @@ -1,98 +1,23 @@ -http://www.w3.org/2000/svg; viewBox="0 0 264 162" width="264" height="162"> - - .st0{fill:#3466CC;} - .st1{fill:#E5E5E5;} - .st2{fill:#FF;} - .st3{opacity:6.00e-02;enable-background:new;} - .st4{opacity:7.00e-02;enable-background:new;} - .st5{opacity:0.25;fill:none;stroke:#FF;stroke-width:0.5;stroke-miterlimit:10;enable-background:new ;} - .st6{fill:#00AF89;} - .st7{opacity:0.23;fill:#F5A623;enable-background:new;} - .st8{fill:#F5A623;} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +http://www.w3.org/2000/svg; viewBox="0 0 264 162" width="264" height="162"> + + .st0{fill:#3466cc}.st1{fill:#e5e5e5}.st2{fill:#fff}.st3{opacity:6e-2}.st3,.st4,.st5{enable-background:new}.st4{opacity:7e-2}.st5{opacity:.25;fill:none;stroke:#fff;stroke-width:.5;stroke-miterlimit:10}.st6{fill:#00af89}.st7{opacity:.23;enable-background:new}.st7,.st8{fill:#f5a623} + + + + + + + + + + + + + +
[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_29]: Fix/hack ErrorPageError to work from non-UI contexts
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363665 ) Change subject: Fix/hack ErrorPageError to work from non-UI contexts .. Fix/hack ErrorPageError to work from non-UI contexts Right now, ErrorPageError *assumes* you're never running on the cli or the API. It's kinda a crappy superclass to use for errors unless you're 1000% sure you'll never hit that code path. Yay assumptions! Ideally, all of this report() crap is cleaned up and unified across the like 1192902117 places we have it spread out, but for now just detect the scenario and delegate back to MWException, which does the right thing Bug: T168337 Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 --- M includes/exception/ErrorPageError.php M tests/phpunit/includes/exception/ErrorPageErrorTest.php 2 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/363665/1 diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php index 2bed87a..4b18126 100644 --- a/includes/exception/ErrorPageError.php +++ b/includes/exception/ErrorPageError.php @@ -61,9 +61,12 @@ } public function report() { - global $wgOut; - - $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); - $wgOut->output(); + if ( self::isCommandLine() || defined( 'MW_API' ) ) { + parent::report(); + } else { + global $wgOut; + $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); + $wgOut->output(); + } } } diff --git a/tests/phpunit/includes/exception/ErrorPageErrorTest.php b/tests/phpunit/includes/exception/ErrorPageErrorTest.php index 71398e3..e72865f 100644 --- a/tests/phpunit/includes/exception/ErrorPageErrorTest.php +++ b/tests/phpunit/includes/exception/ErrorPageErrorTest.php @@ -43,6 +43,7 @@ $mock->expects( $this->once() ) ->method( 'output' ); $this->setMwGlobals( 'wgOut', $mock ); + $this->setMwGlobals( 'wgCommandLineMode', false ); $e = new ErrorPageError( $title, $mockMessage, $params ); $e->report(); -- To view, visit https://gerrit.wikimedia.org/r/363665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_29 Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update reference screenshots
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363663 ) Change subject: Update reference screenshots .. Update reference screenshots Change-Id: Id0a19c71355b5192c9e73d4a1f30fc5aedb54aee --- M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditHelpViewTest.testWidth-480dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditHelpViewTest.testWidth-720dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-dark.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testFocus-480dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-dark.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testTheme-480dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-480dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.0x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditSuccessViewTest.testWidth-720dp-en-ltr-font1.5x-light.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testFocus-480dp-en-ltr-font1.0x-dark-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testFocus-480dp-en-ltr-font1.0x-dark-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testFocus-480dp-en-ltr-font1.0x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testFocus-480dp-en-ltr-font1.0x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testTheme-480dp-en-ltr-font1.0x-dark-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testTheme-480dp-en-ltr-font1.0x-dark-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testTheme-480dp-en-ltr-font1.0x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testTheme-480dp-en-ltr-font1.0x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-480dp-en-ltr-font1.0x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-480dp-en-ltr-font1.0x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-480dp-en-ltr-font1.5x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-480dp-en-ltr-font1.5x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-720dp-en-ltr-font1.0x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-720dp-en-ltr-font1.0x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-720dp-en-ltr-font1.5x-light-PAGE_ONE.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditTutorialPageViewTest.testWidth-720dp-en-ltr-font1.5x-light-PAGE_TWO.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditViewTest.testFocus-480dp-en-ltr-font1.0x-dark-saving.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditViewTest.testFocus-480dp-en-ltr-font1.0x-dark-unsaved.png M app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditViewTest.testFocus-480dp-en-ltr-font1.0x-light-saving.png M
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WIP: Fix ErrorPageError to work from non-web contexts
Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363660 ) Change subject: WIP: Fix ErrorPageError to work from non-web contexts .. WIP: Fix ErrorPageError to work from non-web contexts Right now, ErrorPageError *assumes* you're never running on the cli. It's kinda a crappy superclass to use for errors unless you're 1000% sure you'll never hit that code path from the cli. Ideally, all of this report() crap is cleaned up and unified across the like 1192902117 places we have it spread out, but for now just detect the scenario and delegate back to MWException, which does the right thing Bug: T168337 Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 --- M includes/exception/ErrorPageError.php 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/363660/1 diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php index 2bed87a..508d8ed 100644 --- a/includes/exception/ErrorPageError.php +++ b/includes/exception/ErrorPageError.php @@ -61,9 +61,12 @@ } public function report() { - global $wgOut; - - $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); - $wgOut->output(); + if ( self::isCommandLine() ) { + parent::report(); + } else { + global $wgOut; + $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); + $wgOut->output(); + } } } -- To view, visit https://gerrit.wikimedia.org/r/363660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2f490528e128527a7a5ef1f4f5eea36ec9ee810 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363659 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment f8f590e Merge civicrm updates into master Change-Id: Iedfa3878166fbd6f1e02f301d2dea6013d990121 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/363659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iedfa3878166fbd6f1e02f301d2dea6013d990121 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: MeppsGerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment
Mepps has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363659 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment f8f590e Merge civicrm updates into master Change-Id: Iedfa3878166fbd6f1e02f301d2dea6013d990121 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/59/363659/1 -- To view, visit https://gerrit.wikimedia.org/r/363659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedfa3878166fbd6f1e02f301d2dea6013d990121 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Mepps___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ve.ui.TableLineContext: restore the z-index hack
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363619 ) Change subject: ve.ui.TableLineContext: restore the z-index hack .. ve.ui.TableLineContext: restore the z-index hack 73ce638f11 removed this, thinking it was unnecessary. Unfortunately, it still appears under the table context without the hack. Bug: T169389 Change-Id: I02302a5f5b7443ef164a4c0db1be5960595f7daa --- M src/ui/styles/ve.ui.TableLineContext.css 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved Esanders: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/src/ui/styles/ve.ui.TableLineContext.css b/src/ui/styles/ve.ui.TableLineContext.css index eb3fa27..1c781b0 100644 --- a/src/ui/styles/ve.ui.TableLineContext.css +++ b/src/ui/styles/ve.ui.TableLineContext.css @@ -4,6 +4,12 @@ * @copyright 2011-2017 VisualEditor Team and others; see http://ve.mit-license.org */ +.ve-ui-tableLineContext { + position: absolute; + /* Ensure it is placed above the table context */ + z-index: 2; +} + .ve-ui-tableLineContext-indicator { position: absolute; display: block; -- To view, visit https://gerrit.wikimedia.org/r/363619 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02302a5f5b7443ef164a4c0db1be5960595f7daa Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: DLynchGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Esanders Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Merge civicrm updates into master
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363657 ) Change subject: Merge civicrm updates into master .. Merge civicrm updates into master Change-Id: I8e550b622d8ec04786d5aa93bf8ca198e4e9eb86 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/civicrm b/civicrm index 8d800cb..7ff5e80 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 8d800cbdf3a146631d456c4861be166bf570e020 +Subproject commit 7ff5e80169a112bd5b68004ff255b1cf326ebdc2 -- To view, visit https://gerrit.wikimedia.org/r/363657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e550b622d8ec04786d5aa93bf8ca198e4e9eb86 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: MeppsGerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Stop emitting global events that are not being used...
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363658 ) Change subject: Hygiene: Stop emitting global events that are not being used anywhere .. Hygiene: Stop emitting global events that are not being used anywhere Remove unused events WatchstarGateway (watched) and EditorOverlay (edit-preview) Change-Id: I4bd2b73223f58f1000cfb26454ac6dd92673517d --- M resources/mobile.editor.overlay/EditorOverlay.js M resources/mobile.watchstar/WatchstarGateway.js 2 files changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/58/363658/1 diff --git a/resources/mobile.editor.overlay/EditorOverlay.js b/resources/mobile.editor.overlay/EditorOverlay.js index 145a73e..3713e5f 100644 --- a/resources/mobile.editor.overlay/EditorOverlay.js +++ b/resources/mobile.editor.overlay/EditorOverlay.js @@ -270,8 +270,6 @@ el: self.$preview, text: parsedText } ).$( 'a' ).on( 'click', false ); - // Emit event so we can perform enhancements to page - M.emit( 'edit-preview', self ); } ).fail( function () { self.$preview.addClass( 'error' ).text( mw.msg( 'mobile-frontend-editor-error-preview' ) ); } ).always( function () { diff --git a/resources/mobile.watchstar/WatchstarGateway.js b/resources/mobile.watchstar/WatchstarGateway.js index 0177ce2..14cb643 100644 --- a/resources/mobile.watchstar/WatchstarGateway.js +++ b/resources/mobile.watchstar/WatchstarGateway.js @@ -106,7 +106,6 @@ return this.api.postWithToken( 'watch', data ).done( function () { var newStatus = !self.isWatchedPage( page ); self.setWatchedPage( page, newStatus ); - M.emit( 'watched', page, newStatus ); } ); } }; -- To view, visit https://gerrit.wikimedia.org/r/363658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bd2b73223f58f1000cfb26454ac6dd92673517d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Add license from original source to comply with license requ...
Paladox has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363652 ) Change subject: Add license from original source to comply with license requirements. .. Add license from original source to comply with license requirements. Change-Id: I6ea660e99e239e6d3b1b74034edc85f438322c3c --- A LICENSE 1 file changed, 338 insertions(+), 0 deletions(-) Approvals: Paladox: Verified; Looks good to me, approved diff --git a/LICENSE b/LICENSE new file mode 100644 index 000..9b4c9a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,338 @@ + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Merge civicrm updates into master
Mepps has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363657 ) Change subject: Merge civicrm updates into master .. Merge civicrm updates into master Change-Id: I8e550b622d8ec04786d5aa93bf8ca198e4e9eb86 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/57/363657/1 diff --git a/civicrm b/civicrm index 8d800cb..7ff5e80 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 8d800cbdf3a146631d456c4861be166bf570e020 +Subproject commit 7ff5e80169a112bd5b68004ff255b1cf326ebdc2 -- To view, visit https://gerrit.wikimedia.org/r/363657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e550b622d8ec04786d5aa93bf8ca198e4e9eb86 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Mepps___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.7]: Keep track of what is disabling the TOC
Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363656 ) Change subject: Keep track of what is disabling the TOC .. Keep track of what is disabling the TOC Bug: T168040 Change-Id: Id899115a0d69b01d7c02351a8dc672ed51f251a0 --- M includes/parser/ParserCache.php M includes/parser/ParserOutput.php 2 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/363656/1 diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index 8b5683d..236f6fb 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -329,6 +329,7 @@ 'parserOutputKey' => $parserOutputKey, 'timestamp' => $cacheTime, 'revid' => $revId, + 'disabler' => isset( $parserOutput->mTOCDisabler ) ? $parserOutput->mTOCDisabler : false, ] ); } diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 10ac192..751c694 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -217,6 +217,8 @@ /** @var integer Upper bound of expiry based on parse duration */ private $mMaxAdaptiveExpiry = INF; + public $mTOCDisabler = null; + const EDITSECTION_REGEX = '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)())#s'; @@ -463,6 +465,9 @@ } public function setTOCEnabled( $flag ) { + if ( $flag === false ) { + $this->mTOCDisabler = wfGetAllCallers( false ); + } return wfSetVar( $this->mTOCEnabled, $flag ); } -- To view, visit https://gerrit.wikimedia.org/r/363656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id899115a0d69b01d7c02351a8dc672ed51f251a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.7 Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix field name in entit search
Smalyshev has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363655 ) Change subject: Fix field name in entit search .. Fix field name in entit search Should be labels_all.near_match_folded Bug: T125500 Change-Id: Ie5883a975bd001a78504269a3790223f806fbc74 --- M repo/includes/Search/Elastic/EntitySearchElastic.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/55/363655/1 diff --git a/repo/includes/Search/Elastic/EntitySearchElastic.php b/repo/includes/Search/Elastic/EntitySearchElastic.php index 2499534..90de5bf 100644 --- a/repo/includes/Search/Elastic/EntitySearchElastic.php +++ b/repo/includes/Search/Elastic/EntitySearchElastic.php @@ -164,7 +164,7 @@ $langChain = $this->languageChainFactory->newFromLanguageCode( $languageCode ); $this->searchLanguageCodes = $langChain->getFetchLanguageCodes(); if ( !$strictLanguage ) { - $fields[] = "labels_all.near_match^{$profile['any']}"; + $fields[] = "labels_all.near_match_folded^{$profile['any']}"; $discount = 1; foreach ( $this->searchLanguageCodes as $fallbackCode ) { if ( $fallbackCode === $languageCode ) { -- To view, visit https://gerrit.wikimedia.org/r/363655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5883a975bd001a78504269a3790223f806fbc74 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Fix filename case for some api examples
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363653 ) Change subject: Fix filename case for some api examples .. Fix filename case for some api examples Not sure how we got out of sync with core... Change-Id: I5a3db8322f3c32a32f5ae2670c9867cde1f86391 --- R api/v3/examples/CustomValue/FormatFieldName.php R api/v3/examples/Group/GetFields.php R api/v3/examples/Membership/FilterIsCurrent.php R api/v3/examples/Tag/GetReturnArray.php 4 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/53/363653/1 diff --git a/api/v3/examples/CustomValue/formatFieldName.php b/api/v3/examples/CustomValue/FormatFieldName.php similarity index 100% rename from api/v3/examples/CustomValue/formatFieldName.php rename to api/v3/examples/CustomValue/FormatFieldName.php diff --git a/api/v3/examples/Group/getfields.php b/api/v3/examples/Group/GetFields.php similarity index 100% rename from api/v3/examples/Group/getfields.php rename to api/v3/examples/Group/GetFields.php diff --git a/api/v3/examples/Membership/filterIsCurrent.php b/api/v3/examples/Membership/FilterIsCurrent.php similarity index 100% rename from api/v3/examples/Membership/filterIsCurrent.php rename to api/v3/examples/Membership/FilterIsCurrent.php diff --git a/api/v3/examples/Tag/getReturnArray.php b/api/v3/examples/Tag/GetReturnArray.php similarity index 100% rename from api/v3/examples/Tag/getReturnArray.php rename to api/v3/examples/Tag/GetReturnArray.php -- To view, visit https://gerrit.wikimedia.org/r/363653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a3db8322f3c32a32f5ae2670c9867cde1f86391 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: [WIP] T169342: Make gallery output for missing images consis...
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363654 ) Change subject: [WIP] T169342: Make gallery output for missing images consistent with php .. [WIP] T169342: Make gallery output for missing images consistent with php * This needs a solution to not break currently stored renders when serializing. Change-Id: I1562c6ef7ec70712eb15110b4fec552c57ba4366 --- M lib/ext/Gallery/index.js M tests/parserTests.txt 2 files changed, 27 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/54/363654/1 diff --git a/lib/ext/Gallery/index.js b/lib/ext/Gallery/index.js index f0b7d28..297d369 100644 --- a/lib/ext/Gallery/index.js +++ b/lib/ext/Gallery/index.js @@ -90,12 +90,11 @@ var matches = obj.line.match(/^([^|]+)(\|(?:.*))?$/); if (!matches) { return null; } - var text = matches[1]; var caption = matches[2] || ''; // TODO: % indicates rawurldecode. - var title = env.makeTitleFromText(text, + var title = env.makeTitleFromText(matches[1], env.conf.wiki.canonicalNamespaces.file, true); if (title === null || !title.getNamespace().isFile()) { @@ -162,6 +161,7 @@ var typeOf = thumb.getAttribute('typeof'); if (/\bmw:Error\b/.test(typeOf)) { while (thumb.firstChild) { thumb.firstChild.remove(); } + var text = title._key.replace(/_/g, ' '); thumb.appendChild(doc.createTextNode(text)); } @@ -249,6 +249,7 @@ }; var contentHandler = Promise.method(function(node, state) { + var env = state.env; var content = '\n'; return Promise.reduce(Array.from(node.childNodes), function(_, child) { switch (child.nodeType) { @@ -264,7 +265,7 @@ var elt = thumb.querySelector('img, video'); var resource = null; if (elt) { - // FIXME: Should we preserve the original namespace? + // FIXME: Should we preserve the original namespace? See T151367 resource = elt.getAttribute('resource'); if (resource !== null) { content += resource.replace(/^\.\//, ''); @@ -274,7 +275,14 @@ } } } else { - content += thumb.textContent; + // FIXME: Should we preserve the original namespace? See T151367 + // Presumably, if we have a "thumb" element but no media, + // we were given a valid title that resulted in a mw:Error + // (apierror-filedoesnotexist). + // Normalize to the prefixedDBKey form. + var nsid = env.conf.wiki.canonicalNamespaces.file; + var ns = env.conf.wiki.namespaceNames[nsid]; + content += ns + ':' + thumb.textContent.replace(/ +/g, '_'); } // The first "a" is for the link, hopefully. var a = thumb.querySelector('a'); diff --git a/tests/parserTests.txt b/tests/parserTests.txt index 95df91d..49eecfd 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -19907,7 +19907,7 @@ !! html/parsoid -File:File:Foobar.jpg +File:Foobar.jpg !! end @@ -19970,11 +19970,11 @@ !! html/parsoid -image1.png -image2.gif -image3 -image4 - image5.svg http:/;>http:/ +Image1.png +Image2.gif +Image3 +Image4 +Image5.svg http:/;>http:/ * image6 !! end @@ -20033,8 +20033,8 @@ !! html/parsoid Foo Main Page -File:Nonexistent.jpgcaption -File:Nonexistent.jpg +Nonexistent.jpgcaption +Nonexistent.jpg some caption Main Page blabla. @@ -20094,8 +20094,8 @@ !! html/parsoid Foo Main Page -File:Nonexistent.jpgcaption -File:Nonexistent.jpg +Nonexistent.jpgcaption +Nonexistent.jpg some caption Main Page blabla. @@ -20259,14 +20259,14 @@ !! html/parsoid -File:Nonexistent.jpgFile:Nonexistent.jpgcaption -File:Nonexistent.jpgFile:Nonexistent.jpg +Nonexistent.jpgFile:Nonexistent.jpgcaption +Nonexistent.jpgFile:Nonexistent.jpg File:Foobar.jpgsome caption Main Page File:Foobar.jpg !! end -## Should Parsoid be preserving these variations? +## Should Parsoid be preserving these variations? See T151367 !! test Gallery (with
[MediaWiki-commits] [Gerrit] labs/icinga2[master]: Add license from original source to comply with license requ...
Zppix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363652 ) Change subject: Add license from original source to comply with license requirements. .. Add license from original source to comply with license requirements. Change-Id: I6ea660e99e239e6d3b1b74034edc85f438322c3c --- A LICENSE 1 file changed, 338 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/icinga2 refs/changes/52/363652/1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 000..9b4c9a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,338 @@ + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Only message box styles should be loaded on editor
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363651 ) Change subject: Only message box styles should be loaded on editor .. Only message box styles should be loaded on editor Bug: T164892 Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 --- M includes/MobileFrontend.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/51/363651/1 diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 5182ab4..8e09cb5 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -781,7 +781,7 @@ $requestAction = $out->getRequest()->getVal( 'action' ); if ( $noJsEditing && ( $requestAction === 'edit' || $requestAction === 'submit' ) ) { $out->addModuleStyles( [ - 'mobile.messageBox' + 'mobile.messageBox.styles' ] ); } } -- To view, visit https://gerrit.wikimedia.org/r/363651 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic0562f306f657ec9ba234d08c2a1026d1f3ca7f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Minor modifications to core editing elements in non-js mode
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363643 ) Change subject: Minor modifications to core editing elements in non-js mode .. Minor modifications to core editing elements in non-js mode This adds css rules for edit-tools and mw-editnotice which are currently distracting from the edit text area. Bug: T169784 Change-Id: Ia50ac9fad5bc478d8f4913a44f3c66ccd79cd71b --- M skinStyles/mediawiki.action.edit.styles/minerva.less 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/skinStyles/mediawiki.action.edit.styles/minerva.less b/skinStyles/mediawiki.action.edit.styles/minerva.less index 4ee0fd2..c5c8e63 100644 --- a/skinStyles/mediawiki.action.edit.styles/minerva.less +++ b/skinStyles/mediawiki.action.edit.styles/minerva.less @@ -38,6 +38,8 @@ } // Parsing information doesn't need to be so big + .mw-editnotice, + .mw-editTools, .preview-limit-report-wrapper, // neither to headers for diffs .diff-otitle, @@ -50,6 +52,15 @@ .secondary-text(); } + // add separation btween + .mw-editnotice { + margin-bottom: 8px; + + li { + margin-bottom: 0; + } + } + // Preview header is hidden given the warning box already // tells the user they are in preview mode. .previewnote h2 { -- To view, visit https://gerrit.wikimedia.org/r/363643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia50ac9fad5bc478d8f4913a44f3c66ccd79cd71b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Jforrester Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits