[MediaWiki-commits] [Gerrit] Clarify some Html2Wiki messages - change (mediawiki...Html2Wiki)
jenkins-bot has submitted this change and it was merged. Change subject: Clarify some Html2Wiki messages .. Clarify some Html2Wiki messages * Avoid reference to screen position in dry-run-heading * Add documentation for upload error message Bug: T121883 Bug: T121867 Change-Id: Ie6e7c26a7607a190ecb046fcb8f1f3cfd1dd51a2 --- M i18n/en.json M i18n/qqq.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index ada8df4..a796bc6 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,7 +9,7 @@ "html2wiki-comment": "File imported by [https://www.mediawiki.org/wiki/Extension:Html2Wiki Html2Wiki]", "html2wiki-desc": "Import HTML content into your wiki", "html2wiki-dry-run": "Dry run:", - "html2wiki-dry-run-heading": "Preview only! Contents below were not saved:", + "html2wiki-dry-run-heading": "Preview only! Contents were not saved:", "html2wiki-summary": "Description appearing on top of [[Special:Html2Wiki]] - but it's not.", "html2wiki-importbtn": "Import", "html2wiki-intro": "Use this form to import HTML content into your wiki.\n\nIf you upload a zip file, the Collection Name field is used to differentiate the collection from a later version. Also all files will be grouped in a category by the same name. For example, let's say you're importing a collection of HTML files output from your software documentation system, you would enter a unique Collection ID like 'FluxCapacitor-v1.1' so that the whole collection is imported into an article hierarchy starting with 'FluxCapacitor-v1.1'. This way 10 different collections can be imported without clobbering each other.\n\nSpecifying an existing Collection Name (or parent path) will update existing wiki content.\n\nIf you want to import a single file into an existing article hierarchy, simply specify it's 'parent' as the Collection Name.\n\nFor example, if importing a new 'advanced_topics.html' that should exist at 'FluxCapacitor-v1.1/docs/advanced_topics.html', the parent would be 'FluxCapacitor-v1.1/docs/'", diff --git a/i18n/qqq.json b/i18n/qqq.json index ebf4174..101b098 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -24,7 +24,7 @@ "html2wiki-log-name": "for the Special:Log log name that appears in the drop-down on the Special:Log page", "html2wiki-log-description": "for the Special:Log description that appears on the Special:Log page when you filter logs on this specific log name", "html2wiki_multiple_body": "Found more than one set of tags in \n$1", - "html2wiki_uploaderror": "There was an error handling the file upload:\n$1", + "html2wiki_uploaderror": "An error message when there is a problem with the upload. Parameters:\n* $1 - the error message of the particular caught exception", "html2wiki_parse-error": "external library QueryPath was unable to parse the content at $1", "logentry-html2wiki": "Logentry on import of html pages into a wiki" } -- To view, visit https://gerrit.wikimedia.org/r/266625 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6e7c26a7607a190ecb046fcb8f1f3cfd1dd51a2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Html2Wiki Gerrit-Branch: master Gerrit-Owner: MtDu Gerrit-Reviewer: Aklapper Gerrit-Reviewer: Nemo bis Gerrit-Reviewer: Purodha Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve certain keys when updating central session - change (mediawiki...CentralAuth)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/266672 Change subject: Preserve certain keys when updating central session .. Preserve certain keys when updating central session If the central session is updated without dirtying the MediaWiki\Session\Session, these essential keys get lost which breaks logins in some cases. Bug: T124821 Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f (cherry picked from commit aaca722f29e2f2908ac93982a2fa4e0ce4286b5c) --- M includes/CentralAuthUtils.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/72/266672/1 diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php index 6a7417c..80d128f 100644 --- a/includes/CentralAuthUtils.php +++ b/includes/CentralAuthUtils.php @@ -177,6 +177,8 @@ public static function setCentralSession( array $data, $reset = false, $session = null ) { global $wgCentralAuthCookies, $wgCentralAuthCookiePrefix; + static $keepKeys = array( 'user' => true, 'token' => true, 'expiry' => true ); + if ( class_exists( 'MediaWiki\\Session\\Session' ) ) { if ( $session === null ) { $session = MediaWiki\Session\SessionManager::getGlobalSession(); @@ -197,6 +199,13 @@ } $data['sessionId'] = $id; $key = CentralAuthUtils::memcKey( 'session', $id ); + + // Copy certain keys from the existing session, if any (T124821) + $existing = CentralAuthUtils::getSessionCache()->get( $key ); + if ( is_array( $existing ) ) { + $data += array_intersect_key( $existing, $keepKeys ); + } + $stime = microtime( true ); CentralAuthUtils::getSessionCache()->set( $key, $data, 86400 ); $real = microtime( true ) - $stime; -- To view, visit https://gerrit.wikimedia.org/r/266672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.27.0-wmf.11 Gerrit-Owner: Gergő Tisza Gerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid forceHTTPS cookie flapping if core and CA are setting ... - change (mediawiki...CentralAuth)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/266671 Change subject: Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie .. Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie Ib7b0f77a mostly stopped CentralAuthSessionProvider from setting the forceHTTPS cookie multiple times in one request, but if both core and CA are setting the cookie with the same domain and path it will still delete and reissue the cookie repeatedly. So detect that situation and skip the "delete". Bug: T124421 Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 --- M includes/session/CentralAuthSessionProvider.php 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/71/266671/1 diff --git a/includes/session/CentralAuthSessionProvider.php b/includes/session/CentralAuthSessionProvider.php index 1350265..5b67784 100644 --- a/includes/session/CentralAuthSessionProvider.php +++ b/includes/session/CentralAuthSessionProvider.php @@ -392,17 +392,25 @@ $central = $backend ? CentralAuthUser::getInstance( $backend->getUser() )->isAttached() : false; + $sameCookie = ( + $this->cookieOptions['path'] === $this->centralCookieOptions['path'] && + $this->cookieOptions['domain'] === $this->centralCookieOptions['domain'] + ); // If the account is centralized, have the parent clear its cookie and // set the central cookie. If it's not centralized, clear the central // cookie and have the parent set its cookie as it usually would. if ( $set && $central ) { - parent::setForceHTTPSCookie( false, $backend, $request ); + if ( !$sameCookie ) { + parent::setForceHTTPSCookie( false, $backend, $request ); + } $response->setCookie( 'forceHTTPS', 'true', $backend->shouldRememberUser() ? 0 : null, array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); } else { - $response->clearCookie( 'forceHTTPS', - array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + if ( !$sameCookie ) { + $response->clearCookie( 'forceHTTPS', + array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + } parent::setForceHTTPSCookie( $set, $backend, $request ); } } -- To view, visit https://gerrit.wikimedia.org/r/266671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: wmf/1.27.0-wmf.11 Gerrit-Owner: Gergő Tisza Gerrit-Reviewer: Anomie ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve certain keys when updating central session - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Preserve certain keys when updating central session .. Preserve certain keys when updating central session If the central session is updated without dirtying the MediaWiki\Session\Session, these essential keys get lost which breaks logins in some cases. Bug: T124821 Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f --- M includes/CentralAuthUtils.php 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthUtils.php b/includes/CentralAuthUtils.php index 6a7417c..80d128f 100644 --- a/includes/CentralAuthUtils.php +++ b/includes/CentralAuthUtils.php @@ -177,6 +177,8 @@ public static function setCentralSession( array $data, $reset = false, $session = null ) { global $wgCentralAuthCookies, $wgCentralAuthCookiePrefix; + static $keepKeys = array( 'user' => true, 'token' => true, 'expiry' => true ); + if ( class_exists( 'MediaWiki\\Session\\Session' ) ) { if ( $session === null ) { $session = MediaWiki\Session\SessionManager::getGlobalSession(); @@ -197,6 +199,13 @@ } $data['sessionId'] = $id; $key = CentralAuthUtils::memcKey( 'session', $id ); + + // Copy certain keys from the existing session, if any (T124821) + $existing = CentralAuthUtils::getSessionCache()->get( $key ); + if ( is_array( $existing ) ) { + $data += array_intersect_key( $existing, $keepKeys ); + } + $stime = microtime( true ); CentralAuthUtils::getSessionCache()->set( $key, $data, 86400 ); $real = microtime( true ) - $stime; -- To view, visit https://gerrit.wikimedia.org/r/266610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d2b07af2d946cf730c6a8da5841b904c62b1c3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add hook to modify Special:Contributions lines - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/266670 Change subject: Add hook to modify Special:Contributions lines .. Add hook to modify Special:Contributions lines This gives finer-grained extensibility than the current ContributionsLineEnding hook. Change-Id: Ifca9f3f3b838a2915152f0200624ef40ee3f8a19 --- M docs/hooks.txt M includes/specials/SpecialContributions.php 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/266670/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 9aacaa9..5e6d9ff 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2793,6 +2793,12 @@ $user: User object representing user contributions are being fetched for $sp: SpecialPage instance, providing context +'SpecialContributions::formatRow::flags': Called before rendering a +Special:Contributions row. +$pager: ContribsPager object, for context +$row: Revision information from the database +&$flags: List of flags on this row + 'SpecialContributions::getForm::filters': Called with a list of filters to render on Special:Contributions. $sp: SpecialContributions object, for context diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 68d934a..7ad9cf7 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -1120,6 +1120,8 @@ ); $classes = array_merge( $classes, $newClasses ); + Hooks::run( 'SpecialContributions::formatRow::flags', array( $this, $row, &$flags ) ); + $templateParams = array( 'articleLink' => $link, 'charDifference' => $chardiff, -- To view, visit https://gerrit.wikimedia.org/r/266670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifca9f3f3b838a2915152f0200624ef40ee3f8a19 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo in comment - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Fix typo in comment .. Fix typo in comment Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 --- M specials/SpecialContentTranslation.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index 1d03d38..383ebe1 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -40,7 +40,7 @@ global $wgContentTranslationCampaigns; if ( $this->getUser()->isAnon() ) { - // Campigns are only for logged in users. + // Campaigns are only for logged in users. return false; } return $campaign !== null -- To view, visit https://gerrit.wikimedia.org/r/29 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add application=CX in the requests to recommendation tool - change (mediawiki...ContentTranslation)
Nikerabbit has submitted this change and it was merged. Change subject: Add application=CX in the requests to recommendation tool .. Add application=CX in the requests to recommendation tool Bug: T124494 Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a --- M modules/dashboard/ext.cx.recommendtool.client.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dashboard/ext.cx.recommendtool.client.js b/modules/dashboard/ext.cx.recommendtool.client.js index 9db58d8..caa8bc1 100644 --- a/modules/dashboard/ext.cx.recommendtool.client.js +++ b/modules/dashboard/ext.cx.recommendtool.client.js @@ -76,7 +76,8 @@ s: self.sourceLanguage, t: self.targetLanguage, article: seedPages.join( '|' ), - search: algorithm + search: algorithm, + application: 'CX' } ).then( function ( response ) { return self.adapt( response.articles, algorithm ); } ); -- To view, visit https://gerrit.wikimedia.org/r/266657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Santhosh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Suggestions: Capture the list type for the campaign identifier - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Suggestions: Capture the list type for the campaign identifier .. Suggestions: Capture the list type for the campaign identifier This helps to do more fine grained analysis of suggestion acceptance. Bug: T124490 Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 --- M modules/dashboard/ext.cx.suggestionlist.js 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 46f5a87..32c5c28 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -709,8 +709,10 @@ * Event handlers */ CXSuggestionList.prototype.listen = function () { + var self = this; + this.$suggestionsContainer.on( 'click', '.cx-suggestionlist .cx-slitem', function () { - var cxSelector, suggestion; + var cxSelector, suggestion, campaign; cxSelector = $( this ).data( 'cxsourceselector' ); @@ -718,11 +720,13 @@ cxSelector.prefill(); } else { suggestion = $( this ).find( '.cx-slitem__translation-link' ).data( 'suggestion' ); + // Capture the list type for the campaign identifier + campaign = 'suggestions-type-' + self.lists[ suggestion.listId ].type; $( this ).cxSourceSelector( { sourceLanguage: suggestion.sourceLanguage, targetLanguage: suggestion.targetLanguage, sourceTitle: suggestion.title, - campaign: 'suggestions' + campaign: campaign } ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/26 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid forceHTTPS cookie flapping if core and CA are setting ... - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie .. Avoid forceHTTPS cookie flapping if core and CA are setting the same cookie Ib7b0f77a mostly stopped CentralAuthSessionProvider from setting the forceHTTPS cookie multiple times in one request, but if both core and CA are setting the cookie with the same domain and path it will still delete and reissue the cookie repeatedly. So detect that situation and skip the "delete". Bug: T124421 Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 --- M includes/session/CentralAuthSessionProvider.php 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/session/CentralAuthSessionProvider.php b/includes/session/CentralAuthSessionProvider.php index 1350265..5b67784 100644 --- a/includes/session/CentralAuthSessionProvider.php +++ b/includes/session/CentralAuthSessionProvider.php @@ -392,17 +392,25 @@ $central = $backend ? CentralAuthUser::getInstance( $backend->getUser() )->isAttached() : false; + $sameCookie = ( + $this->cookieOptions['path'] === $this->centralCookieOptions['path'] && + $this->cookieOptions['domain'] === $this->centralCookieOptions['domain'] + ); // If the account is centralized, have the parent clear its cookie and // set the central cookie. If it's not centralized, clear the central // cookie and have the parent set its cookie as it usually would. if ( $set && $central ) { - parent::setForceHTTPSCookie( false, $backend, $request ); + if ( !$sameCookie ) { + parent::setForceHTTPSCookie( false, $backend, $request ); + } $response->setCookie( 'forceHTTPS', 'true', $backend->shouldRememberUser() ? 0 : null, array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); } else { - $response->clearCookie( 'forceHTTPS', - array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + if ( !$sameCookie ) { + $response->clearCookie( 'forceHTTPS', + array( 'prefix' => '', 'secure' => false ) + $this->centralCookieOptions ); + } parent::setForceHTTPSCookie( $set, $backend, $request ); } } -- To view, visit https://gerrit.wikimedia.org/r/266585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie74940d7bf4316acaaec037c6f0a3b92b96df380 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Anomie Gerrit-Reviewer: Anomie Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix typo in comment - change (mediawiki...ContentTranslation)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/29 Change subject: Fix typo in comment .. Fix typo in comment Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 --- M specials/SpecialContentTranslation.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/69/29/1 diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index 1d03d38..383ebe1 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -40,7 +40,7 @@ global $wgContentTranslationCampaigns; if ( $this->getUser()->isAnon() ) { - // Campigns are only for logged in users. + // Campaigns are only for logged in users. return false; } return $campaign !== null -- To view, visit https://gerrit.wikimedia.org/r/29 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e25e729138cefa85fe34e11c77882d5d013fbc1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Nikerabbit ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Beta: Add cxserver registry to Beta - change (operations/puppet)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/28 Change subject: Beta: Add cxserver registry to Beta .. Beta: Add cxserver registry to Beta We still have to figure out how-to use registry from cxserver repository, until that, use this method. Change-Id: I17b6bf49cbb3b352e52f261ac35cf63569893855 --- M hieradata/labs/deployment-prep/common.yaml 1 file changed, 817 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/28/1 diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 2751397..5296e56 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -115,6 +115,823 @@ "cxserver::proxy": deployment-urldownloader.deployment-prep.eqiad.wmflabs:8080 "cxserver::yandex_url": https://translate.yandex.net "cxserver::restbase_url": http://deployment-restbase02.deployment-prep.eqiad.wmflabs:7231/@lang.wikipedia.beta.wmflabs.org/api/rest_v1/page/html/@title +"cxserver::registry": + source: +- ab +- ace +- af + - ak + - am +- ang +- an +- arc +- ar +- arz +- ast +- as +- av +- ay +- az +- bar +- ba +- bcl +- be-tarask +- be +- bg +- bho +- bi +- bjn +- bm +- bn +- bo +- bpy +- br +- bs +- bug +- bxr +- ca +- cbk-zam +- cdo +- ceb +- ce +- chr +- ch +- chy +- ckb +- co +- crh-latn +- cr +- csb +- cs +- cu +- cv +- cy +- da +- de +- diq +- dsb +- dv +- dz +- ee +- el +- eml +- en +- eo +- es +- et +- eu +- ext +- fa +- ff +- fi +- fj +- fo +- frp +- frr +- fr +- fur +- fy +- gag +- gan +- ga +- gd +- glk +- gl +- gn +- gom +- got +- gsw +- gu +- gv +- hak +- ha +- haw +- he +- hif +- hi +- hr +- hsb +- ht +- hu +- hy +- ia +- id +- ie +- ig +- ik +- ilo +- io +- is +- it +- iu +- ja +- jbo +- jv +- kaa +- kab +- ka +- kbd +- kg +- ki +- kk +- kl +- km +- kn +- koi +- ko +- krc +- ksh +- ks +- ku +- kv +- kw +- ky +- lad +- la +- lbe +- lb +- lez +- lg +- lij +- li +- lmo +- ln +- lo +- lrc +- ltg +- lt +- lv +- lzh +- mai +- map-bms +- mdf +- mg +- mhr +- min +- mi +- mk +- ml +- mn +- mrj +- mr +- ms +- mt +- mwl +- myv +- my +- mzn +- nah +- nan +- nap +- na +- nds-nl +- nds +- ne +- new +- nl +- nn +- nov +- 'no' +- nrm +- nso +- nv +- ny +- oc +- om +- or +- os +- pag +- pam +- pap +- pa +- pcd +- pdc +- pfl +- pih +- pi +- pl +- pms +- pnb +- pnt +- ps +- pt +- qu +- rm +- rmy +- rn +- roa-tara +- rup +- ro +- rue +- ru +- rw +- sah +- sa +- scn +- sco +- sc +- sd +- se +- sg +- sgs +- sh +- simple +- si +- sk +- sl +- sm +- sn +- so +- sq +- srn +- sr +- ss +- stq +- st +- su +- sv +- sw +- szl +- ta +- tet +- te +- tg +- th +- ti +- tk +- tl +- tn +- to +- tpi +- tr +- ts +- tt +- tum +- tw +- tyv +- ty +- udm +- ug +- uk +- ur +- uz +- vec +- vep +- ve +- vi +- vls +- vo +- vro +- war +- wa +- wo +- wuu +- xal +- xh +- xmf +- yi +- yo +- yue +- za +- zea +- zh +- zu + target: +- ab +- ace +- af +- ak +- am +- ang +- an +- arc +- ar +- arz +- ast +- as +- av +- ay +- az +- bar +- ba +- bcl +- be-tarask +- be +- bg +- bho +- bi +- bjn +- bm +- bn +- bo +- bpy +- br +- bs +- bug +- bxr +- ca +- cbk-zam +- cdo +- ceb +- ce +- chr +- ch +- chy +- ckb +- co +- crh-latn +- cr +- csb +- cs +- cu +- cv +- cy +- da +- de +- diq +- dsb +- dv +- dz +- ee +- el +- eml +- en +- eo +- es +- et +- eu +- ext +- fa +- ff +- fi +- fj +- fo +- frp +- frr +- fr +- fur +- fy +- gag +- gan +- ga +- gd +- glk +- gl +- gn +- gom +- got
[MediaWiki-commits] [Gerrit] Use correct selector syntax in QUnit test - change (mediawiki...MobileFrontend)
Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/27 Change subject: Use correct selector syntax in QUnit test .. Use correct selector syntax in QUnit test Bug: T124806 Change-Id: I90917295886503b9986f52bc3d44c042b298a94d --- M tests/qunit/mobile.toggle/test_toggle.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/67/27/1 diff --git a/tests/qunit/mobile.toggle/test_toggle.js b/tests/qunit/mobile.toggle/test_toggle.js index 1612751..65f321d 100644 --- a/tests/qunit/mobile.toggle/test_toggle.js +++ b/tests/qunit/mobile.toggle/test_toggle.js @@ -55,7 +55,7 @@ } ); QUnit.test( 'Clicking hash links', 2, function ( assert ) { - this.$container.find( '[href=#First_Section]' ).trigger( 'click' ); + this.$container.find( '[href="#First_Section"]' ).trigger( 'click' ); assert.strictEqual( this.$container.find( '.collapsible-block' ).eq( 0 ).hasClass( 'open-block' ), true, 'check content is visible' ); assert.strictEqual( this.$section0.hasClass( 'open-block' ), true, 'check section is open' ); } ); -- To view, visit https://gerrit.wikimedia.org/r/27 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90917295886503b9986f52bc3d44c042b298a94d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Suggestions: Capture the list type for the campaign identifier - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/26 Change subject: Suggestions: Capture the list type for the campaign identifier .. Suggestions: Capture the list type for the campaign identifier This helps to do more fine grained analysis of suggestion acceptance. Bug: T124490 Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 --- M modules/dashboard/ext.cx.suggestionlist.js 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/66/26/1 diff --git a/modules/dashboard/ext.cx.suggestionlist.js b/modules/dashboard/ext.cx.suggestionlist.js index 46f5a87..32c5c28 100644 --- a/modules/dashboard/ext.cx.suggestionlist.js +++ b/modules/dashboard/ext.cx.suggestionlist.js @@ -709,8 +709,10 @@ * Event handlers */ CXSuggestionList.prototype.listen = function () { + var self = this; + this.$suggestionsContainer.on( 'click', '.cx-suggestionlist .cx-slitem', function () { - var cxSelector, suggestion; + var cxSelector, suggestion, campaign; cxSelector = $( this ).data( 'cxsourceselector' ); @@ -718,11 +720,13 @@ cxSelector.prefill(); } else { suggestion = $( this ).find( '.cx-slitem__translation-link' ).data( 'suggestion' ); + // Capture the list type for the campaign identifier + campaign = 'suggestions-type-' + self.lists[ suggestion.listId ].type; $( this ).cxSourceSelector( { sourceLanguage: suggestion.sourceLanguage, targetLanguage: suggestion.targetLanguage, sourceTitle: suggestion.title, - campaign: 'suggestions' + campaign: campaign } ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/26 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6beb95ba078056be80180811b800ecebb8292c47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rework transferToES.py to send to wikis sequentially - change (wikimedia...analytics)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/25 Change subject: Rework transferToES.py to send to wikis sequentially .. Rework transferToES.py to send to wikis sequentially The prior implementation of transferToES.py would send to whichever wiki it had enough items to send to. This works but pushes the elasticsearch cluster pretty hard, causing it to create segments in many different indices at the same time. This version reworks to use sort(project) which guarantees that each project will be wholly contained within a single partition. It then iterates that segment sending batches. This ensures that each worker is continuously sending documents to the same index and reduces the spread of segment creation, reducing load on the ES cluster. The one downside of this is that foreachPartition() brings the entire partition into memory, so the executors have to be sized such that any executor can hold the entirety of whichever wiki has the most scores to be sent. In the scheme of things this means using 15G of memory for the job, which is 1% of total hadoop memory. It seems small enough to be worthwhile. Change-Id: Id49b74f5ce56ac8c845fd23798500d0476946500 --- M oozie/transfer_to_es/bundle.properties M oozie/transfer_to_es/transferToES.py M oozie/transfer_to_es/workflow.xml 3 files changed, 19 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/analytics refs/changes/65/25/1 diff --git a/oozie/transfer_to_es/bundle.properties b/oozie/transfer_to_es/bundle.properties index 8fe3dc9..b949ed3 100644 --- a/oozie/transfer_to_es/bundle.properties +++ b/oozie/transfer_to_es/bundle.properties @@ -58,9 +58,10 @@ # when spark alocates this resource. This partially controls the amount # of concurrency between the hadoop cluster and the elasticsearch cluster # during export. -spark_number_executors= 1 -spark_executor_memory = 1G +spark_number_executors= 3 +spark_executor_memory = 5G spark_driver_memory = 1G +spark_sql_shuffle_partitions = 30 # Coordintator to start. oozie.bundle.application.path = ${discovery_oozie_directory}/transfer_to_es/bundle.xml diff --git a/oozie/transfer_to_es/transferToES.py b/oozie/transfer_to_es/transferToES.py index 84fe45d..d3740c7 100644 --- a/oozie/transfer_to_es/transferToES.py +++ b/oozie/transfer_to_es/transferToES.py @@ -119,37 +119,25 @@ if not sendDataToES(data, url): failedDocumentCounter.add(len(documents)) -def addToList(listNow, element): +def groupAndSend(rows): """ -Add element to list, will send the data out once batch is full +Group together documents from the same project and batch them +to elasticsearch """ -if len(listNow) < ITEMS_PER_BATCH: -return listNow + [element] -# Treshold reached, send the list out -sendDocumentsToES(listNow) -return [element] - -def mergeLists(listOne, listTwo): -""" -Merge two lists, will send the data out once batch is full -""" -newList = listOne + listTwo -if len(newList) < ITEMS_PER_BATCH: -return newList -sendDocumentsToES(newList) -return [] - -def sendCombined(data): -""" -Send data for the key (hostname) to ES -""" -sendDocumentsToES(data[1]) +group = [] +for row in rows: +if len(group) > 0 and group[0].project != row.project: +sendDocumentsToES(group) +group = [] +group.append(row) +if len(group) >= ITEMS_PER_BATCH: +sendDocumentsToES(group) +group = [] +if len(group) > 0: +sendDocumentsToES(group) data = sqlContext.load(SOURCE) # print "Count: %d\n" % data.count() -# Here's what is going on here: we combine the data by project, -# and when the list of projects reaches ITEMS_PER_BATCH we send them out -# The foreach() part will send out the ones that remained -data.map(lambda x: (x.project, x)).combineByKey(lambda x: [x], addToList, mergeLists).foreach(sendCombined) +data.sort(data.project).foreachPartition(groupAndSend) print "%d documents processed, %d failed." % (documentCounter.value, failedDocumentCounter.value,) print "%d requests successful, %d requests failed." % (updateCounter.value, errorCounter.value) diff --git a/oozie/transfer_to_es/workflow.xml b/oozie/transfer_to_es/workflow.xml index 43e967f..5b00729 100644 --- a/oozie/transfer_to_es/workflow.xml +++ b/oozie/transfer_to_es/workflow.xml @@ -122,7 +122,7 @@ cluster Discovery Transfer To ${elasticsearch_url} ${pyspark_transfer_to_es_script} ---conf spark.yarn.jar=${spark_assembly_jar
[MediaWiki-commits] [Gerrit] Update cxserver to e44f482 - change (mediawiki...deploy)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/24 Change subject: Update cxserver to e44f482 .. Update cxserver to e44f482 Changes: * e44f482 Merge "Stop setting the form data to rawBody" |\ | * 04ea444 Stop setting the form data to rawBody * | 3593903 Fix npm link command * | b3a4196 config: Add all available source languages for Russian in Yandex MT Change-Id: I44d71278162efa69db63923eec4e7035188f4605 --- M src 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy refs/changes/64/24/1 diff --git a/src b/src index 942ee24..e44f482 16 --- a/src +++ b/src -Subproject commit 942ee243b6413d824da0cdf6a04625c76995d7c8 +Subproject commit e44f48268c10e74a524e7bb5f6a11ccb985b3e40 -- To view, visit https://gerrit.wikimedia.org/r/24 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I44d71278162efa69db63923eec4e7035188f4605 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver/deploy Gerrit-Branch: master Gerrit-Owner: KartikMistry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow access to graphite/events/get_data - change (operations/puppet)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/23 Change subject: Allow access to graphite/events/get_data .. Allow access to graphite/events/get_data Named and tagged events, such as a deployment, can pushed into graphite and then shown in grafana using the 'Annotations' settings. These need to be able to access https://graphite.wikimedia.org/events/get_data to work though. This makes those events accessible similar to the existing render. Change-Id: I0f9d2c13d0ee7772619ae418832568664d4802cc --- M templates/graphite/graphite.apache.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/23/1 diff --git a/templates/graphite/graphite.apache.erb b/templates/graphite/graphite.apache.erb index 966a56c..65192c5 100644 --- a/templates/graphite/graphite.apache.erb +++ b/templates/graphite/graphite.apache.erb @@ -15,7 +15,7 @@ SetHandler uwsgi-handler - + Satisfy Any Allow from all -- To view, visit https://gerrit.wikimedia.org/r/23 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f9d2c13d0ee7772619ae418832568664d4802cc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Templatize Special:Contributions lines - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/22 Change subject: [WIP] Templatize Special:Contributions lines .. [WIP] Templatize Special:Contributions lines Bug: T122537 Change-Id: I11aac43de495881e10e393d075a231bd346ea547 --- M includes/specials/SpecialContributions.php 1 file changed, 24 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/22/1 diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 1a1b490..46c1f90 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -1095,16 +1095,13 @@ $userlink = ''; } + $flags = array(); if ( $rev->getParentId() === 0 ) { - $nflag = ChangesList::flag( 'newpage' ); - } else { - $nflag = ''; + $flags[] = ChangesList::flag( 'newpage' ); } if ( $rev->isMinor() ) { - $mflag = ChangesList::flag( 'minor' ); - } else { - $mflag = ''; + $flags[] = ChangesList::flag( 'minor' ); } $del = Linker::getRevDeleteLink( $user, $rev, $page ); @@ -1115,15 +1112,6 @@ $diffHistLinks = $this->msg( 'parentheses' ) ->rawParams( $difftext . $this->messages['pipe-separator'] . $histlink ) ->escaped(); - $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} "; - $ret .= "{$link}{$userlink} {$comment} {$topmarktext}"; - - # Denote if username is redacted for this edit - if ( $rev->isDeleted( Revision::DELETED_USER ) ) { - $ret .= " " . - $this->msg( 'rev-deleted-user-contribs' )->escaped() . - ""; - } # Tags, if any. list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow( @@ -1131,7 +1119,27 @@ 'contributions' ); $classes = array_merge( $classes, $newClasses ); - $ret .= " $tagSummary"; + + $templateParams = array( + 'articleLink' => $link, + 'charDifference' => $chardiff, + 'classes' => $classes, + 'diffHistLinks' => $diffHistLinks, + 'flags' => implode( '', $flags ), + 'logText' => $comment, + 'revDeleteLink' => $del, + 'rev-deleted-user-contribs' => $revDeletedMsg, + 'tagSummary' => $tagSummary, + 'timestamp' => $d, + 'topmarktext' => $topmarktext, + 'userlink' => $userlink, + ); + + # Denote if username is redacted for this edit + if ( $rev->isDeleted( Revision::DELETED_USER ) ) { + $templateParams['rev-deleted-user-contribs'] = + $this->msg( 'rev-deleted-user-contribs' )->escaped(); + } } // Let extensions add data -- To view, visit https://gerrit.wikimedia.org/r/22 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11aac43de495881e10e393d075a231bd346ea547 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TemplateDataBlob: avoid reencoding json - change (mediawiki...TemplateData)
Cenarium has uploaded a new change for review. https://gerrit.wikimedia.org/r/21 Change subject: TemplateDataBlob: avoid reencoding json .. TemplateDataBlob: avoid reencoding json When a TemplateDataBlob is created from json and there is no status error, the json is saved in-class to avoid having to reencode it from the data. Change-Id: I3976e48b9c2cc914960271485e7c8c59ba36aa57 --- M TemplateDataBlob.php 1 file changed, 17 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData refs/changes/61/21/1 diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index e1a8371..5a54151 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -21,6 +21,11 @@ private $data; /** +* @var string +*/ + private $json; + + /** * @var Status: Cache of TemplateDataBlob::parse */ private $status; @@ -50,6 +55,9 @@ $tdb->data->format = 'inline'; $tdb->data->sets = array(); $tdb->data->maps = new stdClass(); + } else { + // data is unchanged so no need to reencode json + $tdb->json = $json; } $tdb->status = $status; return $tdb; @@ -602,8 +610,8 @@ * @return object */ public function getData() { - // TODO: Returned by reference. Data is a private member. Use clone instead? - return $this->data; + // Return deep clone so callers don't modify data (thus json is unchanged) + return unserialize( serialize( $this->data ) ); } /** @@ -616,7 +624,7 @@ public function getDataInLanguage( $langCode ) { // Deep clone, also need to clone ->params and all interfacetext objects // within param properties. - $data = unserialize( serialize( $this->data ) ); + $data = $this->getData(); // Root.description if ( $data->description !== null ) { @@ -667,7 +675,11 @@ * @return string JSON */ public function getJSON() { - return json_encode( $this->data ); + if ( $this->json === null ) { + // if json is not provided, retrieve it from data + $this->json = json_encode( $this->data ); + } + return $this->json; } /** @@ -859,6 +871,7 @@ private function __construct( $data = null ) { $this->data = $data; + $this->json = null; } } -- To view, visit https://gerrit.wikimedia.org/r/21 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3976e48b9c2cc914960271485e7c8c59ba36aa57 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Cenarium ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adds filter to Special:Contributions - change (mediawiki...ORES)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/20 Change subject: Adds filter to Special:Contributions .. Adds filter to Special:Contributions TODO: Flag is still not rendered Bug: T122537 Change-Id: I5547697475f9dccfb6730209070d6c6f304140d0 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/Hooks.php 4 files changed, 30 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/60/20/1 diff --git a/extension.json b/extension.json index 0f1fc29..767e1db 100644 --- a/extension.json +++ b/extension.json @@ -39,6 +39,9 @@ ], "OldChangesListRecentChangesLine": [ "ORES\\Hooks::onOldChangesListRecentChangesLine" + ], + "SpecialContributions::getForm::filters": [ + "ORES\\Hooks::onSpecialContributionsGetFormFilters" ] }, "ResourceFileModulePaths": { diff --git a/i18n/en.json b/i18n/en.json index 60b5917..c00fea0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -6,5 +6,6 @@ "ores-damaging-filter": "$1 good edits", "ores-damaging-letter": "r", "ores-damaging-title": "This edit needs review", - "ores-damaging-legend": "ORES predicts that this change may be damaging and should be reviewed" + "ores-damaging-legend": "ORES predicts that this change may be damaging and should be reviewed", + "ores-hide-nondamaging-filter": "Only show edits needing review" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 418221e..b183e1d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -4,5 +4,6 @@ "ores-damaging-filter": "Label to toggle filtering on ORES data. Parameters:\n* $1 - Action to be performed by toggling.", "ores-damaging-letter": "Single letter for tagging possibly damaging recent changes.", "ores-damaging-title": "Tooltip for damaging risk icon.", - "ores-damaging-legend": "Legend for damaging risk icon." + "ores-damaging-legend": "Legend for damaging risk icon.", + "ores-hide-nondamaging-filter": "Label for Contributions filter, 'only show'" } diff --git a/includes/Hooks.php b/includes/Hooks.php index 5221d29..b747af7 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -12,6 +12,8 @@ use ChangesList; use RCCacheEntry; use RecentChange; +use SpecialContributions; +use Xml; /** * TODO: @@ -180,6 +182,27 @@ } /** +* Hook into Special:Contributions filters +*/ + public static function onSpecialContributionsGetFormFilters( + SpecialContributions $page, array &$filters + ) { + $filters[] = Html::rawElement( + 'span', + array( 'class' => 'mw-input-with-label' ), + Xml::checkLabel( + $page->msg( 'ores-hide-nondamaging-filter' )->text(), + 'hidenondamaging', + 'ores-hide-nondamaging', + $page->getContext()->getRequest()->getVal( 'hidenondamaging' ), + array( 'class' => 'mw-input' ) + ) + ); + + return true; + } + + /** * Internal helper to label matching rows */ protected static function processRecentChangesList( RCCacheEntry $rcObj, array &$data ) { -- To view, visit https://gerrit.wikimedia.org/r/20 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5547697475f9dccfb6730209070d6c6f304140d0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New hook for filters on Special:Contributions form - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/266659 Change subject: New hook for filters on Special:Contributions form .. New hook for filters on Special:Contributions form Bug: T124857 Change-Id: I56a3f13e202f832c5c18c92f3ff899f032f2 --- M docs/hooks.txt M includes/specials/SpecialContributions.php 2 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/266659/1 diff --git a/docs/hooks.txt b/docs/hooks.txt index 2b5e1e0..9aacaa9 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2793,6 +2793,11 @@ $user: User object representing user contributions are being fetched for $sp: SpecialPage instance, providing context +'SpecialContributions::getForm::filters': Called with a list of filters to render +on Special:Contributions. +$sp: SpecialContributions object, for context +&$filters: List of filters rendered as HTML + 'SpecialListusersDefaultQuery': Called right before the end of UsersPager::getDefaultQuery(). $pager: The UsersPager instance diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index ab6614b..1a1b490 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -571,8 +571,10 @@ ) ); + $filters = array(); + if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { - $deletedOnlyCheck = Html::rawElement( + $filters[] = Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ), Xml::checkLabel( @@ -583,11 +585,9 @@ array( 'class' => 'mw-input' ) ) ); - } else { - $deletedOnlyCheck = ''; } - $checkLabelTopOnly = Html::rawElement( + $filters[] = Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ), Xml::checkLabel( @@ -598,7 +598,7 @@ array( 'class' => 'mw-input' ) ) ); - $checkLabelNewOnly = Html::rawElement( + $filters[] = Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ), Xml::checkLabel( @@ -609,10 +609,16 @@ array( 'class' => 'mw-input' ) ) ); + + Hooks::run( + 'SpecialContributions::getForm::filters', + array( $this, &$filters ) + ); + $extraOptions = Html::rawElement( 'td', array( 'colspan' => 2 ), - $deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly + implode( '', $filters ) ); $dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ), -- To view, visit https://gerrit.wikimedia.org/r/266659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56a3f13e202f832c5c18c92f3ff899f032f2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduce replica count for commonswiki_file in codfw - change (operations/mediawiki-config)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/266658 Change subject: Reduce replica count for commonswiki_file in codfw .. Reduce replica count for commonswiki_file in codfw Missed this one when writing the unit test to verify shard counts. Should be ok reducing to 2 replicas and save having to reindex. Change-Id: I57104b666aa5fb697a40c9a7864223b59cbe19a2 --- M tests/cirrusTest.php M wmf-config/InitialiseSettings.php 2 files changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/58/266658/1 diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php index 89a678e..4e71e64 100644 --- a/tests/cirrusTest.php +++ b/tests/cirrusTest.php @@ -146,16 +146,20 @@ } } $wikis = array_unique( $wikis ); - $indexTypes = array( 'content', 'general', 'titlesuggest' ); + $indexTypes = array( 'content', 'general', 'titlesuggest', 'file' ); $clusters = array( 'eqiad' => 31, 'codfw' => 24 ); $tests = array(); foreach ( $wikis as $wiki ) { foreach ( $indexTypes as $indexType ) { + // only commonswiki has the file index + if ( $indexType === 'file' && $wiki !== 'commonswiki' ) { + continue; + } + // wikidata doesn't have completion suggester + if ( $wiki === 'wikidatawiki' && $indexType === 'titlesuggest' ) { + continue; + } foreach ( $clusters as $clusterName => $numServers ) { - // wikidata doesn't have completion suggester - if ( $wiki === 'wikidatawiki' && $indexType === 'titlesuggest' ) { - continue; - } $tests["$clusterName {$wiki}_{$indexType}"] = array( $wiki, $indexType, diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index a0b98c8..49a456f 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15805,7 +15805,10 @@ // some of the larger ones will want more replicas for content indexes 'wmgCirrusSearchReplicas' => array( 'default' => array( 'content' => '0-2', 'general' => '0-2', 'titlesuggest' => '0-2' ), - '+commonswiki' => array( 'file' => '0-3' ), + 'commonswiki' => array( + 'eqiad' => array( 'content' => '0-4', 'general' => '0-3', 'titlesuggest' => '0-2', 'file' => '0-3' ), + 'codfw' => array( 'content' => '0-3', 'general' => '0-2', 'titlesuggest' => '0-2', 'file' => '0-2' ), + ), 'enwiki' => array( 'eqiad' => array( 'content' => '0-4', 'general' => '0-3', 'titlesuggest' => '0-2' ), 'codfw' => array( 'content' => '0-3', 'general' => '0-2', 'titlesuggest' => '0-2' ), -- To view, visit https://gerrit.wikimedia.org/r/266658 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57104b666aa5fb697a40c9a7864223b59cbe19a2 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] Add application=CX in the requests to recommendation tool - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/266657 Change subject: Add application=CX in the requests to recommendation tool .. Add application=CX in the requests to recommendation tool Bug: T124494 Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a --- M modules/dashboard/ext.cx.recommendtool.client.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/57/266657/1 diff --git a/modules/dashboard/ext.cx.recommendtool.client.js b/modules/dashboard/ext.cx.recommendtool.client.js index 9db58d8..caa8bc1 100644 --- a/modules/dashboard/ext.cx.recommendtool.client.js +++ b/modules/dashboard/ext.cx.recommendtool.client.js @@ -76,7 +76,8 @@ s: self.sourceLanguage, t: self.targetLanguage, article: seedPages.join( '|' ), - search: algorithm + search: algorithm, + application: 'CX' } ).then( function ( response ) { return self.adapt( response.articles, algorithm ); } ); -- To view, visit https://gerrit.wikimedia.org/r/266657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea4a586c1a8251cbb3954156a6b842faae8fc39a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create a more neutral warning message *visualeditor-viewpage... - change (mediawiki...VisualEditor)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/266656 Change subject: Create a more neutral warning message *visualeditor-viewpage-savewarning .. Create a more neutral warning message *visualeditor-viewpage-savewarning Bug: T121754 Change-Id: Ibc1ba697081e60b8a797f5ea1b814a320ba812c3 --- M modules/ve-mw/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/56/266656/1 diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json index 7ae811a..50bbfd6 100644 --- a/modules/ve-mw/i18n/en.json +++ b/modules/ve-mw/i18n/en.json @@ -341,7 +341,7 @@ "visualeditor-toolbar-savedialog-short": "Save", "visualeditor-usernamespacepagelink": "Project:User namespace", "visualeditor-version-label": "Version", - "visualeditor-viewpage-savewarning": "Are you sure you want to go back to view mode without saving first?", + "visualeditor-viewpage-savewarning": "Are you sure you want to quit editing mode without saving first?", "visualeditor-viewpage-savewarning-discard": "Discard edits", "visualeditor-viewpage-savewarning-keep": "Continue editing", "visualeditor-viewpage-savewarning-title": "Are you sure?", -- To view, visit https://gerrit.wikimedia.org/r/266656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc1ba697081e60b8a797f5ea1b814a320ba812c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: MtDu ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct invalid shard configuration - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Correct invalid shard configuration .. Correct invalid shard configuration Shard configuration was adjusted without realizing it was post-processed in CirrusSearch-production.php. This fixes that oversight. Change-Id: I2fbdc9b58d600375897bfc4ebfbfbca522c345fe --- M wmf-config/CirrusSearch-production.php 1 file changed, 14 insertions(+), 8 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CirrusSearch-production.php b/wmf-config/CirrusSearch-production.php index 9bc743c..8d7870c 100644 --- a/wmf-config/CirrusSearch-production.php +++ b/wmf-config/CirrusSearch-production.php @@ -56,17 +56,23 @@ // The default configuration is a single-cluster configuration, expand // that here into the necessary multi-cluster config $wgCirrusSearchShardCount = array( - 'eqiad' => $wgCirrusSearchShardCount, - 'codfw' => array_map( function($x) { return min( 7, $x ); }, $wgCirrusSearchShardCount ), - 'labsearch' => array_map( function() { return 1; }, $wgCirrusSearchShardCount ), + 'eqiad' => $wmgCirrusSearchShardCount, + 'codfw' => $wmgCirrusSearchShardCount, + 'labsearch' => array_map( function() { return 1; }, $wmgCirrusSearchShardCount ), ); // Disable replicas for the labsearch cluster, it's only a single machine -$wgCirrusSearchReplicas = array( - 'eqiad' => $wgCirrusSearchReplicas, - 'codfw' => $wgCirrusSearchReplicas, - 'labsearch' => array_map( function() { return 'false'; }, $wgCirrusSearchReplicas ), -); +if ( isset( $wmgCirrusSearchReplicas['eqiad'] ) ) { + $wgCirrusSearchReplicas = $wmgCirrusSearchReplicas + array( + 'labsearch' => array_map( function() { return 'false'; }, $wmgCirrusSearchReplicas['eqiad'] ), + ); +} else { + $wgCirrusSearchReplicas = array( + 'eqiad' => $wmgCirrusSearchReplicas, + 'codfw' => $wmgCirrusSearchReplicas, + 'labsearch' => array_map( function() { return 'false'; }, $wmgCirrusSearchReplicas ), + ); +} // 5 second timeout for local cluster, 10 seconds for remote. 2 second timeout // for the labsearch cluster. -- To view, visit https://gerrit.wikimedia.org/r/266655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fbdc9b58d600375897bfc4ebfbfbca522c345fe Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: Chad Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct invalid shard configuration - change (operations/mediawiki-config)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/266655 Change subject: Correct invalid shard configuration .. Correct invalid shard configuration Shard configuration was adjusted without realizing it was post-processed in CirrusSearch-production.php. This fixes that oversight. Change-Id: I2fbdc9b58d600375897bfc4ebfbfbca522c345fe --- M wmf-config/CirrusSearch-production.php 1 file changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/55/266655/1 diff --git a/wmf-config/CirrusSearch-production.php b/wmf-config/CirrusSearch-production.php index 9bc743c..8d7870c 100644 --- a/wmf-config/CirrusSearch-production.php +++ b/wmf-config/CirrusSearch-production.php @@ -56,17 +56,23 @@ // The default configuration is a single-cluster configuration, expand // that here into the necessary multi-cluster config $wgCirrusSearchShardCount = array( - 'eqiad' => $wgCirrusSearchShardCount, - 'codfw' => array_map( function($x) { return min( 7, $x ); }, $wgCirrusSearchShardCount ), - 'labsearch' => array_map( function() { return 1; }, $wgCirrusSearchShardCount ), + 'eqiad' => $wmgCirrusSearchShardCount, + 'codfw' => $wmgCirrusSearchShardCount, + 'labsearch' => array_map( function() { return 1; }, $wmgCirrusSearchShardCount ), ); // Disable replicas for the labsearch cluster, it's only a single machine -$wgCirrusSearchReplicas = array( - 'eqiad' => $wgCirrusSearchReplicas, - 'codfw' => $wgCirrusSearchReplicas, - 'labsearch' => array_map( function() { return 'false'; }, $wgCirrusSearchReplicas ), -); +if ( isset( $wmgCirrusSearchReplicas['eqiad'] ) ) { + $wgCirrusSearchReplicas = $wmgCirrusSearchReplicas + array( + 'labsearch' => array_map( function() { return 'false'; }, $wmgCirrusSearchReplicas['eqiad'] ), + ); +} else { + $wgCirrusSearchReplicas = array( + 'eqiad' => $wmgCirrusSearchReplicas, + 'codfw' => $wmgCirrusSearchReplicas, + 'labsearch' => array_map( function() { return 'false'; }, $wmgCirrusSearchReplicas ), + ); +} // 5 second timeout for local cluster, 10 seconds for remote. 2 second timeout // for the labsearch cluster. -- To view, visit https://gerrit.wikimedia.org/r/266655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fbdc9b58d600375897bfc4ebfbfbca522c345fe Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config 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] [WIP] Messing with tag integration - change (mediawiki...ORES)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/266654 Change subject: [WIP] Messing with tag integration .. [WIP] Messing with tag integration Change-Id: I254fc1a814e1cfe80b83caf3ea5ca5d508557958 --- M extension.json M includes/Hooks.php 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/54/266654/1 diff --git a/extension.json b/extension.json index 0f1fc29..e3e8c31 100644 --- a/extension.json +++ b/extension.json @@ -37,6 +37,9 @@ "EnhancedChangesListModifyLineData": [ "ORES\\Hooks::onEnhancedChangesListModifyLineData" ], + "ListDefinedTags": [ + "ORES\\Hooks::onListDefinedTags" + ], "OldChangesListRecentChangesLine": [ "ORES\\Hooks::onOldChangesListRecentChangesLine" ] diff --git a/includes/Hooks.php b/includes/Hooks.php index 5221d29..f280032 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -180,6 +180,15 @@ } /** +* ChangeTags integration +* +* @param array $tags +*/ + public static function onListDefinedTags( &$tags ) { + $tags[] = 'nondamaging'; + } + + /** * Internal helper to label matching rows */ protected static function processRecentChangesList( RCCacheEntry $rcObj, array &$data ) { @@ -197,6 +206,7 @@ $score = $rcObj->getAttribute( 'ores_probability' ); $patrolled = $rcObj->getAttribute( 'rc_patrolled' ); + if ( $score && $score >= $wgOresDamagingThreshold && !$patrolled ) { return true; } else { -- To view, visit https://gerrit.wikimedia.org/r/266654 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I254fc1a814e1cfe80b83caf3ea5ca5d508557958 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Adds DonationInterface test against mediawiki 1.25 - change (integration/config)
Cdentinger has uploaded a new change for review. https://gerrit.wikimedia.org/r/266653 Change subject: WIP: Adds DonationInterface test against mediawiki 1.25 .. WIP: Adds DonationInterface test against mediawiki 1.25 Bug: T124105 Change-Id: Ib626e98c6e00306440181c7a0eaebe1ff0fdcaba --- M jjb/wm-fundraising.yaml 1 file changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/53/266653/1 diff --git a/jjb/wm-fundraising.yaml b/jjb/wm-fundraising.yaml index 2c4abc6..4c05bca 100644 --- a/jjb/wm-fundraising.yaml +++ b/jjb/wm-fundraising.yaml @@ -66,3 +66,49 @@ - fundraising-crm-clean - phpunit-junit - archive-log-dir + +- project: +name: donation-interface-125 +jobs: +- mwext-donationinterfacecore125-testextension-php53 + +- job: +name: 'mwext-donationinterfacecore125-testextension-php53' +# See mediawiki.yaml mediawiki-phpunit-{phpflavor} +node: 'contintLabsSlave && ((UbuntuPrecise && phpflavor-php53) || (UbuntuTrusty && phpflavor-php53))' +concurrent: true +properties: + - throttle-one-per-node +triggers: + - zuul +builders: + - assert-phpflavor: + phpflavor: 'php53' + - hhvm-clear-hhbc + - prepare-mediawiki-125 + - mw-run-phpunit-allexts +# TODO, find ways to additionaly run tests for core but +# without extensions tests +publishers: + - junit: +results: 'log/junit*.xml' + - mw-teardown-mysql + - archive-log-dir + +- builder: +name: prepare-mediawiki-125 +builders: +- shell: | +zuul-cloner --version +zuul-cloner \ +--color \ +--verbose \ +--map /srv/deployment/integration/slave-scripts/etc/zuul-clonemap.yaml \ +--workspace src \ +--project-branch mediawiki/core=fundraising/REL1_25 \ + https://gerrit.wikimedia.org/r/p \ + extensions/DonationInterface extensions/ContributionTracking extensions/ParserFunctions extensions/DonationEmailUnsubscribe extensions/cldr skins/Vector vendor +- mw-install-mysql +- shell: "cp deps.txt src/extensions_load.txt" +- mw-apply-settings +- mw-run-update-script -- To view, visit https://gerrit.wikimedia.org/r/266653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib626e98c6e00306440181c7a0eaebe1ff0fdcaba Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Cdentinger ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update tests with raw - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/266652 Change subject: Update tests with raw .. Update tests with raw * Prefer manual normalization. Change-Id: I7535107fcca241fc1d205fdbfa04fb7b5f1e2beb --- M bin/parserTests.js 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/52/266652/1 diff --git a/bin/parserTests.js b/bin/parserTests.js index 4f77e50..fdfa12b 100755 --- a/bin/parserTests.js +++ b/bin/parserTests.js @@ -1126,7 +1126,6 @@ title: title, raw: actual ? actual.raw : null, expected: expected ? expected.raw : null, - actualNormalized: actual ? actual.normal : null, }; this.stats.modes[mode].failList.push(fail); @@ -2147,7 +2146,7 @@ var exp = new RegExp("(" + /!!\s*test\s*/.source + Util.escapeRegExp(fail.title) + /(?:(?!!!\s*end)[\s\S])*/.source + ")(" + Util.escapeRegExp(fail.expected) + ")", "m"); - parserTests = parserTests.replace(exp, "$1" + fail.actualNormalized.replace(/\$/g, '')); + parserTests = parserTests.replace(exp, "$1" + fail.raw.replace(/\$/g, '')); } }); fs.writeFileSync(parserTestsFilename, parserTests, 'utf8'); -- To view, visit https://gerrit.wikimedia.org/r/266652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7535107fcca241fc1d205fdbfa04fb7b5f1e2beb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improvements to SFWikiPage class - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: Improvements to SFWikiPage class .. Improvements to SFWikiPage class Change-Id: Ida0c3a9eb3fd201b58bc1fae80866b4422e30de5 --- M includes/SF_FormPrinter.php M includes/wikipage/SF_WikiPage.php 2 files changed, 8 insertions(+), 6 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php index fa1be1d..40cc491 100644 --- a/includes/SF_FormPrinter.php +++ b/includes/SF_FormPrinter.php @@ -758,7 +758,9 @@ $tif->checkIfAllInstancesPrinted( $form_submitted, $source_is_page ); - $wiki_page->addTemplate( $tif ); + if ( !$tif->allInstancesPrinted() ) { + $wiki_page->addTemplate( $tif ); + } // = // end template processing diff --git a/includes/wikipage/SF_WikiPage.php b/includes/wikipage/SF_WikiPage.php index 54120cf..be2cd82 100644 --- a/includes/wikipage/SF_WikiPage.php +++ b/includes/wikipage/SF_WikiPage.php @@ -15,10 +15,6 @@ private $mFreeTextOnlyInclude = false; function addTemplate( $templateInForm ) { - if ( $templateInForm->allInstancesPrinted() ) { - return; - } - $templateName = $templateInForm->getTemplateName(); $this->mComponents[] = new SFWikiPageTemplate( $templateName, !$templateInForm->allowsMultiple() ); if ( $templateInForm->getInstanceNum() == 0 ) { @@ -63,6 +59,7 @@ foreach ( $this->mComponents as $i => $component ) { if ( get_class( $component ) == 'SFWikiPageFreeText' ) { $this->mComponents[$i]->setText( $text ); + return; } } // Throw an exception here if no free text section found? @@ -169,7 +166,10 @@ $sectionName = "=$sectionName="; } $pageText .= "$sectionName\n"; - $pageText .= $component->getText() . "\n"; + if ( $component->getText() != '' ) { + $pageText .= $component->getText() . "\n"; + } + $pageText .= "\n"; } elseif ( get_class( $component ) == 'SFWikiPageFreeText' ) { $freeText = $component->getText(); if ( $this->mFreeTextOnlyInclude ) { -- To view, visit https://gerrit.wikimedia.org/r/266650 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida0c3a9eb3fd201b58bc1fae80866b4422e30de5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren Gerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [BREAK] Solve -user argument conflict - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [BREAK] Solve -user argument conflict .. [BREAK] Solve -user argument conflict -user is a global option; rename the local implementation Bug: T87635 Change-Id: Ifb07f1e0d2ddc0e7cb780e21565cdaa04860c5d2 --- M scripts/template.py 1 file changed, 8 insertions(+), 8 deletions(-) Approvals: John Vandenberg: Looks good to me, approved Mpaa: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/scripts/template.py b/scripts/template.py index fba031c..783da18 100755 --- a/scripts/template.py +++ b/scripts/template.py @@ -29,13 +29,13 @@ info will be loaded from the maintenance page of the live wiki. argument can also be given as "-xml:filename.xml". --user: Only process pages edited by a given user +-onlyuser: Only process pages edited by a given user -skipuser: Only process pages not edited by a given user --timestamp: (With -user or -skipuser). Only check for a user where his edit is - not older than the given timestamp. Timestamp must be writen in - MediaWiki timestamp format which is "%Y%m%d%H%M%S" +-timestamp: (With -onlyuser or -skipuser). Only check for a user where his + edit is not older than the given timestamp. Timestamp must be + writen in MediaWiki timestamp format which is "%Y%m%d%H%M%S". If this parameter is missed, all edits are checked but this is restricted to the last 100 edits. @@ -102,8 +102,8 @@ # # (C) Daniel Herding, 2004 # (C) Rob W.W. Hooft, 2003-2005 -# (C) xqt, 2009-2015 -# (C) Pywikibot team, 2004-2015 +# (C) xqt, 2009-2016 +# (C) Pywikibot team, 2004-2016 # # Distributed under the terms of the MIT license. # @@ -301,8 +301,8 @@ options['addedCat'] = arg[len('-addcat:'):] elif arg.startswith('-summary:'): options['summary'] = arg[len('-summary:'):] -elif arg.startswith('-user:'): -user = arg[len('-user:'):] +elif arg.startswith('-onlyuser:'): +user = arg[len('-onlyuser:'):] elif arg.startswith('-skipuser:'): user = arg[len('-skipuser:'):] skip = True -- To view, visit https://gerrit.wikimedia.org/r/266212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb07f1e0d2ddc0e7cb780e21565cdaa04860c5d2 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Mpaa Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update to service-template-node v0.2.3 - change (mediawiki...mathoid)
Mobrovac has uploaded a new change for review. https://gerrit.wikimedia.org/r/266651 Change subject: Update to service-template-node v0.2.3 .. Update to service-template-node v0.2.3 - Log the error stack only for 500 errors - Better configuration params handling - Update dependencies Change-Id: I252f2a71929b6919d4f577d365517cae327a8c60 --- M .travis.yml M app.js M config.dev.yaml M doc/deployment.md M lib/util.js M package.json M test/features/app/app.js M test/utils/server.js 8 files changed, 109 insertions(+), 72 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid refs/changes/51/266651/1 diff --git a/.travis.yml b/.travis.yml index cd47495..b47877b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: node_js + node_js: -- "4.2.4" + - "4.2.4" + - "5" script: npm run-script coverage && (npm run-script coveralls || exit 0) diff --git a/app.js b/app.js index e7f9f99..376f9fa 100644 --- a/app.js +++ b/app.js @@ -37,9 +37,9 @@ // ensure some sane defaults if(!app.conf.port) { app.conf.port = 10042; } if(!app.conf.interface) { app.conf.interface = '0.0.0.0'; } -if(!app.conf.compression_level) { app.conf.compression_level = 3; } +if(app.conf.compression_level === undefined) { app.conf.compression_level = 3; } if(app.conf.cors === undefined) { app.conf.cors = '*'; } -if(!app.conf.csp) { +if(app.conf.csp === undefined) { app.conf.csp = "default-src 'self'; object-src 'none'; media-src *; img-src *; style-src *; frame-ancestors 'self'"; } @@ -96,6 +96,25 @@ app.conf.spec.paths = {}; } +// set the CORS and CSP headers +app.all('*', function(req, res, next) { +if(app.conf.cors !== false) { +res.header('access-control-allow-origin', app.conf.cors); +res.header('access-control-allow-headers', 'accept, x-requested-with, content-type'); +res.header('access-control-expose-headers', 'etag'); +} +if(app.conf.csp !== false) { +res.header('x-xss-protection', '1; mode=block'); +res.header('x-content-type-options', 'nosniff'); +res.header('x-frame-options', 'SAMEORIGIN'); +res.header('content-security-policy', app.conf.csp); +res.header('x-content-security-policy', app.conf.csp); +res.header('x-webkit-csp', app.conf.csp); +} +sUtil.initAndLogRequest(req, app); +next(); +}); + // disable the X-Powered-By header app.set('x-powered-by', false); // disable the ETag header - users should provide them! @@ -106,25 +125,6 @@ app.use(bodyParser.json()); // use the application/x-www-form-urlencoded parser app.use(bodyParser.urlencoded({extended: true})); - -// set the CORS and CSP headers -app.all('*', function(req, res, next) { -if(app.conf.cors !== false) { -res.header('access-control-allow-origin', app.conf.cors); -res.header('access-control-allow-headers', 'accept, x-requested-with, content-type'); -res.header('access-control-expose-headers', 'etag'); -} -res.header('x-xss-protection', '1; mode=block'); -res.header('x-content-type-options', 'nosniff'); -res.header('x-frame-options', 'SAMEORIGIN'); -res.header('content-security-policy', app.conf.csp); -res.header('x-content-security-policy', app.conf.csp); -res.header('x-webkit-csp', app.conf.csp); - -sUtil.initAndLogRequest(req, app); - -next(); -}); // serve static files from static/ app.use('/static', express.static(__dirname + '/static')); @@ -154,42 +154,43 @@ function loadRoutes (app) { // get the list of files in routes/ -return fs.readdirAsync(__dirname + '/routes') -.map(function (fname) { -return BBPromise.try(function () { -// ... and then load each route -// but only if it's a js file -if(!/\.js$/.test(fname)) { -return undefined; -} -// import the route file -var route = require(__dirname + '/routes/' + fname); -return route(app); -}).then(function (route) { -if(route === undefined) { -return undefined; -} -// check that the route exports the object we need -if (route.constructor !== Object || !route.path || !route.router || !(route.api_version || route.skip_domain)) { -throw new TypeError('routes/' + fname + ' does not export the correct object!'); -} -// wrap the route handlers with Promise.try() blocks -sUtil.wrapRouteHandlers(route.router); -// determine the path prefix -
[MediaWiki-commits] [Gerrit] resourceloader: Simplify and clean up RLQ wrap - change (mediawiki/core)
Ori.livneh has submitted this change and it was merged. Change subject: resourceloader: Simplify and clean up RLQ wrap .. resourceloader: Simplify and clean up RLQ wrap startup.js: * Don't assign to "window.RLQ" and read from "RLQ". Use the same identifier in both places instead of relying on global scope. * Create the global window.RLQ only once. The temporary [] fallback doesn't need to be exposed globally, so use a local variable for the loop that processes the pre-existing queue built up while the startup module was loading. OutputPage: * Simplify the RLQ wrap to be more idiomatic and less repetitive. Matches the pattern used in Google and Facebook open-source projects. Change-Id: I9176377bc05432e51add841696a356428feec8ce --- M includes/resourceloader/ResourceLoader.php M resources/src/startup.js M tests/phpunit/includes/OutputPageTest.php 3 files changed, 8 insertions(+), 8 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 74ee6ab..d7b51b8 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -1365,7 +1365,7 @@ * @return string */ public static function makeLoaderConditionalScript( $script ) { - return "window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n" . + return "(window.RLQ = window.RLQ || []).push(function () {\n" . trim( $script ) . "\n} );"; } @@ -1382,7 +1382,7 @@ $js = self::makeLoaderConditionalScript( $script ); return new WrappedString( Html::inlineScript( $js ), - "window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n", + "