[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove BadMethodCallException when creating quiz with no answer
Harjotsingh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365437 ) Change subject: Remove BadMethodCallException when creating quiz with no answer .. Remove BadMethodCallException when creating quiz with no answer The quiz throws BadMethodCallException when no answer is provided, earlier it just showed syntax error.This change creates templateParser before the if/else block. Bug: T170733 Change-Id: I6a1fcf8a3707305dd8d41d93c4597950ba537fb4 --- M Question.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz refs/changes/37/365437/1 diff --git a/Question.php b/Question.php index 9065c3f..dd1a4f0 100644 --- a/Question.php +++ b/Question.php @@ -401,12 +401,12 @@ } $maxlength = $input[3]; } + $templateParser = new TemplateParser( __DIR__ . '/templates' ); // Syntax error if there is no input text. if ( empty( $input[1] ) ) { $value = 'value="???"'; $state = 'error'; } else { - $templateParser = new TemplateParser( __DIR__ . '/templates' ); // For hiding down arrow $bigDisplay = 'display: none'; if ( $this->mBeingCorrected ) { -- To view, visit https://gerrit.wikimedia.org/r/365437 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a1fcf8a3707305dd8d41d93c4597950ba537fb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Quiz Gerrit-Branch: master Gerrit-Owner: Harjotsingh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Remove BadMethodCallException when zero is taken as answer i...
Harjotsingh has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365436 ) Change subject: Remove BadMethodCallException when zero is taken as answer in quiz .. Remove BadMethodCallException when zero is taken as answer in quiz Currently the quiz throws a BadMethodCallException when zero is taken as the answer.This was due to the use of empty() function for checking the input. Bug: T169135 Change-Id: I717237e5bad1d74abea8c446b95eaf63eb2dad4b --- M Question.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Quiz refs/changes/36/365436/1 diff --git a/Question.php b/Question.php index 9065c3f..802bba4 100644 --- a/Question.php +++ b/Question.php @@ -402,7 +402,7 @@ $maxlength = $input[3]; } // Syntax error if there is no input text. - if ( empty( $input[1] ) ) { + if ( $input[1] === "" ) { $value = 'value="???"'; $state = 'error'; } else { -- To view, visit https://gerrit.wikimedia.org/r/365436 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I717237e5bad1d74abea8c446b95eaf63eb2dad4b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Quiz Gerrit-Branch: master Gerrit-Owner: Harjotsingh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: cache::misc: remove unused director netmon1001
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365435 ) Change subject: cache::misc: remove unused director netmon1001 .. cache::misc: remove unused director netmon1001 This director should now not be used by anything anymore and can be removed. Change-Id: I23aa4300258630402b67f93c314db121e173a754 --- M hieradata/role/common/cache/misc.yaml 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/365435/1 diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index 4b880d5..2e5979a 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -81,9 +81,6 @@ labmon1001: backends: eqiad: 'labmon1001.eqiad.wmnet' - netmon1001: -backends: - eqiad: 'netmon1001.wikimedia.org' netmon1002: backends: eqiad: 'netmon1002.wikimedia.org' -- To view, visit https://gerrit.wikimedia.org/r/365435 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23aa4300258630402b67f93c314db121e173a754 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.toc: Migrate test from deprecated asyncTest()
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364515 ) Change subject: mediawiki.toc: Migrate test from deprecated asyncTest() .. mediawiki.toc: Migrate test from deprecated asyncTest() Instead, use assert.async(), or (in this case) return the Promise directly to QUnit.test, which will naturally await it. As bonus, it'll handle errors, too. (instead of timing out) Change-Id: I94ee0bf72a3d8ac2e588cd75cbe0787b5001d5b4 --- M tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js index 477550b..b20b68f 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js @@ -6,7 +6,7 @@ } } ) ); - QUnit.asyncTest( 'toggleToc', function ( assert ) { + QUnit.test( 'toggleToc', function ( assert ) { var tocHtml, $toc, $toggleLink, $tocList; assert.strictEqual( $( '.toc' ).length, 0, 'There is no table of contents on the page at the beginning' ); @@ -29,13 +29,11 @@ assert.strictEqual( $tocList.is( ':hidden' ), false, 'The table of contents is now visible' ); $toggleLink.click(); - $tocList.promise().done( function () { + return $tocList.promise().then( function () { assert.strictEqual( $tocList.is( ':hidden' ), true, 'The table of contents is now hidden' ); $toggleLink.click(); - $tocList.promise().done( function () { - QUnit.start(); - } ); + return $tocList.promise(); } ); } ); }( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/364515 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94ee0bf72a3d8ac2e588cd75cbe0787b5001d5b4 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: KrinkleGerrit-Reviewer: Gilles Gerrit-Reviewer: Jforrester 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] operations/puppet[production]: smokeping: restrict http access to prod networks
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365434 ) Change subject: smokeping: restrict http access to prod networks .. smokeping: restrict http access to prod networks smokeping is behind cache::misc so it doesn't need to talk http to everything anymore. Change-Id: Iaffef289242d93aeed3e605c990543300216a562 --- M modules/role/manifests/smokeping.pp 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/365434/1 diff --git a/modules/role/manifests/smokeping.pp b/modules/role/manifests/smokeping.pp index 26dca9b..cd37702 100644 --- a/modules/role/manifests/smokeping.pp +++ b/modules/role/manifests/smokeping.pp @@ -7,8 +7,9 @@ include ::smokeping::web ferm::service { 'smokeping-http': -proto => 'tcp', -port => '80', +proto => 'tcp', +port => '80', +srange => '$PRODUCTION_NETWORKS', } backup::set {'smokeping': } -- To view, visit https://gerrit.wikimedia.org/r/365434 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaffef289242d93aeed3e605c990543300216a562 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: servermon: restrict http access to prod networks
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365433 ) Change subject: servermon: restrict http access to prod networks .. servermon: restrict http access to prod networks servermon nowadays is behind cache::misc so it only needs to talk http to prod networks, not the world. netmon1003 was still created in .wikimedia.org to be equivalent to other netmon*. but we can close it this way. (this is like same change for RT Iebc3228fc69f1) Bug: T170653 Change-Id: Ia08157bc853f4d2be441d6512b29f97eac16181d --- M modules/role/manifests/servermon/wmf.pp 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/role/manifests/servermon/wmf.pp b/modules/role/manifests/servermon/wmf.pp index 6fc65ba..08cba49 100644 --- a/modules/role/manifests/servermon/wmf.pp +++ b/modules/role/manifests/servermon/wmf.pp @@ -51,8 +51,9 @@ } ferm::service { 'servermon-http': -proto => 'tcp', -port => '80', +proto => 'tcp', +port => '80', +srange => '$PRODUCTION_NETWORKS', } } -- To view, visit https://gerrit.wikimedia.org/r/365433 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia08157bc853f4d2be441d6512b29f97eac16181d Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Muehlenhoff 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]: servermon: restrict http access to prod networks
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365433 ) Change subject: servermon: restrict http access to prod networks .. servermon: restrict http access to prod networks servermon nowadays is behind cache::misc so it only needs to talk http to prod networks, not the world. netmon1003 was still created in .wikimedia.org to be equivalent to other netmon*. but we can close it this way. (this is like same change for RT Iebc3228fc69f1) Bug: T170653 Change-Id: Ia08157bc853f4d2be441d6512b29f97eac16181d --- M modules/role/manifests/servermon/wmf.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/365433/1 diff --git a/modules/role/manifests/servermon/wmf.pp b/modules/role/manifests/servermon/wmf.pp index 6fc65ba..295f374 100644 --- a/modules/role/manifests/servermon/wmf.pp +++ b/modules/role/manifests/servermon/wmf.pp @@ -53,6 +53,7 @@ ferm::service { 'servermon-http': proto => 'tcp', port => '80', +srange => '$PRODUCTION_NETWORKS', } } -- To view, visit https://gerrit.wikimedia.org/r/365433 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia08157bc853f4d2be441d6512b29f97eac16181d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: servermon: remove role from netmon1001
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365432 ) Change subject: servermon: remove role from netmon1001 .. servermon: remove role from netmon1001 This is now running on netmon1003, remove role from netmon1001 so that there is no additional "make updates" cron running and talking to db. One step closer to decom netmon1001. Bug: T170653 Change-Id: I4cca02ff082a913dad2de5fcf2dc91c9fe1cc3e8 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 43eec802..488d708 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1785,7 +1785,7 @@ # network monitoring tool server node 'netmon1001.wikimedia.org' { -role(network::monitor, librenms, servermon::wmf) +role(network::monitor, librenms) interface::add_ip6_mapped { 'main': } } -- To view, visit https://gerrit.wikimedia.org/r/365432 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4cca02ff082a913dad2de5fcf2dc91c9fe1cc3e8 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Muehlenhoff 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]: servermon: remove role from netmon1001
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365432 ) Change subject: servermon: remove role from netmon1001 .. servermon: remove role from netmon1001 This is now running on netmon1003, remove role from netmon1001 so that there is no additional "make updates" cron running and talking to db. One step closer to decom netmon1001. Bug: T170653 Change-Id: I4cca02ff082a913dad2de5fcf2dc91c9fe1cc3e8 --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/32/365432/1 diff --git a/manifests/site.pp b/manifests/site.pp index 5db5aa4..a79a1bd 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1768,7 +1768,7 @@ # network monitoring tool server node 'netmon1001.wikimedia.org' { -role(network::monitor, librenms, servermon::wmf) +role(network::monitor, librenms) interface::add_ip6_mapped { 'main': } } -- To view, visit https://gerrit.wikimedia.org/r/365432 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4cca02ff082a913dad2de5fcf2dc91c9fe1cc3e8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery()
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365431 ) Change subject: ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery() .. ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery() If you omitted the $filter_tag parameter or set it to false, this would go grab the 'tagfilter' query string parameter from $wgRequest and use it instead. Thankfully no callers (in core or extensions) used this scary misfeature, so we can just remove it. Change-Id: Ib5d1b9f90989903f99a0d163745879df24f45b6a --- M includes/changetags/ChangeTags.php 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/365431/1 diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index afcc90f..2939e4b 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -654,17 +654,13 @@ * @param string|array $conds Conditions used in query, see Database::select * @param array $join_conds Join conditions, see Database::select * @param string|array $options Options, see Database::select -* @param bool|string|array $filter_tag Tag(s) to select on +* @param string|array $filter_tag Tag(s) to select on * * @throws MWException When unable to determine appropriate JOIN condition for tagging */ public static function modifyDisplayQuery( &$tables, &$fields, &$conds, - &$join_conds, &$options, $filter_tag = false ) { - global $wgRequest, $wgUseTagFilter; - - if ( $filter_tag === false ) { - $filter_tag = $wgRequest->getVal( 'tagfilter' ); - } + &$join_conds, &$options, $filter_tag = '' ) { + global $wgUseTagFilter; // Figure out which ID field to use if ( in_array( 'recentchanges', (array)$tables ) ) { -- To view, visit https://gerrit.wikimedia.org/r/365431 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5d1b9f90989903f99a0d163745879df24f45b6a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: cache::misc: switch servermon from netmon1001 to netmon1003
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365429 ) Change subject: cache::misc: switch servermon from netmon1001 to netmon1003 .. cache::misc: switch servermon from netmon1001 to netmon1003 Bug: T170653 Change-Id: Ib8966a3d7aef2b7f5debd7e77cebcd5dfa6c5998 --- M hieradata/role/common/cache/misc.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index afb8474..4b880d5 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -239,7 +239,7 @@ scholarships.wikimedia.org: director: 'krypton' servermon.wikimedia.org: -director: 'netmon1001' +director: 'netmon1003' smokeping.wikimedia.org: director: 'netmon1002' static-bugzilla.wikimedia.org: -- To view, visit https://gerrit.wikimedia.org/r/365429 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8966a3d7aef2b7f5debd7e77cebcd5dfa6c5998 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn 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]: Add unit tests for ChangeTags::modifyDisplayQuery()
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365430 ) Change subject: Add unit tests for ChangeTags::modifyDisplayQuery() .. Add unit tests for ChangeTags::modifyDisplayQuery() The rest of ChangeTags.php should have tests too, but this is a start. Also fix up ChangeTags::modifyDisplayQuery() to work when strings are passed for certain parameters, which its documentation claims it supports but which leads to errors in practice. Change-Id: I2fe61bcb716a369a14a45c2843817a6557d44f7c --- M includes/changetags/ChangeTags.php A tests/phpunit/includes/changetags/ChangeTagsTest.php 2 files changed, 257 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/365430/1 diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 14c2012..e1f83d5 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -653,7 +653,7 @@ * @param string|array $fields Fields used in query, see Database::select * @param string|array $conds Conditions used in query, see Database::select * @param array $join_conds Join conditions, see Database::select -* @param array $options Options, see Database::select +* @param string|array $options Options, see Database::select * @param bool|string|array $filter_tag Tag(s) to select on * * @throws MWException When unable to determine appropriate JOIN condition for tagging @@ -667,18 +667,19 @@ } // Figure out which ID field to use - if ( in_array( 'recentchanges', $tables ) ) { + if ( in_array( 'recentchanges', (array)$tables ) ) { $join_cond = 'ct_rc_id=rc_id'; - } elseif ( in_array( 'logging', $tables ) ) { + } elseif ( in_array( 'logging', (array)$tables ) ) { $join_cond = 'ct_log_id=log_id'; - } elseif ( in_array( 'revision', $tables ) ) { + } elseif ( in_array( 'revision', (array)$tables ) ) { $join_cond = 'ct_rev_id=rev_id'; - } elseif ( in_array( 'archive', $tables ) ) { + } elseif ( in_array( 'archive', (array)$tables ) ) { $join_cond = 'ct_rev_id=ar_rev_id'; } else { throw new MWException( 'Unable to determine appropriate JOIN condition for tagging.' ); } + $fields = (array)$fields; $fields['ts_tags'] = wfGetDB( DB_REPLICA )->buildGroupConcatField( ',', 'change_tag', 'ct_tag', $join_cond ); @@ -687,10 +688,13 @@ // Somebody wants to filter on a tag. // Add an INNER JOIN on change_tag + $tables = (array)$tables; $tables[] = 'change_tag'; $join_conds['change_tag'] = [ 'INNER JOIN', $join_cond ]; + $conds = (array)$conds; $conds['ct_tag'] = $filter_tag; - if ( count( $filter_tag ) > 1 && !in_array( 'DISTINCT', $options ) ) { + if ( count( $filter_tag ) > 1 && !in_array( 'DISTINCT', (array)$options ) ) { + $options = (array)$options; $options[] = 'DISTINCT'; } } diff --git a/tests/phpunit/includes/changetags/ChangeTagsTest.php b/tests/phpunit/includes/changetags/ChangeTagsTest.php new file mode 100644 index 000..2b5f665 --- /dev/null +++ b/tests/phpunit/includes/changetags/ChangeTagsTest.php @@ -0,0 +1,247 @@ +setMwGlobals( 'wgUseTagFilter', $useTags ); + // HACK resolve deferred group concats (see comment in provideModifyDisplayQuery) + if ( isset( $modifiedQuery['fields']['ts_tags'] ) ) { + $modifiedQuery['fields']['ts_tags'] = call_user_func_array( + [ wfGetDB( DB_REPLICA ), 'buildGroupConcatField' ], + $modifiedQuery['fields']['ts_tags'] + ); + } + if ( isset( $modifiedQuery['exception'] ) ) { + $this->setExpectedException( $modifiedQuery['exception'] ); + } + ChangeTags::modifyDisplayQuery( + $origQuery['tables'], + $origQuery['fields'], + $origQuery['conds'], + $origQuery['join_conds'], + $origQuery['options'], + $filter_tag + ); + if ( !isset( $modifiedQuery['exception'] ) ) { + $this->assertArrayEquals( +
[MediaWiki-commits] [Gerrit] operations/puppet[production]: cache::misc: switch servermon from netmon1001 to netmon1003
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365429 ) Change subject: cache::misc: switch servermon from netmon1001 to netmon1003 .. cache::misc: switch servermon from netmon1001 to netmon1003 Bug: T170653 Change-Id: Ib8966a3d7aef2b7f5debd7e77cebcd5dfa6c5998 --- M hieradata/role/common/cache/misc.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/365429/1 diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index afb8474..4b880d5 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -239,7 +239,7 @@ scholarships.wikimedia.org: director: 'krypton' servermon.wikimedia.org: -director: 'netmon1001' +director: 'netmon1003' smokeping.wikimedia.org: director: 'netmon1002' static-bugzilla.wikimedia.org: -- To view, visit https://gerrit.wikimedia.org/r/365429 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8966a3d7aef2b7f5debd7e77cebcd5dfa6c5998 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: cache::misc: add director for netmon1003
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365428 ) Change subject: cache::misc: add director for netmon1003 .. cache::misc: add director for netmon1003 This will be hosting servermon, moving over from netmon1001. Gotta add the director first. Bug: T170653 Change-Id: I66dff48666050341cf47672c6d4c385540114488 --- M hieradata/role/common/cache/misc.yaml 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index 1f40122..afb8474 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -87,6 +87,9 @@ netmon1002: backends: eqiad: 'netmon1002.wikimedia.org' + netmon1003: +backends: + eqiad: 'netmon1003.wikimedia.org' noc: backends: eqiad: 'terbium.eqiad.wmnet' -- To view, visit https://gerrit.wikimedia.org/r/365428 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66dff48666050341cf47672c6d4c385540114488 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn 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]: cache::misc: add director for netmon1003
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365428 ) Change subject: cache::misc: add director for netmon1003 .. cache::misc: add director for netmon1003 This will be hosting servermon, moving over from netmon1001. Gotta add the director first. Bug: T170653 Change-Id: I66dff48666050341cf47672c6d4c385540114488 --- M hieradata/role/common/cache/misc.yaml 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/28/365428/1 diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index 1f40122..afb8474 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -87,6 +87,9 @@ netmon1002: backends: eqiad: 'netmon1002.wikimedia.org' + netmon1003: +backends: + eqiad: 'netmon1003.wikimedia.org' noc: backends: eqiad: 'terbium.eqiad.wmnet' -- To view, visit https://gerrit.wikimedia.org/r/365428 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66dff48666050341cf47672c6d4c385540114488 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add offline compilation client
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365427 ) Change subject: Add offline compilation client .. Add offline compilation client Bug: T163714 Change-Id: I2b11abad2e62293a8a59b7b50b90c836a6ca961e --- A app/src/main/java/org/wikipedia/offline/CompilationClient.java A app/src/main/java/org/wikipedia/offline/CompilationInfo.java A app/src/test/java/org/wikipedia/offline/CompilationClientTest.java 3 files changed, 230 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/27/365427/1 diff --git a/app/src/main/java/org/wikipedia/offline/CompilationClient.java b/app/src/main/java/org/wikipedia/offline/CompilationClient.java new file mode 100644 index 000..1d1a06c --- /dev/null +++ b/app/src/main/java/org/wikipedia/offline/CompilationClient.java @@ -0,0 +1,104 @@ +package org.wikipedia.offline; + + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.annotation.VisibleForTesting; + +import org.wikipedia.dataclient.WikiSite; +import org.wikipedia.dataclient.retrofit.RetrofitFactory; +import org.wikipedia.json.annotations.Required; +import org.wikipedia.settings.Prefs; + +import java.io.IOException; +import java.util.List; +import java.util.Locale; + +import retrofit2.Call; +import retrofit2.Response; +import retrofit2.Retrofit; +import retrofit2.http.GET; +import retrofit2.http.Headers; + +import static org.wikipedia.Constants.ACCEPT_HEADER_PREFIX; + +class CompilationClient { +interface Callback { +void success(@NonNull List compilations); +void error(@NonNull Throwable caught); +} + +@Nullable private Call call; + +// todo: according to Jake Wharton, Retrofit service objects are very expensive and should only +// be created once for the application and then cached for reuse. Figure out how to make these +// WikiSite-independent, and create once. +// https://stackoverflow.com/a/20627010/5520737 +public void request(@NonNull WikiSite wiki, @NonNull Callback cb) { +cancel(); +Retrofit retrofit = RetrofitFactory.newInstance(getEndpoint(wiki), wiki); +Service service = retrofit.create(Service.class); +call = request(service); +call.enqueue(new CallbackAdapter(cb)); +} + +public void cancel() { +if (call == null) { +return; +} +call.cancel(); +call = null; +} + +@VisibleForTesting @NonNull +Call request(@NonNull Service service) { +return service.get(); +} + +@VisibleForTesting +static class CallbackAdapter implements retrofit2.Callback { +private Callback cb; + +CallbackAdapter(Callback cb) { +this.cb = cb; +} + +@Override +public void onResponse(@NonNull Call call, + @NonNull Response response) { +// noinspection ConstantConditions +if (response.body() != null && response.body().compilations() != null) { +// noinspection ConstantConditions +cb.success(response.body().compilations()); +} else { +cb.error(new IOException("An unknown error occurred.")); +} +} + +@Override +public void onFailure(@NonNull Call call, @NonNull Throwable t) { +cb.error(t); +} + +static class CompilationResponse { +@SuppressWarnings("unused,NullableProblems") @NonNull @Required +private List compilations; + +@Nullable +List compilations() { +return compilations; +} +} +} + +// todo: update endpoint path when finalized +@VisibleForTesting +interface Service { +@NonNull @Headers(ACCEPT_HEADER_PREFIX + "compilations/0.1.0\"") @GET("/compilations") +Call get(); +} + +private String getEndpoint(WikiSite wiki) { +return String.format(Locale.ROOT, Prefs.getRestbaseUriFormat(), wiki.scheme(), wiki.authority()); +} +} diff --git a/app/src/main/java/org/wikipedia/offline/CompilationInfo.java b/app/src/main/java/org/wikipedia/offline/CompilationInfo.java new file mode 100644 index 000..386dcab --- /dev/null +++ b/app/src/main/java/org/wikipedia/offline/CompilationInfo.java @@ -0,0 +1,59 @@ +package org.wikipedia.offline; + + +import android.net.Uri; +import android.support.annotation.NonNull; + +import com.google.gson.annotations.SerializedName; + +import java.util.Date; + +// A Gson POJO that will model the compilations endpoint response. TODO: Finalize when the spec is defined. +class CompilationInfo { +@SuppressWarnings("unused,NullableProblems") @NonNull private String filename; +@SuppressWarnings("unused,NullableProblems") @NonNull private String summary; +
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Add din.wikipedia.org to RESTBase
Mobrovac has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365426 ) Change subject: Add din.wikipedia.org to RESTBase .. Add din.wikipedia.org to RESTBase Bug: T168518 Change-Id: Idcde93fd2c00c3426289cad3153ba0ace14eaf2a --- M scap/vars.yaml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Mobrovac: Verified; Looks good to me, approved diff --git a/scap/vars.yaml b/scap/vars.yaml index 4b9ce11..eda7525 100644 --- a/scap/vars.yaml +++ b/scap/vars.yaml @@ -115,6 +115,7 @@ cy.wikipedia.org: default_project da.wikipedia.org: default_project de.wikipedia.org: default_project +din.wikipedia.org: default_project diq.wikipedia.org: default_project dsb.wikipedia.org: default_project dty.wikipedia.org: default_project -- To view, visit https://gerrit.wikimedia.org/r/365426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idcde93fd2c00c3426289cad3153ba0ace14eaf2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/restbase/deploy Gerrit-Branch: master Gerrit-Owner: MobrovacGerrit-Reviewer: Mobrovac ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Add din.wikipedia.org to RESTBase
Mobrovac has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365426 ) Change subject: Add din.wikipedia.org to RESTBase .. Add din.wikipedia.org to RESTBase Bug: T168518 Change-Id: Idcde93fd2c00c3426289cad3153ba0ace14eaf2a --- M scap/vars.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy refs/changes/26/365426/1 diff --git a/scap/vars.yaml b/scap/vars.yaml index 4b9ce11..eda7525 100644 --- a/scap/vars.yaml +++ b/scap/vars.yaml @@ -115,6 +115,7 @@ cy.wikipedia.org: default_project da.wikipedia.org: default_project de.wikipedia.org: default_project +din.wikipedia.org: default_project diq.wikipedia.org: default_project dsb.wikipedia.org: default_project dty.wikipedia.org: default_project -- To view, visit https://gerrit.wikimedia.org/r/365426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idcde93fd2c00c3426289cad3153ba0ace14eaf2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/restbase/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...mobileapps[master]: Offline compilations endpoint groundwork
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365425 ) Change subject: Offline compilations endpoint groundwork .. Offline compilations endpoint groundwork Lays the groundwork for the forthcoming offline compilations endopint. A formal spec is forthcoming and this will need updating when that's finalized. (Marked with todos where applicable.) The endpoint path will need finalizing as well. Bug: T170732 Change-Id: I6713ccc027fe37434081c7eccf511fb8af8f14f2 --- M lib/mobile-util.js A routes/compilations.js M spec.yaml A test/features/compilations/compilations.js 4 files changed, 122 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/25/365425/1 diff --git a/lib/mobile-util.js b/lib/mobile-util.js index eee8f56..ce36582 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -9,13 +9,10 @@ mUtil.CONTENT_TYPES = { mobileSections: { name: 'mobile-sections', version: '0.11.0' }, definition: { name: 'definition', version: '0.7.2' }, - random: { name: 'random', version: '0.6.0' }, - announcements: { name: 'announcements', version: '0.1.0' }, - +compilations: { name: 'compilations', version: '0.1.0' }, onthisday: { name: 'onthisday', version: '0.2.0' }, - unpublished: { name: 'unpublished', version: '0.0.0' } }; diff --git a/routes/compilations.js b/routes/compilations.js new file mode 100644 index 000..5a66487 --- /dev/null +++ b/routes/compilations.js @@ -0,0 +1,36 @@ +'use strict'; + +const sUtil = require('../lib/util'); +const mUtil = require('../lib/mobile-util'); + +/** + * The main router object + */ +const router = sUtil.router(); + +// todo: populate after we've decided what offline compilations to serve. (T169905) +function getCompilations() { return []; } + +/** + * GET /compilations + * Gets information about the available offline compilations + */ +router.get('/compilations', (req, res) => { +const response = { compilations: getCompilations() }; +const hash = mUtil.hashCode(JSON.stringify(response)); + +res.status(200); +mUtil.setContentType(res, mUtil.CONTENT_TYPES.compilations); +mUtil.setETag(res, hash); +res.set('cache-control', 'public, max-age=7200, s-maxage=14400'); +res.json(response); +}); + +module.exports = function() { +return { +// todo: update when endpoint path is finalized +path: '/', +api_version: 1, +router +}; +}; diff --git a/spec.yaml b/spec.yaml index 3618cf5..0991300 100644 --- a/spec.yaml +++ b/spec.yaml @@ -923,6 +923,50 @@ - text - countries + compilations: +type: object +properties: + compilations: +type: array +description: list of available offline article compilations +items: + $ref: '#/definitions/compilation' +required: + - compilations + + compilation: +type: object +properties: + filename: +type: string +description: The compilation filename + summary: +type: string +description: A short description of the compilation's contents + description: +type: string +description: A detailed description of the compilation's contents + thumb_url: +type: string +description: The URL for a thumbnail icon representing the collection + image_url: +type: string +description: The URL for a full-size image representing the collection + article_count: +type: integer +description: The number of articles included in the compilation + size: +type: integer +description: The size of the compilation, in bytes + timestamp: +type: integer +description: A timestamp for the compilation file creation date (expressed in ms since midnight 1/1/70 UTC) +required: + - filename + - article_count + - size + - timestamp + action: type: object properties: diff --git a/test/features/compilations/compilations.js b/test/features/compilations/compilations.js new file mode 100644 index 000..2f9c4f9 --- /dev/null +++ b/test/features/compilations/compilations.js @@ -0,0 +1,41 @@ +'use strict'; + +const preq = require('preq'); +const assert = require('../../utils/assert.js'); +const server = require('../../utils/server.js'); +const headers = require('../../utils/headers.js'); + +describe('compilations', function() { + +this.timeout(2); // eslint-disable-line no-invalid-this + +before(() => { +return server.start(); +}); + +it('should respond to GET request with expected headers, incl. CORS and CSP headers', () => { +return headers.checkHeaders(`${server.config.uri}en.wikipedia.org/v1/feed/announcements`); +}); + +// todo: update when spec is finalized +it('should return a valid
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Lists: Change exim filter for spam observed from qq.com
Herron has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365424 ) Change subject: Lists: Change exim filter for spam observed from qq.com .. Lists: Change exim filter for spam observed from qq.com Update exim filter with messages attributes seen in spam sent to list -owners addresses. Set check_rfc2047_length = false to decode unusually long subject headers. Bug: T170601 Change-Id: Id5a9766f7b8a3d304d73829eb385cb132e89680a --- M modules/profile/templates/exim/exim4.conf.mailman.erb M modules/profile/templates/exim/system_filter.conf.mailman.erb 2 files changed, 8 insertions(+), 2 deletions(-) Approvals: Herron: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/profile/templates/exim/exim4.conf.mailman.erb b/modules/profile/templates/exim/exim4.conf.mailman.erb index 410ecb8..e5b52da 100644 --- a/modules/profile/templates/exim/exim4.conf.mailman.erb +++ b/modules/profile/templates/exim/exim4.conf.mailman.erb @@ -64,6 +64,7 @@ # Other never_users = root : daemon : bin ignore_bounce_errors_after = 0h +check_rfc2047_length = false add_environment = <; PATH=/bin:/usr/bin keep_environment = diff --git a/modules/profile/templates/exim/system_filter.conf.mailman.erb b/modules/profile/templates/exim/system_filter.conf.mailman.erb index 5c39455..3d92a2f 100644 --- a/modules/profile/templates/exim/system_filter.conf.mailman.erb +++ b/modules/profile/templates/exim/system_filter.conf.mailman.erb @@ -19,6 +19,11 @@ endif # Filter spam observed from qq.com with matching subject. -if $header_subject: contains "只要投紸荭宝天天" and $header_from: ends "qq.com" then -fail text "Message rejected" +if $header_subject: contains "只要投紸荭宝天天" and $header_from: contains "@qq.com" then +fail text "Message rejected ref1" +endif + +# Filter spam observed from qq.com with matching subject. +if $header_subject: matches "8。COM.*天天" and $header_from: contains "@qq.com" then +fail text "Message rejected ref2" endif -- To view, visit https://gerrit.wikimedia.org/r/365424 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5a9766f7b8a3d304d73829eb385cb132e89680a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: HerronGerrit-Reviewer: Herron 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...Vector[master]: Remove `position: absolute` from #p-logo element
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364028 ) Change subject: Remove `position: absolute` from #p-logo element .. Remove `position: absolute` from #p-logo element This was inherited from Monobook (r2881, b52a2a1567). The #mw-panel (sidebar) was at `top: 160px`. The #p-logo was at `top: -160px`. This looks hacky so I set #mw-panel `top: 0`. Bug: T170053 Change-Id: Ifb99ff36e3a9c530c944df2ea0a6c75759045c1c --- M components/navigation.less M screen-hd.less M variables.less 3 files changed, 2 insertions(+), 11 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/components/navigation.less b/components/navigation.less index a74eda3..776ef35 100644 --- a/components/navigation.less +++ b/components/navigation.less @@ -60,9 +60,6 @@ /* Logo */ #p-logo { - position: absolute; - top: -160px; - left: 0; width: 10em; height: 160px; @@ -80,8 +77,7 @@ div#mw-panel { font-size: @menu-main-font-size; position: absolute; - top: 160px; - padding-top: 1em; + top: 0; width: 10em; left: 0; @@ -135,7 +131,7 @@ /* First sidebar portlet. Not using :first-of-type for IE<=8 support. */ #p-logo + div.portal { background-image: none; - margin-top: 0; + margin-top: 1em; h3 { display: none; } diff --git a/screen-hd.less b/screen-hd.less index 96c96cc..02c3fb8 100644 --- a/screen-hd.less +++ b/screen-hd.less @@ -6,9 +6,6 @@ margin-left: 11em; padding: 1.25em 1.5em 1.5em 1.5em; } -#p-logo { - left: @menu-main-logo-left; -} div#footer { margin-left: 11em; padding: 1.25em; diff --git a/variables.less b/variables.less index 1e67cb3..7a5d1e6 100755 --- a/variables.less +++ b/variables.less @@ -33,7 +33,5 @@ @menu-main-body-margin-left: 0.5em; @menu-main-body-padding: 0.3em 0 0 0; -@menu-main-logo-left: 0.5em; - // Personal menu @menu-personal-font-size: 0.75em; -- To view, visit https://gerrit.wikimedia.org/r/364028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifb99ff36e3a9c530c944df2ea0a6c75759045c1c Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: GolopotwGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Golopotw Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: VolkerE 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]: mw.loader: Avoid use of deprecated QUnit.asyncTest/QUnit.start
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364512 ) Change subject: mw.loader: Avoid use of deprecated QUnit.asyncTest/QUnit.start .. mw.loader: Avoid use of deprecated QUnit.asyncTest/QUnit.start Deprecated since QUnit 1.16, removed in QUnit 2.0. (We're on 1.23 currently.) Migrate to assert.async(). This is a fairly atypical use of QUnit.start(), because it functions here as a cross-script callback, where lexical scope cannot be used to share the async() callback directly. Other mw.loader tests already solved this by using a static callback instead which inherits the lexical scope from the test to call done(). The old 'qunitOkCall' script is no longer used after this and thus removed. Change-Id: I430df14b35a69c71df8685494d1379e22af0d6df --- R tests/qunit/data/mwLoaderTestCallback.js D tests/qunit/data/qunitOkCall.js M tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js 3 files changed, 30 insertions(+), 26 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/tests/qunit/data/callMwLoaderTestCallback.js b/tests/qunit/data/mwLoaderTestCallback.js similarity index 100% rename from tests/qunit/data/callMwLoaderTestCallback.js rename to tests/qunit/data/mwLoaderTestCallback.js diff --git a/tests/qunit/data/qunitOkCall.js b/tests/qunit/data/qunitOkCall.js deleted file mode 100644 index 3ed5514..000 --- a/tests/qunit/data/qunitOkCall.js +++ /dev/null @@ -1,2 +0,0 @@ -QUnit.start(); -QUnit.assert.ok( true, 'Successfully loaded!' ); diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js index 9dc9e5d..cd18380 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js @@ -90,7 +90,7 @@ isAwesomeDone = true; }; - mw.loader.implement( 'test.callback', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/callMwLoaderTestCallback.js' ) ] ); + mw.loader.implement( 'test.callback', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/mwLoaderTestCallback.js' ) ] ); return mw.loader.using( 'test.callback', function () { assert.strictEqual( isAwesomeDone, true, 'test.callback module should\'ve caused isAwesomeDone to be true' ); @@ -109,7 +109,7 @@ isAwesomeDone = true; }; - mw.loader.implement( 'hasOwnProperty', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/callMwLoaderTestCallback.js' ) ], {}, {} ); + mw.loader.implement( 'hasOwnProperty', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/mwLoaderTestCallback.js' ) ], {}, {} ); return mw.loader.using( 'hasOwnProperty', function () { assert.strictEqual( isAwesomeDone, true, 'hasOwnProperty module should\'ve caused isAwesomeDone to be true' ); @@ -128,7 +128,7 @@ isAwesomeDone = true; }; - mw.loader.implement( 'test.promise', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/callMwLoaderTestCallback.js' ) ] ); + mw.loader.implement( 'test.promise', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/mwLoaderTestCallback.js' ) ] ); return mw.loader.using( 'test.promise' ) .done( function () { @@ -680,38 +680,44 @@ ); } ); - QUnit.asyncTest( '.load( "//protocol-relative" ) - T32825', function ( assert ) { - // This bug was actually already fixed in 1.18 and later when discovered in 1.17. - // Test is for regressions! + // This bug was actually already fixed in 1.18 and later when discovered in 1.17. + QUnit.test( '.load( "//protocol-relative" ) - T32825', function ( assert ) { + var target, + done = assert.async(); - // Forge a URL to the test callback script - var target = QUnit.fixurl( - mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/qunitOkCall.js' + // URL to the callback script + target = QUnit.fixurl( + mw.config.get( 'wgServer' ) + mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/mwLoaderTestCallback.js' ); - - // Confirm that mw.loader.load() works with protocol-relative URLs + // Ensure a protocol-relative URL for this test target = target.replace( /https?:/, '' ); + assert.equal( target.slice( 0, 2 ), '//', 'URL is
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Lists: Change exim filter for spam observed from qq.com
Herron has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365424 ) Change subject: Lists: Change exim filter for spam observed from qq.com .. Lists: Change exim filter for spam observed from qq.com Update exim filter with messages attributes seen in spam sent to list -owners addresses. Set check_rfc2047_length = false to decode unusually long subject headers. Bug: T170601 Change-Id: Id5a9766f7b8a3d304d73829eb385cb132e89680a --- M modules/profile/templates/exim/exim4.conf.mailman.erb M modules/profile/templates/exim/system_filter.conf.mailman.erb 2 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/24/365424/1 diff --git a/modules/profile/templates/exim/exim4.conf.mailman.erb b/modules/profile/templates/exim/exim4.conf.mailman.erb index 410ecb8..e5b52da 100644 --- a/modules/profile/templates/exim/exim4.conf.mailman.erb +++ b/modules/profile/templates/exim/exim4.conf.mailman.erb @@ -64,6 +64,7 @@ # Other never_users = root : daemon : bin ignore_bounce_errors_after = 0h +check_rfc2047_length = false add_environment = <; PATH=/bin:/usr/bin keep_environment = diff --git a/modules/profile/templates/exim/system_filter.conf.mailman.erb b/modules/profile/templates/exim/system_filter.conf.mailman.erb index 5c39455..3d92a2f 100644 --- a/modules/profile/templates/exim/system_filter.conf.mailman.erb +++ b/modules/profile/templates/exim/system_filter.conf.mailman.erb @@ -19,6 +19,11 @@ endif # Filter spam observed from qq.com with matching subject. -if $header_subject: contains "只要投紸荭宝天天" and $header_from: ends "qq.com" then -fail text "Message rejected" +if $header_subject: contains "只要投紸荭宝天天" and $header_from: contains "@qq.com" then +fail text "Message rejected ref1" +endif + +# Filter spam observed from qq.com with matching subject. +if $header_subject: matches "8。COM.*天天" and $header_from: contains "@qq.com" then +fail text "Message rejected ref2" endif -- To view, visit https://gerrit.wikimedia.org/r/365424 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5a9766f7b8a3d304d73829eb385cb132e89680a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Herron___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Material[master]: Load ResourceLoader modules correctly
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365421 ) Change subject: Load ResourceLoader modules correctly .. Load ResourceLoader modules correctly Few other changes: - (indefinitely) remove some WIP stylesheets from loading, which are currently the motion, print, and icon stylesheets. - Fix header positioning. Change-Id: I044b0eb56ed60069a86bed5c1439aefd6970798f --- M Material.skin.php M material/styles/components/md-ui.components.header.less M skin.json 3 files changed, 5 insertions(+), 18 deletions(-) Approvals: SamanthaNguyen: Looks good to me, approved jenkins-bot: Verified diff --git a/Material.skin.php b/Material.skin.php index 9d002c8..89f8513 100644 --- a/Material.skin.php +++ b/Material.skin.php @@ -35,7 +35,8 @@ parent::setupSkinUserCss( $out ); $out->addModuleStyles( array( 'mediawiki.skinning.interface', - 'skins.material' + 'skins.material.base', + 'skins.material.components' ) ); } } diff --git a/material/styles/components/md-ui.components.header.less b/material/styles/components/md-ui.components.header.less index a8d8a80..869bb5e 100644 --- a/material/styles/components/md-ui.components.header.less +++ b/material/styles/components/md-ui.components.header.less @@ -5,6 +5,7 @@ width: 100%; position: fixed; z-index: 2; + margin-top: -0.5em; > a:first-child img { display: none; } diff --git a/skin.json b/skin.json index 0ffd99b..b351f1d 100644 --- a/skin.json +++ b/skin.json @@ -1,7 +1,7 @@ { "name": "Material", "namemsg": "skinname-material", - "version": "1.3.5", + "version": "1.4.0", "author": [ "[https://mediawiki.org/wiki/User:SamanthaNguyen SamanthaNguyen]", "[https://mediawiki.org/wiki/User:MtMNC MtMNC]", @@ -32,12 +32,6 @@ "remoteSkinPath": "Material" }, "ResourceModules": { - "skins.material": { - "dependencies": [ - "skins.material.components", - "skins.material.base" - ] - }, "skins.material.components": { "styles": { "material/styles/components/md-ui.components.datatable.less": { @@ -59,16 +53,7 @@ }, "skins.material.base": { "styles": { - "material/styles/base/md-ui.base.print.less": { - "media": "print" - }, "material/styles/base/md-ui.base.colors.less": { - "media": "screen" - }, - "material/styles/base/md-ui.base.icons.less": { - "media": "screen" - }, - "material/styles/base/md-ui.base.motion.less": { "media": "screen" }, "material/styles/base/md-ui.base.variables.less": { @@ -82,7 +67,7 @@ }, "ResourceModuleSkinStyles": { "material": { - "+mediawiki.skinning.interface": "material/styles/mediawiki/skinning.interface.css", + "+mediawiki.skinning.interface": "material/styles/mediawiki/skinning.interface.less", "+mediawiki.special.preferences.styles": "material/styles/mediawiki/specials.preferences.styles.less", "+mediawiki.toc": "material/styles/mediawiki/toc.less" } -- To view, visit https://gerrit.wikimedia.org/r/365421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I044b0eb56ed60069a86bed5c1439aefd6970798f Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/skins/Material Gerrit-Branch: master Gerrit-Owner: SamanthaNguyenGerrit-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] mediawiki/core[master]: Remove temporary hole in abstractions
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365419 ) Change subject: Remove temporary hole in abstractions .. Remove temporary hole in abstractions Was introduced temprarily to facilitate event logging, now the only caller is gone. Bug: T166247 Change-Id: I0f9cdccc6b3a566d9f7ebf02515f724348205071 --- M includes/user/User.php 1 file changed, 0 insertions(+), 12 deletions(-) Approvals: jenkins-bot: Verified Kaldari: Looks good to me, approved diff --git a/includes/user/User.php b/includes/user/User.php index a1119fa..7bf6be5 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -305,12 +305,6 @@ /** @var integer User::READ_* constant bitfield used to load data */ protected $queryFlagsUsed = self::READ_NORMAL; - /** @var string Indicates type of block (used for eventlogging) -* Permitted values: 'cookie-block', 'proxy-block', 'openproxy-block', 'xff-block', -* 'config-block' -*/ - public $blockTrigger = false; - public static $idCacheByName = []; /** @@ -1676,7 +1670,6 @@ 'address' => $ip, 'systemBlock' => 'proxy', ] ); - $this->blockTrigger = 'proxy-block'; } elseif ( $this->isAnon() && $this->isDnsBlacklisted( $ip ) ) { $block = new Block( [ 'byText' => wfMessage( 'sorbs' )->text(), @@ -1684,7 +1677,6 @@ 'address' => $ip, 'systemBlock' => 'dnsbl', ] ); - $this->blockTrigger = 'openproxy-block'; } } @@ -1703,7 +1695,6 @@ # Mangle the reason to alert the user that the block # originated from matching the X-Forwarded-For header. $block->mReason = wfMessage( 'xffblockreason', $block->mReason )->text(); - $this->blockTrigger = 'xff-block'; } } @@ -1719,7 +1710,6 @@ 'anonOnly' => true, 'systemBlock' => 'wgSoftBlockRanges', ] ); - $this->blockTrigger = 'config-block'; } if ( $block instanceof Block ) { @@ -1733,7 +1723,6 @@ $this->mBlockedby = ''; $this->mHideName = 0; $this->mAllowUsertalk = false; - $this->blockTrigger = false; } // Avoid PHP 7.1 warning of passing $this by reference @@ -1766,7 +1755,6 @@ $useBlockCookie = ( $config->get( 'CookieSetOnAutoblock' ) === true ); if ( $blockIsValid && $useBlockCookie ) { // Use the block. - $this->blockTrigger = 'cookie-block'; return $tmpBlock; } else { // If the block is not valid, remove the cookie. -- To view, visit https://gerrit.wikimedia.org/r/365419 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f9cdccc6b3a566d9f7ebf02515f724348205071 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: Kaldari 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 (a0a86ff48)
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365423 ) Change subject: Update VE core submodule to master (a0a86ff48) .. Update VE core submodule to master (a0a86ff48) New changes: 9ba233409 VisualDiff: Use and on whole paragraphs 8d9068029 Update OOjs UI to v0.22.3 d12bb03d7 Avoid deprecated QUnit.asyncTest() in ve.init.sa.Platform.test a0a86ff48 tests: Avoid deprecated QUnit.push() Bug: T170136 Change-Id: I50c45fc9826a21810ebd4f4fed5f7b0acb341d13 --- M lib/ve 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/23/365423/1 diff --git a/lib/ve b/lib/ve index c9b0d1a..a0a86ff 16 --- a/lib/ve +++ b/lib/ve @@ -1 +1 @@ -Subproject commit c9b0d1a232fa8ab7d160c2e88691799252a56853 +Subproject commit a0a86ff48ec98003731ad10229412e2b97bdea21 -- To view, visit https://gerrit.wikimedia.org/r/365423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50c45fc9826a21810ebd4f4fed5f7b0acb341d13 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...RelatedArticles[master]: Add limit via ResourceLoaderGetConfigVars
Jdlrobson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365420 ) Change subject: Add limit via ResourceLoaderGetConfigVars .. Add limit via ResourceLoaderGetConfigVars Using MakeGlobalVariablesScript hook will add config variables to the HTML meaning cached HTML will not be able to access it leaving it as undefined. This will mess up any existing caching. Additional changes: Because I'm paranoid, make sure that value is never undefined. Bug: T170648 Change-Id: Icb8e34104c57b1e69b7e035ef89d5b4c3371132f --- M includes/FooterHooks.php M resources/ext.relatedArticles.readMore.bootstrap/index.js 2 files changed, 10 insertions(+), 8 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php index 5023122..9e9185d 100644 --- a/includes/FooterHooks.php +++ b/includes/FooterHooks.php @@ -28,13 +28,6 @@ ->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' ); @@ -169,6 +162,14 @@ $config->get( 'RelatedArticlesLoggingBucketSize' ); $vars['wgRelatedArticlesEnabledBucketSize'] = $config->get( 'RelatedArticlesEnabledBucketSize' ); + + $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.' + ); + } return true; } diff --git a/resources/ext.relatedArticles.readMore.bootstrap/index.js b/resources/ext.relatedArticles.readMore.bootstrap/index.js index 297d75a..3c1c81e 100644 --- a/resources/ext.relatedArticles.readMore.bootstrap/index.js +++ b/resources/ext.relatedArticles.readMore.bootstrap/index.js @@ -7,7 +7,8 @@ mw.config.get( 'wgRelatedArticlesUseCirrusSearch' ), mw.config.get( 'wgRelatedArticlesOnlyUseCirrusSearch' ) ), - LIMIT = mw.config.get( 'wgRelatedArticlesCardLimit' ), + // Make sure this is never undefined as I'm paranoid + LIMIT = mw.config.get( 'wgRelatedArticlesCardLimit', 3 ), debouncedLoad = $.debounce( 100, function () { loadRelatedArticles(); // eslint-disable-line } ), -- To view, visit https://gerrit.wikimedia.org/r/365420 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb8e34104c57b1e69b7e035ef89d5b4c3371132f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: EBernhardson Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Niedzielski 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]: Hygiene: Remove unnecessary variable
Jdlrobson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365417 ) Change subject: Hygiene: Remove unnecessary variable .. Hygiene: Remove unnecessary variable Improves readability... Change-Id: Ib0e9cbc083e6c0a384c81815b470063698e0595f --- M resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Jdlrobson: Verified; Looks good to me, approved diff --git a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js index ba49682..5bb8b16 100644 --- a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js +++ b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js @@ -63,8 +63,7 @@ * @return {jQuery.Promise} */ RelatedPagesGateway.prototype.getForCurrentPage = function ( limit ) { - var apiLimit, - parameters = { + var parameters = { action: 'query', formatversion: 2, prop: 'pageimages|pageterms', @@ -81,13 +80,12 @@ parameters.titles = relatedPages; } else if ( this.useCirrusSearch ) { - apiLimit = limit; - parameters.pilimit = apiLimit; + parameters.pilimit = limit; parameters.generator = 'search'; parameters.gsrsearch = 'morelike:' + this.currentPage; parameters.gsrnamespace = '0'; - parameters.gsrlimit = apiLimit; + parameters.gsrlimit = limit; parameters.gsrqiprofile = 'classic_noboostlinks'; // Currently, if you're logged in, then the API uses your language by default ard so responses -- To view, visit https://gerrit.wikimedia.org/r/365417 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0e9cbc083e6c0a384c81815b470063698e0595f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Niedzielski 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...MinervaNeue[master]: Hygiene: Remove and update references to MobileFrontend
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365422 ) Change subject: Hygiene: Remove and update references to MobileFrontend .. Hygiene: Remove and update references to MobileFrontend Changes: * namespace tests to MinervaNeue * Update docs * Update browser test artifacts * Update comments Change-Id: I83432b3f7f0bcd07ed08259972b8ff89147104b6 --- M includes/Minerva.hooks.php M tests/browser/README.mediawiki M tests/browser/features/step_definitions/common_steps.rb M tests/browser/features/step_definitions/create_page_api_steps.rb M tests/phpunit/MenuBuilderTest.php M tests/phpunit/skins/SkinMinervaPageActionsTest.php M tests/phpunit/skins/SkinMinervaTest.php M tests/phpunit/skins/SkinUserPageHelperTest.php 8 files changed, 16 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/22/365422/1 diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php index dcb2894..804ee13 100644 --- a/includes/Minerva.hooks.php +++ b/includes/Minerva.hooks.php @@ -5,8 +5,6 @@ /** * Hook handlers for Minerva skin. - * Hooks specific to all skins running in mobile mode should belong in - * MobileFrontend.hooks.php * * Hook handler method names should be in the form of: * on() @@ -66,7 +64,7 @@ 'skins.minerva.notifications.badge' ], 'localBasePath' => dirname( __DIR__ ), - 'remoteExtPath' => 'MobileFrontend', + 'remoteExtPath' => 'MinervaNeue', 'targets' => [ 'mobile', 'desktop' ], 'scripts' => [ 'tests/qunit/skins.minerva.notifications.badge/test_NotificationBadge.js' diff --git a/tests/browser/README.mediawiki b/tests/browser/README.mediawiki index 4c8af26..8874a78 100644 --- a/tests/browser/README.mediawiki +++ b/tests/browser/README.mediawiki @@ -7,7 +7,7 @@ Note including this in a production instance is not advised given it fiddles with permissions. -include_once "$IP/extensions/MobileFrontend/tests/browser/LocalSettings.php"; +include_once "$IP/skins/MinervaNeue/tests/browser/LocalSettings.php"; Further tweaks may be necessary to run tests that are not tagged @integration: @@ -18,11 +18,6 @@ * Create an account and store the username in MEDIAWIKI_USER which has ** an edit count of greater than 0 ** Ensure user has bureaucrat and admin rights (set via Special:UserRights) - -= MobileFrontend Extension = - -For general information about MobileFrontend Extension please see -README.mediawiki file in the root of the repository. Selenium tests @@ -58,9 +53,9 @@ the MEDIAWIKI_API_URL environment variable, e.g. export MEDIAWIKI_API_URL=http://en.wikipedia.beta.wmflabs.org/w/api.php -Run the tests from the MobileFrontend directory with: +Run the tests from the Minerva directory with: - make cucumber + bundle exec cucumber tests/browser/features If you want to run a single set of tests, go to the tests/browser directory and call 'bundle exec cucumber' with the path to the test file. For example, to run diff --git a/tests/browser/features/step_definitions/common_steps.rb b/tests/browser/features/step_definitions/common_steps.rb index a27d3fc..5139e54 100644 --- a/tests/browser/features/step_definitions/common_steps.rb +++ b/tests/browser/features/step_definitions/common_steps.rb @@ -62,7 +62,7 @@ end Given(/^the "(.*?)" page is protected\.$/) do |page| - api.protect_page(page, 'MobileFrontend Selenium test protected this page') + api.protect_page(page, 'MinervaNeue Selenium test protected this page') end When(/^I click the browser back button$/) do diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb b/tests/browser/features/step_definitions/create_page_api_steps.rb index 2cbb858..7faf837 100644 --- a/tests/browser/features/step_definitions/create_page_api_steps.rb +++ b/tests/browser/features/step_definitions/create_page_api_steps.rb @@ -1,6 +1,6 @@ # export MEDIAWIKI_API_URL = http://en.wikipedia.beta.wmflabs.org/w/api.php Given(/^I go to a page that has references$/) do - wikitext = "MobileFrontend is a MediaWiki extension. + wikitext = "MinervaNeue is a MediaWiki skin. {{#tag:ref|This is a note.This is a nested ref.|group=note}} ==Notes== diff --git a/tests/phpunit/MenuBuilderTest.php b/tests/phpunit/MenuBuilderTest.php index da6430c..dc9b07c 100644 --- a/tests/phpunit/MenuBuilderTest.php +++ b/tests/phpunit/MenuBuilderTest.php @@ -6,7 +6,7 @@ use MediaWiki\Minerva\MenuEntry; /** - * @group MobileFrontend + * @group MinervaNeue */ class MenuTest extends \PHPUnit_Framework_TestCase { private $homeComponent = [ diff --git a/tests/phpunit/skins/SkinMinervaPageActionsTest.php b/tests/phpunit/skins/SkinMinervaPageActionsTest.php index
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: tests: Avoid deprecated QUnit.push()
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365038 ) Change subject: tests: Avoid deprecated QUnit.push() .. tests: Avoid deprecated QUnit.push() Bug: T170585 Change-Id: I1605f0f3035cc5861fd9d1ea52f00fbd32f00d58 --- M tests/ve.qunit.js 1 file changed, 60 insertions(+), 18 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/ve.qunit.js b/tests/ve.qunit.js index 4bb3f0e..12697b3 100644 --- a/tests/ve.qunit.js +++ b/tests/ve.qunit.js @@ -142,9 +142,12 @@ } actualSummary = getNodeTreeSummary( actual, shallow ); expectedSummary = getNodeTreeSummary( expected, shallow ); - QUnit.push( - QUnit.equiv( actualSummary, expectedSummary ), actualSummary, expectedSummary, message - ); + this.pushResult( { + result: QUnit.equiv( actualSummary, expectedSummary ), + actual: actualSummary, + expected: expectedSummary, + message: message + } ); }; /** @@ -161,15 +164,21 @@ for ( i = 0; i < actual.length; i++ ) { if ( expected[ i ] && expected[ i ].node !== actual[ i ].node ) { - QUnit.push( false, actualSummary, expectedSummary, - message + ' (reference equality for selection[' + i + '].node)' - ); + this.pushResult( { + result: false, + actual: actualSummary, + expected: expectedSummary, + message: message + ' (reference equality for selection[' + i + '].node)' + } ); return; } } - QUnit.push( - QUnit.equiv( actualSummary, expectedSummary ), actualSummary, expectedSummary, message - ); + this.pushResult( { + result: QUnit.equiv( actualSummary, expectedSummary ), + actual: actualSummary, + expected: expectedSummary, + message: message + } ); }; /** @@ -185,9 +194,12 @@ actualSummaryHtml = ve.getDomElementSummary( actual, true ), expectedSummaryHtml = ve.getDomElementSummary( expected, true ); - QUnit.push( - QUnit.equiv( actualSummary, expectedSummary ), actualSummaryHtml, expectedSummaryHtml, message - ); + this.pushResult( { + result: QUnit.equiv( actualSummary, expectedSummary ), + actual: actualSummaryHtml, + expected: expectedSummaryHtml, + message: message + } ); }; QUnit.assert.equalLinearData = function ( actual, expected, message ) { @@ -205,7 +217,12 @@ actual = ve.copy( actual, null, removeOriginalDomElements ); expected = ve.copy( expected, null, removeOriginalDomElements ); - QUnit.push( QUnit.equiv( actual, expected ), actual, expected, message ); + this.pushResult( { + result: QUnit.equiv( actual, expected ), + actual: actual, + expected: expected, + message: message + } ); }; QUnit.assert.equalLinearDataWithDom = function ( store, actual, expected, message ) { @@ -221,7 +238,12 @@ actual = ve.copy( actual, ve.convertDomElements, addOriginalDomElements ); expected = ve.copy( expected, ve.convertDomElements, addOriginalDomElements ); - QUnit.push( QUnit.equiv( actual, expected ), actual, expected, message ); + this.pushResult( { + result: QUnit.equiv( actual, expected ), + actual: actual, + expected: expected, + message: message + } ); }; /** @@ -238,7 +260,12 @@ actual = ve.copy( actual, ve.convertDomElements ); expected = ve.copy( expected, ve.convertDomElements ); - QUnit.push( QUnit.equiv( actual, expected ), actual, expected, message ); + this.pushResult( { + result: QUnit.equiv( actual, expected ), + actual: actual, + expected: expected, + message: message +
[MediaWiki-commits] [Gerrit] mediawiki/event-schemas[master]: Fix up tests and adapt schemas.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364809 ) Change subject: Fix up tests and adapt schemas. .. Fix up tests and adapt schemas. We have tests that verify that all the schemas contain some common properties for their specific type of schema. The tests were broken, now they are fixed and the schemas are adapted to pass the tests. Change-Id: If432630d3e013fac5ed8dc2da45b045055725a98 --- M jsonschema/mediawiki/job/1.yaml M test/jsonschema/index.js D test/jsonschema/mediawiki/mediawiki_common_schema.yaml M test/jsonschema/mediawiki/page/page_common_schema.yaml M test/jsonschema/mediawiki/revision/revision_common_schema.yaml M test/jsonschema/mediawiki/user/user_common_schema.yaml 6 files changed, 106 insertions(+), 48 deletions(-) Approvals: Mobrovac: Looks good to me, approved Ottomata: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/jsonschema/mediawiki/job/1.yaml b/jsonschema/mediawiki/job/1.yaml index 4e375f5..630df4a 100644 --- a/jsonschema/mediawiki/job/1.yaml +++ b/jsonschema/mediawiki/job/1.yaml @@ -44,6 +44,10 @@ - dt - domain + database: +description: The name of the wiki database this event belongs to. +type: string + type: description: type of the job type: string @@ -87,6 +91,7 @@ required: - meta + - database - type - page_namespace - page_title \ No newline at end of file diff --git a/test/jsonschema/index.js b/test/jsonschema/index.js index 4b33a85..c3d1e07 100644 --- a/test/jsonschema/index.js +++ b/test/jsonschema/index.js @@ -35,12 +35,7 @@ // Go recursively return Object.keys(example) .filter((key) => key !== 'title' && key !== 'description') -.forEach((key) => { -if (example.required.indexOf(key) !== -1 -|| schema.required.indexOf(key) !== -1) { -assert.isSuperSchema(schema[key], example[key], path + '.' + key) -} -}); +.forEach((key) => assert.isSuperSchema(schema[key], example[key], path + '.' + key)); } else if (schema !== example) { throw new assert.AssertionError({ message: `Error at path: ${path}`, diff --git a/test/jsonschema/mediawiki/mediawiki_common_schema.yaml b/test/jsonschema/mediawiki/mediawiki_common_schema.yaml deleted file mode 100644 index 9813e5c..000 --- a/test/jsonschema/mediawiki/mediawiki_common_schema.yaml +++ /dev/null @@ -1,41 +0,0 @@ -title: Mediawiki Common Schema -description: Used to validate that all mediawiki events have common properties -$schema: http://json-schema.org/draft-04/schema# -type: object -properties: - ### Mediawiki entity fields. All Mediawiki entity events should have these. - database: -type: string - - performer: -type: object -properties: - user_id: -type: integer - user_text: -type: string - user_groups: -type: array -items: - type: string - user_is_bot: -type: boolean - user_registration_dt: -description: > - The datetime of the user account registration. - Not present for anonymous users or if missing in the MW database. -type: string -format: date-time - user_edit_count: -description: > - The number of edits this user has made at the time this revision is created. - Not present for anonymous users. -type: integer -minimum: 0 -required: - - user_text - - user_groups - - user_is_bot - -required: - - database diff --git a/test/jsonschema/mediawiki/page/page_common_schema.yaml b/test/jsonschema/mediawiki/page/page_common_schema.yaml index 0ce9d70..ae5f6eb 100644 --- a/test/jsonschema/mediawiki/page/page_common_schema.yaml +++ b/test/jsonschema/mediawiki/page/page_common_schema.yaml @@ -3,9 +3,42 @@ $schema: http://json-schema.org/draft-04/schema# type: object properties: + database: +type: string + + performer: +type: object +properties: + user_id: +type: integer + user_text: +type: string + user_groups: +type: array +items: + type: string + user_is_bot: +type: boolean + user_registration_dt: +description: > + The datetime of the user account registration. + Not present for anonymous users or if missing in the MW database. +type: string +format: date-time + user_edit_count: +description: > + The number of edits this user has made at the time this revision is created. + Not present for anonymous users. +type: integer +minimum: 0 +required: + - user_text + - user_groups + - user_is_bot + page_id: type: integer -minimum: 1 +# minimum: 1 It's different for the
[MediaWiki-commits] [Gerrit] mediawiki...Material[master]: Load ResourceLoader modules correctly
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365421 ) Change subject: Load ResourceLoader modules correctly .. Load ResourceLoader modules correctly Also remove some WIP stylesheets, which is currently the motion, print, and icon stylesheets. Change-Id: I044b0eb56ed60069a86bed5c1439aefd6970798f --- M Material.skin.php M skin.json 2 files changed, 3 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Material refs/changes/21/365421/1 diff --git a/Material.skin.php b/Material.skin.php index 9d002c8..89f8513 100644 --- a/Material.skin.php +++ b/Material.skin.php @@ -35,7 +35,8 @@ parent::setupSkinUserCss( $out ); $out->addModuleStyles( array( 'mediawiki.skinning.interface', - 'skins.material' + 'skins.material.base', + 'skins.material.components' ) ); } } diff --git a/skin.json b/skin.json index 0ffd99b..64d2ebd 100644 --- a/skin.json +++ b/skin.json @@ -1,7 +1,7 @@ { "name": "Material", "namemsg": "skinname-material", - "version": "1.3.5", + "version": "1.4.0", "author": [ "[https://mediawiki.org/wiki/User:SamanthaNguyen SamanthaNguyen]", "[https://mediawiki.org/wiki/User:MtMNC MtMNC]", @@ -32,12 +32,6 @@ "remoteSkinPath": "Material" }, "ResourceModules": { - "skins.material": { - "dependencies": [ - "skins.material.components", - "skins.material.base" - ] - }, "skins.material.components": { "styles": { "material/styles/components/md-ui.components.datatable.less": { @@ -59,16 +53,7 @@ }, "skins.material.base": { "styles": { - "material/styles/base/md-ui.base.print.less": { - "media": "print" - }, "material/styles/base/md-ui.base.colors.less": { - "media": "screen" - }, - "material/styles/base/md-ui.base.icons.less": { - "media": "screen" - }, - "material/styles/base/md-ui.base.motion.less": { "media": "screen" }, "material/styles/base/md-ui.base.variables.less": { -- To view, visit https://gerrit.wikimedia.org/r/365421 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I044b0eb56ed60069a86bed5c1439aefd6970798f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Material Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Fix DB timeout from API queries without project specified
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365177 ) Change subject: Fix DB timeout from API queries without project specified .. Fix DB timeout from API queries without project specified Bug: T170638 Change-Id: I2c878f173b7f9ec353750b70ed1b19df019a47d9 --- M api/ApiQueryProjectPages.php M i18n/en.json 2 files changed, 8 insertions(+), 7 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiQueryProjectPages.php b/api/ApiQueryProjectPages.php index b903cb4..dc0c4e5 100644 --- a/api/ApiQueryProjectPages.php +++ b/api/ApiQueryProjectPages.php @@ -42,8 +42,8 @@ $this->buildDbQuery( $params, $resultPageSet ); - // If matching projects were found, or no specific projects were requested, run the query. - if ( $this->projectIds || !$params['projects'] ) { + // If matching projects were found, run the query. + if ( $this->projectIds ) { $db_res = $this->select( __METHOD__ ); // Otherwise, just set the result to an empty array (still works with foreach). } else { @@ -157,8 +157,8 @@ $this->handleQueryContinuation( $params['continue'] ); } - // If more than 1 project is requested (or all projects), order by project first. - if ( count( $this->projectIds ) !== 1 ) { + // If more than 1 project is requested, order by project first. + if ( count( $this->projectIds ) > 1 ) { $this->addOption( 'ORDER BY', 'pa_project_id, pa_page_id' ); } else { $this->addOption( 'ORDER BY', 'pa_page_id' ); @@ -205,7 +205,8 @@ ApiBase::PARAM_TYPE => 'boolean', ], 'projects' => [ - ApiBase::PARAM_ISMULTI => true + ApiBase::PARAM_ISMULTI => true, + ApiBase::PARAM_REQUIRED => true, ], 'limit' => [ ApiBase::PARAM_DFLT => '10', @@ -222,7 +223,7 @@ public function getExamplesMessages() { return [ - 'action=query=projectpages' + 'action=query=projectpages=Medicine|Anatomy' => 'apihelp-query+projectpages-example-simple-1', 'action=query=projectpages=Medicine=true' => 'apihelp-query+projectpages-example-simple-2', diff --git a/i18n/en.json b/i18n/en.json index d5594e3..209877e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -18,7 +18,7 @@ "apihelp-query+projectpages-param-assessments": "Also return assessments for the pages returned.", "apihelp-query+projectpages-param-projects": "The projects to list pages for. If this parameter is omitted, all projects will be included.", "apihelp-query+projectpages-param-limit": "The maximum number of pages to return.", - "apihelp-query+projectpages-example-simple-1": "Get first 10 pages associated with any WikiProject.", + "apihelp-query+projectpages-example-simple-1": "Get first 10 pages associated with WikiProject Medicine or WikiProject Anatomy.", "apihelp-query+projectpages-example-simple-2": "Get first 10 pages associated with WikiProject Medicine, including assessment data.", "apihelp-query+projectpages-example-generator": "Get page info for first 10 pages associated with WikiProject Textile Arts.", "apihelp-query+projects-description": "List all the projects.", -- To view, visit https://gerrit.wikimedia.org/r/365177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c878f173b7f9ec353750b70ed1b19df019a47d9 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/PageAssessments Gerrit-Branch: master Gerrit-Owner: KaldariGerrit-Reviewer: MaxSem 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] mediawiki...RelatedArticles[master]: Add limit via ResourceLoaderGetConfigVars
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365420 ) Change subject: Add limit via ResourceLoaderGetConfigVars .. Add limit via ResourceLoaderGetConfigVars Using MakeGlobalVariablesScript hook will add config variables to the HTML meaning cached HTML will not be able to access it leaving it as undefined. This will mess up any existing caching. Additional changes: Because I'm paranoid, make sure that value is never undefined. Bug: T170648 Change-Id: Icb8e34104c57b1e69b7e035ef89d5b4c3371132f --- M includes/FooterHooks.php M resources/ext.relatedArticles.readMore.bootstrap/index.js 2 files changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles refs/changes/20/365420/1 diff --git a/includes/FooterHooks.php b/includes/FooterHooks.php index 5023122..9e9185d 100644 --- a/includes/FooterHooks.php +++ b/includes/FooterHooks.php @@ -28,13 +28,6 @@ ->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' ); @@ -169,6 +162,14 @@ $config->get( 'RelatedArticlesLoggingBucketSize' ); $vars['wgRelatedArticlesEnabledBucketSize'] = $config->get( 'RelatedArticlesEnabledBucketSize' ); + + $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.' + ); + } return true; } diff --git a/resources/ext.relatedArticles.readMore.bootstrap/index.js b/resources/ext.relatedArticles.readMore.bootstrap/index.js index 297d75a..3c1c81e 100644 --- a/resources/ext.relatedArticles.readMore.bootstrap/index.js +++ b/resources/ext.relatedArticles.readMore.bootstrap/index.js @@ -7,7 +7,8 @@ mw.config.get( 'wgRelatedArticlesUseCirrusSearch' ), mw.config.get( 'wgRelatedArticlesOnlyUseCirrusSearch' ) ), - LIMIT = mw.config.get( 'wgRelatedArticlesCardLimit' ), + // Make sure this is never undefined as I'm paranoid + LIMIT = mw.config.get( 'wgRelatedArticlesCardLimit', 3 ), debouncedLoad = $.debounce( 100, function () { loadRelatedArticles(); // eslint-disable-line } ), -- To view, visit https://gerrit.wikimedia.org/r/365420 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb8e34104c57b1e69b7e035ef89d5b4c3371132f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles 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...CheckUser[master]: Replace deprecated User::makeGroupLinkHTML with the alternat...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365250 ) Change subject: Replace deprecated User::makeGroupLinkHTML with the alternative method from UserGroupMembership class .. Replace deprecated User::makeGroupLinkHTML with the alternative method from UserGroupMembership class Bug: T170675 Change-Id: I53a741b270ba34f05edd05fd27512515e05e7e90 --- M specials/SpecialCheckUser.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: TTO: Looks good to me, approved jenkins-bot: Verified Martineznovo: Looks good to me, but someone else must approve diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php index ea1c84b..952f23e 100644 --- a/specials/SpecialCheckUser.php +++ b/specials/SpecialCheckUser.php @@ -1509,8 +1509,8 @@ protected static function buildGroupLink( $group, $username ) { static $cache = []; if ( !isset( $cache[$group] ) ) { - $cache[$group] = User::makeGroupLinkHTML( - $group, User::getGroupMember( $group, $username ) + $cache[$group] = UserGroupMembership::getLink( + $group, RequestContext::getMain(), 'html' ); } return $cache[$group]; -- To view, visit https://gerrit.wikimedia.org/r/365250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53a741b270ba34f05edd05fd27512515e05e7e90 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: HujiGerrit-Reviewer: Anomie Gerrit-Reviewer: Martineznovo Gerrit-Reviewer: Reedy Gerrit-Reviewer: TTO Gerrit-Reviewer: VolkerE 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]: Remove temporary hole in abstractions
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365419 ) Change subject: Remove temporary hole in abstractions .. Remove temporary hole in abstractions Was introduced temprarily to facilitate event logging, now the only caller is gone. Bug: T166247 Change-Id: I0f9cdccc6b3a566d9f7ebf02515f724348205071 --- M includes/user/User.php 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/19/365419/1 diff --git a/includes/user/User.php b/includes/user/User.php index a1119fa..7bf6be5 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -305,12 +305,6 @@ /** @var integer User::READ_* constant bitfield used to load data */ protected $queryFlagsUsed = self::READ_NORMAL; - /** @var string Indicates type of block (used for eventlogging) -* Permitted values: 'cookie-block', 'proxy-block', 'openproxy-block', 'xff-block', -* 'config-block' -*/ - public $blockTrigger = false; - public static $idCacheByName = []; /** @@ -1676,7 +1670,6 @@ 'address' => $ip, 'systemBlock' => 'proxy', ] ); - $this->blockTrigger = 'proxy-block'; } elseif ( $this->isAnon() && $this->isDnsBlacklisted( $ip ) ) { $block = new Block( [ 'byText' => wfMessage( 'sorbs' )->text(), @@ -1684,7 +1677,6 @@ 'address' => $ip, 'systemBlock' => 'dnsbl', ] ); - $this->blockTrigger = 'openproxy-block'; } } @@ -1703,7 +1695,6 @@ # Mangle the reason to alert the user that the block # originated from matching the X-Forwarded-For header. $block->mReason = wfMessage( 'xffblockreason', $block->mReason )->text(); - $this->blockTrigger = 'xff-block'; } } @@ -1719,7 +1710,6 @@ 'anonOnly' => true, 'systemBlock' => 'wgSoftBlockRanges', ] ); - $this->blockTrigger = 'config-block'; } if ( $block instanceof Block ) { @@ -1733,7 +1723,6 @@ $this->mBlockedby = ''; $this->mHideName = 0; $this->mAllowUsertalk = false; - $this->blockTrigger = false; } // Avoid PHP 7.1 warning of passing $this by reference @@ -1766,7 +1755,6 @@ $useBlockCookie = ( $config->get( 'CookieSetOnAutoblock' ) === true ); if ( $blockIsValid && $useBlockCookie ) { // Use the block. - $this->blockTrigger = 'cookie-block'; return $tmpBlock; } else { // If the block is not valid, remove the cookie. -- To view, visit https://gerrit.wikimedia.org/r/365419 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f9cdccc6b3a566d9f7ebf02515f724348205071 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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...WikimediaEvents[master]: Remove temporary cookie block logging
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365414 ) Change subject: Remove temporary cookie block logging .. Remove temporary cookie block logging Bug: T166247 Change-Id: Ib34819194a6a0fdc5e17b024e3099eacbd075074 --- M WikimediaEventsHooks.php M extension.json 2 files changed, 0 insertions(+), 24 deletions(-) Approvals: jenkins-bot: Verified Kaldari: Looks good to me, approved diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index 58b700b..d9fe8cf 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -634,27 +634,6 @@ } /** -* Called when User::getBlockedStatus() has been set -* -* @param $user User object -*/ - public static function onGetBlockedStatus( $user ) { - $blocked = $user->mBlock instanceof Block; - $rc = RequestContext::getMain(); - $request = $rc->getRequest(); - $isCookieSetOnAutoblock = $rc->getConfig()->get( 'CookieSetOnAutoblock' ); - $blockCookieVal = $request->getCookie( 'BlockID' ); - $trigger = $user->blockTrigger; - if ( $isCookieSetOnAutoblock && $blockCookieVal > 0 && $blocked ) { - $logData = [ - 'ip' => $request->getIP(), - 'is_cookie_block' => $trigger === 'cookie-block' - ]; - EventLogging::logEvent( 'CookieBlock', 16241436, $logData ); - } - } - - /** * In summer 2017 WMDE will run a banner campaign with a GuidedTour to encourage users to * create an account and edit. * The banner campaign will link to one of 2 pages (see examples) diff --git a/extension.json b/extension.json index 00e9134..c9e5bf6 100644 --- a/extension.json +++ b/extension.json @@ -76,9 +76,6 @@ ], "ChangesListSpecialPageStructuredFilters": [ "WikimediaEventsHooks::onChangesListSpecialPageStructuredFilters" - ], - "GetBlockedStatus": [ - "WikimediaEventsHooks::onGetBlockedStatus" ] }, "MessagesDirs": { -- To view, visit https://gerrit.wikimedia.org/r/365414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib34819194a6a0fdc5e17b024e3099eacbd075074 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: Kaldari 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/vagrant[master]: Puppet: Downgrade npm to version 2
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364929 ) Change subject: Puppet: Downgrade npm to version 2 .. Puppet: Downgrade npm to version 2 After we've upgraded node.js in Vagrant to version 6, it brought us npm version 3. However, version 3 has a weird bug that doesn't allow properly installing dependencies with --no-bin-links. I couldn't find a workaround for the bug or any reference that it's been addressed in version 3, so let's stick with version 2 for now. Also, we don't need nodejs-legacy ane more or older legacy npm to be installed, so deleted puppet that used to install them. Bug: T162468 Change-Id: I0c9c2573c0b2163976f8541fa86637f8a99149d4 --- M puppet/modules/npm/manifests/init.pp 1 file changed, 11 insertions(+), 14 deletions(-) Approvals: Mobrovac: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/npm/manifests/init.pp b/puppet/modules/npm/manifests/init.pp index ef02ea8..dde3fdd 100644 --- a/puppet/modules/npm/manifests/init.pp +++ b/puppet/modules/npm/manifests/init.pp @@ -26,20 +26,6 @@ priority => 1010, } -# Install the npm and nodejs-legacy packages manually -# before the nodesource repo has been added so as not to -# conflict for package versions -exec { 'ins-npm-nodejs-legacy': -command => '/usr/bin/apt-get update && /usr/bin/apt-get install -y --force-yes npm nodejs-legacy', -environment => 'DEBIAN_FRONTEND=noninteractive', -unless => '/usr/bin/dpkg -l npm && /usr/bin/dpkg -l nodejs-legacy', -user=> 'root', -before => [ -Apt::Repository['nodesource'], -Apt::Pin['nodejs'], -], -} - package { 'nodejs': ensure => latest, require => [ @@ -55,6 +41,17 @@ group => 'root', } +# Node 6 brings in npm 3 that doesn't work in shared folders due to a bug. +# See: https://github.com/npm/npm/issues/9953 +# Although the ticket is closed, the issue is still present, so downgrade to npm 2 +exec { 'downgrade_npm': + command => '/usr/bin/npm install -g npm@latest-2', + user=> 'root', + require => [ + Package['nodejs'], + ], +} + env::var { 'NPM_CONFIG_CACHE': value => $cache_dir, require => Exec['npm_set_cache_dir'], -- To view, visit https://gerrit.wikimedia.org/r/364929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c9c2573c0b2163976f8541fa86637f8a99149d4 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: PpchelkoGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: GWicke Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ppchelko 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[wmf/1.30.0-wmf.9]: Revert "Revert "Fixups prior to Minerva/MobileFrontend separ...
Hello Thcipriani, Chad, Niedzielski, jenkins-bot, Siebrand, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/365418 to review the following change. Change subject: Revert "Revert "Fixups prior to Minerva/MobileFrontend separation"" .. Revert "Revert "Fixups prior to Minerva/MobileFrontend separation"" This can be safely merged after Minerva has been enabled. This reverts commit 177d29eec54c3c1d7d96593fddea2d7d4522f959. Change-Id: Ia8959330948a58faa1f81d7639d7a17d0fbc377f --- M extension.json M i18n/en.json M i18n/qqq.json M jsduck.json M resources/skins.minerva.talk/init.js 5 files changed, 13 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/18/365418/1 diff --git a/extension.json b/extension.json index 95c150e..77901e6 100644 --- a/extension.json +++ b/extension.json @@ -504,11 +504,17 @@ "mobile-frontend-overlay-continue", "mobile-frontend-last-modified-with-user-seconds", "mobile-frontend-last-modified-with-user-minutes", - "mobile-frontend-last-modified-with-user-hours", "mobile-frontend-last-modified-with-user-days", "mobile-frontend-last-modified-with-user-months", "mobile-frontend-last-modified-with-user-years", "mobile-frontend-last-modified-with-user-just-now", + "mobile-frontend-joined-just-now", + "mobile-frontend-joined-seconds", + "mobile-frontend-joined-minutes", + "mobile-frontend-joined-hours", + "mobile-frontend-joined-days", + "mobile-frontend-joined-months", + "mobile-frontend-joined-years", "mobile-frontend-loading-message", "mobile-frontend-editor-licensing", "mobile-frontend-editor-licensing-with-terms", @@ -908,7 +914,6 @@ "desktop" ], "dependencies": [ - "skins.minerva.icons.images.variants", "mobile.startup" ], "styles": [ @@ -1358,20 +1363,6 @@ "mobile-frontend-meta-data-issues-header", "mobile-frontend-meta-data-issues-header-talk", "mobile-frontend-languages-not-available", - "mobile-frontend-last-modified-with-user-seconds", - "mobile-frontend-last-modified-with-user-minutes", - "mobile-frontend-last-modified-with-user-hours", - "mobile-frontend-last-modified-with-user-days", - "mobile-frontend-last-modified-with-user-months", - "mobile-frontend-last-modified-with-user-years", - "mobile-frontend-last-modified-with-user-just-now", - "mobile-frontend-joined-just-now", - "mobile-frontend-joined-seconds", - "mobile-frontend-joined-minutes", - "mobile-frontend-joined-hours", - "mobile-frontend-joined-days", - "mobile-frontend-joined-months", - "mobile-frontend-joined-years", "mobile-frontend-cookies-required", "mobile-frontend-console-recruit", "mobile-frontend-redirected-from" @@ -1519,13 +1510,14 @@ "resources/skins.minerva.talk/init.js" ], "messages": [ - "mobile-frontend-talk-add-overlay-submit" + "minerva-talk-add-topic" ] }, "skins.minerva.toggling": { "class": "MFResourceLoaderParsedMessageModule", "dependencies": [ "mobile.toggle", + "skins.minerva.icons.images.variants", "skins.minerva.scripts" ], "scripts": [ @@ -1544,14 +1536,6 @@ ], "scripts": [
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Compilations: integrate with Search.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364588 ) Change subject: Compilations: integrate with Search. .. Compilations: integrate with Search. This enables the Search bar to fetch results (transparently) from a compilation when offline. Change-Id: Ieb0aa92cb85f08c32cf032096fcfb95de60ebd04 --- M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java 1 file changed, 28 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java b/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java index 27fdca5..53f3ae6 100644 --- a/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java +++ b/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java @@ -25,9 +25,12 @@ import org.wikipedia.analytics.SearchFunnel; import org.wikipedia.dataclient.mwapi.MwQueryResponse; import org.wikipedia.history.HistoryEntry; +import org.wikipedia.offline.OfflineManager; import org.wikipedia.page.PageTitle; import org.wikipedia.readinglist.AddToReadingListDialog; +import org.wikipedia.util.DeviceUtil; import org.wikipedia.util.StringUtil; +import org.wikipedia.util.log.L; import org.wikipedia.views.GoneIfEmptyTextView; import org.wikipedia.views.ViewUtil; import org.wikipedia.views.WikiErrorView; @@ -202,9 +205,32 @@ return true; } final String mySearchTerm = (String) msg.obj; -doTitlePrefixSearch(mySearchTerm); +if (!DeviceUtil.isOnline() && OfflineManager.hasCompilation()) { +doOfflineSearch(mySearchTerm); +} else { +doTitlePrefixSearch(mySearchTerm); +} return true; } +} + +private void doOfflineSearch(final String searchTerm) { +searchSuggestion.setVisibility(View.GONE); +searchErrorView.setVisibility(View.GONE); +updateProgressBar(false); + +List resultList = new ArrayList<>(); +try { +List results = OfflineManager.instance().searchByPrefix(searchTerm, BATCH_SIZE); +for (String title : results) { +resultList.add(new SearchResult(new PageTitle(title, app.getWikiSite(; +} +} catch (IOException e) { +L.d(e); +} + +clearResults(); +displayResults(resultList); } private void doTitlePrefixSearch(final String searchTerm) { @@ -494,7 +520,7 @@ // ...and lastly, if we've scrolled to the last item in the list, then // continue searching! -if (position == (totalResults.size() - 1)) { +if (position == (totalResults.size() - 1) && DeviceUtil.isOnline()) { if (lastFullTextResults == null) { // the first full text search doFullTextSearch(currentSearchTerm, null, false); -- To view, visit https://gerrit.wikimedia.org/r/364588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb0aa92cb85f08c32cf032096fcfb95de60ebd04 Gerrit-PatchSet: 4 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: DbrantGerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Compilations: integrate with Random feed card.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364577 ) Change subject: Compilations: integrate with Random feed card. .. Compilations: integrate with Random feed card. This will transparently load a random page from a compilation (if the user is offline), and then fall back to loading a random page from a reading list, as before. Sadly, this does not use an interceptor... it simply wouldn't be a savings of complexity. Bug: T163706 Change-Id: I942f8b54b7da4a225f54568d7cf9b87bf525bae6 --- M app/src/main/java/org/wikipedia/feed/random/RandomCardView.java 1 file changed, 23 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java b/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java index 8bd26ef..0edaf5b 100644 --- a/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java +++ b/app/src/main/java/org/wikipedia/feed/random/RandomCardView.java @@ -10,10 +10,13 @@ import org.wikipedia.dataclient.restbase.page.RbPageSummary; import org.wikipedia.feed.view.StaticCardView; import org.wikipedia.history.HistoryEntry; +import org.wikipedia.offline.OfflineManager; import org.wikipedia.page.PageTitle; import org.wikipedia.random.RandomSummaryClient; import org.wikipedia.readinglist.page.database.ReadingListPageDao; import org.wikipedia.util.log.L; + +import java.io.IOException; import retrofit2.Call; @@ -42,7 +45,7 @@ public void getRandomPage() { if (getCallback() != null && getCard() != null) { setProgress(true); -new RandomSummaryClient().request(getCard().wikiSite(), new RandomSummaryClient.Callback() { +new RandomSummaryClient().request(getCard().wikiSite(), new RandomSummaryClient.Callback() { @Override public void onSuccess(@NonNull Call call, @NonNull PageTitle title) { setProgress(false); @@ -54,17 +57,32 @@ @Override public void onError(@NonNull Call call, @NonNull Throwable t) { -L.w("Failed to get random card from network. Falling back to reading lists.", t); -getRandomReadingListPage(t); +L.w("Failed to get random card from network. Falling back to compilations.", t); +getRandomPageFromCompilation(t); setProgress(false); } }); } } -private void getRandomReadingListPage(@NonNull final Throwable throwableIfEmpty) { +private void getRandomPageFromCompilation(@NonNull final Throwable throwableIfEmpty) { +if (OfflineManager.hasCompilation() && getCallback() != null && getCard() != null) { +try { +getCallback().onSelectPage(getCard(), new HistoryEntry( +new PageTitle(OfflineManager.instance().getRandomTitle(), getCard().wikiSite()), +HistoryEntry.SOURCE_FEED_RANDOM)); +} catch (IOException e) { +getCallback().onGetRandomError(e, RandomCardView.this); +} +} else { +getRandomPageFromReadingLists(throwableIfEmpty); +} +} + +private void getRandomPageFromReadingLists(@NonNull final Throwable throwableIfEmpty) { ReadingListPageDao.instance().randomPage(new CallbackTask.DefaultCallback() { -@Override public void success(@Nullable PageTitle title) { +@Override +public void success(@Nullable PageTitle title) { if (getCallback() != null && getCard() != null) { if (title != null) { getCallback().onSelectPage(getCard(), -- To view, visit https://gerrit.wikimedia.org/r/364577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I942f8b54b7da4a225f54568d7cf9b87bf525bae6 Gerrit-PatchSet: 4 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: DbrantGerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski 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]: Hygiene: Remove unnecessary variable
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365417 ) Change subject: Hygiene: Remove unnecessary variable .. Hygiene: Remove unnecessary variable Improves readability... Change-Id: Ib0e9cbc083e6c0a384c81815b470063698e0595f --- M resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles refs/changes/17/365417/1 diff --git a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js index ba49682..5bb8b16 100644 --- a/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js +++ b/resources/ext.relatedArticles.readMore.gateway/RelatedPagesGateway.js @@ -63,8 +63,7 @@ * @return {jQuery.Promise} */ RelatedPagesGateway.prototype.getForCurrentPage = function ( limit ) { - var apiLimit, - parameters = { + var parameters = { action: 'query', formatversion: 2, prop: 'pageimages|pageterms', @@ -81,13 +80,12 @@ parameters.titles = relatedPages; } else if ( this.useCirrusSearch ) { - apiLimit = limit; - parameters.pilimit = apiLimit; + parameters.pilimit = limit; parameters.generator = 'search'; parameters.gsrsearch = 'morelike:' + this.currentPage; parameters.gsrnamespace = '0'; - parameters.gsrlimit = apiLimit; + parameters.gsrlimit = limit; parameters.gsrqiprofile = 'classic_noboostlinks'; // Currently, if you're logged in, then the API uses your language by default ard so responses -- To view, visit https://gerrit.wikimedia.org/r/365417 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0e9cbc083e6c0a384c81815b470063698e0595f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RelatedArticles 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/vagrant[master]: Puppet: Only install production packages for node.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365076 ) Change subject: Puppet: Only install production packages for node. .. Puppet: Only install production packages for node. Node services git-update takes ages to complete. Speed it up a little bit by only installing production dependencies and not installing devDependencies. Change-Id: Ia517810de8c562494ffee7bdf586f7768cb21b86 --- M puppet/modules/service/manifests/gitupdate.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Mobrovac: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/service/manifests/gitupdate.pp b/puppet/modules/service/manifests/gitupdate.pp index 485d68e..367fb58 100644 --- a/puppet/modules/service/manifests/gitupdate.pp +++ b/puppet/modules/service/manifests/gitupdate.pp @@ -86,7 +86,7 @@ # descern the update command to use $up_cmd = $type ? { 'php'=> 'composer update --no-interaction --optimize-autoloader', -'nodejs' => 'sudo rm -rf node_modules && npm install --no-bin-links', +'nodejs' => 'sudo rm -rf node_modules && npm install --no-bin-links --production', 'python' => './virtualenv/bin/pip install -Ue .', default => 'invalid' } -- To view, visit https://gerrit.wikimedia.org/r/365076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia517810de8c562494ffee7bdf586f7768cb21b86 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: PpchelkoGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: GWicke Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Compilations: Feed card to indicate offline state.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364564 ) Change subject: Compilations: Feed card to indicate offline state. .. Compilations: Feed card to indicate offline state. The card will be shown automatically if the device goes offline while in the Explore feed. The "My Compilations" button is not yet hooked up to anything. Bug: T163595 Change-Id: I6186f544cf53f16bddfd280571da501c28f53c09 --- M app/src/main/java/org/wikipedia/activity/BaseActivity.java M app/src/main/java/org/wikipedia/feed/FeedCoordinator.java M app/src/main/java/org/wikipedia/feed/FeedCoordinatorBase.java M app/src/main/java/org/wikipedia/feed/FeedFragment.java M app/src/main/java/org/wikipedia/feed/model/CardType.java A app/src/main/java/org/wikipedia/feed/offline/OfflineCompilationCard.java A app/src/main/java/org/wikipedia/feed/offline/OfflineCompilationCardView.java A app/src/main/java/org/wikipedia/feed/offline/OfflineCompilationClient.java M app/src/main/java/org/wikipedia/feed/view/FeedAdapter.java M app/src/main/java/org/wikipedia/main/MainActivity.java M app/src/main/java/org/wikipedia/main/MainFragment.java M app/src/main/java/org/wikipedia/page/PageActivity.java A app/src/main/res/drawable/ic_offline_white_24dp.xml A app/src/main/res/layout/view_card_offline_compilation.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml 16 files changed, 199 insertions(+), 18 deletions(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/app/src/main/java/org/wikipedia/activity/BaseActivity.java b/app/src/main/java/org/wikipedia/activity/BaseActivity.java index ef253d4..78a6b45 100644 --- a/app/src/main/java/org/wikipedia/activity/BaseActivity.java +++ b/app/src/main/java/org/wikipedia/activity/BaseActivity.java @@ -51,6 +51,10 @@ } } +public void updateOfflineCompilations() { +searchOfflineCompilationsWithPermission(true); +} + protected void requestFullUserOrientation() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_USER); @@ -104,7 +108,6 @@ } protected void onGoOffline() { -searchOfflineCompilationsWithPermission(false); } protected void onGoOnline() { diff --git a/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java b/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java index e8a850a..2012a1c 100644 --- a/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java +++ b/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java @@ -8,8 +8,10 @@ import org.wikipedia.feed.becauseyouread.BecauseYouReadClient; import org.wikipedia.feed.continuereading.ContinueReadingClient; import org.wikipedia.feed.mainpage.MainPageClient; +import org.wikipedia.feed.offline.OfflineCompilationClient; import org.wikipedia.feed.random.RandomClient; import org.wikipedia.feed.searchbar.SearchClient; +import org.wikipedia.util.DeviceUtil; class FeedCoordinator extends FeedCoordinatorBase { @@ -19,18 +21,18 @@ @Override protected void buildScript(int age) { -if (age == 0) { -addPendingClient(new SearchClient()); -addPendingClient(new AnnouncementClient()); -} -addPendingClient(new AggregatedFeedContentClient()); +boolean online = DeviceUtil.isOnline(); + +conditionallyAddPendingClient(new SearchClient(), age == 0); +conditionallyAddPendingClient(new OfflineCompilationClient(), age == 0 && !online); +conditionallyAddPendingClient(new AnnouncementClient(), age == 0 && online); +conditionallyAddPendingClient(new AggregatedFeedContentClient(), online); addPendingClient(new ContinueReadingClient()); -if (age == 0) { -addPendingClient(new MainPageClient()); -} -addPendingClient(new BecauseYouReadClient()); -if (age == 0) { -addPendingClient(new RandomClient()); -} + +// TODO: enable this for offline when ready: +conditionallyAddPendingClient(new MainPageClient(), age == 0 && online); + +conditionallyAddPendingClient(new BecauseYouReadClient(), online); +conditionallyAddPendingClient(new RandomClient(), age == 0); } } diff --git a/app/src/main/java/org/wikipedia/feed/FeedCoordinatorBase.java b/app/src/main/java/org/wikipedia/feed/FeedCoordinatorBase.java index b7d850e..cddf45a 100644 --- a/app/src/main/java/org/wikipedia/feed/FeedCoordinatorBase.java +++ b/app/src/main/java/org/wikipedia/feed/FeedCoordinatorBase.java @@ -116,6 +116,12 @@ pendingClients.add(client); } +void conditionallyAddPendingClient(FeedClient client, boolean condition) { +if (condition) { +pendingClients.add(client); +} +} + // Call to kick off the
[MediaWiki-commits] [Gerrit] analytics/reportupdater-queries[master]: Add sunburst graph to "desktop by browser" tab
Nuria has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365415 ) Change subject: Add sunburst graph to "desktop by browser" tab .. Add sunburst graph to "desktop by browser" tab Reports will populate since data is available Bug: T170286 Change-Id: Ic85620140cac23575d453ca52bd7602c5f7bd215 --- M browser/config.yaml A browser/desktop_site_by_browser_family_and_major 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/reportupdater-queries refs/changes/15/365415/1 diff --git a/browser/config.yaml b/browser/config.yaml index 26985fa..26a48ac 100644 --- a/browser/config.yaml +++ b/browser/config.yaml @@ -127,3 +127,9 @@ starts: 2015-06-07 lag: 86400 # wait 1 day to compute last week +desktop_site_by_browser_family_and_major: +type: script +granularity: weeks +funnel: true +starts: 2015-06-07 +lag: 86400 # wait 1 day to compute last week diff --git a/browser/desktop_site_by_browser_family_and_major b/browser/desktop_site_by_browser_family_and_major new file mode 100755 index 000..99c9422 --- /dev/null +++ b/browser/desktop_site_by_browser_family_and_major @@ -0,0 +1,20 @@ +#!/bin/bash +hive -e " +SELECT +'$1' AS date, +browser_family, +browser_major, +SUM(view_count) as view_count +FROM wmf.browser_general +WHERE +access_method = 'desktop' AND +CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) >= '$1' AND +CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) < '$2' +GROUP BY +'$1', +browser_family, +browser_major +ORDER BY view_count DESC +LIMIT 1000 +; +" 2> /dev/null | grep -v parquet.hadoop -- To view, visit https://gerrit.wikimedia.org/r/365415 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic85620140cac23575d453ca52bd7602c5f7bd215 Gerrit-PatchSet: 1 Gerrit-Project: analytics/reportupdater-queries Gerrit-Branch: master Gerrit-Owner: Nuria___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Remove temporary cookie block logging
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365414 ) Change subject: Remove temporary cookie block logging .. Remove temporary cookie block logging Bug: T166247 Change-Id: Ib34819194a6a0fdc5e17b024e3099eacbd075074 --- M WikimediaEventsHooks.php M extension.json 2 files changed, 0 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/14/365414/1 diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php index 58b700b..d9fe8cf 100644 --- a/WikimediaEventsHooks.php +++ b/WikimediaEventsHooks.php @@ -634,27 +634,6 @@ } /** -* Called when User::getBlockedStatus() has been set -* -* @param $user User object -*/ - public static function onGetBlockedStatus( $user ) { - $blocked = $user->mBlock instanceof Block; - $rc = RequestContext::getMain(); - $request = $rc->getRequest(); - $isCookieSetOnAutoblock = $rc->getConfig()->get( 'CookieSetOnAutoblock' ); - $blockCookieVal = $request->getCookie( 'BlockID' ); - $trigger = $user->blockTrigger; - if ( $isCookieSetOnAutoblock && $blockCookieVal > 0 && $blocked ) { - $logData = [ - 'ip' => $request->getIP(), - 'is_cookie_block' => $trigger === 'cookie-block' - ]; - EventLogging::logEvent( 'CookieBlock', 16241436, $logData ); - } - } - - /** * In summer 2017 WMDE will run a banner campaign with a GuidedTour to encourage users to * create an account and edit. * The banner campaign will link to one of 2 pages (see examples) diff --git a/extension.json b/extension.json index 00e9134..c9e5bf6 100644 --- a/extension.json +++ b/extension.json @@ -76,9 +76,6 @@ ], "ChangesListSpecialPageStructuredFilters": [ "WikimediaEventsHooks::onChangesListSpecialPageStructuredFilters" - ], - "GetBlockedStatus": [ - "WikimediaEventsHooks::onGetBlockedStatus" ] }, "MessagesDirs": { -- To view, visit https://gerrit.wikimedia.org/r/365414 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib34819194a6a0fdc5e17b024e3099eacbd075074 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents 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...Capiunto[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364797 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim Change-Id: If9b1a342a64720cccaeb37791d61e3ba8125d36a --- D Capiunto.i18n.php 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Capiunto.i18n.php b/Capiunto.i18n.php deleted file mode 100644 index 86d1cf3..000 --- a/Capiunto.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = []; -if ( !function_exists( 'wfJsonI18nShim3cc74515f0f58ddf' ) ) { - function wfJsonI18nShim3cc74515f0f58ddf( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( [ $code ], $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = __DIR__ . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim3cc74515f0f58ddf'; -} -- To view, visit https://gerrit.wikimedia.org/r/364797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9b1a342a64720cccaeb37791d61e3ba8125d36a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Capiunto Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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] mediawiki...Flow[master]: Add newline between namespace and use statements
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365273 ) Change subject: Add newline between namespace and use statements .. Add newline between namespace and use statements FOUND 1 ERROR AFFECTING 1 LINE -- 3 | ERROR | [x] There must be one blank line after the namespace | | declaration | | (PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter) -- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -- Change-Id: I6ce7f1545329ed529ed8ff858ce5eb9c0144e4c0 --- M tests/phpunit/api/ApiFlowEditHeaderTest.php M tests/phpunit/api/ApiFlowEditPostTest.php M tests/phpunit/api/ApiFlowEditTopicSummaryTest.php M tests/phpunit/api/ApiFlowReplyTest.php M tests/phpunit/api/ApiFlowViewHeaderTest.php 5 files changed, 5 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/api/ApiFlowEditHeaderTest.php b/tests/phpunit/api/ApiFlowEditHeaderTest.php index d894694..da1a676 100644 --- a/tests/phpunit/api/ApiFlowEditHeaderTest.php +++ b/tests/phpunit/api/ApiFlowEditHeaderTest.php @@ -1,6 +1,7 @@ https://gerrit.wikimedia.org/r/365273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ce7f1545329ed529ed8ff858ce5eb9c0144e4c0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-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] mediawiki...BlockAndNuke[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364796 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim Change-Id: I5e8f7a64b528deea20dc10447fa31b96382350ed --- D BlockandNuke.i18n.php 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/BlockandNuke.i18n.php b/BlockandNuke.i18n.php deleted file mode 100644 index e0e5b83..000 --- a/BlockandNuke.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShim38d0e046dd863766' ) ) { - function wfJsonI18nShim38d0e046dd863766( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim38d0e046dd863766'; -} -- To view, visit https://gerrit.wikimedia.org/r/364796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5e8f7a64b528deea20dc10447fa31b96382350ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlockAndNuke Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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] mediawiki...SemanticSifter[master]: build: ignore extensions folder
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365075 ) Change subject: build: ignore extensions folder .. build: ignore extensions folder The build result is stored in extensions folder and should not shown as unstashed files Change-Id: I00a709094eb417c622b7d74818de9da42f0df2af --- M .gitignore M composer.json 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index a7abe44..9285b89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -node_modules/ -vendor/ - +/node_modules +/vendor +/composer.lock +/extensions diff --git a/composer.json b/composer.json index 1ad30e4..c1229ad 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ }, "scripts": { "test": [ - "parallel-lint . --exclude vendor" + "parallel-lint . --exclude vendor --exclude node_modules --exclude extensions" ] } } -- To view, visit https://gerrit.wikimedia.org/r/365075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00a709094eb417c622b7d74818de9da42f0df2af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticSifter Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Hashar 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] mediawiki...SemanticHighcharts[master]: build: ignore extensions folder
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365074 ) Change subject: build: ignore extensions folder .. build: ignore extensions folder The build result is stored in extensions folder and should not shown as unstashed files Change-Id: I566f02dd0ed03013a4e0defd5f7ecba1de74d1f4 --- M .gitignore M composer.json 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 8ec4b92..9285b89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -node_modules/ -vendor/ -composer.lock +/node_modules +/vendor +/composer.lock +/extensions diff --git a/composer.json b/composer.json index f54d60d..474f7a0 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ }, "scripts": { "test": [ - "parallel-lint . --exclude vendor" + "parallel-lint . --exclude vendor --exclude node_modules --exclude extensions" ] } } -- To view, visit https://gerrit.wikimedia.org/r/365074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I566f02dd0ed03013a4e0defd5f7ecba1de74d1f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticHighcharts Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Hashar 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] mediawiki...SideBarMenu[master]: build: ignore extensions folder
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365070 ) Change subject: build: ignore extensions folder .. build: ignore extensions folder The build result is stored in extensions folder and should not shown as unstashed files Change-Id: Iecf99ede96125bbea321f756d13c921929ed11c5 --- M .gitignore M composer.json 2 files changed, 5 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 039a014..f19b4b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -node_modules/ -vendor/ +/node_modules +/vendor +/composer.lock +/extensions .idea diff --git a/composer.json b/composer.json index 066fa50..e3d6ff4 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "scripts": { "test": [ - "parallel-lint . --exclude vendor" + "parallel-lint . --exclude vendor --exclude node_modules --exclude extensions" ] } } -- To view, visit https://gerrit.wikimedia.org/r/365070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iecf99ede96125bbea321f756d13c921929ed11c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SideBarMenu Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Hashar 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] operations/puppet[production]: CI/integration: Create profile for docker setup
Thcipriani has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365416 ) Change subject: CI/integration: Create profile for docker setup .. CI/integration: Create profile for docker setup Change-Id: I6c6583790a981d20bdb727e3a3722a8fc419572a --- A modules/contint/manifests/git_cache.pp M modules/git/manifests/clone.pp A modules/profile/manifests/ci/docker.pp M modules/role/manifests/ci/slave/labs/docker.pp 4 files changed, 120 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/365416/1 diff --git a/modules/contint/manifests/git_cache.pp b/modules/contint/manifests/git_cache.pp new file mode 100644 index 000..7af23f5 --- /dev/null +++ b/modules/contint/manifests/git_cache.pp @@ -0,0 +1,35 @@ +# == Define contint::git_cache +# +# Creates a bare repo in /srv/git so that the repo can be used by CI as a +# --reference for git clone operations. +# +# === Parameters +# +# [*repo*] repo that we need to cache on the docker hosts +# + +define contint::git_cache( +$repo = $title, +) { +$repo_path = "/srv/git/${repo}.git" + +exec { "mkdir ${repo_path}": +command => "/bin/mkdir -p ${repo_path}", +creates => $repo_path, +before => Git::Clone[$repo], +} + +# This is here to prevent the git::clone module from attempting to create +# multi-level repos directory before the parent directories are created by +# the exec in this definition +file { $repo_path: +ensure => 'directory', +require => Exec["mkdir ${repo_path}"], +} + +git::clone{ $repo: +bare => true, +directory => $repo_path, +shared=> true, +} +} diff --git a/modules/git/manifests/clone.pp b/modules/git/manifests/clone.pp index ea310cf..38d616d 100644 --- a/modules/git/manifests/clone.pp +++ b/modules/git/manifests/clone.pp @@ -12,6 +12,7 @@ # checked out from gerrit using a default gerrit url. # If you set this, please specify the full repository url. # $+branch+:: Branch you would like to check out. +# $+bare+:: Create a bare repo # $+ensure+:: _absent_, _present_, or _latest_. Defaults to _present_. # - _present_ (default) will just clone once. # - _latest_ will execute a git pull if there are any changes. @@ -19,7 +20,8 @@ # $+owner+:: Owner of $directory, default: _root_. git commands will be run # by this user. # $+group+:: Group owner of $directory, default: 'root' -# $+recurse_submodules:: If true, git +# $+recurse_submodules:: If true, append --recurse-submodules to the clone +#command # $+shared+:: Enable git's core.sharedRepository=group setting for sharing the # repository between serveral users, default: false # $+umask+:: umask value that git operations should run under, @@ -49,6 +51,7 @@ define git::clone( $directory, $origin=undef, +$bare=false, $branch='', $ssh='', $ensure='present', @@ -135,18 +138,26 @@ $shared_arg = '' } +if $bare { +$bare_arg = '--bare ' +$creates = "${directory}/HEAD" +} else { +$bare_arg = '' +$creates = "${directory}/.git/config" +} + $git = '/usr/bin/git' # set PATH for following execs Exec { path => '/usr/bin:/bin' } # clone the repository exec { "git_clone_${title}": -command => "${git} ${shared_arg} clone ${recurse_submodules_arg}${brancharg}${remote}${deptharg} ${directory}", +command => "${git} ${shared_arg} clone ${recurse_submodules_arg}${brancharg}${bare_arg}${remote}${deptharg} ${directory}", provider=> shell, logoutput => on_failure, cwd => '/tmp', environment => $env, -creates => "${directory}/.git/config", +creates => "${creates}", user=> $owner, group => $group, umask => $git_umask, @@ -170,37 +181,50 @@ '' => 'remotes/origin/HEAD', default => "remotes/origin/${branch}", } -exec { "git_pull_${title}": -cwd => $directory, -command => "${git} ${shared_arg} pull ${recurse_submodules_arg}--quiet${deptharg}", -provider => shell, -logoutput => on_failure, -# git diff --quiet will exit 1 (return false) -# if there are differences -unless=> "${git} fetch && ${git} diff --quiet ${remote_to_check}", -user => $owner, -group =>
[MediaWiki-commits] [Gerrit] mediawiki...GoogleSiteSearch[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364810 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim Change-Id: I068189e70c6403dd30c3d62c244124984405e79f --- D GoogleSiteSearch.i18n.php 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/GoogleSiteSearch.i18n.php b/GoogleSiteSearch.i18n.php deleted file mode 100644 index d05f3b7..000 --- a/GoogleSiteSearch.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShimbbc88643bc96ce09' ) ) { - function wfJsonI18nShimbbc88643bc96ce09( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimbbc88643bc96ce09'; -} -- To view, visit https://gerrit.wikimedia.org/r/364810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I068189e70c6403dd30c3d62c244124984405e79f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleSiteSearch Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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] mediawiki...DiscussionThreading[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364811 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim Change-Id: I110a54081fdc8ba7185c030fc6c023834b9ed494 --- D DiscussionThreading.i18n.php 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/DiscussionThreading.i18n.php b/DiscussionThreading.i18n.php deleted file mode 100644 index 8c14a25..000 --- a/DiscussionThreading.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShimd25f7a27d39c5e32' ) ) { - function wfJsonI18nShimd25f7a27d39c5e32( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimd25f7a27d39c5e32'; -} -- To view, visit https://gerrit.wikimedia.org/r/364811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I110a54081fdc8ba7185c030fc6c023834b9ed494 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DiscussionThreading Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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] mediawiki...MsCalendar[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364816 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim Change-Id: I19cc280d8125cf43723bd995a46f3c23c44cbad7 --- D MsCalendar.i18n.php 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/MsCalendar.i18n.php b/MsCalendar.i18n.php deleted file mode 100644 index 70734aa..000 --- a/MsCalendar.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShim5bdc347913ae99ef' ) ) { - function wfJsonI18nShim5bdc347913ae99ef( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/extensions/MsCalendar/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim5bdc347913ae99ef'; -} -- To view, visit https://gerrit.wikimedia.org/r/364816 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19cc280d8125cf43723bd995a46f3c23c44cbad7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MsCalendar Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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] mediawiki...PageImages[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364819 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim Change-Id: I8f7c101f25a579423acd0c1a48fe32343bc9845f --- D PageImages.i18n.php 1 file changed, 0 insertions(+), 35 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/PageImages.i18n.php b/PageImages.i18n.php deleted file mode 100644 index 5bb744c..000 --- a/PageImages.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = []; -if ( !function_exists( 'wfJsonI18nShim74e07e31dc460199' ) ) { - function wfJsonI18nShim74e07e31dc460199( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( [ $code ], $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = __DIR__ . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim74e07e31dc460199'; -} -- To view, visit https://gerrit.wikimedia.org/r/364819 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f7c101f25a579423acd0c1a48fe32343bc9845f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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] mediawiki...LDAPAuthorization[master]: Remove unused i18n shim
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364822 ) Change subject: Remove unused i18n shim .. Remove unused i18n shim wgExensionMessagesFiles is wrong written Change-Id: Ibeaa6f163c4dd5a3430eaf49cb38bd474083ea5b --- D LDAPAuthorization.i18n.php M LDAPAuthorization.php 2 files changed, 0 insertions(+), 37 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/LDAPAuthorization.i18n.php b/LDAPAuthorization.i18n.php deleted file mode 100644 index 3b07d79..000 --- a/LDAPAuthorization.i18n.php +++ /dev/null @@ -1,35 +0,0 @@ -https://phabricator.wikimedia.org/source/mediawiki/browse/master/maintenance/generateJsonI18n.php - * - * Beginning with MediaWiki 1.23, translation strings are stored in json files, - * and the EXTENSION.i18n.php file only exists to provide compatibility with - * older releases of MediaWiki. For more information about this migration, see: - * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format - * - * This shim maintains compatibility back to MediaWiki 1.17. - */ -$messages = array(); -if ( !function_exists( 'wfJsonI18nShim8ea15cd8f6f70cbe' ) ) { - function wfJsonI18nShim8ea15cd8f6f70cbe( $cache, $code, &$cachedData ) { - $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); - foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; - if ( is_readable( $fileName ) ) { - $data = FormatJson::decode( file_get_contents( $fileName ), true ); - foreach ( array_keys( $data ) as $key ) { - if ( $key === '' || $key[0] === '@' ) { - unset( $data[$key] ); - } - } - $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); - } - - $cachedData['deps'][] = new FileDependency( $fileName ); - } - return true; - } - - $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim8ea15cd8f6f70cbe'; -} diff --git a/LDAPAuthorization.php b/LDAPAuthorization.php index 9da00b4..19601a1 100644 --- a/LDAPAuthorization.php +++ b/LDAPAuthorization.php @@ -44,8 +44,6 @@ 'url' => 'https://mediawiki.org/wiki/Extension:LDAPAuthorization' ); -$GLOBALS['wgExensionMessagesFiles']['LDAPAuthorization'] = __DIR__ . '/LDAPAuthorization.i18n.php'; - $GLOBALS['wgMessagesDirs']['LDAPAuthorization'] = __DIR__ . '/i18n'; $GLOBALS['wgAutoloadClasses']['LDAPAuthorization'] = -- To view, visit https://gerrit.wikimedia.org/r/364822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibeaa6f163c4dd5a3430eaf49cb38bd474083ea5b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/LDAPAuthorization Gerrit-Branch: master Gerrit-Owner: UmherirrenderGerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Umherirrender 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[wmf/1.30.0-wmf.9]: RCFilters: Allow experimental live update feature to be enab...
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365413 ) Change subject: RCFilters: Allow experimental live update feature to be enabled with query string parameter .. RCFilters: Allow experimental live update feature to be enabled with query string parameter For testing. Adding ?liveupdate=1 to the URL will unhide the live update button. Bug: T167743 Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd (cherry picked from commit aa872f4d9c31b9283be029639c75a58d6ee2617c) --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/365413/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js index a748063..3e7a3e1 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js @@ -58,7 +58,11 @@ $bottom = $( '' ) .addClass( 'mw-rcfilters-ui-filterWrapperWidget-bottom' ); - if ( mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ) { + if ( + mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) || + // Allow users to enable live update with ?liveupdate=1 + new mw.Uri().query.liveupdate + ) { $bottom.append( this.liveUpdateButton.$element ); } -- To view, visit https://gerrit.wikimedia.org/r/365413 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.30.0-wmf.9 Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Rename "Forms" section to "Morphology"
AnotherLadsgroup has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365412 ) Change subject: Rename "Forms" section to "Morphology" .. Rename "Forms" section to "Morphology" Bug: T170287 Change-Id: Id0ee8592ecf29a6394d33321e3b8141f494596a3 --- M i18n/en.json M i18n/qqq.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme refs/changes/12/365412/1 diff --git a/i18n/en.json b/i18n/en.json index 42a7abb..309c10b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -12,7 +12,7 @@ "wikibase-newlexeme-language": "Language of lexeme", "wikibase-lexeme-view-language-lexical-category": "$1 in $2", "wikibase-lexeme-statementsection-statements-about-form": "Statements about $1", - "wikibase-lexeme-view-forms": "Forms", + "wikibase-lexeme-view-forms": "Morphology", "wikibase-lexeme-enter-form-representation": "Enter new form representation", "wikibase-lexeme-empty-form-representation": "No form representation defined", "wikibase-lexeme-statementsection-statements-about-sense": "Statements about $1", diff --git a/i18n/qqq.json b/i18n/qqq.json index 0f2a3cc..6373ab2 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -17,7 +17,7 @@ "wikibase-newlexeme-language": "Label for field in the lexeme creation form.", "wikibase-lexeme-view-language-lexical-category": "Description when both lexical category and language are present\n{{Identical|In}}", "wikibase-lexeme-statementsection-statements-about-form": "Heading for the list of statements giving specific information about the currently viewed Form of a Lexeme.\n\nParameters:\n* $1 - Form ID.\n{{Identical|Statements}}", - "wikibase-lexeme-view-forms": "Subheading for the forms section on a lexeme page.\n{{Identical|Form}}", + "wikibase-lexeme-view-forms": "Subheading for the morphology section on a lexeme page.\n{{Identical|Form}}", "wikibase-lexeme-enter-form-representation": "Placeholder for the lexeme form representation input field.", "wikibase-lexeme-empty-form-representation": "Placeholder message displayed instead of the lexeme form representation in case no representation has been specified yet.", "wikibase-lexeme-statementsection-statements-about-sense": "Heading for the list of statements giving specific information about the currently viewed Sense of a Lexeme.\n\nParameters:\n* $1 - Sense ID.\n{{Identical|Statements}}", -- To view, visit https://gerrit.wikimedia.org/r/365412 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0ee8592ecf29a6394d33321e3b8141f494596a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseLexeme Gerrit-Branch: master Gerrit-Owner: AnotherLadsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: update mediawiki-title dependency
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365364 ) Change subject: Hygiene: update mediawiki-title dependency .. Hygiene: update mediawiki-title dependency Similar to what RB did in https://github.com/wikimedia/restbase/commit/58c1f41#diff-8930dc130a31fecef5d3002db29cffa0 Change-Id: I49dc4d48feeca742f90aae385ff523e676a3c403 --- M lib/mwapi.js M package.json 2 files changed, 3 insertions(+), 2 deletions(-) Approvals: Mobrovac: Looks good to me, approved Ppchelko: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/lib/mwapi.js b/lib/mwapi.js index 9aeb202..1709de5 100644 --- a/lib/mwapi.js +++ b/lib/mwapi.js @@ -94,7 +94,7 @@ format: 'json', formatversion: 2, meta: 'siteinfo', -siprop: 'general|namespaces|namespacealiases' +siprop: 'general|namespaces|namespacealiases|specialpagealiases' }; siteInfoCache[rp.domain] = api.mwApiGet(app, req.params.domain, query) .then((res) => { @@ -106,6 +106,7 @@ }, namespaces: res.body.query.namespaces, namespacealiases: res.body.query.namespacealiases, +specialpagealiases: res.body.query.specialpagealiases, sharedRepoRootURI: mwapi.findSharedRepoDomain(res) }; }); diff --git a/package.json b/package.json index d109237..df94a4f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "escape-string-regexp": "^1.0.5", "express": "^4.14.0", "js-yaml": "^3.7.0", -"mediawiki-title": "^0.5.6", +"mediawiki-title": "^0.6.3", "preq": "^0.5.1", "service-runner": "^2.2.5", "swagger-router": "^0.5.5", -- To view, visit https://gerrit.wikimedia.org/r/365364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49dc4d48feeca742f90aae385ff523e676a3c403 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearNDGerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Jhernandez Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Ppchelko 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...Video[master]: [WIP] Reorganize directory structure + file renaming
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365411 ) Change subject: [WIP] Reorganize directory structure + file renaming .. [WIP] Reorganize directory structure + file renaming Splits VideoPage.php into: - includes/VideoPage.class.php - includes/VideoHistoryList.class.php - includes/CategoryWithVideoViewer.class.php Splits VideoGallery.php into: - includes/VideoGallery.class.php - includes/parser/VideoGallery.hooks.php Bug: T160849 Change-Id: I98be0c47f2a12048b12a9e79859f132fee57b74a --- D VideoGalleryPopulate.php D VideoPage.php M extension.json R includes/ArchivedVideo.class.php A includes/CategoryWithVideoViewer.class.php R includes/RevertVideoAction.class.php R includes/Video.alias.php R includes/Video.class.php R includes/Video.hooks.php R includes/Video.namespaces.php R includes/VideoGallery.class.php A includes/VideoHistoryList.class.php A includes/VideoPage.class.php R includes/VideoPageArchive.class.php R includes/WikiVideoPage.class.php A includes/parser/VideoGallery.hooks.php A includes/parser/VideoGalleryPopulate.hooks.php R includes/providers/BaseVideoProvider.class.php R includes/providers/BlipTVVideo.php R includes/providers/DailyMotionVideo.php R includes/providers/GametrailersVideo.php R includes/providers/GoogleVideo.php R includes/providers/HuluVideo.php R includes/providers/MTVNetworksVideo.php R includes/providers/MetaCafeVideo.php R includes/providers/MovieClipsVideo.php R includes/providers/MyVideoVideo.php R includes/providers/SouthParkStudiosVideo.php R includes/providers/ViddlerVideo.php R includes/providers/VimeoVideo.php R includes/providers/WeGameVideo.php R includes/providers/YouTubeVideo.php R includes/specials/SpecialAddVideo.php R includes/specials/SpecialNewVideos.php R includes/specials/SpecialUndeleteWithVideoSupport.php R resources/css/Video.css R sql/video.sql 37 files changed, 625 insertions(+), 622 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Video refs/changes/11/365411/1 diff --git a/VideoGalleryPopulate.php b/VideoGalleryPopulate.php deleted file mode 100644 index 81b61ed..000 --- a/VideoGalleryPopulate.php +++ /dev/null @@ -1,76 +0,0 @@ - parser hook extension -- display a gallery of all - * videos in a specific category - * - * @file - * @ingroup Extensions - */ - -$wgHooks['ParserFirstCallInit'][] = 'wfVideoGalleryPopulate'; - -function wfVideoGalleryPopulate( $parser ) { - $parser->setHook( 'videogallerypopulate', 'VideoGalleryPopulate' ); - return true; -} - -function VideoGalleryPopulate( $input, $args, $parser ) { - $parser->disableCache(); - - $category = ( isset( $args['category'] ) ) ? $args['category'] : ''; - $limit = ( isset( $args['limit'] ) ) ? intval( $args['limit'] ) : 10; - - if ( empty( $category ) ) { - return ''; - } - - // Use Parser::recursivePreprocess() if available instead of creating another Parser instance - if ( is_callable( array( $parser, 'recursivePreprocess' ) ) ) { - $category = $parser->recursivePreprocess( $category ); - } else { - $newParser = new Parser(); - $category = $newParser->preprocess( $category, $parser->getTitle(), $parser->getOptions() ); - } - $category_title = Title::newFromText( $category ); - if ( !( $category_title instanceof Title ) ) { - return ''; - } - - // @todo FIXME: not overly i18n-friendly here... - $category_title_secondary = Title::newFromText( $category . ' Videos' ); - if ( !( $category_title_secondary instanceof Title ) ) { - return ''; - } - - $params['ORDER BY'] = 'page_id'; - if ( $limit ) { - $params['LIMIT'] = $limit; - } - - $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr->select( - array( 'page', 'categorylinks' ), - 'page_title', - array( - 'cl_to' => array( - $category_title->getDBkey(), - $category_title_secondary->getDBkey() - ), - 'page_namespace' => NS_VIDEO - ), - __METHOD__, - $params, - array( 'categorylinks' => array( 'INNER JOIN', 'cl_from = page_id' ) ) - ); - - $gallery = new VideoGallery(); - $gallery->setParsing( true ); - $gallery->setShowFilename( true ); - - foreach ( $res as $row ) { - $video = Video::newFromName( $row->page_title, RequestContext::getMain() ); - $gallery->add( $video ); - } - - return $gallery->toHtml(); -} diff --git a/VideoPage.php b/VideoPage.php deleted file mode 100644 index f441ede..000 --- a/VideoPage.php +++ /dev/null @@ -1,437 +0,0 @@ -getContext(); -
[MediaWiki-commits] [Gerrit] operations/puppet[production]: site: add netmon1003 with servermon role
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365410 ) Change subject: site: add netmon1003 with servermon role .. site: add netmon1003 with servermon role Bug: T170653 Change-Id: I99b4481057a0a1238fbe9fffa7830e6748348fc2 --- M manifests/site.pp 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index c0e1157..43eec802 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1792,12 +1792,19 @@ # network monitoring tool server - replacement servers (T125020, T166180) node /^netmon(1002|2001)\.wikimedia\.org$/ { -# TODO: role(librenms, servermon::wmf) +# TODO: role(librenms) role(network::monitor, librenms, rancid, smokeping) interface::add_ip6_mapped { 'main': } } +# jessie VM for servermon until it supports stretch (T170653) +node 'netmon1003.wikimedia.org' { +role(network::monitor, servermon::wmf) + +interface::add_ip6_mapped { 'main': } +} + node /^(nihal\.codfw|nitrogen\.eqiad)\.wmnet$/ { role(puppetmaster::puppetdb) } -- To view, visit https://gerrit.wikimedia.org/r/365410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99b4481057a0a1238fbe9fffa7830e6748348fc2 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn 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]: RCFilters: Allow experimental live update feature to be enab...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365408 ) Change subject: RCFilters: Allow experimental live update feature to be enabled with query string parameter .. RCFilters: Allow experimental live update feature to be enabled with query string parameter For testing. Adding ?liveupdate=1 to the URL will unhide the live update button. Bug: T167743 Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js index a748063..3e7a3e1 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js @@ -58,7 +58,11 @@ $bottom = $( '' ) .addClass( 'mw-rcfilters-ui-filterWrapperWidget-bottom' ); - if ( mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ) { + if ( + mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) || + // Allow users to enable live update with ?liveupdate=1 + new mw.Uri().query.liveupdate + ) { $bottom.append( this.liveUpdateButton.$element ); } -- To view, visit https://gerrit.wikimedia.org/r/365408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Jforrester 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]: site: add netmon1003 with servermon role
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365410 ) Change subject: site: add netmon1003 with servermon role .. site: add netmon1003 with servermon role Bug: T170653 Change-Id: I99b4481057a0a1238fbe9fffa7830e6748348fc2 --- M manifests/site.pp 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/365410/1 diff --git a/manifests/site.pp b/manifests/site.pp index 5db5aa4..00e8af8 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1775,12 +1775,19 @@ # network monitoring tool server - replacement servers (T125020, T166180) node /^netmon(1002|2001)\.wikimedia\.org$/ { -# TODO: role(librenms, servermon::wmf) +# TODO: role(librenms) role(network::monitor, librenms, rancid, smokeping) interface::add_ip6_mapped { 'main': } } +# jessie VM for servermon until it supports stretch (T170653) +node 'netmon1001.wikimedia.org' { +role(network::monitor, servermon::wmf) + +interface::add_ip6_mapped { 'main': } +} + node /^(nihal\.codfw|nitrogen\.eqiad)\.wmnet$/ { role(puppetmaster::puppetdb) } -- To view, visit https://gerrit.wikimedia.org/r/365410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99b4481057a0a1238fbe9fffa7830e6748348fc2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update enwikiquote's logo
Urbanecm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365409 ) Change subject: Update enwikiquote's logo .. Update enwikiquote's logo Bug: T170722 Change-Id: Ia966cc5ff86644dac7aa47b1674711b4ed231b20 --- M static/images/project-logos/enwikiquote.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/09/365409/1 diff --git a/static/images/project-logos/enwikiquote.png b/static/images/project-logos/enwikiquote.png index 4184de0..51d929f 100644 --- a/static/images/project-logos/enwikiquote.png +++ b/static/images/project-logos/enwikiquote.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/365409 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia966cc5ff86644dac7aa47b1674711b4ed231b20 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Urbanecm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Allow experimental live update feature to be enab...
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365408 ) Change subject: RCFilters: Allow experimental live update feature to be enabled with query string parameter .. RCFilters: Allow experimental live update feature to be enabled with query string parameter For testing. Adding ?liveupdate=1 to the URL will unhide the live update button. Bug: T167743 Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd --- M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/08/365408/1 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js index a748063..3e7a3e1 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js @@ -58,7 +58,11 @@ $bottom = $( '' ) .addClass( 'mw-rcfilters-ui-filterWrapperWidget-bottom' ); - if ( mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ) { + if ( + mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) || + // Allow users to enable live update with ?liveupdate=1 + new mw.Uri().query.liveupdate + ) { $bottom.append( this.liveUpdateButton.$element ); } -- To view, visit https://gerrit.wikimedia.org/r/365408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...SiteScout[master]: Reorganize directory structure + file renaming
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365407 ) Change subject: Reorganize directory structure + file renaming .. Reorganize directory structure + file renaming Bug: T160849 Change-Id: Idd058e9a66f0cc43d635b6a781db6832b2d4f7c4 --- M extension.json R includes/SiteScout.alias.php R includes/SiteScout.class.php A includes/SiteScoutHTML.class.php A includes/SiteScoutXML.class.php R includes/specials/SpecialSiteScout.php R includes/specials/SpecialSiteScoutUpdate.php 7 files changed, 144 insertions(+), 144 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteScout refs/changes/07/365407/1 diff --git a/extension.json b/extension.json index c9d1cb6..86e0747 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "SiteScout", - "version": "2.0", + "version": "2.1.0", "author": [ "David Pean", "Jack Phoenix" @@ -19,14 +19,14 @@ ] }, "ExtensionMessagesFiles": { - "SiteScoutAliases": "SiteScout.alias.php" + "SiteScoutAliases": "includes/SiteScout.alias.php" }, "AutoloadClasses": { - "SiteScout": "SiteScoutClass.php", - "SiteScoutHTML": "SiteScoutClass.php", - "SiteScoutXML": "SiteScoutClass.php", - "SiteScoutPage": "SpecialSiteScout.php", - "SiteScoutUpdate": "SiteScout_Update.php" + "SiteScout": "includes/SiteScout.class.php", + "SiteScoutHTML": "includes/SiteScoutHTML.class.php", + "SiteScoutXML": "includes/SiteScoutXML.class.php", + "SiteScoutPage": "includes/specials/SpecialSiteScout.php", + "SiteScoutUpdate": "includes/specials/SiteScoutUpdate.php" }, "ResourceFileModulePaths": { "localBasePath": "", diff --git a/SiteScout.alias.php b/includes/SiteScout.alias.php similarity index 100% rename from SiteScout.alias.php rename to includes/SiteScout.alias.php diff --git a/SiteScoutClass.php b/includes/SiteScout.class.php similarity index 76% rename from SiteScoutClass.php rename to includes/SiteScout.class.php index 23d5327..a708646 100644 --- a/SiteScoutClass.php +++ b/includes/SiteScout.class.php @@ -610,140 +610,3 @@ } } } - -class SiteScoutHTML extends SiteScout { - - function displayItems() { - global $wgExtensionAssetsPath, $wgUserBoard; - - $output = ''; - $imgPath = $wgExtensionAssetsPath . '/SocialProfile/images/'; - $this->populateItems(); - $x = 1; - - foreach ( $this->items as $item ) { - if ( $x <= 30 ) { - $title = Title::makeTitle( $item['namespace'], $item['pagetitle'] ); - $user_title = Title::makeTitle( NS_USER, $item['username'] ); - $output .= ''; - $output .= ''; - - if ( $item['minor'] == 1 ) { - $output .= '' . wfMessage( 'sitescout-minor' )->plain() . ''; - } - if ( $item['new'] == 1 ) { - $output .= '' . wfMessage( 'sitescout-new' )->plain() . ''; - } - $output .= ''; - - if ( $item['type'] != 'networkupdate' ) { - $output .= Linker::link( - $title, - $title->getPrefixedText(), - array( 'class' => 'item-title' ) - ); - } else { - if ( $item['team_id'] ) { - $team = SportsTeams::getTeam( $item['team_id'] ); - $network_name = $team['name']; - } else { - $sport = SportsTeams::getSport( $item['sport_id'] ); - $network_name = $sport['name']; - } - $output .= '' . $network_name . ''; - } - - // $output .= '' . date( 'g:i a, m.d.y', $item['timestamp'] ) . ''; - $comment = $item['comment']; - if ( $item['type'] == 'comment' ) { - $comment = '' . -
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add PoolCounter specifically for morelike
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365405 ) Change subject: Add PoolCounter specifically for morelike .. Add PoolCounter specifically for morelike A reduction in the varnish cache hit rate for related articles led to an overload of the search cluster, because the very expensive morelike queries were in the same poolcounter as regular search queries. Split them out into their own pool counter to allow setting a much lower limit. Bug: T170648 Change-Id: I8c131cfba86aeb640aa921643d546e8dc774269f --- M includes/Searcher.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/05/365405/1 diff --git a/includes/Searcher.php b/includes/Searcher.php index 86901e0..f0bcc1b 100644 --- a/includes/Searcher.php +++ b/includes/Searcher.php @@ -969,6 +969,7 @@ $poolCounterTypes = [ 'regex' => 'CirrusSearch-Regex', 'prefix' => 'CirrusSearch-Prefix', + 'more_like' => 'CirrusSearch-MoreLike', ]; foreach ( $poolCounterTypes as $type => $counter ) { if ( $this->searchContext->isSyntaxUsed( $type ) ) { -- To view, visit https://gerrit.wikimedia.org/r/365405 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c131cfba86aeb640aa921643d546e8dc774269f 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] operations/mediawiki-config[master]: Configure CirrusSearch-MoreLike pool counter
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365406 ) Change subject: Configure CirrusSearch-MoreLike pool counter .. Configure CirrusSearch-MoreLike pool counter A reduction in the varnish cache hit rate for related articles led to an overload of the search cluster, because the very expensive morelike queries were in the same poolcounter as regular search queries. Split them out into their own pool counter to allow setting a much lower limit. Bug: T170648 Change-Id: Iec51f5407f63854c1557b38ed23cd3274d020876 --- M wmf-config/PoolCounterSettings.php 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/365406/1 diff --git a/wmf-config/PoolCounterSettings.php b/wmf-config/PoolCounterSettings.php index 135b746..a0062a0 100644 --- a/wmf-config/PoolCounterSettings.php +++ b/wmf-config/PoolCounterSettings.php @@ -14,7 +14,7 @@ 'CirrusSearch-Search' => [ 'class' => 'PoolCounter_Client', 'timeout' => 15, - 'workers' => 432, + 'workers' => 382, 'maxqueue' => 600, ], // Super common and mostly fast @@ -46,6 +46,15 @@ 'workers' => 50, 'maxqueue' => 200, ], + // These are very expensive and incredibly common at more than 5M per hour + // before varnish caching. If the somehow the cache hit rate drops this + // protects the cluster + 'CirrusSearch-MoreLike' => [ + 'class' => 'PoolCounter_Client', + 'timeout' => 5, + 'workers' => 50, + 'maxqueue' => 200, + ], 'FileRender' => [ 'class' => 'PoolCounter_Client', 'timeout' => 8, -- To view, visit https://gerrit.wikimedia.org/r/365406 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec51f5407f63854c1557b38ed23cd3274d020876 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] wikimedia...rainbow[develop]: Sister search note + fix KPI displays
Bearloga has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365404 ) Change subject: Sister search note + fix KPI displays .. Sister search note + fix KPI displays Change-Id: I798130566d0bbd05583b74c1605dfe36d59e5818 --- M server.R M tab_documentation/sister_search_traffic.md 2 files changed, 8 insertions(+), 6 deletions(-) Approvals: Bearloga: Verified; Looks good to me, approved diff --git a/server.R b/server.R index 8ba28fb..752f5ba 100644 --- a/server.R +++ b/server.R @@ -44,6 +44,10 @@ source("modules/key_performance_metrics/summary/boxes.R", local = TRUE) source("modules/key_performance_metrics/summary/sparklines.R", local = TRUE) source("modules/key_performance_metrics/monthly_metrics.R", local = TRUE) + source("modules/key_performance_metrics/load_times.R", local = TRUE) + source("modules/key_performance_metrics/zero_results.R", local = TRUE) + source("modules/key_performance_metrics/api_usage.R", local = TRUE) + source("modules/key_performance_metrics/augmented_clickthroughs.R", local = TRUE) # Desktop source("modules/desktop/events.R", local = TRUE) source("modules/desktop/load_times.R", local = TRUE) diff --git a/tab_documentation/sister_search_traffic.md b/tab_documentation/sister_search_traffic.md index e6df9ec..390d458 100644 --- a/tab_documentation/sister_search_traffic.md +++ b/tab_documentation/sister_search_traffic.md @@ -8,16 +8,14 @@ === Sister project (cross-wiki) snippets is a feature that adds search results from sister projects of Wikipedia to a sidebar on the search engine results page (SERP). If a query results in matches from the sister projects, users will be shown snippets from Wiktionary, Wikisource, Wikiquote and/or other projects. See [T162276](https://phabricator.wikimedia.org/T162276) for more details. -Some communities (e.g. Italian Wikipedia) developed their own cross-wiki search results sidebars, which is why we see some sister traffic before the deployment of the sister search feature across all Wikipedias. - -When viewing traffic split by project, these statistics include all languages and any click into a sister project snippet (either article or more results). - -English Wikipedia has a different display than all the other languages due to community feedback. Specifically, it does not show results from Commons/multimedia, Wikinews, and Wikiversity. Refer to [T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more details. +When viewing traffic split by project, these statistics include all languages and any click into a sister project snippet (either article or more results). Also, these are actual pageviews, not events from event logging. Notes, outages, and inaccuracies - -* '__A__': [on 2017-06-15](https://lists.wikimedia.org/pipermail/discovery/2017-June/001536.html) we deployed the sister search feature to all Wikipedia in all languages. +* English Wikipedia has a different display than all the other languages due to community feedback. Specifically, it does not show results from Commons/multimedia, Wikinews, and Wikiversity. Refer to [T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more details. +* Some projects (e.g. French and Catalan Wikipedias) use a [community-developed sister project search sidebar](https://simple.wiktionary.org/wiki/Module:Sister_project), which is why we see some sister traffic before the deployment of the sister search feature across all Wikipedias. * Wikisource had a unknown spike on 22 June 2017 that slightly skews that project's results and overall results for that day. Specifically, we calculated 5129 pageviews on Desktop from English Wikipedia, which is an extreme outlier that we removed and imputed. +* '__A__': [on 2017-06-15](https://lists.wikimedia.org/pipermail/discovery/2017-June/001536.html) we deployed the sister search feature to all Wikipedia in all languages. Questions, bug reports, and feature suggestions -- -- To view, visit https://gerrit.wikimedia.org/r/365404 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I798130566d0bbd05583b74c1605dfe36d59e5818 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/rainbow Gerrit-Branch: develop Gerrit-Owner: BearlogaGerrit-Reviewer: Bearloga ___ 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 note + fix KPI displays
Bearloga has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365404 ) Change subject: Sister search note + fix KPI displays .. Sister search note + fix KPI displays Change-Id: I798130566d0bbd05583b74c1605dfe36d59e5818 --- M server.R M tab_documentation/sister_search_traffic.md 2 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow refs/changes/04/365404/1 diff --git a/server.R b/server.R index 8ba28fb..752f5ba 100644 --- a/server.R +++ b/server.R @@ -44,6 +44,10 @@ source("modules/key_performance_metrics/summary/boxes.R", local = TRUE) source("modules/key_performance_metrics/summary/sparklines.R", local = TRUE) source("modules/key_performance_metrics/monthly_metrics.R", local = TRUE) + source("modules/key_performance_metrics/load_times.R", local = TRUE) + source("modules/key_performance_metrics/zero_results.R", local = TRUE) + source("modules/key_performance_metrics/api_usage.R", local = TRUE) + source("modules/key_performance_metrics/augmented_clickthroughs.R", local = TRUE) # Desktop source("modules/desktop/events.R", local = TRUE) source("modules/desktop/load_times.R", local = TRUE) diff --git a/tab_documentation/sister_search_traffic.md b/tab_documentation/sister_search_traffic.md index e6df9ec..390d458 100644 --- a/tab_documentation/sister_search_traffic.md +++ b/tab_documentation/sister_search_traffic.md @@ -8,16 +8,14 @@ === Sister project (cross-wiki) snippets is a feature that adds search results from sister projects of Wikipedia to a sidebar on the search engine results page (SERP). If a query results in matches from the sister projects, users will be shown snippets from Wiktionary, Wikisource, Wikiquote and/or other projects. See [T162276](https://phabricator.wikimedia.org/T162276) for more details. -Some communities (e.g. Italian Wikipedia) developed their own cross-wiki search results sidebars, which is why we see some sister traffic before the deployment of the sister search feature across all Wikipedias. - -When viewing traffic split by project, these statistics include all languages and any click into a sister project snippet (either article or more results). - -English Wikipedia has a different display than all the other languages due to community feedback. Specifically, it does not show results from Commons/multimedia, Wikinews, and Wikiversity. Refer to [T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more details. +When viewing traffic split by project, these statistics include all languages and any click into a sister project snippet (either article or more results). Also, these are actual pageviews, not events from event logging. Notes, outages, and inaccuracies - -* '__A__': [on 2017-06-15](https://lists.wikimedia.org/pipermail/discovery/2017-June/001536.html) we deployed the sister search feature to all Wikipedia in all languages. +* English Wikipedia has a different display than all the other languages due to community feedback. Specifically, it does not show results from Commons/multimedia, Wikinews, and Wikiversity. Refer to [T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more details. +* Some projects (e.g. French and Catalan Wikipedias) use a [community-developed sister project search sidebar](https://simple.wiktionary.org/wiki/Module:Sister_project), which is why we see some sister traffic before the deployment of the sister search feature across all Wikipedias. * Wikisource had a unknown spike on 22 June 2017 that slightly skews that project's results and overall results for that day. Specifically, we calculated 5129 pageviews on Desktop from English Wikipedia, which is an extreme outlier that we removed and imputed. +* '__A__': [on 2017-06-15](https://lists.wikimedia.org/pipermail/discovery/2017-June/001536.html) we deployed the sister search feature to all Wikipedia in all languages. Questions, bug reports, and feature suggestions -- -- To view, visit https://gerrit.wikimedia.org/r/365404 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I798130566d0bbd05583b74c1605dfe36d59e5818 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/rainbow Gerrit-Branch: develop Gerrit-Owner: Bearloga___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: [WIP] T169293: Colon prefixed media links still point to media
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365403 ) Change subject: [WIP] T169293: Colon prefixed media links still point to media .. [WIP] T169293: Colon prefixed media links still point to media Change-Id: Icf418e8cb2a69db20e0a9ebb5e929a6598b081fb --- M lib/wt2html/tt/LinkHandler.js M tests/parserTests.txt 2 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/03/365403/1 diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js index 19aa601..5d68e04 100644 --- a/lib/wt2html/tt/LinkHandler.js +++ b/lib/wt2html/tt/LinkHandler.js @@ -314,18 +314,23 @@ WikiLinkHandler.prototype.getWikiLinkHandler = function(token, target, isRedirect) { var title = target.title; if (title) { - if (!target.fromColonEscapedText && !isRedirect) { + if (isRedirect) { + return this.renderWikiLink.bind(this); + } + if (title.getNamespace().isMedia()) { + // Render as a media link. + return this.renderMedia.bind(this); + } + if (!target.fromColonEscapedText) { if (title.getNamespace().isFile()) { // Render as a file. return this.renderFile.bind(this); - } else if (title.getNamespace().isMedia()) { - return this.renderMedia.bind(this); - } else if (title.getNamespace().isCategory()) { + } + if (title.getNamespace().isCategory()) { // Render as a category membership. return this.renderCategory.bind(this); } } - // Colon-escaped or non-file/category links. // Render as plain wiki links. return this.renderWikiLink.bind(this); @@ -1896,7 +1901,8 @@ link.setShadowInfo('namespace', title.getNamespace().getNormalizedText(), nsText); link.setShadowInfo('fileName', imgHrefFileName, fileName); - var content = token.getAttribute('mw:maybeContent') || token.getAttribute('href'); + var content = Util.tokensToString(token.getAttribute('href')).replace(/^:/, ''); + content = token.getAttribute('mw:maybeContent') || content; cb({ tokens: [ link, content, new EndTagTk('a') ] }); }; diff --git a/tests/parserTests.txt b/tests/parserTests.txt index 9aa7324..be3d3a4 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -17156,13 +17156,16 @@ !! wikitext [[Media:Foobar.jpg]] [[Media:Video.ogv]] +[[:Media:Video.ogv]] !! html/php http://example.com/images/3/3a/Foobar.jpg; class="internal" title="Foobar.jpg">Media:Foobar.jpg +http://example.com/images/0/00/Video.ogv; class="internal" title="Video.ogv">Media:Video.ogv http://example.com/images/0/00/Video.ogv; class="internal" title="Video.ogv">Media:Video.ogv !! html/parsoid Media:Foobar.jpg -Media:Video.ogv +Media:Video.ogv +Media:Video.ogv !! end !! test -- To view, visit https://gerrit.wikimedia.org/r/365403 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf418e8cb2a69db20e0a9ebb5e929a6598b081fb 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] operations/puppet[production]: install_server: netmon1003 use jessie, not stretch
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365376 ) Change subject: install_server: netmon1003 use jessie, not stretch .. install_server: netmon1003 use jessie, not stretch Bug: T170655 Change-Id: I85236f65ee182b8b64c3cd4dc4653e01a62a0cb6 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 991ea20..5c82228 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -5574,8 +5574,6 @@ host netmon1003 { hardware ethernet aa:00:00:79:17:b5; fixed-address netmon1003.wikimedia.org; -option pxelinux.pathprefix "stretch-installer/"; -filename "stretch-installer/debian-installer/amd64/pxelinux.0"; } host netmon2001 { -- To view, visit https://gerrit.wikimedia.org/r/365376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85236f65ee182b8b64c3cd4dc4653e01a62a0cb6 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn 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]: install_server: netmon1003 use jessie, not stretch
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365376 ) Change subject: install_server: netmon1003 use jessie, not stretch .. install_server: netmon1003 use jessie, not stretch Bug: T170655 Change-Id: I85236f65ee182b8b64c3cd4dc4653e01a62a0cb6 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/365376/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 158943f..bb14329 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -5554,8 +5554,6 @@ host netmon1003 { hardware ethernet aa:00:00:79:17:b5; fixed-address netmon1003.wikimedia.org; -option pxelinux.pathprefix "stretch-installer/"; -filename "stretch-installer/debian-installer/amd64/pxelinux.0"; } host netmon2001 { -- To view, visit https://gerrit.wikimedia.org/r/365376 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85236f65ee182b8b64c3cd4dc4653e01a62a0cb6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Reduce saved queries items height
Mooeypoo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365375 ) Change subject: RCFilters: Reduce saved queries items height .. RCFilters: Reduce saved queries items height Bug: T164861 Change-Id: I30a558bc73cc552e0d2b70ab7fd9299e866fd6d2 --- M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/365375/1 diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less index fb0b93b..2daa76e 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less @@ -1,5 +1,6 @@ .mw-rcfilters-ui-savedLinksListItemWidget { - padding: 0.2em 0.7em; + padding: 0 0.5em; + line-height: normal; &:hover { // Mimicking optionWidget styles @@ -48,6 +49,7 @@ &-content { width: 100%; + line-height: normal; } } -- To view, visit https://gerrit.wikimedia.org/r/365375 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30a558bc73cc552e0d2b70ab7fd9299e866fd6d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mooeypoo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: update mediawiki-title dependency
BearND has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365364 ) Change subject: Hygiene: update mediawiki-title dependency .. Hygiene: update mediawiki-title dependency Similar to what RB did in https://github.com/wikimedia/restbase/commit/58c1f41#diff-8930dc130a31fecef5d3002db29cffa0 Change-Id: I49dc4d48feeca742f90aae385ff523e676a3c403 --- M lib/mwapi.js M package.json 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/64/365364/1 diff --git a/lib/mwapi.js b/lib/mwapi.js index 9aeb202..1709de5 100644 --- a/lib/mwapi.js +++ b/lib/mwapi.js @@ -94,7 +94,7 @@ format: 'json', formatversion: 2, meta: 'siteinfo', -siprop: 'general|namespaces|namespacealiases' +siprop: 'general|namespaces|namespacealiases|specialpagealiases' }; siteInfoCache[rp.domain] = api.mwApiGet(app, req.params.domain, query) .then((res) => { @@ -106,6 +106,7 @@ }, namespaces: res.body.query.namespaces, namespacealiases: res.body.query.namespacealiases, +specialpagealiases: res.body.query.specialpagealiases, sharedRepoRootURI: mwapi.findSharedRepoDomain(res) }; }); diff --git a/package.json b/package.json index d109237..df94a4f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "escape-string-regexp": "^1.0.5", "express": "^4.14.0", "js-yaml": "^3.7.0", -"mediawiki-title": "^0.5.6", +"mediawiki-title": "^0.6.3", "preq": "^0.5.1", "service-runner": "^2.2.5", "swagger-router": "^0.5.5", -- To view, visit https://gerrit.wikimedia.org/r/365364 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I49dc4d48feeca742f90aae385ff523e676a3c403 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] research...wheels[master]: Bumps revscoring to 1.3.17:
Halfak has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365354 ) Change subject: Bumps revscoring to 1.3.17: .. Bumps revscoring to 1.3.17: Change-Id: I414586cc0e90c6c0eff678a45fafdacd18990e96 --- D revscoring-1.3.15-py2.py3-none-any.whl A revscoring-1.3.17-py2.py3-none-any.whl 2 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels refs/changes/54/365354/1 diff --git a/revscoring-1.3.15-py2.py3-none-any.whl b/revscoring-1.3.15-py2.py3-none-any.whl deleted file mode 100644 index cfe442e..000 --- a/revscoring-1.3.15-py2.py3-none-any.whl +++ /dev/null Binary files differ diff --git a/revscoring-1.3.17-py2.py3-none-any.whl b/revscoring-1.3.17-py2.py3-none-any.whl new file mode 100644 index 000..93b1a5f --- /dev/null +++ b/revscoring-1.3.17-py2.py3-none-any.whl Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/365354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I414586cc0e90c6c0eff678a45fafdacd18990e96 Gerrit-PatchSet: 1 Gerrit-Project: research/ores/wheels Gerrit-Branch: master Gerrit-Owner: Halfak___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: git ignore category folder
Xqt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365338 ) Change subject: git ignore category folder .. git ignore category folder makecat creates a category folder. Ignore it in git. Change-Id: I34324380f205c57421bb01ef80419f4b987069a8 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/38/365338/1 diff --git a/.gitignore b/.gitignore index eb433f7..0b56aca 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /.tox /*.egg /data* +category* logs* *apicache* *pycache* -- To view, visit https://gerrit.wikimedia.org/r/365338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34324380f205c57421bb01ef80419f4b987069a8 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: SenseId property type with demo data
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365246 ) Change subject: SenseId property type with demo data .. SenseId property type with demo data Didn't want to introduce extra complexity, so just put test data in both Sense.js and SenseIdFormatter.php If you will need to add something don't forget that you need to add in both. Bug: T168373 Change-Id: I1d91aae24c4aa9577d08690ddc32ac2be7ebb6e3 --- M WikibaseLexeme.datatypes.php M extension.json M i18n/en.json M i18n/qqq.json A resources/experts/Sense.js A src/PropertyType/SenseIdFormatter.php 6 files changed, 241 insertions(+), 2 deletions(-) Approvals: WMDE-leszek: Looks good to me, approved Jonas Kress (WMDE): Looks good to me, approved jenkins-bot: Verified diff --git a/WikibaseLexeme.datatypes.php b/WikibaseLexeme.datatypes.php index 55bb50c..77fb280 100644 --- a/WikibaseLexeme.datatypes.php +++ b/WikibaseLexeme.datatypes.php @@ -21,6 +21,7 @@ use Wikibase\Lexeme\DataModel\Lexeme; use Wikibase\Lexeme\PropertyType\FormIdFormatter; use Wikibase\Lexeme\PropertyType\FormIdParser; +use Wikibase\Lexeme\PropertyType\SenseIdFormatter; use Wikibase\Repo\WikibaseRepo; return [ @@ -42,4 +43,14 @@ }, 'value-type' => 'string', ], + 'PT:wikibase-lexeme-sense' => [ + 'expert-module' => 'wikibase.experts.Sense', + 'validator-factory-callback' => function() { + return []; + }, + 'formatter-factory-callback' => function( $format, FormatterOptions $options ) { + return new SenseIdFormatter(); + }, + 'value-type' => 'string', + ], ]; diff --git a/extension.json b/extension.json index 62912b6..5199467 100644 --- a/extension.json +++ b/extension.json @@ -346,6 +346,15 @@ "wikibase.experts.Entity" ] }, + "wikibase.experts.Sense": { + "scripts": [ + "experts/Sense.js" + ], + "dependencies": [ + "jquery.valueview.Expert", + "wikibase.experts.Entity" + ] + }, "wikibase.lexeme.styles": { "position": "top", "styles": [ diff --git a/i18n/en.json b/i18n/en.json index 423d1de..42a7abb 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -20,5 +20,6 @@ "wikibase-lexeme-gloss-empty": "No gloss defined", "wikibase-lexeme-summary-wbeditentity-update": "Changed a lexeme", "datatypes-type-wikibase-lexeme": "Lexeme", - "datatypes-type-wikibase-lexeme-form": "Lexeme Form" + "datatypes-type-wikibase-lexeme-form": "Lexeme Form", + "datatypes-type-wikibase-lexeme-sense": "Lexeme Sense" } diff --git a/i18n/qqq.json b/i18n/qqq.json index ba2e92e..0f2a3cc 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -25,5 +25,6 @@ "wikibase-lexeme-gloss-empty": "Placeholder message displayed instead of the gloss of the sense in case the gloss in the display language has not been specified yet.", "wikibase-lexeme-summary-wbeditentity-update": "Auto-generated edit summary when editing a lexeme", "datatypes-type-wikibase-lexeme": "The name of a data type for lexemes in Wikibase.\n{{Identical|Lexeme}}", - "datatypes-type-wikibase-lexeme-form": "The name of a data type for lexeme forms in Wikibase." + "datatypes-type-wikibase-lexeme-form": "The name of a data type for lexeme forms in Wikibase.", + "datatypes-type-wikibase-lexeme-sense": "The name of a data type for lexeme senses in Wikibase." } diff --git a/resources/experts/Sense.js b/resources/experts/Sense.js new file mode 100644 index 000..9f54e87 --- /dev/null +++ b/resources/experts/Sense.js @@ -0,0 +1,123 @@ +module.exports = ( function ( wb, vv ) { + 'use strict'; + + var PARENT = wb.experts.Entity; + + //Basically, copy-paste of src/PropertyType/SenseIdFormatter.php:18-48 + //If you change something here, change also there + var existingSenses = [ + new Sense( 'L13', 'hard', 'English adjective', 'S1', 'presenting difficulty' ), + new Sense( 'L13', 'hard', 'English adjective', 'S2', 'resisting deformation' ), + new Sense( 'L3627', 'difficult', 'English adjective', 'S4', 'not easy, requiring skill' ), + new Sense( 'L283', 'schwierig', 'German adjective', 'S2', 'complicated' ), + new Sense( 'L465', 'dur', 'French adjective', 'S1', 'hard' ), + new Sense( 'L801', 'easy', 'English adjective', 'S1', 'not difficult' ), + new Sense( 'L802', 'simple', 'English adjective', 'S1', 'not difficult'
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add a role for ArticleCreationWorkflow
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365282 ) Change subject: Add a role for ArticleCreationWorkflow .. Add a role for ArticleCreationWorkflow Bug: T170354 Change-Id: I842e363b60d419cdf27711fd2253384db2d911bd --- A puppet/modules/role/manifests/articlecreationworkflow.pp 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/manifests/articlecreationworkflow.pp b/puppet/modules/role/manifests/articlecreationworkflow.pp new file mode 100644 index 000..b6bf67d --- /dev/null +++ b/puppet/modules/role/manifests/articlecreationworkflow.pp @@ -0,0 +1,7 @@ +# == Class: role::articlecreationworkflow +# The ArticleCreationWorkflow[1] allows to customize page creation experience for new users. +# +# [1] https://www.mediawiki.org/wiki/Extension:ArticleCreationWorkflow +class role::articlecreationworkflow { + mediawiki::extension { 'ArticleCreationWorkflow': } +} -- To view, visit https://gerrit.wikimedia.org/r/365282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I842e363b60d419cdf27711fd2253384db2d911bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall 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...Wikibase[master]: Make a few unspecific array type hints more specific
Thiemo Mättig (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365311 ) Change subject: Make a few unspecific array type hints more specific .. Make a few unspecific array type hints more specific The one in the .js file is an actual mistake, because the parameter is not optional. Change-Id: Ie381e97d49c8db018746d8dd31c085c7a1606209 --- M repo/tests/phpunit/includes/Api/EntityTestHelper.php M view/resources/jquery/wikibase/jquery.wikibase.listview.js 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/11/365311/1 diff --git a/repo/tests/phpunit/includes/Api/EntityTestHelper.php b/repo/tests/phpunit/includes/Api/EntityTestHelper.php index 82bdd9c..7e0e72f 100644 --- a/repo/tests/phpunit/includes/Api/EntityTestHelper.php +++ b/repo/tests/phpunit/includes/Api/EntityTestHelper.php @@ -283,8 +283,8 @@ * Get the data of the entity with the given handle we received after creation * * @param string $handle -* @param null|array $props array of props we want the output to have -* @param null|array $langs array of langs we want the output to have +* @param string[]|null $props Array of property keys we want the output to have +* @param string[]|null $langs Array of language codes we want the output to have * * @throws OutOfBoundsException * @return mixed @@ -304,8 +304,8 @@ * Remove props and langs that are not included in $props or $langs from the $entityOutput array * * @param array $entityOutput Array of entity output -* @param array $props Props to keep in the output -* @param null|array $languageCodes Languages to keep in the output +* @param string[] $props Property keys to keep in the output +* @param string[]|null $languageCodes Languages to keep in the output * * @return array Array of entity output with props and langs removed */ diff --git a/view/resources/jquery/wikibase/jquery.wikibase.listview.js b/view/resources/jquery/wikibase/jquery.wikibase.listview.js index 3c41c99..2aff4c4 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.listview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.listview.js @@ -48,7 +48,7 @@ /** * The DOM elements this `listview`'s element contained when it was initialized. These DOM * elements are reused in `this._addLiValue` until the array is empty. -* @property [HTMLElement[]] +* @property {HTMLElement[]|null} * @private */ _reusedItems: null, -- To view, visit https://gerrit.wikimedia.org/r/365311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie381e97d49c8db018746d8dd31c085c7a1606209 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE)___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Introduce a disk usage component, and use it for Compilations.
Dbrant has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365294 ) Change subject: Introduce a disk usage component, and use it for Compilations. .. Introduce a disk usage component, and use it for Compilations. The only difficulty encountered in the making of this component is that it doesn't seem to be possible for us to determine how much space our app uses. The system doesn't provide this information easily. Instead this component currently only states the amount of space used by compilations, whose magnitude will likely overshadow the storage footprint of the app itself. Bug: T164387 Change-Id: Ia97c84cf6c43d9fdf4e4b47513fbc972ea32382b --- A app/src/main/java/org/wikipedia/offline/DiskUsageView.java M app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java A app/src/main/res/drawable/shape_circle_outline.xml A app/src/main/res/drawable/shape_disk_usage.xml M app/src/main/res/layout/fragment_local_compilations.xml A app/src/main/res/layout/view_disk_usage.xml M app/src/main/res/values-qq/strings.xml M app/src/main/res/values/strings.xml 8 files changed, 295 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/94/365294/1 diff --git a/app/src/main/java/org/wikipedia/offline/DiskUsageView.java b/app/src/main/java/org/wikipedia/offline/DiskUsageView.java new file mode 100644 index 000..b58380a --- /dev/null +++ b/app/src/main/java/org/wikipedia/offline/DiskUsageView.java @@ -0,0 +1,103 @@ +package org.wikipedia.offline; + +import android.annotation.TargetApi; +import android.content.Context; +import android.content.res.ColorStateList; +import android.os.Build; +import android.os.Environment; +import android.support.v4.content.ContextCompat; +import android.support.v4.view.ViewCompat; +import android.util.AttributeSet; +import android.view.View; +import android.widget.LinearLayout; +import android.widget.TextView; + +import org.wikipedia.R; +import org.wikipedia.util.ResourceUtil; + +import java.io.File; + +import butterknife.BindView; +import butterknife.ButterKnife; + +public class DiskUsageView extends LinearLayout { +private static final int KILOBYTE = 1000; + +@BindView(R.id.view_disk_usage_size_text) TextView sizeText; +@BindView(R.id.view_disk_usage_text_app) TextView usageAppText; +@BindView(R.id.view_disk_usage_text_free) TextView usageFreeText; +@BindView(R.id.view_disk_usage_bar_other) View otherBar; +@BindView(R.id.view_disk_usage_bar_used) View usedBar; +@BindView(R.id.view_disk_usage_bar_free) View freeBar; +@BindView(R.id.view_disk_usage_dot_other) View otherDot; +@BindView(R.id.view_disk_usage_dot_used) View usedDot; +@BindView(R.id.view_disk_usage_dot_free) View freeDot; + +public DiskUsageView(Context context) { +super(context); +init(); +} + +public DiskUsageView(Context context, AttributeSet attrs) { +super(context, attrs); +init(); +} + +public DiskUsageView(Context context, AttributeSet attrs, int defStyleAttr) { +super(context, attrs, defStyleAttr); +init(); +} + +@TargetApi(Build.VERSION_CODES.LOLLIPOP) +public DiskUsageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { +super(context, attrs, defStyleAttr, defStyleRes); +init(); +} + +public void update(long usedBytes) { +File path = Environment.getDataDirectory(); +float availableGB = bytesToGB(path.getFreeSpace()); +float otherGB = bytesToGB(path.getTotalSpace()); +float usedGB = bytesToGB(usedBytes); +otherGB -= usedGB; + + sizeText.setText(getResources().getString(R.string.storage_size_format, usedGB)); + usageFreeText.setText(getResources().getString(R.string.storage_size_free, availableGB)); + +LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) otherBar.getLayoutParams(); +params.weight = otherGB; +otherBar.setLayoutParams(params); + +params = (LinearLayout.LayoutParams) freeBar.getLayoutParams(); +params.weight = availableGB; +freeBar.setLayoutParams(params); + +params = (LinearLayout.LayoutParams) usedBar.getLayoutParams(); +params.weight = usedGB; +usedBar.setLayoutParams(params); +} + +private void init() { +inflate(getContext(), R.layout.view_disk_usage, this); +ButterKnife.bind(this); +setOrientation(VERTICAL); + +ViewCompat.setBackgroundTintList(otherDot, new ColorStateList(new int[][]{new int[]{}}, +new int[]{ContextCompat.getColor(getContext(), +ResourceUtil.getThemedAttributeId(getContext(), R.attr.window_inverse_color))})); + +ViewCompat.setBackgroundTintList(usedDot, new ColorStateList(new int[][]{new int[]{}}, +new
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: PayPal EC: use ajax to get redirect URL
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/364825 ) Change subject: PayPal EC: use ajax to get redirect URL .. PayPal EC: use ajax to get redirect URL Act like Adyen or Ingenico, showing the form and using and AJAX call to do the server-to-server setup in the background and return a formaction URL. Slightly different from Adyen and Ingenico, this will submit instantly and redirect instead of showing an iframe. This might solve our dead session errors. Bug: T167923 Change-Id: Ifad296dbd09dc6935ecd8799278e411ef3b14548 --- M extension.json M gateway_common/donation.api.php A paypal_gateway/express_checkout/forms/js/paypal.js M paypal_gateway/express_checkout/paypal_express.adapter.php M paypal_gateway/express_checkout/paypal_express_gateway.body.php 5 files changed, 25 insertions(+), 11 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index d6367ad..ca62edd 100644 --- a/extension.json +++ b/extension.json @@ -203,6 +203,10 @@ "scripts": "globalcollect_gateway/forms/js/ingenico.js", "dependencies": "ext.donationInterface.forms" }, + "ext.donationinterface.paypal.scripts": { + "scripts": "paypal_gateway/express_checkout/forms/js/paypal.js", + "dependencies": "ext.donationInterface.forms" + }, "ext.donationinterface.amazon.styles": { "styles": "amazon_gateway/amazon.css" }, diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php index 5d38d3c..7ad1075 100644 --- a/gateway_common/donation.api.php +++ b/gateway_common/donation.api.php @@ -48,6 +48,9 @@ } } elseif ( $this->gateway == 'adyen' ) { $result = $gatewayObj->do_transaction( 'donate' ); + } elseif ( $this->gateway === 'paypal_ec' ) { + $gatewayObj->doPayment(); + $result = $gatewayObj->getTransactionResponse(); } // $normalizedData = $gatewayObj->getData_Unstaged_Escaped(); diff --git a/paypal_gateway/express_checkout/forms/js/paypal.js b/paypal_gateway/express_checkout/forms/js/paypal.js new file mode 100644 index 000..9f41454 --- /dev/null +++ b/paypal_gateway/express_checkout/forms/js/paypal.js @@ -0,0 +1,12 @@ +( function ( $, mw ) { + var di = mw.donationInterface; + + function redirect( result ) { + top.location.href = result.formaction; + } + + di.forms.submit = function () { + di.forms.callDonateApi( redirect ); + }; + di.forms.submit(); +} )( jQuery, mediaWiki ); diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php b/paypal_gateway/express_checkout/paypal_express.adapter.php index c614407..f40e39b 100644 --- a/paypal_gateway/express_checkout/paypal_express.adapter.php +++ b/paypal_gateway/express_checkout/paypal_express.adapter.php @@ -420,8 +420,11 @@ case 'SetExpressCheckout_recurring': $this->checkResponseAck( $response ); $this->addResponseData( $this->unstageKeys( $response ) ); - $this->transaction_response->setRedirect( - $this->account_config['RedirectURL'] . $response['TOKEN'] ); + $redirectUrl = $this->account_config['RedirectURL'] . $response['TOKEN']; + $this->transaction_response->setRedirect( $redirectUrl ); + $this->transaction_response->setData( array( + 'FORMACTION' => $redirectUrl + ) ); break; case 'GetExpressCheckoutDetails': $this->checkResponseAck( $response ); diff --git a/paypal_gateway/express_checkout/paypal_express_gateway.body.php b/paypal_gateway/express_checkout/paypal_express_gateway.body.php index 2d7e4ce..8f624ba 100644 --- a/paypal_gateway/express_checkout/paypal_express_gateway.body.php +++ b/paypal_gateway/express_checkout/paypal_express_gateway.body.php @@ -8,17 +8,9 @@ */ protected function handleRequest() { $this->getOutput()->allowClickjacking(); - $this->getOutput()->addModules( 'ext.donationInterface.forms' ); + $this->getOutput()->addModules( 'ext.donationinterface.paypal.scripts' ); $this->handleDonationRequest(); } - /** -* Always attempt to pass through transparently. -* -* @see GatewayPage::isProcessImmediate() -*/ -
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add urlencode for URL encoding of lang values
Fomafix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365290 ) Change subject: Add urlencode for URL encoding of lang values .. Add urlencode for URL encoding of lang values Change-Id: If7d21223536d1873b3bfed154649d3dcb9850f9b --- M includes/specialpage/LoginSignupSpecialPage.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/365290/1 diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 5c048a2..0600642 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -761,7 +761,7 @@ if ( $this->showCreateAccountLink() ) { # Pass any language selection on to the mode switch link if ( $this->mLanguage ) { - $linkq .= '=' . $this->mLanguage; + $linkq .= '=' . urlencode( $this->mLanguage ); } // Supply URL, login template creates the button. $template->set( 'createOrLoginHref', $titleObj->getLocalURL( $linkq ) ); @@ -1149,7 +1149,7 @@ $linkq = $this->getReturnToQueryStringFragment(); // Pass any language selection on to the mode switch link if ( $this->mLanguage ) { - $linkq .= '=' . $this->mLanguage; + $linkq .= '=' . urlencode( $this->mLanguage ); } $loggedIn = $this->getUser()->isLoggedIn(); -- To view, visit https://gerrit.wikimedia.org/r/365290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7d21223536d1873b3bfed154649d3dcb9850f9b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Fomafix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adds aspell-el to ORES base.pp
Halfak has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365289 ) Change subject: Adds aspell-el to ORES base.pp .. Adds aspell-el to ORES base.pp Change-Id: I88e511b24b0333aa8b2084dde8a08f5cd055b8d4 --- M modules/ores/manifests/base.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/89/365289/1 diff --git a/modules/ores/manifests/base.pp b/modules/ores/manifests/base.pp index 201b130..a9da95d 100644 --- a/modules/ores/manifests/base.pp +++ b/modules/ores/manifests/base.pp @@ -19,7 +19,8 @@ # Spellcheck packages for supported languages # NOTE: aspell-id is imported in our apt: # https://apt.wikimedia.org/wikimedia/pool/thirdparty/a/aspell-id/ -require_package('aspell-ar', 'aspell-id', 'aspell-pl', 'aspell-sv', +require_package('aspell-ar', 'aspell-el', 'aspell-id', 'aspell-pl', +'aspell-sv', 'aspell-ro', 'hunspell-vi', 'myspell-cs', -- To view, visit https://gerrit.wikimedia.org/r/365289 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88e511b24b0333aa8b2084dde8a08f5cd055b8d4 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Halfak___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Allow uploads to autoconfirmed-only at huwiki
Urbanecm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365288 ) Change subject: Allow uploads to autoconfirmed-only at huwiki .. Allow uploads to autoconfirmed-only at huwiki Bug: T169438 Change-Id: If95d3c4c83df1e9b76775b5c75f3cb3d6ce5a80a --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/88/365288/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 5d21213..e6bff23 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8444,7 +8444,6 @@ 'huwiki' => [ 'editor' => [ 'noratelimit' => true ], 'sysop' => [ 'templateeditor' => true ], // T74055 - 'user' => [ 'upload' => true ], // T30576 'templateeditor' => [ 'templateeditor' => true ], // T74055 'interface-editor' => [ 'editinterface' => true, 'editusercss' => true, 'edituserjs' => true ], // T109408 ], -- To view, visit https://gerrit.wikimedia.org/r/365288 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If95d3c4c83df1e9b76775b5c75f3cb3d6ce5a80a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Urbanecm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...recommendation-api[master]: Fix split call
Mobrovac has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365211 ) Change subject: Fix split call .. Fix split call Change-Id: I8e74740e7ca8cc4506b2f927f7e00d4f320b6c6a --- M routes/translation.js 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Mobrovac: Verified; Looks good to me, approved diff --git a/routes/translation.js b/routes/translation.js index 158c6fd..191bed9 100644 --- a/routes/translation.js +++ b/routes/translation.js @@ -46,7 +46,7 @@ * Gets the articles existing in source but missing in domain. */ router.get('/articles/:source', (req, res) => { -const target = req.params.domain.split('.', 0); +const target = req.params.domain.split('.')[0]; return recommend(req, res, req.params.source, target); }); @@ -56,7 +56,7 @@ * Gets the articles existing in source but missing in domain based on seed. */ router.get('/articles/:source/:seed', (req, res) => { -const target = req.params.domain.split('.', 0); +const target = req.params.domain.split('.')[0]; return recommend(req, res, req.params.source, target, req.params.seed); }); -- To view, visit https://gerrit.wikimedia.org/r/365211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e74740e7ca8cc4506b2f927f7e00d4f320b6c6a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/recommendation-api Gerrit-Branch: master Gerrit-Owner: NschaafGerrit-Reviewer: Mobrovac ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...RegexBlock[master]: Specify RegexBlock as an antispam extension
SamanthaNguyen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365287 ) Change subject: Specify RegexBlock as an antispam extension .. Specify RegexBlock as an antispam extension While it technically implements a special page, it's more specific and accurate to specify it's purpose as an anti-spam extension. Change-Id: I6638279da37c8ba1cbef2944b9f104f62dd3211f --- M extension.json 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RegexBlock refs/changes/87/365287/1 diff --git a/extension.json b/extension.json index 4b2b43f..e7e93e6 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "RegexBlock", - "version": "1.4", + "version": "1.4.1", "author": [ "Bartek Łapiński", "Tomasz Klim", @@ -12,7 +12,7 @@ "license-name": "GPL-2.0+", "url": "https://www.mediawiki.org/wiki/Extension:RegexBlock;, "descriptionmsg": "regexblock-desc", - "type": "specialpage", + "type": "antispam", "config": { "ContactLink": "Special:Contact", "RegexBlockDatabase": false -- To view, visit https://gerrit.wikimedia.org/r/365287 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6638279da37c8ba1cbef2944b9f104f62dd3211f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RegexBlock Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: librenms: bugfix for HTTPS redirect
BBlack has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365286 ) Change subject: librenms: bugfix for HTTPS redirect .. librenms: bugfix for HTTPS redirect The HTTP->HTTPS redirect was using an empty hostname in the Location header. Turns out this is due to a type of @sitename as @site_name. Also fixed up the other obvious place the templated value could/should be used here. Change-Id: Ie76c15129aeadd618b47b17996b7a011f141e198 --- M modules/librenms/templates/apache.conf.erb 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/librenms/templates/apache.conf.erb b/modules/librenms/templates/apache.conf.erb index 4b5dcf2..2fdc25b 100644 --- a/modules/librenms/templates/apache.conf.erb +++ b/modules/librenms/templates/apache.conf.erb @@ -1,10 +1,10 @@ -ServerName librenms.wikimedia.org +ServerName <%= @sitename %> ServerAdmin n...@wikimedia.org Include /etc/acme/challenge-apache.conf RewriteEngine on RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ -RewriteRule ^/(.*)$ https://<%= @site_name %>/$1 [L,R=301] +RewriteRule ^/(.*)$ https://<%= @sitename %>/$1 [L,R=301] -- To view, visit https://gerrit.wikimedia.org/r/365286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie76c15129aeadd618b47b17996b7a011f141e198 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack 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]: librenms: bugfix for HTTPS redirect
BBlack has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365286 ) Change subject: librenms: bugfix for HTTPS redirect .. librenms: bugfix for HTTPS redirect The HTTP->HTTPS redirect was using an empty hostname in the Location header. Turns out this is due to a type of @sitename as @site_name. Also fixed up the other obvious place the templated value could/should be used here. Change-Id: Ie76c15129aeadd618b47b17996b7a011f141e198 --- M modules/librenms/templates/apache.conf.erb 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/86/365286/1 diff --git a/modules/librenms/templates/apache.conf.erb b/modules/librenms/templates/apache.conf.erb index 4b5dcf2..2fdc25b 100644 --- a/modules/librenms/templates/apache.conf.erb +++ b/modules/librenms/templates/apache.conf.erb @@ -1,10 +1,10 @@ -ServerName librenms.wikimedia.org +ServerName <%= @sitename %> ServerAdmin n...@wikimedia.org Include /etc/acme/challenge-apache.conf RewriteEngine on RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ -RewriteRule ^/(.*)$ https://<%= @site_name %>/$1 [L,R=301] +RewriteRule ^/(.*)$ https://<%= @sitename %>/$1 [L,R=301] -- To view, visit https://gerrit.wikimedia.org/r/365286 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie76c15129aeadd618b47b17996b7a011f141e198 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Pool db2072 with low load as s1 main traffic
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365285 ) Change subject: mariadb: Pool db2072 with low load as s1 main traffic .. mariadb: Pool db2072 with low load as s1 main traffic Bug: T170662 Change-Id: I77b262ad8fa48bea2081d6410ac0572c4e0686a4 --- M wmf-config/db-codfw.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/85/365285/1 diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index ac3a59e..d37b218 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -98,10 +98,11 @@ 'db2042' => 50, # C6 2.9TB 160GB, rc, log 'db2048' => 400, # C6 2.9TB 160GB, 'db2055' => 50, # D6 3.3TB 160GB, dump (inactive), vslow, api -# 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 # down for cloning + 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 'db2069' => 50, # D6 3.3TB 160GB, api 'db2070' => 400, # C5 3.3TB 160GB 'db2071' => 50, # A6 3.6TB 512GB, api + 'db2072' => 50, # B6 3.6TB 512GB ], 's2' => [ 'db2017' => 0, # B6 2.9TB 96GB, master @@ -246,7 +247,7 @@ ], 'api' => [ 'db2055' => 1, -# 'db2062' => 1, + 'db2062' => 1, 'db2069' => 1, 'db2071' => 5, ], -- To view, visit https://gerrit.wikimedia.org/r/365285 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77b262ad8fa48bea2081d6410ac0572c4e0686a4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "mariadb: Depool db2062 to clone it to db2072, and ot...
Hello Marostegui, Florianschmidtwelzow, jenkins-bot, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/365284 to review the following change. Change subject: Revert "mariadb: Depool db2062 to clone it to db2072, and other hosts" .. Revert "mariadb: Depool db2062 to clone it to db2072, and other hosts" This reverts commit 32a80cc3b623daccbb9ee468838a1f620dce9b9d. Change-Id: Ie048aaf63ebdc3b336d52fb18711e7d5fbe1 --- M wmf-config/db-codfw.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/84/365284/1 diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php index ac3a59e..faae4ce 100644 --- a/wmf-config/db-codfw.php +++ b/wmf-config/db-codfw.php @@ -98,7 +98,7 @@ 'db2042' => 50, # C6 2.9TB 160GB, rc, log 'db2048' => 400, # C6 2.9TB 160GB, 'db2055' => 50, # D6 3.3TB 160GB, dump (inactive), vslow, api -# 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 # down for cloning + 'db2062' => 50, # B5 3.3TB 160GB, api # mariadb 10.1 'db2069' => 50, # D6 3.3TB 160GB, api 'db2070' => 400, # C5 3.3TB 160GB 'db2071' => 50, # A6 3.6TB 512GB, api @@ -246,7 +246,7 @@ ], 'api' => [ 'db2055' => 1, -# 'db2062' => 1, + 'db2062' => 1, 'db2069' => 1, 'db2071' => 5, ], -- To view, visit https://gerrit.wikimedia.org/r/365284 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie048aaf63ebdc3b336d52fb18711e7d5fbe1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JcrespoGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Marostegui 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/software[master]: mariadb: Add db2072 to the list of enwiki hosts
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365283 ) Change subject: mariadb: Add db2072 to the list of enwiki hosts .. mariadb: Add db2072 to the list of enwiki hosts Bug: T170662 Change-Id: I724ffa3133f5a88ff925c85168a21a495c711cda --- M dbtools/s1.hosts 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software refs/changes/83/365283/1 diff --git a/dbtools/s1.hosts b/dbtools/s1.hosts index e1a6387..f1d7608 100644 --- a/dbtools/s1.hosts +++ b/dbtools/s1.hosts @@ -7,6 +7,7 @@ db2069.codfw.wmnet 3306 db2070.codfw.wmnet 3306 db2071.codfw.wmnet 3306 +db2072.codfw.wmnet 3306 dbstore2001.codfw.wmnet3306 dbstore2002.codfw.wmnet3306 db2016.codfw.wmnet 3306 -- To view, visit https://gerrit.wikimedia.org/r/365283 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I724ffa3133f5a88ff925c85168a21a495c711cda Gerrit-PatchSet: 1 Gerrit-Project: operations/software Gerrit-Branch: master Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] convert bytestring to unicode for py3
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365280 ) Change subject: [bugfix] convert bytestring to unicode for py3 .. [bugfix] convert bytestring to unicode for py3 Bug: T170678 Change-Id: I76d6cad5feac7ebe92c95d08549f632804809438 --- M setup.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/setup.py b/setup.py index cb74bca..6ee8cd6 100644 --- a/setup.py +++ b/setup.py @@ -196,7 +196,7 @@ try: import subprocess date = subprocess.check_output(['git', 'log', '-1', '--format=%ci']).strip() -date = date.split(" ")[0].replace("-", "") +date = date.decode().split(' ')[0].replace('-', '') version = version + "." + date except Exception as e: print(e) -- To view, visit https://gerrit.wikimedia.org/r/365280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I76d6cad5feac7ebe92c95d08549f632804809438 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XqtGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Support url datatype in harvest_template.py
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365281 ) Change subject: Support url datatype in harvest_template.py .. Support url datatype in harvest_template.py Use Pywikibot's native regex for matching external links. Shame this is implemented in 2017. Change-Id: I1645857a5eb8765d9eff1909f51b51035fb2396d --- M scripts/harvest_template.py 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index b9954af..4957e39 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -52,7 +52,7 @@ signal.signal(signal.SIGINT, _signal_handler) import pywikibot -from pywikibot import pagegenerators as pg, WikidataBot +from pywikibot import pagegenerators as pg, WikidataBot, textlib docuReplacements = {'': pywikibot.pagegenerators.parameterHelp} @@ -80,6 +80,7 @@ self.fields = fields self.cacheSources() self.templateTitles = self.getTemplateSynonyms(self.templateTitle) +self.linkR = textlib.compileLinkR() def getTemplateSynonyms(self, title): """Fetch redirects of the title, so we can check against them.""" @@ -185,6 +186,11 @@ claim.setTarget(linked_item) elif claim.type in ('string', 'external-id'): claim.setTarget(value.strip()) +elif claim.type == 'url': +match = self.linkR.search(value) +if not match: +continue +claim.setTarget(match.group('url')) elif claim.type == 'commonsMedia': commonssite = pywikibot.Site('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/365281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1645857a5eb8765d9eff1909f51b51035fb2396d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Matěj SuchánekGerrit-Reviewer: Dalba Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Xqt 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/vagrant[master]: Add a role for ArticleCreationWorkflow
MaxSem has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365282 ) Change subject: Add a role for ArticleCreationWorkflow .. Add a role for ArticleCreationWorkflow Bug: T170354 Change-Id: I842e363b60d419cdf27711fd2253384db2d911bd --- A puppet/modules/role/manifests/articlecreationworkflow.pp 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/82/365282/1 diff --git a/puppet/modules/role/manifests/articlecreationworkflow.pp b/puppet/modules/role/manifests/articlecreationworkflow.pp new file mode 100644 index 000..b6bf67d --- /dev/null +++ b/puppet/modules/role/manifests/articlecreationworkflow.pp @@ -0,0 +1,7 @@ +# == Class: role::articlecreationworkflow +# The ArticleCreationWorkflow[1] allows to customize page creation experience for new users. +# +# [1] https://www.mediawiki.org/wiki/Extension:ArticleCreationWorkflow +class role::articlecreationworkflow { + mediawiki::extension { 'ArticleCreationWorkflow': } +} -- To view, visit https://gerrit.wikimedia.org/r/365282 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I842e363b60d419cdf27711fd2253384db2d911bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant 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] pywikibot/core[master]: Support url datatype in harvest_template.py
Matěj Suchánek has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365281 ) Change subject: Support url datatype in harvest_template.py .. Support url datatype in harvest_template.py Use Pywikibot's native regex for matching external links. Shame this is implemented in 2017. Change-Id: I1645857a5eb8765d9eff1909f51b51035fb2396d --- M scripts/harvest_template.py 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/81/365281/1 diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index b9954af..4957e39 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -52,7 +52,7 @@ signal.signal(signal.SIGINT, _signal_handler) import pywikibot -from pywikibot import pagegenerators as pg, WikidataBot +from pywikibot import pagegenerators as pg, WikidataBot, textlib docuReplacements = {'': pywikibot.pagegenerators.parameterHelp} @@ -80,6 +80,7 @@ self.fields = fields self.cacheSources() self.templateTitles = self.getTemplateSynonyms(self.templateTitle) +self.linkR = textlib.compileLinkR() def getTemplateSynonyms(self, title): """Fetch redirects of the title, so we can check against them.""" @@ -185,6 +186,11 @@ claim.setTarget(linked_item) elif claim.type in ('string', 'external-id'): claim.setTarget(value.strip()) +elif claim.type == 'url': +match = self.linkR.search(value) +if not match: +continue +claim.setTarget(match.group('url')) elif claim.type == 'commonsMedia': commonssite = pywikibot.Site('commons', 'commons') -- To view, visit https://gerrit.wikimedia.org/r/365281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1645857a5eb8765d9eff1909f51b51035fb2396d Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Matěj Suchánek___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] convert bytestring to unicode for py3
Xqt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365280 ) Change subject: [bugfix] convert bytestring to unicode for py3 .. [bugfix] convert bytestring to unicode for py3 Bug: T170678 Change-Id: I76d6cad5feac7ebe92c95d08549f632804809438 --- M setup.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/80/365280/1 diff --git a/setup.py b/setup.py index cb74bca..6ee8cd6 100644 --- a/setup.py +++ b/setup.py @@ -196,7 +196,7 @@ try: import subprocess date = subprocess.check_output(['git', 'log', '-1', '--format=%ci']).strip() -date = date.split(" ")[0].replace("-", "") +date = date.decode().split(' ')[0].replace('-', '') version = version + "." + date except Exception as e: print(e) -- To view, visit https://gerrit.wikimedia.org/r/365280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76d6cad5feac7ebe92c95d08549f632804809438 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Curl Wrapper fix and use provider config
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/365012 ) Change subject: Curl Wrapper fix and use provider config .. Curl Wrapper fix and use provider config Change-Id: Ia30ff1ac43fe5f8040a68259992255802a606e14 --- M Core/Http/CurlWrapper.php M PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php M PaymentProviders/Ingenico/Tests/phpunit/IdealStatusProviderTest.php M Tests/BaseSmashPigUnitTestCase.php 4 files changed, 36 insertions(+), 31 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/Core/Http/CurlWrapper.php b/Core/Http/CurlWrapper.php index d4a4bd0..45c749c 100644 --- a/Core/Http/CurlWrapper.php +++ b/Core/Http/CurlWrapper.php @@ -130,17 +130,21 @@ } public static function parseResponse( $response, $curlInfo ) { - $parts = explode( "\r\n\r\n", $response, 2 ); - $headerLines = explode( "\r\n", $parts[0] ); + $header_size = $curlInfo['header_size']; + $header = substr($response, 0, $header_size); + $body = substr($response, $header_size); + $header = str_replace("\r", "", $header); + $headerLines = explode( "\n", $header ); $responseHeaders = array(); foreach( $headerLines as $line ) { if ( strstr( $line, ': ' ) !== false ) { + $line = rtrim($line); list( $name, $value ) = explode( ': ', $line, 2 ); $responseHeaders[$name] = $value; } } return array( - 'body' => $parts[1], + 'body' => $body, 'headers' => $responseHeaders, 'status' => (int)$curlInfo['http_code'] ); diff --git a/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php b/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php index bd4b985..749f2e9 100644 --- a/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php +++ b/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php @@ -5,7 +5,6 @@ use Psr\Cache\CacheItemPoolInterface; use SmashPig\Core\Cache\HashCacheItem; use SmashPig\Core\Context; -use SmashPig\Core\Http\CurlWrapper; use SmashPig\PaymentProviders\Ingenico\BankPaymentProvider; use SmashPig\Tests\BaseSmashPigUnitTestCase; @@ -32,9 +31,7 @@ public function setUp() { parent::setUp(); - $providerConfiguration = $this->setProviderConfiguration( 'ingenico' ); - $this->curlWrapper = $this->getMock( '\SmashPig\Core\Http\CurlWrapper' ); - $providerConfiguration->overrideObjectInstance( 'curl/wrapper', $this->curlWrapper ); + $this->setProviderConfiguration( 'ingenico' ); $globalConfig = Context::get()->getGlobalConfiguration(); $this->cache = $globalConfig->object( 'cache', true ); @@ -49,7 +46,7 @@ } public function testGetBankList() { - $this->setUpResponse( 'productDirectory', 200 ); + $this->setUpResponse( __DIR__ . '/../Data/productDirectory.response', 200 ); $results = $this->provider->getBankList( 'NL', 'EUR' ); $this->assertEquals( array( @@ -60,7 +57,7 @@ } public function testCacheBankList() { - $this->setUpResponse( 'productDirectory', 200 ); + $this->setUpResponse( __DIR__ . '/../Data/productDirectory.response', 200 ); $this->curlWrapper->expects( $this->once() ) ->method( 'execute' ); $results = $this->provider->getBankList( 'NL', 'EUR' ); @@ -78,7 +75,7 @@ * When the lookup returns 404 we should cache the emptiness */ public function testCacheEmptyBankList() { - $this->setUpResponse( 'emptyDirectory', 404 ); + $this->setUpResponse( __DIR__ . '/../Data/emptyDirectory.response', 404 ); $this->curlWrapper->expects( $this->once() ) ->method( 'execute' ); $results = $this->provider->getBankList( 'NL', 'COP' ); @@ -99,7 +96,7 @@ true ); $this->cache->save( $cacheItem ); - $this->setUpResponse( 'productDirectory', 200 ); + $this->setUpResponse( __DIR__ . '/../Data/productDirectory.response', 200 ); $this->curlWrapper->expects( $this->once() ) ->method( 'execute' ); $results = $this->provider->getBankList( 'NL', 'EUR' ); @@ -109,19 +106,5 @@ ), $results