[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Fix type conversion bug
Gergő Tisza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379702 ) Change subject: Fix type conversion bug .. Fix type conversion bug And also some small type / code style issues while we are at it. Change-Id: Ic5a62b2665b2b25fc270770c3d9db088bcc9fd00 --- M src/Api/ApiQueryReadingListOrder.php M src/Api/ApiQueryReadingLists.php M src/Api/ApiTrait.php 3 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReadingLists refs/changes/02/379702/1 diff --git a/src/Api/ApiQueryReadingListOrder.php b/src/Api/ApiQueryReadingListOrder.php index 9bb78f0..7eab123 100644 --- a/src/Api/ApiQueryReadingListOrder.php +++ b/src/Api/ApiQueryReadingListOrder.php @@ -40,11 +40,13 @@ $repository = $this->getReadingListRepository( $this->getUser() ); if ( $listorder ) { $order = $repository->getListOrder(); + $order = array_map( 'intval', $order ); ApiResult::setIndexedTagName( $order, 'list' ); $result->addValue( $path, null, [ 'type' => 'lists', 'order' => $order ] ); } foreach ( $lists as $list ) { $order = $repository->getListEntryOrder( $list ); + $order = array_map( 'intval', $order ); ApiResult::setIndexedTagName( $order, 'entry' ); $result->addValue( $path, null, [ 'type' => 'entries', 'list' => $list, 'order' => $order ] ); } diff --git a/src/Api/ApiQueryReadingLists.php b/src/Api/ApiQueryReadingLists.php index 48bdb93..350ca89 100644 --- a/src/Api/ApiQueryReadingLists.php +++ b/src/Api/ApiQueryReadingLists.php @@ -197,7 +197,7 @@ private function getResultItem( $row, $mode ) { $item = [ 'id' => (int)$row->rl_id, - 'name' => (int)$row->rl_name, + 'name' => $row->rl_name, 'default' => (bool)$row->rl_is_default, 'description' => $row->rl_description, 'color' => $row->rl_color, @@ -210,10 +210,10 @@ $item['deleted'] = (bool)$row->rl_deleted; } if ( isset( $row->order ) ) { - $item['order'] = $row->order; + $item['order'] = array_map( 'intval', $row->order ); } if ( isset( $row->list_order ) ) { - $item['listOrder'] = $row->list_order; + $item['listOrder'] = array_map( 'intval', $row->list_order ); } return $item; } diff --git a/src/Api/ApiTrait.php b/src/Api/ApiTrait.php index bb7dd13..830b17a 100644 --- a/src/Api/ApiTrait.php +++ b/src/Api/ApiTrait.php @@ -47,7 +47,7 @@ */ public static function factory( ApiBase $parent, $name ) { $services = MediaWikiServices::getInstance(); - $loadBalancerFactory = $services ->getDBLoadBalancerFactory(); + $loadBalancerFactory = $services->getDBLoadBalancerFactory(); $dbw = Utils::getDB( DB_MASTER, $services ); $dbr = Utils::getDB( DB_REPLICA, $services ); if ( static::$prefix ) { -- To view, visit https://gerrit.wikimedia.org/r/379702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5a62b2665b2b25fc270770c3d9db088bcc9fd00 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReadingLists Gerrit-Branch: master Gerrit-Owner: Gergő Tisza ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Update Node.js dependency
KartikMistry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379701 ) Change subject: Update Node.js dependency .. Update Node.js dependency jsdom requires Node.js >= 6. Change-Id: If0d5dea81ab62f32360cc80bb64510c6f166d596 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/01/379701/1 diff --git a/package.json b/package.json index 970f80f..b22efe3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://phabricator.wikimedia.org/tag/cxserver/"; }, "engines": { -"node": ">=4.4.6" +"node": ">=6.11.1" }, "dependencies": { "bluebird": "^3.4.1", -- To view, visit https://gerrit.wikimedia.org/r/379701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0d5dea81ab62f32360cc80bb64510c6f166d596 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: KartikMistry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: dnsleaks.py: use case-insensitive comparisons
Andrew Bogott has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379700 ) Change subject: dnsleaks.py: use case-insensitive comparisons .. dnsleaks.py: use case-insensitive comparisons We have some Capitalized instances, and Horizon seems to permit CamelCase names. To stay on the safe side, don't discard records that differ only by case. Change-Id: I3e93d5fa1fd8e6a546693034f7c01b3821e4d712 --- M modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py index 9c43bac..1e002de 100755 --- a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py +++ b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py @@ -100,13 +100,13 @@ # we need a fresh copy of all instances so we don't accidentally # delete things that have been created since we last checked. instances = clients.allinstances() -all_nova_instances = ["%s.%s.eqiad.wmflabs." % (instance.name, instance.tenant_id) +all_nova_instances = ["%s.%s.eqiad.wmflabs." % (instance.name.lower(), instance.tenant_id) for instance in instances] -all_nova_shortname_instances = ["%s.eqiad.wmflabs." % (instance.name) +all_nova_shortname_instances = ["%s.eqiad.wmflabs." % (instance.name.lower()) for instance in instances] for recordset in recordsets: -name = recordset['name'] +name = recordset['name'].lower() if name.endswith(".svc.eqiad.wmflabs."): # These are service records and shouldn't point to instances. # Leave them be. -- To view, visit https://gerrit.wikimedia.org/r/379700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e93d5fa1fd8e6a546693034f7c01b3821e4d712 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott Gerrit-Reviewer: Andrew Bogott 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]: dnsleaks.py: use case-insensitive comparisons
Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379700 ) Change subject: dnsleaks.py: use case-insensitive comparisons .. dnsleaks.py: use case-insensitive comparisons We have some Capitalized instances, and Horizon seems to permit CamelCase names. To stay on the safe side, don't discard records that differ only by case. Change-Id: I3e93d5fa1fd8e6a546693034f7c01b3821e4d712 --- M modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/379700/1 diff --git a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py index 9c43bac..1e002de 100755 --- a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py +++ b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py @@ -100,13 +100,13 @@ # we need a fresh copy of all instances so we don't accidentally # delete things that have been created since we last checked. instances = clients.allinstances() -all_nova_instances = ["%s.%s.eqiad.wmflabs." % (instance.name, instance.tenant_id) +all_nova_instances = ["%s.%s.eqiad.wmflabs." % (instance.name.lower(), instance.tenant_id) for instance in instances] -all_nova_shortname_instances = ["%s.eqiad.wmflabs." % (instance.name) +all_nova_shortname_instances = ["%s.eqiad.wmflabs." % (instance.name.lower()) for instance in instances] for recordset in recordsets: -name = recordset['name'] +name = recordset['name'].lower() if name.endswith(".svc.eqiad.wmflabs."): # These are service records and shouldn't point to instances. # Leave them be. -- To view, visit https://gerrit.wikimedia.org/r/379700 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e93d5fa1fd8e6a546693034f7c01b3821e4d712 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: dnsleaks.py: ignore things under .svc.eqiad.wmflabs
Andrew Bogott has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379699 ) Change subject: dnsleaks.py: ignore things under .svc.eqiad.wmflabs .. dnsleaks.py: ignore things under .svc.eqiad.wmflabs Until recently we could reasonably expect every DNS record under .wmflabs to point to a VM. Now that we have db service under .svc.eqiad.wmflabs we need to avoid purging them just because they don't point to a VM. Change-Id: Ib08210db4f90cb1d01bf3b7044ad305f6ff3addc --- M modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py index b3b0e30..9c43bac 100755 --- a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py +++ b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py @@ -107,6 +107,10 @@ for recordset in recordsets: name = recordset['name'] +if name.endswith(".svc.eqiad.wmflabs."): +# These are service records and shouldn't point to instances. +# Leave them be. +continue recordsetid = recordset['id'] if recordset['type'] == 'A': # For an A record, we can just delete the whole recordset -- To view, visit https://gerrit.wikimedia.org/r/379699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib08210db4f90cb1d01bf3b7044ad305f6ff3addc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott Gerrit-Reviewer: Andrew Bogott 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]: dnsleaks.py: ignore things under .svc.eqiad.wmflabs
Andrew Bogott has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379699 ) Change subject: dnsleaks.py: ignore things under .svc.eqiad.wmflabs .. dnsleaks.py: ignore things under .svc.eqiad.wmflabs Until recently we could reasonably expect every DNS record under .wmflabs to point to a VM. Now that we have db service under .svc.eqiad.wmflabs we need to avoid purging them just because they don't point to a VM. Change-Id: Ib08210db4f90cb1d01bf3b7044ad305f6ff3addc --- M modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/379699/1 diff --git a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py index b3b0e30..9c43bac 100755 --- a/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py +++ b/modules/openstack2/files/liberty/admin_scripts/novastats/dnsleaks.py @@ -107,6 +107,10 @@ for recordset in recordsets: name = recordset['name'] +if name.endswith(".svc.eqiad.wmflabs."): +# These are service records and shouldn't point to instances. +# Leave them be. +continue recordsetid = recordset['id'] if recordset['type'] == 'A': # For an A record, we can just delete the whole recordset -- To view, visit https://gerrit.wikimedia.org/r/379699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib08210db4f90cb1d01bf3b7044ad305f6ff3addc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CommentStreams[master]: Allow anonymous comments.
Cicalese has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/376912 ) Change subject: Allow anonymous comments. .. Allow anonymous comments. T167447 T175657 T175656 T175659 Change-Id: Ia9df3191a06543b5ae3b704e181241ec63e85ac1 --- M extension.json M i18n/en.json M i18n/qqq.json M includes/ApiCSDeleteComment.php M includes/ApiCSEditComment.php M includes/ApiCSPostComment.php M includes/Comment.php M includes/CommentStreams.php M includes/CommentStreamsAllComments.php M includes/CommentStreamsHooks.php M resources/CommentStreams.css M resources/CommentStreams.js M sql/commentData.sql M sql/votes.sql M sql/watch.sql 15 files changed, 154 insertions(+), 51 deletions(-) Approvals: Cicalese: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/extension.json b/extension.json index 7dfc9a8..15e1660 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,6 @@ { "name": "CommentStreams", - "version": "3.9.1", + "version": "3.10", "author": [ "[http://www.mediawiki.org/wiki/User:Jji Jason Ji]", "[http://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy Cicalese]" @@ -83,7 +83,9 @@ "commentstreams-buttontooltip-submit", "commentstreams-buttontooltip-cancel", "commentstreams-dialog-delete-message", + "commentstreams-dialog-anonymous-message", "commentstreams-dialog-buttontext-ok", + "commentstreams-dialog-buttontext-cancel", "commentstreams-dialog-buttontext-yes", "commentstreams-dialog-buttontext-no", "commentstreams-urldialog-instructions", diff --git a/i18n/en.json b/i18n/en.json index d6cff7d..aedf7ad 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -7,6 +7,7 @@ }, "commentstreams-desc": "Allows commenting on wiki pages", "commentstreams-error-prohibitedaction": "Action $1 is not allowed on comment pages.", + "commentstreams-author-anonymous": "anonymous", "apihelp-csQueryComment-description": "Return the title, user, creation timestamp, and wikitext of a comment. Either pageid or title must be provided.", "apihelp-csQueryComment-summary": "Return the title, user, creation timestamp, and wikitext of a comment. Either pageid or title must be provided.", "apihelp-csQueryComment-param-pageid": "page ID of the page which holds the comment to query", @@ -94,7 +95,9 @@ "commentstreams-buttontooltip-submit": "submit", "commentstreams-buttontooltip-cancel": "cancel", "commentstreams-dialog-delete-message": "Are you sure you want to delete this comment?", + "commentstreams-dialog-anonymous-message": "You are not logged in. If you proceed to save this comment, your IP address will be recorded, and you will not be able to edit or delete this comment.", "commentstreams-dialog-buttontext-ok": "OK", + "commentstreams-dialog-buttontext-cancel": "Cancel", "commentstreams-dialog-buttontext-yes": "Yes", "commentstreams-dialog-buttontext-no": "No", "commentstreams-urldialog-instructions": "Copy and paste the URL below to share a permalink to this comment. Press escape to dismiss this dialog.", @@ -119,6 +122,8 @@ "group-csmoderator": "Moderators (CommentStreams)", "group-csmoderator-member": "{{GENDER:$1|moderator (CommentStreams)}}", "grouppage-csmoderator": "{{ns:project}}:Moderators (CommentStreams)", + "right-cs-comment": "Post, edit, and delete user's own comments", + "action-cs-comment": "post, edit, or delete comments", "right-cs-moderator-edit": "Edit comments by any user", "action-cs-moderator-edit": "edit comments by other users", "right-cs-moderator-delete": "Delete comments by any user", diff --git a/i18n/qqq.json b/i18n/qqq.json index d824cf4..88d5c78 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -5,8 +5,9 @@ "Jason Ji" ] }, - "commentstreams-desc": "{{desc|name=CommentStreams|url=http://gestalt.mitre.org/gestaltd/index.php/CommentStreams}}";, + "commentstreams-desc": "{{desc|name=CommentStreams|url=https://www.mediawiki.org/wiki/Extension:CommentStreams}}";, "commentstreams-error-prohibitedaction": "Error message.", + "commentstreams-author-anonymous": "The name displayed for anonymous comment authors", "apihelp-csQueryComment-description": "{{doc-apihelp-description|csQueryComment}}", "apihelp-csQueryComment-summary": "{{doc-apihelp-summary|csQueryComment}}", "apihelp-csQueryComment-param-pageid": "{{doc-apihelp-param|csQueryComment|pageid}}", @@ -94,7 +95,9 @@
[MediaWiki-commits] [Gerrit] marvin[master]: WIP: Update: move page summary thumbnail
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379698 ) Change subject: WIP: Update: move page summary thumbnail .. WIP: Update: move page summary thumbnail Change-Id: I02d7e19fb49282bec89e1c247a1dc98547edebcb --- M package-lock.json M package.json M src/client/index.tsx M src/common/components/page-summary/page-summary.css M src/common/components/page-summary/page-summary.tsx M src/common/data-clients/page-data-client.ts M src/common/marshallers/page-unmarshaller.ts M src/common/marshallers/restbase.ts M src/common/models/page.ts M src/common/pages/wiki.tsx M src/common/routers/api.ts M src/common/routers/route.ts M src/common/routers/router.test.ts M src/common/routers/router.ts A src/server/api/page/summary.ts M src/server/index.tsx A src/server/types/domino.d.ts 17 files changed, 117 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/98/379698/1 diff --git a/package-lock.json b/package-lock.json index 8136876..c7196e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1451,6 +1451,11 @@ "domelementtype": "1.3.0" } }, +"domino": { + "version": "1.0.29", + "resolved": "https://registry.npmjs.org/domino/-/domino-1.0.29.tgz";, + "integrity": "sha1-3oqh9vmOPFU4/remH6acHqu6zgY=" +}, "domutils": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz";, diff --git a/package.json b/package.json index 75b7ab7..529e808 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "npm": ">= 5" }, "dependencies": { +"domino": "^1.0.29", "express": "^4.15.3", "isomorphic-unfetch": "^2.0.0", "path-to-regexp": "^2.0.0", diff --git a/src/client/index.tsx b/src/client/index.tsx index 554a266..771c214 100644 --- a/src/client/index.tsx +++ b/src/client/index.tsx @@ -24,7 +24,10 @@ ); }; -const route = (path: string) => router.route(path).then(renderPageRoot); +const route = (path: string) => + router +.route({ serverURL: window.location.origin, path }) +.then(renderPageRoot); // Observe the History history.listen(location => route(location.pathname)); diff --git a/src/common/components/page-summary/page-summary.css b/src/common/components/page-summary/page-summary.css index 0684106..03bbcda 100644 --- a/src/common/components/page-summary/page-summary.css +++ b/src/common/components/page-summary/page-summary.css @@ -58,4 +58,5 @@ } .PageSummary-thumbnail-image-portrait {} -.PageSummary-extract {} +.PageSummary-extract-lead {} +.PageSummary-extract-body {} diff --git a/src/common/components/page-summary/page-summary.tsx b/src/common/components/page-summary/page-summary.tsx index 02f38f3..3dca977 100644 --- a/src/common/components/page-summary/page-summary.tsx +++ b/src/common/components/page-summary/page-summary.tsx @@ -6,17 +6,22 @@ summary: PageSummaryModel; } -export const PageSummary = ({ summary }: Props): JSX.Element => ( - - -{summary.extractHTML && ( +export const PageSummary = ({ summary }: Props): JSX.Element => { + const [lead, ...body] = summary.extractHTML; + return ( + -)} - -); + + + + ); +}; const Thumbnail = ({ summary }: Props) => { if (!summary.thumbnail || !summary.image) { diff --git a/src/common/data-clients/page-data-client.ts b/src/common/data-clients/page-data-client.ts index 5a914a6..50b5b51 100644 --- a/src/common/data-clients/page-data-client.ts +++ b/src/common/data-clients/page-data-client.ts @@ -3,15 +3,15 @@ import { unmarshalPageSummary } from "../marshallers/page-unmarshaller"; export interface Params { + serverURL: string; titlePath: PageTitlePath; } -const url = ({ titlePath }: Params) => - `https://en.wikipedia.org/api/rest_v1/page/summary/${titlePath}`; +const url = ({ serverURL, titlePath }: Params) => + `${serverURL}/api/page/summary/${titlePath}`; const HEADERS = { - accept: -'application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Summary/1.2.0";' + accept: 'application/json; charset=utf-8"' }; export const requestPageSummary = (params: Params): Promise => diff --git a/src/common/marshallers/page-unmarshaller.ts b/src/common/marshallers/page-unmarshaller.ts index 2227b18..90cace2 100644 --- a/src/common/marshallers/page-unmarshaller.ts +++ b/src/common/marshallers/page-unmarshaller.ts @@ -34,7 +34,7 @@ }; export const unmarshalPageSummary = (json: JSONObject): PageSummary => { - const type: RESTBase.PageSummary.PageSummary = json as any; + const type: RESTBase.PageSummary.SupplementedPageSummary = json as any; return { wikiLanguageCode: type.lang, localeDirection: type.dir, diff --git a/src/common/marshallers/restbase.ts b/src/common/marshallers/restbase.ts index 37c1d94..a99cf3b 100644 --- a/src/common/marshallers/restbase.ts +++ b/src/com
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: PayPal country code mapping
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379697 ) Change subject: PayPal country code mapping .. PayPal country code mapping Only unstaging, as we don't seem to send them country code for anything Bug: T176450 Change-Id: I97bf94742a0830776189f8097455ab2b74d740d0 --- M extension.json A paypal_gateway/PayPalCountry.php M paypal_gateway/express_checkout/config/transformers.yaml M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php A tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_C2.testresponse 5 files changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/97/379697/1 diff --git a/extension.json b/extension.json index 760c469..c434e14 100644 --- a/extension.json +++ b/extension.json @@ -146,6 +146,7 @@ "AstroPaySignature": "astropay_gateway/AstroPaySignature.php", "DummyFiscalNumber": "astropay_gateway/DummyFiscalNumber.php", "CleanupRecurringLength": "paypal_gateway/CleanupRecurringLength.php", + "PayPalCountry": "paypal_gateway/PayPalCountry.php", "PaypalExpressAdapter": "paypal_gateway/express_checkout/paypal_express.adapter.php", "PaypalExpressGateway": "paypal_gateway/express_checkout/paypal_express_gateway.body.php", "PaypalExpressGatewayResult": "paypal_gateway/express_checkout/paypal_express_resultswitcher.body.php", diff --git a/paypal_gateway/PayPalCountry.php b/paypal_gateway/PayPalCountry.php new file mode 100644 index 000..dd8f713 --- /dev/null +++ b/paypal_gateway/PayPalCountry.php @@ -0,0 +1,18 @@ +gatewayAdapter->shouldRectifyOrphan(); $this->assertEquals( $result, true, 'shouldRectifyOrphan returning false.' ); } + + /** +* We should take the country from the donor info response, and transform +* it into a real code if it's a PayPal bogon. +*/ + public function testUnstageCountry() { + $init = $this->getDonorTestData( 'US' ); + TestingPaypalExpressAdapter::setDummyGatewayResponseCode( [ 'C2', 'OK' ] ); + $init['contribution_tracking_id'] = '45931210'; + $init['gateway_session_id'] = mt_rand(); + $init['language'] = 'pt'; + $session = array( 'Donor' => $init ); + + $request = array( + 'token' => $init['gateway_session_id'], + 'PayerID' => 'ASdASDAS', + 'language' => $init['language'] // FIXME: mashing up request vars and other stuff in verifyFormOutput + ); + $this->setUpRequest( $request, $session ); + $gateway = $this->getFreshGatewayObject( $init ); + $gateway->processDonorReturn( $request ); + $savedCountry = $gateway->getData_Unstaged_Escaped( 'country' ); + $this->assertEquals( 'CN', $savedCountry ); + } } diff --git a/tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_C2.testresponse b/tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_C2.testresponse new file mode 100644 index 000..040a97d --- /dev/null +++ b/tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_C2.testresponse @@ -0,0 +1 @@ +TOKEN=EC%2d4V987654XA123456V&BILLINGAGREEMENTACCEPTEDSTATUS=0&CHECKOUTSTATUS=PaymentActionNotInitiated&TIMESTAMP=2017%2d02%2d01T20%3a07%3a14Z&CORRELATIONID=d70c9a334455e&ACK=Success&VERSION=204&BUILD=28806785&EMAIL=donor%40generous%2enet&PAYERID=8R297FE87CD8S&PAYERSTATUS=unverified&FIRSTNAME=Fezziwig&LASTNAME=Fowl&COUNTRYCODE=C2&BILLINGNAME=Fezziwig%20Fowl&STREET=123%20Notta%20Way&CITY=Whoville&STATE=OR&ZIP=97211&COUNTRY=US&COUNTRYNAME=United%20States&ADDRESSID=PayPal&ADDRESSSTATUS=Confirmed&CURRENCYCODE=USD&AMT=1%2e55&ITEMAMT=1%2e55&SHIPPINGAMT=0&HANDLINGAMT=0&TAXAMT=0&CUSTOM=45931210&DESC=Donation%20to%20the%20Wikimedia%20Foundation&INVNUM=45931210%2e1&NOTIFYURL=http%3a%2f%2ffundraising%2ewikimedia%2eorg%2fIPNListener_Standalone%2ephp&INSURANCEAMT=0&SHIPDISCAMT=0&INSURANCEOPTIONOFFERED=false&L_QTY0=1&L_TAXAMT0=0&L_AMT0=1%2e55&L_DESC0=Donation%20to%20the%20Wikimedia%20Foundation&PAYMENTREQUEST_0_CURRENCYCODE=USD&PAYMENTREQUEST_0_AMT=1%2e55&PAYMENTREQUEST_0_ITEMAMT=1%2e55&PAYMENTREQUEST_0_SHIPPINGAMT=0&PAYMENTREQUEST_0_HANDLINGAMT=0&PAYMENTREQUEST_0_TAXAMT=0&PAYMENTREQUEST_0_CUSTOM=45931210&PAYMENTREQUEST_0_DESC=Donation%20to%20the%20Wikimedia%20Foundation&PAYMENTREQUEST_0_INVNUM=45931210%2e1&PAYMENTREQUEST_0_NOTIFYURL=http%3a%2f%2ffundraising%2ewikimedia%2eorg%2fIPNListener_Standalone%2ephp&PAYMENTREQUEST_0_INSURANCEAMT=0&PAYMENTREQUEST_0_SHIPDISCAMT=0&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=receiver%40wikimedia%2eorg&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false&PAYMENTREQUEST_0_ADDRESSSTATUS=Co
[MediaWiki-commits] [Gerrit] mediawiki...SiteMatrix[master]: Add language direction to SiteMatrix API output
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379690 ) Change subject: Add language direction to SiteMatrix API output .. Add language direction to SiteMatrix API output This is required for auto-updation of the rtl dblist. Bug: T172337 Change-Id: I9e4e6426988f7f0375875bfb96948033750dd105 --- M SiteMatrixApi.php 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/SiteMatrixApi.php b/SiteMatrixApi.php index 8180565..2debcdd 100644 --- a/SiteMatrixApi.php +++ b/SiteMatrixApi.php @@ -51,6 +51,7 @@ 'code' => $langhost, 'name' => isset( $langNames[$lang] ) ? $langNames[$lang] : null, 'site' => [], + 'dir' => Language::factory( $langhost )->getDir() ]; if ( isset( $localLanguageNames[$lang] ) ) { $language['localname'] = $localLanguageNames[$lang]; @@ -198,9 +199,10 @@ 'code', 'name', 'site', + 'dir', 'localname', ], - ApiBase::PARAM_DFLT => 'code|name|site|localname', + ApiBase::PARAM_DFLT => 'code|name|site|dir|localname', ], 'siteprop' => [ ApiBase::PARAM_ISMULTI => true, -- To view, visit https://gerrit.wikimedia.org/r/379690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e4e6426988f7f0375875bfb96948033750dd105 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SiteMatrix Gerrit-Branch: master Gerrit-Owner: Niharika29 Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: Interpretation and general findings for API dashboards
Bearloga has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378067 ) Change subject: Interpretation and general findings for API dashboards .. Interpretation and general findings for API dashboards Bug: T172452 Change-Id: If97bb9cd23ae93117d106012d69b8f6250a19ce9 --- M modules/api.R M modules/key_performance_metrics/api_usage.R M tab_documentation/fulltext_basic.md M tab_documentation/geo_basic.md M tab_documentation/kpi_api_usage.md M tab_documentation/language_basic.md M tab_documentation/morelike_basic.md M tab_documentation/open_basic.md M tab_documentation/prefix_basic.md M tab_documentation/referer_breakdown.md M ui.R 11 files changed, 295 insertions(+), 97 deletions(-) Approvals: Bearloga: Verified; Looks good to me, approved diff --git a/modules/api.R b/modules/api.R index 790b29e..da1e3e4 100644 --- a/modules/api.R +++ b/modules/api.R @@ -1,9 +1,27 @@ +use_proportion <- function(data, use_prop) { + if (use_prop) { +return(cbind(data[, "date"], purrr::map_df(data[, -c(1, 2)], function(x) round(100 * x / data$All, 2))) %>% + dplyr::filter(date >= "2017-06-29")) + } else{ +return(data) + } +} + output$cirrus_aggregate <- renderDygraph({ split_dataset$`full-text via API` %>% tidyr::spread(referrer, calls) %>% polloi::reorder_columns() %>% +use_proportion(input$fulltext_search_prop) %>% polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_fulltext_search)) %>% -polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily Full-text search API usage by referrer", legend_name = "Searches") %>% +polloi::make_dygraph(xlab = "Date", + ylab = dplyr::case_when( + input$fulltext_search_prop ~ "API Calls Share (%)", + input$fulltext_search_log_scale ~ "Calls (log10 scale)", + TRUE ~ "API Calls" + ), + title = "Daily Full-text search via API usage by referrer", + legend_name = "API Calls", + logscale = input$fulltext_search_log_scale) %>% dyLegend(labelsDiv = "cirrus_aggregate_legend", width = 600) %>% dyRangeSelector %>% dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") %>% @@ -14,8 +32,17 @@ split_dataset$`morelike via API` %>% tidyr::spread(referrer, calls) %>% polloi::reorder_columns() %>% +use_proportion(input$morelike_search_prop) %>% polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_morelike_search)) %>% -polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily Morelike search API usage by referrer", legend_name = "Searches") %>% +polloi::make_dygraph(xlab = "Date", + ylab = dplyr::case_when( + input$morelike_search_prop ~ "API Calls Share (%)", + input$morelike_search_log_scale ~ "Calls (log10 scale)", + TRUE ~ "API Calls" + ), + title = "Daily Morelike search API usage by referrer", + legend_name = "API Calls", + logscale = input$morelike_search_log_scale) %>% dyLegend(labelsDiv = "morelike_aggregate_legend", width = 600) %>% dyRangeSelector }) @@ -24,8 +51,17 @@ split_dataset$open %>% tidyr::spread(referrer, calls) %>% polloi::reorder_columns() %>% +use_proportion(input$open_search_prop) %>% polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_open_search)) %>% -polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily OpenSearch API usage by referrer", legend_name = "Searches") %>% +polloi::make_dygraph(xlab = "Date", + ylab = dplyr::case_when( + input$open_search_prop ~ "API Calls Share (%)", + input$open_search_log_scale ~ "Calls (log10 scale)", + TRUE ~ "API Calls" + ), + title = "Daily OpenSearch API usage by referrer", + legend_name = "API Calls", + logscale = input$open_search_log_scale) %>% dyLegend(labelsDiv = "open_aggregate_legend", width = 600) %>% dyRangeSelector %>% dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") %>% @@ -36,8 +72,17 @@ split_dataset$geo %>% tidyr::spread(referrer, calls) %>% polloi::reorder_columns() %>% +use_proportion(input$geo_search_prop) %>% polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_geo_search)) %>% -polloi::make_dygraph(xlab = "Date"
[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Use correct table to find deletes.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/374416 ) Change subject: Use correct table to find deletes. .. Use correct table to find deletes. Timestamps in archive table are revision creation timestamp, and thus unsuitable for retreving deletes by timestamp. This patch switches to using logging table, where timestamp is the actual deletion timestamp, plus we check that there is an archive entry for this title, to ensure the delete wasn't reversed. It is not perfect but it's reasonable approximation for now. Bug: T171921 Change-Id: Ie3c3ce292cd6a0c5264157a582544d98b3a6d48b --- M maintenance/forceSearchIndex.php 1 file changed, 14 insertions(+), 12 deletions(-) Approvals: Cindy-the-browser-test-bot: Looks good to me, but someone else must approve EBernhardson: Looks good to me, approved jenkins-bot: Verified DCausse: Looks good to me, but someone else must approve diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php index 7adffc7..5d4c51a 100644 --- a/maintenance/forceSearchIndex.php +++ b/maintenance/forceSearchIndex.php @@ -385,24 +385,28 @@ $dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] ); $it = new BatchRowIterator( $dbr, - 'archive', - [ 'ar_namespace', 'ar_title', 'ar_timestamp' ], + 'logging', + [ 'log_timestamp' ], $this->mBatchSize ); - $this->attachPageConditions( $dbr, $it, 'ar' ); - $this->attachTimestampConditions( $dbr, $it, 'ar' ); - $it->addConditions( [ 'ar_page_id IS NOT NULL' ] ); + $this->attachPageConditions( $dbr, $it, 'log' ); + $this->attachTimestampConditions( $dbr, $it, 'log' ); + $it->addConditions( [ + 'log_type' => 'delete', + 'log_action' => 'delete', + 'EXISTS(select * from archive where ar_title = log_title and ar_namespace = log_namespace)', + ] ); - $it->setFetchColumns( [ 'ar_timestamp', 'ar_namespace', 'ar_title', 'ar_page_id' ] ); + $it->setFetchColumns( [ 'log_timestamp', 'log_namespace', 'log_title', 'log_page' ] ); return new CallbackIterator( $it, function ( $batch ) { $titlesToDelete = []; $docIdsToDelete = []; $archive = []; foreach ( $batch as $row ) { - $title = Title::makeTitle( $row->ar_namespace, $row->ar_title ); - $id = $this->getSearchConfig()->makeId( $row->ar_page_id ); + $title = Title::makeTitle( $row->log_namespace, $row->log_title ); + $id = $this->getSearchConfig()->makeId( $row->log_page ); $titlesToDelete[] = $title; $docIdsToDelete[] = $id; $archive[] = [ @@ -415,10 +419,8 @@ 'titlesToDelete' => $titlesToDelete, 'docIdsToDelete' => $docIdsToDelete, 'archive' => $archive, - 'endingAt' => isset( $title ) - ? substr( preg_replace( - '/[^' . Title::legalChars() . ']/', '_', $title->getPrefixedDBkey() - ), 0, 30 ) + 'endingAt' => isset( $row ) + ? ( new MWTimestamp( $row->log_timestamp ) )->getTimestamp( TS_ISO_8601 ) : 'unknown', ]; } ); -- To view, visit https://gerrit.wikimedia.org/r/374416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3c3ce292cd6a0c5264157a582544d98b3a6d48b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Smalyshev Gerrit-Reviewer: Cindy-the-browser-test-bot Gerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Gehel Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Smalyshev 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...ThrottleOverride[master]: Improve 'exemption applied' message
EddieGP has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379696 ) Change subject: Improve 'exemption applied' message .. Improve 'exemption applied' message Change the message to link somewhere (Special:ThrottleOverrideList). Also add an appropriate page title. Once again, most of this is c&p from Special:Block. Change-Id: I03276c79c11cc65d5c9e22f7a1441004af1a5bb1 --- M SpecialOverrideThrottle.php M i18n/en.json M i18n/qqq.json 3 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThrottleOverride refs/changes/96/379696/1 diff --git a/SpecialOverrideThrottle.php b/SpecialOverrideThrottle.php index ee62d47..56f9cae 100644 --- a/SpecialOverrideThrottle.php +++ b/SpecialOverrideThrottle.php @@ -262,7 +262,9 @@ } function onSuccess() { - $this->getOutput()->addWikiMsg( 'throttleoverride-success' ); + $out = $this->getOutput(); + $out->setPageTitle( $this->msg( 'throttleoverride-success-sub' ) ); + $out->addWikiMsg( 'throttleoverride-success', wfEscapeWikiText( $this->target ) ); } protected function getGroupName() { diff --git a/i18n/en.json b/i18n/en.json index 863f6de..dbbb3da 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2,7 +2,8 @@ "@metadata": { "authors": [ "Tyler Romeo ", - "Glaisher" + "Glaisher", + "EddieGP" ] }, "overridethrottle": "Override throttles", @@ -13,7 +14,8 @@ "throttleoverride-legend": "Exemption information", "throttleoverride-text": "Enter the IP address or range you want to exempt from certain throttles, and how long the exemption should last for.\nAn optional reason can be given for the logs.", "throttleoverride-ipaddress": "IP address or range", - "throttleoverride-success": "The exemption was applied.", + "throttleoverride-success": "The exemption for $1 was applied.\nSee the [[Special:ThrottleOverrideList|list of throttle overrides]] to review exemptions.", + "throttleoverride-success-sub": "Throttle override succeeded", "throttleoverride-types": "Throttle types:", "throttleoverride-types-all": "All types", "throttleoverride-types-actcreate": "Account creation", diff --git a/i18n/qqq.json b/i18n/qqq.json index e6bf053..f0af201 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -5,7 +5,8 @@ "Umherirrender", "Liuxinyu970226", "Glaisher", - "Robby" + "Robby", + "EddieGP" ] }, "overridethrottle": "{{doc-special|OverrideThrottle}}", @@ -17,6 +18,7 @@ "throttleoverride-text": "Intro text on [[Special:OverrideThrottle]]", "throttleoverride-ipaddress": "Label for the IP address field on [[Special:OverrideThrottle]]", "throttleoverride-success": "Text displayed after a successful submission on [[Special:OverrideThrottle]]", + "throttleoverride-success-sub": "Used as page title in [[Special:ThrottleOverride]].\n\nThis message is the subject for the following message:\n* {{msg-mw|throttleoverride-success}}", "throttleoverride-types": "Label for the types of throttles that can be overridden.\n{{Identical|Throttle type}}", "throttleoverride-types-all": "Label for the throttle type representing all types (used in [[Special:ThrottleOverrideList]]).\n{{Identical|All types}}", "throttleoverride-types-actcreate": "Label for the throttle type for account creations", -- To view, visit https://gerrit.wikimedia.org/r/379696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03276c79c11cc65d5c9e22f7a1441004af1a5bb1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ThrottleOverride Gerrit-Branch: master Gerrit-Owner: EddieGP ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: WIP dontmerge: dummy patchset to check whether CI fails
Divec has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379695 ) Change subject: WIP dontmerge: dummy patchset to check whether CI fails .. WIP dontmerge: dummy patchset to check whether CI fails Change-Id: I3f465d40f5be7bdfaaf438d54b9c2160a2447bd9 --- M tests/ce/imetests/backspace-chromium-ubuntu-none.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/95/379695/1 diff --git a/tests/ce/imetests/backspace-chromium-ubuntu-none.js b/tests/ce/imetests/backspace-chromium-ubuntu-none.js index 46538df..ebb6f65 100644 --- a/tests/ce/imetests/backspace-chromium-ubuntu-none.js +++ b/tests/ce/imetests/backspace-chromium-ubuntu-none.js @@ -1,5 +1,5 @@ /*! - * VisualEditor IME backspace test for Chromium on Ubuntu. + * VisualEditor IME backspace test for Chromium on Ubuntu * * @copyright 2011-2017 VisualEditor Team and others; see http://ve.mit-license.org */ -- To view, visit https://gerrit.wikimedia.org/r/379695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f465d40f5be7bdfaaf438d54b9c2160a2447bd9 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Divec ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Restore good country data from session
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379694 ) Change subject: Restore good country data from session .. Restore good country data from session In case we get garbage back from somewhere else. Bug: T176450 Change-Id: I42f7bb743e60cefaeaa24b24851ee6d7366ab65f --- M gateway_common/DonationData.php 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/94/379694/1 diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index 0d18971..ef94da9 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -422,9 +422,14 @@ // try to regenerate the country if we still don't have a valid one yet if ( $regen ) { - // If no valid country was passed, try to do GeoIP lookup - // Requires php5-geoip package - if ( function_exists( 'geoip_country_code_by_name' ) ) { + // If no valid country was passed, first check session. + $sessionCountry = $this->gateway->session_getData( 'Donor', 'country' ); + if ( CountryValidation::isValidIsoCode( $sessionCountry ) ) { + $this->logger->info( "Using country code $sessionCountry from session" ); + $country = $sessionCountry; + } elseif ( function_exists( 'geoip_country_code_by_name' ) ) { + // Then try to do GeoIP lookup + // Requires php5-geoip package $ip = $this->getVal( 'user_ip' ); if ( WmfFramework::validateIP( $ip ) ) { try { -- To view, visit https://gerrit.wikimedia.org/r/379694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42f7bb743e60cefaeaa24b24851ee6d7366ab65f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.loader: Simplify getVersion and getState
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379688 ) Change subject: mw.loader: Simplify getVersion and getState .. mw.loader: Simplify getVersion and getState This undefined check no longer makes sense since there are now defaults for these in register(). There is no supported scenario in which a module would have a key in the registry but not have these properties defined, or have them defined with the undefined value. Change-Id: I945871861ccf3659c2d7dd021aa87dfd747f22b9 --- M resources/src/mediawiki/mediawiki.js 1 file changed, 2 insertions(+), 8 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index b522486..7e02df4 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -2123,10 +2123,7 @@ * in the registry. */ getVersion: function ( module ) { - if ( !hasOwn.call( registry, module ) || registry[ module ].version === undefined ) { - return null; - } - return registry[ module ].version; + return hasOwn.call( registry, module ) ? registry[ module ].version : null; }, /** @@ -2137,10 +2134,7 @@ * in the registry. */ getState: function ( module ) { - if ( !hasOwn.call( registry, module ) || registry[ module ].state === undefined ) { - return null; - } - return registry[ module ].state; + return hasOwn.call( registry, module ) ? registry[ module ].state : null; }, /** -- To view, visit https://gerrit.wikimedia.org/r/379688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I945871861ccf3659c2d7dd021aa87dfd747f22b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle Gerrit-Reviewer: Catrope Gerrit-Reviewer: Gilles Gerrit-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] mediawiki...DonationInterface[master]: Remove old transitional code
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379693 ) Change subject: Remove old transitional code .. Remove old transitional code The modules should be out of caches by now, and the old session rekey code is months out of date. Change-Id: I455096b360bd78fa4d294a9fe6a591675a504a41 --- M extension.json M gateway_common/DonationData.php 2 files changed, 4 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/93/379693/1 diff --git a/extension.json b/extension.json index 760c469..017aa5a 100644 --- a/extension.json +++ b/extension.json @@ -199,36 +199,6 @@ "scripts": "modules/js/ext.donationInterface.forms.js", "dependencies": "ext.donationInterface.validation" }, - "ext.donationinterface.mustache.styles": { - "styles": "gateway_forms/mustache/forms.css" - }, - "ext.donationinterface.adyen.scripts": { - "scripts": "adyen_gateway/forms/js/adyen.js", - "dependencies": "ext.donationInterface.forms" - }, - "ext.donationinterface.ingenico.scripts": { - "scripts": "globalcollect_gateway/forms/js/ingenico.js", - "dependencies": "ext.donationInterface.forms" - }, - "ext.donationinterface.ingenico-hosted": { - "scripts": "ingenico_gateway/forms/js/ingenico.js", - "styles": "ingenico_gateway/forms/css/ingenico.css", - "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" - }, - "ext.donationinterface.amazon.scripts": { - "scripts": "amazon_gateway/amazon.js", - "dependencies": "ext.donationInterface.validation", - "messages": [ - "donate_interface-otherways-short" - ] - }, "ext.donationInterface.mustache.styles": { "styles": "gateway_forms/mustache/forms.css" }, diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index 0d18971..2b54ee0 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -192,26 +192,14 @@ if ( is_null( $donorData ) ) { return; } - // Transitional code, used for a few hours after deploy. - // Please delete before next deploy - $rekey = array( - 'currency_code' => 'currency', - 'fname' => 'first_name', - 'lname' => 'last_name', - 'state' => 'state_province', - ); // fields that should always overwrite with their original values $overwrite = array( 'referrer', 'contribution_tracking_id' ); foreach ( $donorData as $key => $val ) { - $newKey = $key; - if ( isset( $rekey[$key] ) ) { - $newKey = $rekey[$key]; - } - if ( !$this->isSomething( $newKey ) ) { - $this->setVal( $newKey, $val ); + if ( !$this->isSomething( $key ) ) { + $this->setVal( $key, $val ); } else { - if ( in_array( $newKey, $overwrite ) ) { - $this->setVal( $newKey, $val ); + if ( in_array( $key, $overwrite ) ) { + $this->setVal( $key, $val ); } } } -- To view, visit https://gerrit.wikimedia.org/r/379693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I455096b360bd78fa4d294a9fe6a591675a504a41 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Use ES5 Array#filter instead of jQuery.grep
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379681 ) Change subject: resourceloader: Use ES5 Array#filter instead of jQuery.grep .. resourceloader: Use ES5 Array#filter instead of jQuery.grep Same or better performance in Chrome Canary and latest WebKit. Further reduces reliance on jQuery in base module. Change-Id: I691b73b837178b76cff665cbd52f5e5067672a6e --- M resources/src/mediawiki/mediawiki.js 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index b522486..39d0127 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -625,7 +625,7 @@ * @param {Function} callback */ trackUnsubscribe: function ( callback ) { - trackHandlers = $.grep( trackHandlers, function ( fns ) { + trackHandlers = trackHandlers.filter( function ( fns ) { if ( fns[ 1 ] === callback ) { trackCallbacks.remove( fns[ 0 ] ); // Ensure the tuple is removed to avoid holding on to closures @@ -1465,7 +1465,7 @@ if ( ready !== undefined || error !== undefined ) { jobs.push( { // Narrow down the list to modules that are worth waiting for - dependencies: $.grep( dependencies, function ( module ) { + dependencies: dependencies.filter( function ( module ) { var state = mw.loader.getState( module ); return state === 'registered' || state === 'loaded' || state === 'loading' || state === 'executing'; } ), @@ -1782,7 +1782,7 @@ if ( mw.loader.store.enabled ) { implementations = []; sourceModules = []; - batch = $.grep( batch, function ( module ) { + batch = batch.filter( function ( module ) { var implementation = mw.loader.store.get( module ); if ( implementation ) { implementations.push( implementation ); @@ -1807,7 +1807,7 @@ mw.track( 'resourceloader.exception', { exception: err, source: 'store-eval' } ); // Re-add the failed ones that are still pending back to the batch - failed = $.grep( sourceModules, function ( module ) { + failed = sourceModules.filter( function ( module ) { return registry[ module ].state === 'loading'; } ); batchRequest( failed ); @@ -2071,7 +2071,7 @@ } // Filter out top-level modules that are unknown or failed to load before. - filtered = $.grep( modules, function ( module ) { + filtered = modules.filter( function ( module ) { var state = mw.loader.getState( module ); return state !== 'error' && state !== 'missing'; } ); @@ -2773,7 +2773,7 @@ $( function () { var loading, modules; - modules = $.grep( mw.loader.getModuleNames(), function ( module ) { + modules = mw.loader.getModuleNames().filter( function ( module ) { return mw.loader.getState( module ) === 'loading'; } ); // We only need a callback, not any actual module. First try a single using() -- To view, visit https://gerrit.wikimedia.org/r/379681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I691b73b837178b76cff665cbd52f5e5067672a6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379692 ) Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: I73399192c44f56a60d26faea543188fab9c414b8 --- M extensions/DonationInterface 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 0775011..4ce7f50 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface @@ -1 +1 @@ -Subproject commit 07750119540eea2ec876eb51f7c0792ea7cba258 +Subproject commit 4ce7f50d003cedc5a9a9f01bd94899c86e7d1882 -- To view, visit https://gerrit.wikimedia.org/r/379692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73399192c44f56a60d26faea543188fab9c414b8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_27 Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Omnimail recipient - further fixes to batching.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379457 ) Change subject: Omnimail recipient - further fixes to batching. .. Omnimail recipient - further fixes to batching. Save offset whenever we save rows, so we can pick up again if we cancel. Bug: T176255 Change-Id: I5b068ce70459113ba295b41c92b37833679a88da --- M sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php 1 file changed, 25 insertions(+), 16 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php index 06f8c9e..5b14382 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php @@ -43,19 +43,18 @@ $count = 0; $insertBatchSize = CRM_Utils_Array::value('insert_batch_size', $params, 1); $valueStrings = array(); +$progressSettings = array( + 'last_timestamp' => $jobSettings['last_timestamp'], + 'retrieval_parameters' => $omnimail->getRetrievalParameters(), + 'progress_end_date' => $omnimail->endTimeStamp, +); foreach ($recipients as $recipient) { if ($count === $limit) { // Do this here - ie. before processing a new row rather than at the end of the last row // to avoid thinking a job is incomplete if the limit co-incides with available rows. // Also write any remaining rows to the DB before exiting. -_civicrm_api3_omnirecipient_load_write_remainder_rows($valueStrings); -$omnimail->saveJobSetting(array( - 'last_timestamp' => $jobSettings['last_timestamp'], - 'retrieval_parameters' => $omnimail->getRetrievalParameters(), - 'progress_end_date' => $omnimail->endTimeStamp, - 'offset' => $omnimail->getOffset() + $count, -)); +_civicrm_api3_omnirecipient_load_write_remainder_rows($valueStrings, $omnimail, $progressSettings, $omnimail->getOffset() + $count); return civicrm_api3_create_success(1); } $insertValues = array( @@ -72,11 +71,12 @@ ), 6 => array((string) $recipient->getContactReference(), 'String'), ); - $valueStrings[] = CRM_Core_DAO::composeQuery("(%1, %2, %3, %4, %5, %6 )", $insertValues); - $valueStrings = _civicrm_api3_omnirecipient_load_batch_write_to_db($valueStrings, $insertBatchSize); - $rowsLeftBeforeThrottle--; $count++; + + $valueStrings[] = CRM_Core_DAO::composeQuery("(%1, %2, %3, %4, %5, %6 )", $insertValues); + $valueStrings = _civicrm_api3_omnirecipient_load_batch_write_to_db($valueStrings, $insertBatchSize, $omnimail, $progressSettings, $omnimail->getOffset() + $count); + if ($throttleStagePoint && (strtotime('now') > $throttleStagePoint)) { $throttleStagePoint = strtotime('+ ' . (int) $throttleSeconds . 'seconds'); $rowsLeftBeforeThrottle = $throttleCount; @@ -85,7 +85,7 @@ sleep(ceil($throttleStagePoint - strtotime('now'))); } } -_civicrm_api3_omnirecipient_load_write_remainder_rows($valueStrings); +_civicrm_api3_omnirecipient_load_write_remainder_rows($valueStrings, $omnimail, $progressSettings, $omnimail->getOffset() + $count); $omnimail->saveJobSetting(array('last_timestamp' => $omnimail->endTimeStamp)); return civicrm_api3_create_success(1); } @@ -101,11 +101,16 @@ } /** - * @param $valueStrings + * Write remaining rows, if any, to the database. + * + * @param array $valueStrings + * @param \CRM_Omnimail_Omnirecipients $job + * @param array $jobSettings + * @param int $newOffSet */ -function _civicrm_api3_omnirecipient_load_write_remainder_rows($valueStrings) { +function _civicrm_api3_omnirecipient_load_write_remainder_rows($valueStrings, $job, $jobSettings, $newOffSet) { if (count($valueStrings)) { -_civicrm_api3_omnirecipient_load_batch_write_to_db($valueStrings, count($valueStrings)); +_civicrm_api3_omnirecipient_load_batch_write_to_db($valueStrings, count($valueStrings), $job, $jobSettings, $newOffSet); } } @@ -113,20 +118,24 @@ * Write the imported values to the DB, batching per parameter. * * Save the values to the DB in batch sizes accordant with the insertBatchSize - * parameter. + * parameter. Also store where we are up to in setting. * * @param array $valueStrings * @param int $insertBatchSize + * @param \CRM_Omnimail_Omnirecipients $job + * @param array $jobSettings + * @param int $newOffSet * * @return array */ -function _civicrm_api3_omnirecipient_load_batch_write_to_db($valueStrings, $insertBatchSize) { +function _civicrm_api3_omnirecipient_load_batch_write_to_db($val
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379691 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 0091560fb Optionally send more Minfraud parameters 53cb589d7 Don't send empty or '0' address fields to minFraud Change-Id: I23e4086b559f5f0bcd93d4c1b6c0b2d67395a6ba --- D tests/phpunit/FraudFiltersTest.php D tests/phpunit/includes/Responses/minFraud/15points.json 2 files changed, 0 insertions(+), 254 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/tests/phpunit/FraudFiltersTest.php b/tests/phpunit/FraudFiltersTest.php deleted file mode 100644 index ee076c5..000 --- a/tests/phpunit/FraudFiltersTest.php +++ /dev/null @@ -1,237 +0,0 @@ -<<< HEAD (077501 Merge branch 'master' into deployment) -=== -requestFactory = $this->getMockBuilder( - '\MaxMind\WebService\Http\RequestFactory' - )->disableOriginalConstructor()->getMock(); - - $this->request = $this->getMockBuilder( - 'MaxMind\WebService\Http\CurlRequest' - )->disableOriginalConstructor()->getMock(); - - $this->requestFactory->method( 'request' )->willReturn( - $this->request - ); - - $this->setMwGlobals( array( - 'wgDonationInterfaceEnableMinFraud' => true, - 'wgDonationInterfaceMinFraudErrorScore' => 50, - 'wgDonationInterfaceMinFraudClientOptions' => array( - 'host' => '0.0.0.0', - 'httpRequestFactory' => $this->requestFactory - ), - ) ); - } - - /** -* When minFraud gets a blank answer, we should assign points according to -* $wgDonationInterfaceMinFraudErrorScore. -*/ - function testMinFraudErrorScore() { - $this->request->method( 'post' )->willReturn( '' ); - $options = $this->getDonorTestData(); - $options['email'] = 'someb...@wikipedia.org'; - $options['payment_method'] = 'cc'; - - $gateway = $this->getFreshGatewayObject( $options ); - - $gateway->runAntifraudFilters(); - - $this->assertEquals( 'reject', $gateway->getValidationAction(), 'Validation action is not as expected' ); - $exposed = TestingAccessWrapper::newFromObject( $gateway ); - $this->assertEquals( 107.5, $exposed->risk_score, 'RiskScore is not as expected for failure mode' ); - $message = QueueWrapper::getQueue( 'payments-antifraud' )->pop(); - SourceFields::removeFromMessage( $message ); - $expected = array( - 'validation_action' => 'reject', - 'risk_score' => 107.5, - 'score_breakdown' => array( - 'initial' => 0, - 'getScoreUtmCampaignMap' => 0, - 'getScoreCountryMap' => 20, - 'getScoreUtmSourceMap' => 0, - 'getScoreUtmMediumMap' => 0, - 'getScoreEmailDomainMap' => 37.5, - 'getCVVResult' => 0, - 'getAVSResult' => 0, - 'minfraud_filter' => 50, - ), - 'user_ip' => '127.0.0.1', - 'gateway_txn_id' => false, - 'date' => $message['date'], - 'server' => gethostname(), - 'gateway' => 'globalcollect', - 'contribution_tracking_id' => $gateway->getData_Unstaged_Escaped( 'contribution_tracking_id' ), - 'order_id' => $gateway->getData_Unstaged_Escaped( 'order_id' ), - 'payment_method' => 'cc', - ); - $this->assertEquals( $expected, $message ); - } - - /** -* Test we correctly add a real score from minFraud -*/ - function testMinFraudRealScore() { - $options = $this->getDonorTestData(); - $options['email'] = 'someb...@wikipedia.org'; - $options['payment_method'] = 'cc'; - - $gateway = $this->getFreshGatewayObject( $options ); - - $this->request->expects( $this->once() ) - ->method( 'post' ) - ->with( - '{"billing":{"city":"San Francisco","region":"CA","postal":"94105","country":"US"},' . - '"device":{"ip_address":"127.0.0.1"},' . - '"email":{"address":"daf162af7e8
[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379692 ) Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: I73399192c44f56a60d26faea543188fab9c414b8 --- M extensions/DonationInterface 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/379692/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 0775011..4ce7f50 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface @@ -1 +1 @@ -Subproject commit 07750119540eea2ec876eb51f7c0792ea7cba258 +Subproject commit 4ce7f50d003cedc5a9a9f01bd94899c86e7d1882 -- To view, visit https://gerrit.wikimedia.org/r/379692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73399192c44f56a60d26faea543188fab9c414b8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_27 Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379691 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 0091560fb Optionally send more Minfraud parameters 53cb589d7 Don't send empty or '0' address fields to minFraud Change-Id: I23e4086b559f5f0bcd93d4c1b6c0b2d67395a6ba --- D tests/phpunit/FraudFiltersTest.php D tests/phpunit/includes/Responses/minFraud/15points.json 2 files changed, 0 insertions(+), 254 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/91/379691/1 diff --git a/tests/phpunit/FraudFiltersTest.php b/tests/phpunit/FraudFiltersTest.php deleted file mode 100644 index ee076c5..000 --- a/tests/phpunit/FraudFiltersTest.php +++ /dev/null @@ -1,237 +0,0 @@ -<<< HEAD (077501 Merge branch 'master' into deployment) -=== -requestFactory = $this->getMockBuilder( - '\MaxMind\WebService\Http\RequestFactory' - )->disableOriginalConstructor()->getMock(); - - $this->request = $this->getMockBuilder( - 'MaxMind\WebService\Http\CurlRequest' - )->disableOriginalConstructor()->getMock(); - - $this->requestFactory->method( 'request' )->willReturn( - $this->request - ); - - $this->setMwGlobals( array( - 'wgDonationInterfaceEnableMinFraud' => true, - 'wgDonationInterfaceMinFraudErrorScore' => 50, - 'wgDonationInterfaceMinFraudClientOptions' => array( - 'host' => '0.0.0.0', - 'httpRequestFactory' => $this->requestFactory - ), - ) ); - } - - /** -* When minFraud gets a blank answer, we should assign points according to -* $wgDonationInterfaceMinFraudErrorScore. -*/ - function testMinFraudErrorScore() { - $this->request->method( 'post' )->willReturn( '' ); - $options = $this->getDonorTestData(); - $options['email'] = 'someb...@wikipedia.org'; - $options['payment_method'] = 'cc'; - - $gateway = $this->getFreshGatewayObject( $options ); - - $gateway->runAntifraudFilters(); - - $this->assertEquals( 'reject', $gateway->getValidationAction(), 'Validation action is not as expected' ); - $exposed = TestingAccessWrapper::newFromObject( $gateway ); - $this->assertEquals( 107.5, $exposed->risk_score, 'RiskScore is not as expected for failure mode' ); - $message = QueueWrapper::getQueue( 'payments-antifraud' )->pop(); - SourceFields::removeFromMessage( $message ); - $expected = array( - 'validation_action' => 'reject', - 'risk_score' => 107.5, - 'score_breakdown' => array( - 'initial' => 0, - 'getScoreUtmCampaignMap' => 0, - 'getScoreCountryMap' => 20, - 'getScoreUtmSourceMap' => 0, - 'getScoreUtmMediumMap' => 0, - 'getScoreEmailDomainMap' => 37.5, - 'getCVVResult' => 0, - 'getAVSResult' => 0, - 'minfraud_filter' => 50, - ), - 'user_ip' => '127.0.0.1', - 'gateway_txn_id' => false, - 'date' => $message['date'], - 'server' => gethostname(), - 'gateway' => 'globalcollect', - 'contribution_tracking_id' => $gateway->getData_Unstaged_Escaped( 'contribution_tracking_id' ), - 'order_id' => $gateway->getData_Unstaged_Escaped( 'order_id' ), - 'payment_method' => 'cc', - ); - $this->assertEquals( $expected, $message ); - } - - /** -* Test we correctly add a real score from minFraud -*/ - function testMinFraudRealScore() { - $options = $this->getDonorTestData(); - $options['email'] = 'someb...@wikipedia.org'; - $options['payment_method'] = 'cc'; - - $gateway = $this->getFreshGatewayObject( $options ); - - $this->request->expects( $this->once() ) - ->method( 'post' ) - ->with( - '{"billing":{"city":"San Francisco","region":"CA","postal":"94105","country":"US"},' . - '"device":{"ip_address":"127.0.0.1"},' . - '"email"
[MediaWiki-commits] [Gerrit] mediawiki...SiteMatrix[master]: Add language direction to SiteMatrix API output
Niharika29 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379690 ) Change subject: Add language direction to SiteMatrix API output .. Add language direction to SiteMatrix API output This is required for auto-updation of the rtl dblist. Bug: T172337 Change-Id: I9e4e6426988f7f0375875bfb96948033750dd105 --- M SiteMatrixApi.php 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteMatrix refs/changes/90/379690/1 diff --git a/SiteMatrixApi.php b/SiteMatrixApi.php index 8180565..2debcdd 100644 --- a/SiteMatrixApi.php +++ b/SiteMatrixApi.php @@ -51,6 +51,7 @@ 'code' => $langhost, 'name' => isset( $langNames[$lang] ) ? $langNames[$lang] : null, 'site' => [], + 'dir' => Language::factory( $langhost )->getDir() ]; if ( isset( $localLanguageNames[$lang] ) ) { $language['localname'] = $localLanguageNames[$lang]; @@ -198,9 +199,10 @@ 'code', 'name', 'site', + 'dir', 'localname', ], - ApiBase::PARAM_DFLT => 'code|name|site|localname', + ApiBase::PARAM_DFLT => 'code|name|site|dir|localname', ], 'siteprop' => [ ApiBase::PARAM_ISMULTI => true, -- To view, visit https://gerrit.wikimedia.org/r/379690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e4e6426988f7f0375875bfb96948033750dd105 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SiteMatrix Gerrit-Branch: master Gerrit-Owner: Niharika29 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.19]: Turn off human search relevance survey
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379686 ) Change subject: Turn off human search relevance survey .. Turn off human search relevance survey The survey has run for two weeks. Turn off now so we can analyze the results. Bug: T175047 Change-Id: I1b758d5bf81acbd04243a5fe1954f86ae4cb4322 (cherry picked from commit 80f389f6223d115b6f84d2be0d146f07554df7bd) --- M extension.json 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index cac3d20..9852186 100644 --- a/extension.json +++ b/extension.json @@ -184,8 +184,7 @@ ], "skinScripts": { "default": [ - "ext.wikimediaEvents.searchSatisfaction.js", - "ext.wikimediaEvents.humanSearchRelevance.js" + "ext.wikimediaEvents.searchSatisfaction.js" ], "minerva": [] }, -- To view, visit https://gerrit.wikimedia.org/r/379686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b758d5bf81acbd04243a5fe1954f86ae4cb4322 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: EBernhardson Gerrit-Reviewer: EBernhardson 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: Start the toplinks collapsed/expanded by cookie v...
Mooeypoo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379689 ) Change subject: RCFilters: Start the toplinks collapsed/expanded by cookie value .. RCFilters: Start the toplinks collapsed/expanded by cookie value Prevent "jumping" of the content by initializing the top links already collapsed or expanded depending on the cookie value. Bug: T176380 Change-Id: I6c494b42ec6f029b60182607faa37feba062b597 --- M includes/specials/SpecialRecentchanges.php M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 3 files changed, 25 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/379689/1 diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 40834cb..886c6ea 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -656,12 +656,16 @@ $topLinksAttributes = [ 'class' => 'mw-recentchanges-toplinks' ]; if ( $this->isStructuredFilterUiEnabled() ) { + // Check whether the widget is already collapsed or expanded + $collapsedState = $this->getRequest()->getCookie( 'rcfilters-toplinks-collapsed-state' ); + $collapsedClass = $collapsedState === 'collapsed' ? 'mw-rcfilters-toplinks-collapsed' : ''; + $contentTitle = Html::rawElement( 'div', - [ 'class' => 'mw-recentchanges-toplinks-title' ], + [ 'class' => 'mw-recentchanges-toplinks-title ' . $collapsedClass ], $this->msg( 'rcfilters-other-review-tools' )->parse() ); $contentWrapper = Html::rawElement( 'div', - array_merge( [ 'class' => 'mw-collapsible-content' ], $langAttributes ), + array_merge( [ 'class' => 'mw-recentchanges-toplinks-content mw-collapsible-content ' . $collapsedClass ], $langAttributes ), $content ); $content = $contentTitle . $contentWrapper; diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js index 5ab32ea..560241b 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js @@ -32,7 +32,7 @@ currentPage = mw.config.get( 'wgCanonicalNamespace' ) + ':' + mw.config.get( 'wgCanonicalSpecialPageName' ); - +debugger; // TODO: The changesListWrapperWidget should be able to initialize // after the model is ready. // eslint-disable-next-line no-new diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index 80aff74..ba7a70e 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -15,18 +15,31 @@ .rcfilters-head { min-height: @rcfilters-head-min-height; } + // On the watchlist, reserve a bit more .mw-special-Watchlist .rcfilters-head { min-height: @rcfilters-wl-head-min-height; } - body:not( .mw-rcfilters-ui-initialized ) .rcfilters-head { - opacity: 0.5; - pointer-events: none; - - .cloptions { + body:not( .mw-rcfilters-ui-initialized ) { + .mw-recentchanges-toplinks-content.mw-rcfilters-toplinks-collapsed { display: none; } + + .mw-recentchanges-toplinks-title.mw-rcfilters-toplinks-collapsed { + // Hide, but keep the placement so we don't jump + visibility: hidden; + } + + .rcfilters-head { + opacity: 0.5; + pointer-events: none; + + .cloptions { + display: none; + } + + } } .rcfilters-container { -- To view, visit https://gerrit.wikimedia.org/r/379689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c494b42ec6f029b60182607faa37feba062b597 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mooeypoo __
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Stop injecting search relevance survey data into pages
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379591 ) Change subject: Stop injecting search relevance survey data into pages .. Stop injecting search relevance survey data into pages Survey is being turned off after two weeks. Bug: T175047 Change-Id: I791252adad2e9e4a101603dfe270e972d3a5933c --- D wmf-config/CirrusSearch-rel-survey.php M wmf-config/InitialiseSettings.php 2 files changed, 0 insertions(+), 18,985 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve -- To view, visit https://gerrit.wikimedia.org/r/379591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I791252adad2e9e4a101603dfe270e972d3a5933c Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: Zoranzoki21 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: Simplify getVersion and getState
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379688 ) Change subject: mw.loader: Simplify getVersion and getState .. mw.loader: Simplify getVersion and getState This undefined check no longer makes sense since there are now defaults for these in register(). There is no supported scenario in which a module would have a key in the registry but not have these properties defined, or have them defined with the undefined value. Change-Id: I945871861ccf3659c2d7dd021aa87dfd747f22b9 --- M resources/src/mediawiki/mediawiki.js 1 file changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/88/379688/1 diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index b522486..7e02df4 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -2123,10 +2123,7 @@ * in the registry. */ getVersion: function ( module ) { - if ( !hasOwn.call( registry, module ) || registry[ module ].version === undefined ) { - return null; - } - return registry[ module ].version; + return hasOwn.call( registry, module ) ? registry[ module ].version : null; }, /** @@ -2137,10 +2134,7 @@ * in the registry. */ getState: function ( module ) { - if ( !hasOwn.call( registry, module ) || registry[ module ].state === undefined ) { - return null; - } - return registry[ module ].state; + return hasOwn.call( registry, module ) ? registry[ module ].state : null; }, /** -- To view, visit https://gerrit.wikimedia.org/r/379688 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I945871861ccf3659c2d7dd021aa87dfd747f22b9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Replace abandoned blue with WikimediaUI color palette one
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379687 ) Change subject: Replace abandoned blue with WikimediaUI color palette one .. Replace abandoned blue with WikimediaUI color palette one Replacing `#36b` with `#36c`. Bug: T176448 Change-Id: I688826e4f15bc398012d60d496b9de1deb4f9565 --- M resources/css/ext.translate.editor.css M resources/css/ext.translate.special.translate.css 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/87/379687/1 diff --git a/resources/css/ext.translate.editor.css b/resources/css/ext.translate.editor.css index 8d5b261..38258d9 100644 --- a/resources/css/ext.translate.editor.css +++ b/resources/css/ext.translate.editor.css @@ -224,7 +224,7 @@ .message-desc-control .read-more { font-size: 14px; - color: #36b; + color: #36c; cursor: pointer; margin-right: 5px; } @@ -249,7 +249,7 @@ .in-other-language { font-size: 14px; border: 1px solid #ddd; - border-left: 2px solid #36b; + border-left: 2px solid #36c; padding: 5px 5px 5px 10px; background-color: #f5f5f5; } @@ -333,7 +333,7 @@ } .tux-warning-message .show-diff-link { - color: #36b; + color: #36c; cursor: pointer; padding-left: 5px; } diff --git a/resources/css/ext.translate.special.translate.css b/resources/css/ext.translate.special.translate.css index bdaf02b..5a53a79 100644 --- a/resources/css/ext.translate.special.translate.css +++ b/resources/css/ext.translate.special.translate.css @@ -131,11 +131,11 @@ } .tux-message-selector li.selected { - border-bottom: 2px solid #36b; + border-bottom: 2px solid #36c; } .tux-message-selector li.selected a { - color: #36b; + color: #36c; } .tux-message-selector li a { -- To view, visit https://gerrit.wikimedia.org/r/379687 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I688826e4f15bc398012d60d496b9de1deb4f9565 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.19]: Turn off human search relevance survey
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379686 ) Change subject: Turn off human search relevance survey .. Turn off human search relevance survey The survey has run for two weeks. Turn off now so we can analyze the results. Bug: T175047 Change-Id: I1b758d5bf81acbd04243a5fe1954f86ae4cb4322 (cherry picked from commit 80f389f6223d115b6f84d2be0d146f07554df7bd) --- M extension.json 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/86/379686/1 diff --git a/extension.json b/extension.json index cac3d20..9852186 100644 --- a/extension.json +++ b/extension.json @@ -184,8 +184,7 @@ ], "skinScripts": { "default": [ - "ext.wikimediaEvents.searchSatisfaction.js", - "ext.wikimediaEvents.humanSearchRelevance.js" + "ext.wikimediaEvents.searchSatisfaction.js" ], "minerva": [] }, -- To view, visit https://gerrit.wikimedia.org/r/379686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b758d5bf81acbd04243a5fe1954f86ae4cb4322 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Turn off human search relevance survey
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379590 ) Change subject: Turn off human search relevance survey .. Turn off human search relevance survey The survey has run for two weeks. Turn off now so we can analyze the results. Bug: T175047 Change-Id: I1b758d5bf81acbd04243a5fe1954f86ae4cb4322 --- M extension.json 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/extension.json b/extension.json index cac3d20..9852186 100644 --- a/extension.json +++ b/extension.json @@ -184,8 +184,7 @@ ], "skinScripts": { "default": [ - "ext.wikimediaEvents.searchSatisfaction.js", - "ext.wikimediaEvents.humanSearchRelevance.js" + "ext.wikimediaEvents.searchSatisfaction.js" ], "minerva": [] }, -- To view, visit https://gerrit.wikimedia.org/r/379590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b758d5bf81acbd04243a5fe1954f86ae4cb4322 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Zoranzoki21 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/mediawiki-config[master]: mariadb: Depool db1055
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379684 ) Change subject: mariadb: Depool db1055 .. mariadb: Depool db1055 Change-Id: I24f97719aced37a115b352b7b9990e7aa98fc145 --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jcrespo: Looks good to me, approved diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 4ba4a02..7232bf8 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -104,7 +104,7 @@ 'db1052' => 0, # B3 2.8TB 96GB, master 'db1067' => 0, # D1 2.8TB 160GB, old master 'db1051' => 50, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager - 'db1055' => 50, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager + # 'db1055' => 50, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium 'db1066' => 10, # D1 2.8TB 160GB, api 'db1072' => 50, # B2 2.8TB 160GB, api @@ -246,23 +246,23 @@ 's1' => [ 'watchlist' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchanges' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchangeslinked' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'contributions' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'logpager' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'dump' => [ 'db1065' => 1, -- To view, visit https://gerrit.wikimedia.org/r/379684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24f97719aced37a115b352b7b9990e7aa98fc145 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Urbanecm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...heritage[master]: Harvest the source page of unknown fields
Jean-Frédéric has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379685 ) Change subject: Harvest the source page of unknown fields .. Harvest the source page of unknown fields The UnknownFields report is as of now not actionable as it is very hard to track down the location of the error. For each field, we store a counter mapping a page and the occurence count. We display a subset of these as wikilinks on the report in a third column. Bug: T117330 Change-Id: If1144827c69bbd271aff93a9ec81164b65b29b93 --- M erfgoedbot/update_database.py M requirements-test.txt M tests/test_update_database.py 3 files changed, 105 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage refs/changes/85/379685/1 diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py index d70deb2..f82f9f3 100755 --- a/erfgoedbot/update_database.py +++ b/erfgoedbot/update_database.py @@ -16,6 +16,7 @@ import datetime import urlparse import time +from collections import Counter from requests.exceptions import Timeout @@ -141,9 +142,10 @@ def unknownFieldsStatistics(countryconfig, unknownFields): """ -Produce some unknown field statistics to debug. +Outputs a list of any unknown fields as a wikitext table. -This is still very raw data. Should be formatted and more information. +The table contains the name and frequency of the field and a sample of +source pages where this field was encountered. """ site = pywikibot.Site(u'commons', u'commons') page = pywikibot.Page( @@ -152,15 +154,45 @@ summary = u'Updating the list of unknown fields' text = u'{| class="wikitable sortable"\n' -text += u'! Field !! Count\n' -for key, value in unknownFields.items(): +text += u'! Field !! Count !! Sources\n' +for key, counter in unknownFields.items(): text += u'|-\n' -text += u'| %s || %s\n' % (key, value) +text += u'| {0} || {1} || {2}\n'.format( +key, sum(counter.values()), format_source_field(counter, site)) text += u'|}\n' text += u'[[Category:Commons:Monuments database/Unknown fields]]' common.save_to_wiki_or_local(page, summary, text) + + +def format_source_field(sources, site, sample_size=4): +""" +Format a list of source pages to fit in the statistics field. + +@param sources: set of pywikibot.Page objects +@param site: the site to which the output should be written (commons) +@param sample_size: the number of source pages to output +""" +source_text = '' +if len(sources) == 1: +source_page = sources.keys()[0] +source_text = source_page.title( +asLink=True, forceInterwiki=True, withNamespace=False, insite=site) +else: +source_slice = sources.most_common(sample_size) +remaining = len(sources) - len(source_slice) +for (source_page, source_count) in source_slice: +source_text += u'\n* {0} ({1})'.format( +source_page.title( +asLink=True, forceInterwiki=True, withNamespace=False, +insite=site), +source_count +) +if remaining: +source_text += u"\n* ''and {0} more page(s)''".format(remaining) + +return source_text def updateMonument(contents, source, countryconfig, conn, cursor, sourcePage): @@ -338,8 +370,8 @@ title, field, value), _logger) if field not in unknownFields: -unknownFields[field] = 0 -unknownFields[field] += 1 +unknownFields[field] = Counter() +unknownFields[field][source] += 1 # time.sleep(5) # If we truncate we don't have to check for primkey (it's a made up one) diff --git a/requirements-test.txt b/requirements-test.txt index 9f90b1c..ddd621b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -5,3 +5,4 @@ nose-cov coverage yamllint +orderedset diff --git a/tests/test_update_database.py b/tests/test_update_database.py index 1145984..8688f0e 100644 --- a/tests/test_update_database.py +++ b/tests/test_update_database.py @@ -3,6 +3,7 @@ import mock import unittest import pywikibot +from collections import Counter from erfgoedbot import update_database @@ -49,13 +50,21 @@ self.assertEqual(unknown_fields, {}) def test_processMonument_with_one_unknown_param_correctly_returns_unknown_fields(self): -params = [u'id=1234', u'name=A Monument Name', u'some_unknown_field=An unknown field value'] +params = [ +u'id=1234', +u'name=A Monument Name', +u'some_unknown_field=An unknown field value' +] unknown_fields = {} +expected_unknown = Counter({self.source: 1}) with self.asser
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: mariadb: Depool db1055
Jcrespo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379684 ) Change subject: mariadb: Depool db1055 .. mariadb: Depool db1055 Change-Id: I24f97719aced37a115b352b7b9990e7aa98fc145 --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/84/379684/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 4ba4a02..7232bf8 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -104,7 +104,7 @@ 'db1052' => 0, # B3 2.8TB 96GB, master 'db1067' => 0, # D1 2.8TB 160GB, old master 'db1051' => 50, # B3 2.8TB 96GB, watchlist, recentchanges, contributions, logpager - 'db1055' => 50, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager + # 'db1055' => 50, # C2 2.8TB 96GB, watchlist, recentchanges, contributions, logpager 'db1065' => 0, # D1 2.8TB 160GB, vslow, dump, master for sanitarium 'db1066' => 10, # D1 2.8TB 160GB, api 'db1072' => 50, # B2 2.8TB 160GB, api @@ -246,23 +246,23 @@ 's1' => [ 'watchlist' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchanges' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'recentchangeslinked' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'contributions' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'logpager' => [ 'db1051' => 1, - 'db1055' => 1, + # 'db1055' => 1, ], 'dump' => [ 'db1065' => 1, -- To view, visit https://gerrit.wikimedia.org/r/379684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24f97719aced37a115b352b7b9990e7aa98fc145 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/puppet[production]: WMCS Cumin: use openstack as default backend
Volans has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379682 ) Change subject: WMCS Cumin: use openstack as default backend .. WMCS Cumin: use openstack as default backend Bug: T175711 Change-Id: I81c03c4edf8929e3e6c0326adc113e0d721f3494 --- M modules/profile/templates/openstack/main/cumin/config.yaml.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Volans: Looks good to me, approved diff --git a/modules/profile/templates/openstack/main/cumin/config.yaml.erb b/modules/profile/templates/openstack/main/cumin/config.yaml.erb index 34bce5f..acaab38 100644 --- a/modules/profile/templates/openstack/main/cumin/config.yaml.erb +++ b/modules/profile/templates/openstack/main/cumin/config.yaml.erb @@ -1,6 +1,6 @@ transport: clustershell log_file: <%= @cumin_log_path %>/cumin.log -default_backend: direct +default_backend: openstack environment: SSH_AUTH_SOCK: /run/keyholder/proxy.sock -- To view, visit https://gerrit.wikimedia.org/r/379682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81c03c4edf8929e3e6c0326adc113e0d721f3494 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans Gerrit-Reviewer: Volans 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...Popups[master]: Unify `box-sizing` to common LESS mixin
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379683 ) Change subject: Unify `box-sizing` to common LESS mixin .. Unify `box-sizing` to common LESS mixin Change-Id: Ifd3e7dd9be68c09b362c0fb8071cd9f27f846505 --- M resources/ext.popups/styles/ext.popups.settings.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/83/379683/1 diff --git a/resources/ext.popups/styles/ext.popups.settings.less b/resources/ext.popups/styles/ext.popups.settings.less index 6da67f8..cf87440 100644 --- a/resources/ext.popups/styles/ext.popups.settings.less +++ b/resources/ext.popups/styles/ext.popups.settings.less @@ -11,7 +11,7 @@ border-radius: 2px; header { - box-sizing: border-box; + .box-sizing( border-box ); border-bottom: 1px solid #c8ccd1; position: relative; display: table; -- To view, visit https://gerrit.wikimedia.org/r/379683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd3e7dd9be68c09b362c0fb8071cd9f27f846505 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: WMCS Cumin: use openstack as default backend
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379682 ) Change subject: WMCS Cumin: use openstack as default backend .. WMCS Cumin: use openstack as default backend Bug: T175711 Change-Id: I81c03c4edf8929e3e6c0326adc113e0d721f3494 --- M modules/profile/templates/openstack/main/cumin/config.yaml.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/379682/1 diff --git a/modules/profile/templates/openstack/main/cumin/config.yaml.erb b/modules/profile/templates/openstack/main/cumin/config.yaml.erb index 34bce5f..acaab38 100644 --- a/modules/profile/templates/openstack/main/cumin/config.yaml.erb +++ b/modules/profile/templates/openstack/main/cumin/config.yaml.erb @@ -1,6 +1,6 @@ transport: clustershell log_file: <%= @cumin_log_path %>/cumin.log -default_backend: direct +default_backend: openstack environment: SSH_AUTH_SOCK: /run/keyholder/proxy.sock -- To view, visit https://gerrit.wikimedia.org/r/379682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81c03c4edf8929e3e6c0326adc113e0d721f3494 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Use ES5 Array#filter instead of jQuery.grep
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379681 ) Change subject: resourceloader: Use ES5 Array#filter instead of jQuery.grep .. resourceloader: Use ES5 Array#filter instead of jQuery.grep Same or better performance in Chrome Canary and latest WebKit. Further reduces reliance on jQuery in base module. Change-Id: I691b73b837178b76cff665cbd52f5e5067672a6e --- M resources/src/mediawiki/mediawiki.js 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/379681/1 diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index b522486..39d0127 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -625,7 +625,7 @@ * @param {Function} callback */ trackUnsubscribe: function ( callback ) { - trackHandlers = $.grep( trackHandlers, function ( fns ) { + trackHandlers = trackHandlers.filter( function ( fns ) { if ( fns[ 1 ] === callback ) { trackCallbacks.remove( fns[ 0 ] ); // Ensure the tuple is removed to avoid holding on to closures @@ -1465,7 +1465,7 @@ if ( ready !== undefined || error !== undefined ) { jobs.push( { // Narrow down the list to modules that are worth waiting for - dependencies: $.grep( dependencies, function ( module ) { + dependencies: dependencies.filter( function ( module ) { var state = mw.loader.getState( module ); return state === 'registered' || state === 'loaded' || state === 'loading' || state === 'executing'; } ), @@ -1782,7 +1782,7 @@ if ( mw.loader.store.enabled ) { implementations = []; sourceModules = []; - batch = $.grep( batch, function ( module ) { + batch = batch.filter( function ( module ) { var implementation = mw.loader.store.get( module ); if ( implementation ) { implementations.push( implementation ); @@ -1807,7 +1807,7 @@ mw.track( 'resourceloader.exception', { exception: err, source: 'store-eval' } ); // Re-add the failed ones that are still pending back to the batch - failed = $.grep( sourceModules, function ( module ) { + failed = sourceModules.filter( function ( module ) { return registry[ module ].state === 'loading'; } ); batchRequest( failed ); @@ -2071,7 +2071,7 @@ } // Filter out top-level modules that are unknown or failed to load before. - filtered = $.grep( modules, function ( module ) { + filtered = modules.filter( function ( module ) { var state = mw.loader.getState( module ); return state !== 'error' && state !== 'missing'; } ); @@ -2773,7 +2773,7 @@ $( function () { var loading, modules; - modules = $.grep( mw.loader.getModuleNames(), function ( module ) { + modules = mw.loader.getModuleNames().filter( function ( module ) { return mw.loader.getState( module ) === 'loading'; } ); // We only need a callback, not any actual module. First try a single using() -- To view, visit https://gerrit.wikimedia.org/r/379681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I691b73b837178b76cff665cbd52f5e5067672a6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T170832: Don't emit template info in lint for extension tags
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379679 ) Change subject: T170832: Don't emit template info in lint for extension tags .. T170832: Don't emit template info in lint for extension tags * We could probably provide finer grained dsr for native extensions but hold off on that for now. Change-Id: Ie21c79e0193feef43a3a657a62dc53a4366191d9 --- M lib/wt2html/pp/handlers/linter.js M tests/mocha/linter.js 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/wt2html/pp/handlers/linter.js b/lib/wt2html/pp/handlers/linter.js index 8e95440..2a8bb3d 100644 --- a/lib/wt2html/pp/handlers/linter.js +++ b/lib/wt2html/pp/handlers/linter.js @@ -89,6 +89,10 @@ * @return {string} */ function findEnclosingTemplateName(env, tplInfo) { + var typeOf = tplInfo.first.getAttribute('typeof'); + if (!/(?:^|\s)mw:Transclusion(?=$|\s)/.test(typeOf)) { + return undefined; + } var dmw = DU.getDataMw(tplInfo.first); if (dmw.parts && dmw.parts.length === 1) { var p0 = dmw.parts[0]; diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js index f1ad362..a3de2c7 100644 --- a/tests/mocha/linter.js +++ b/tests/mocha/linter.js @@ -171,6 +171,15 @@ result[1].params.should.have.a.property("name", "tt"); }); }); + it('should not have template info for extension tags', function() { + return parseWT('\nFile:Test.jpg|foo\n') + .then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property('type', 'obsolete-tag'); + result[0].should.not.have.a.property('templateInfo'); + result[0].dsr.should.deep.equal([ 0, 47, 2, 2 ]); + }); + }); }); describe('FOSTERED CONTENT', function() { -- To view, visit https://gerrit.wikimedia.org/r/379679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie21c79e0193feef43a3a657a62dc53a4366191d9 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Don't send empty or '0' address fields to minFraud
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379120 ) Change subject: Don't send empty or '0' address fields to minFraud .. Don't send empty or '0' address fields to minFraud Change-Id: I8eb56ab704c1966349a23bd444e6228c578ca765 --- M extras/custom_filters/filters/minfraud/minfraud.body.php 1 file changed, 12 insertions(+), 6 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/extras/custom_filters/filters/minfraud/minfraud.body.php b/extras/custom_filters/filters/minfraud/minfraud.body.php index 828986e..422aaed 100644 --- a/extras/custom_filters/filters/minfraud/minfraud.body.php +++ b/extras/custom_filters/filters/minfraud/minfraud.body.php @@ -209,13 +209,19 @@ } protected function getBillingParams( $data ) { - return [ - 'city' => $data['city'], - // FIXME: region should use the ISO 3166-2 code - 'region' => $data['state_province'], - 'postal' => $data['postal_code'], - 'country' => $data['country'], + $map = [ + 'city' => 'city', + 'state_province' => 'region', + 'postal_code' => 'postal', + 'country' => 'country' ]; + $billingParams = []; + foreach ( $map as $ourName => $theirName ) { + if ( !empty( $data[$ourName] ) && $data[$ourName] !== '0' ) { + $billingParams[$theirName] = $data[$ourName]; + } + } + return $billingParams; } protected function getEventParams( $data ) { -- To view, visit https://gerrit.wikimedia.org/r/379120 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8eb56ab704c1966349a23bd444e6228c578ca765 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Mepps Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...heritage[master]: Make all erfgoedbot scripts respect the skipping mechanisms.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379140 ) Change subject: Make all erfgoedbot scripts respect the skipping mechanisms. .. Make all erfgoedbot scripts respect the skipping mechanisms. The skipping mechanisms (introduced through the merging of the Wikidata branch) consist of the `skip` field in the config and the `-skip_wd` command line argument. Also: * make tests aware of `skip` field * set `skip: true` for nl-wd_(nl) Change-Id: I68f345cf09e555e2ea37c4db0197ccc11954abc1 --- M erfgoedbot/add_coord_to_articles.py M erfgoedbot/add_object_location_monuments.py M erfgoedbot/categorize_images.py M erfgoedbot/images_of_monuments_without_id.py M erfgoedbot/missing_commonscat_links.py M erfgoedbot/monuments_config/nl-wd_nl.json M erfgoedbot/populate_image_table.py M erfgoedbot/unused_monument_images.py M erfgoedbot/update_id_dump.py M tests/test_monuments_config.py 10 files changed, 74 insertions(+), 18 deletions(-) Approvals: Jean-Frédéric: Looks good to me, approved jenkins-bot: Verified diff --git a/erfgoedbot/add_coord_to_articles.py b/erfgoedbot/add_coord_to_articles.py index 5a9950e..58fa56e 100644 --- a/erfgoedbot/add_coord_to_articles.py +++ b/erfgoedbot/add_coord_to_articles.py @@ -291,6 +291,7 @@ def main(): countrycode = u'' lang = u'' +skip_wd = False connMon = None cursorMon = None @@ -302,10 +303,12 @@ countrycode = value elif option == '-langcode': lang = value +elif option == '-skip_wd': +skip_wd = True else: raise Exception( -u'Bad parameters. Expected "-countrycode", "-langcode" or ' -u'pywikibot args. Found "{}"'.format(option)) +u'Bad parameters. Expected "-countrycode", "-langcode", ' +u'"-skip_wd" or pywikibot args. Found "{}"'.format(option)) if countrycode and lang: if not mconfig.countries.get((countrycode, lang)): @@ -318,6 +321,9 @@ u'be used together.') else: for (countrycode, lang), countryconfig in mconfig.countries.iteritems(): +if (countryconfig.get('skip') or +(skip_wd and (countryconfig.get('type') == 'sparql'))): +continue pywikibot.output(u'Working on countrycode "%s" in language "%s"' % (countrycode, lang)) processCountry(countrycode, lang, countryconfig, wikiData.get(lang), connMon, cursorMon) diff --git a/erfgoedbot/add_object_location_monuments.py b/erfgoedbot/add_object_location_monuments.py index 658a403..608df47 100644 --- a/erfgoedbot/add_object_location_monuments.py +++ b/erfgoedbot/add_object_location_monuments.py @@ -205,6 +205,7 @@ def main(): countrycode = u'' lang = u'' +skip_wd = False # Connect database, we need that (conn, cursor) = connect_to_monuments_database() @@ -216,10 +217,13 @@ countrycode = value elif option == '-langcode': lang = value +elif option == '-skip_wd': +skip_wd = True else: raise Exception( -u'Bad parameters. Expected "-countrycode", "-langcode" ' -u'or pywikibot args. Found "{}"'.format(option)) +u'Bad parameters. Expected "-countrycode", "-langcode", ' +u'"-skip_wd" or pywikibot args. ' +u'Found "{}"'.format(option)) pywikibot.setSite(pywikibot.getSite(u'commons', u'commons')) @@ -237,6 +241,9 @@ u'be used together.') else: for (countrycode, lang), countryconfig in mconfig.countries.iteritems(): +if (countryconfig.get('skip') or +(skip_wd and (countryconfig.get('type') == 'sparql'))): +continue if not countryconfig.get('autoGeocode'): pywikibot.output( u'"%s" in language "%s" is not supported in auto geocode mode (yet).' % (countrycode, lang)) diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py index 0c23cad..df0e4e0 100644 --- a/erfgoedbot/categorize_images.py +++ b/erfgoedbot/categorize_images.py @@ -591,6 +591,7 @@ countrycode = u'' lang = u'' overridecat = u'' +skip_wd = False conn = None cursor = None # Connect database, we need that @@ -604,10 +605,12 @@ lang = value elif option == '-overridecat': overridecat = value +elif option == '-skip_wd': +skip_wd = True else: raise Exception( u'Bad parameters. Expected "-countrycode", "-langcode", ' -u'"-overridecat" or pywikibot args. ' +u'"-overridecat", "-skip_wd" or pywikibot args. ' u'Found "{}"'.format(option)) if count
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Optionally send more Minfraud parameters
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/275043 ) Change subject: Optionally send more Minfraud parameters .. Optionally send more Minfraud parameters List the extra fields you want to send in $wgDonationInterfaceMinFraudExtraFields. Available: 'email', 'first_name', 'last_name', 'street_address', 'amount', and 'currency'. Also cleans up some unused CCFD (old minfraud lib) references. Bug: T128902 Bug: T173876 Change-Id: I3b48de91ac417cf245fd23a5bfcf80c7cb3bbad2 --- M README.txt M extension.json M extras/custom_filters/filters/minfraud/minfraud.body.php M tests/phpunit/FraudFiltersTest.php A tests/phpunit/includes/Responses/minFraud/15points.json 5 files changed, 154 insertions(+), 59 deletions(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/README.txt b/README.txt index 1a5f1f5..c9f16e1 100644 --- a/README.txt +++ b/README.txt @@ -414,6 +414,16 @@ */ $wgDonationInterfaceMinFraudAlarmLimit = 25000 +/** + * Additional fields to send in each Minfraud request. + * Parameter documentation: http://dev.maxmind.com/minfraud/#Input + * We will always send city, region, postal, country, domain, email (MD5 + * hashed), transaction_id, ip_address, user_agent, and accept_language. + * Things you can put here: email (send the real address instead of a hash), + * amount, currency, first_name, last_name, and street_address. + */ +$wgDonationInterfaceMinFraudExtraFields = array() + //Referrer Filter globals $wgDonationInterfaceCustomFiltersRefRules = array() diff --git a/extension.json b/extension.json index 2c1041a..760c469 100644 --- a/extension.json +++ b/extension.json @@ -475,6 +475,7 @@ "DonationInterfaceMinFraudUserId": "", "DonationInterfaceMinFraudLicenseKey": "", "DonationInterfaceMinFraudClientOptions": [], + "DonationInterfaceMinFraudExtraFields": [], "DonationInterfaceMinFraudAlarmLimit": 25000, "DonationInterfaceCustomFiltersRefRules": [], "DonationInterfaceCustomFiltersSrcRules": [], diff --git a/extras/custom_filters/filters/minfraud/minfraud.body.php b/extras/custom_filters/filters/minfraud/minfraud.body.php index fcd5b4d..828986e 100644 --- a/extras/custom_filters/filters/minfraud/minfraud.body.php +++ b/extras/custom_filters/filters/minfraud/minfraud.body.php @@ -64,13 +64,13 @@ * @see MaxMind\MinFraud * @var array $minFraudClientOptions */ - protected $minFraudClientOptions = array(); + protected $minFraudClientOptions = []; /** -* License key for minfraud -* @var string $minfraudLicenseKey +* License key for minFraud +* @var string $minFraudLicenseKey */ - protected $minfraudLicenseKey = ''; + protected $minFraudLicenseKey = ''; /** * Instance of Gateway_Extras_CustomFilters_MinFraud @@ -83,6 +83,35 @@ * @var \Psr\Log\LoggerInterface */ protected $fraud_logger; + + /** +* Extra fields to send to minFraud. These should be our normalized field +* names, not the minFraud field names. +* When 'email' is specified as an extra, it means we will send the real +* address instead of the md5 hash. +* +* See http://dev.maxmind.com/minfraud/#Input +* @var string[] $enabledExtraFields +*/ + protected $enabledExtraFields = []; + + /** +* Top level keys indicate the grouping under the minFraud scheme. +* Second level keys are our field names, values are minFraud field names. +* @var array $extraFieldsMap +*/ + protected static $extraFieldsMap = [ + 'email' => [ 'email' => 'address' ], + 'billing' => [ + 'first_name' => 'first_name', + 'last_name' => 'last_name', + 'street_address' => 'address', + ], + 'order' => [ + 'amount' => 'amount', + 'currency' => 'currency' + ] + ]; /** * Constructor @@ -117,8 +146,12 @@ // Set the minFraud API options $minFraudOptions = $gateway_adapter->getGlobal( 'MinFraudClientOptions' ); - if ( !empty( $minFraudOptions ) && is_array( $minFraudOptions ) ) { + if ( is_array( $minFraudOptions ) ) { $this->minFraudClientOptions = $minFraudOptions; + } + $extraFields = $gateway_adapter->getGlobal( 'MinFraudExtraFields' ); + if ( is_array( $extraFields ) ) { + $this->enabledExtraFields = $extraFields; } } @@ -141,12 +174,14 @@ * @return array all parameters f
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Unify `box-sizing` to LESS mixin
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379680 ) Change subject: Unify `box-sizing` to LESS mixin .. Unify `box-sizing` to LESS mixin Change-Id: I3c308267e6754d681c26c3799084203fae0cdb42 --- M resources/skins.minerva.userpage.styles/userpage.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/80/379680/1 diff --git a/resources/skins.minerva.userpage.styles/userpage.less b/resources/skins.minerva.userpage.styles/userpage.less index 5f0c321..f9d4778 100644 --- a/resources/skins.minerva.userpage.styles/userpage.less +++ b/resources/skins.minerva.userpage.styles/userpage.less @@ -30,9 +30,9 @@ .cta-holder { background-color: @colorGray14; + .box-sizing( border-box ); padding: 30px 20px; text-align: center; - box-sizing: border-box; border-radius: @borderRadius; .icon { -- To view, visit https://gerrit.wikimedia.org/r/379680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c308267e6754d681c26c3799084203fae0cdb42 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Omnimail recipient job: Follow up fix on suffix
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379456 ) Change subject: Omnimail recipient job: Follow up fix on suffix .. Omnimail recipient job: Follow up fix on suffix It turned out the setting was not merging 2 suffixes but overwriting. Bug: T176255 Change-Id: Ic9c396b2ce7226b0eee0fdcb2be55baa78e46017 --- M sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php M sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php 2 files changed, 14 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php index 2d40168..a6a5174 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php @@ -39,6 +39,11 @@ /** * @var array */ + protected $settings = array(); + + /** + * @var array + */ protected $retrievalParameters; /** @@ -60,6 +65,7 @@ public function __construct($params) { $this->job_suffix = !empty($params['job_suffix']) ? $params['job_suffix'] : ''; $this->mail_provider = $params['mail_provider']; +$this->settings = CRM_Omnimail_Helper::getSettings(); $this->setJobSettings($params); $this->setOffset($params); $this->setRetrievalParameters(CRM_Utils_Array::value('retrieval_parameters', $this->jobSettings)); @@ -160,8 +166,7 @@ * @param $params */ protected function setJobSettings($params) { -$settings = CRM_Omnimail_Helper::getSettings(); -$this->jobSettings = CRM_Utils_Array::value($params['mail_provider'] . $this->job_suffix, $settings['omnimail_' . $this->job . '_load'], array()); +$this->jobSettings = CRM_Utils_Array::value($params['mail_provider'] . $this->job_suffix, $this->settings['omnimail_' . $this->job . '_load'], array()); } /** @@ -170,10 +175,11 @@ * @param array $setting */ function saveJobSetting($setting) { +$key = 'omnimail_' . $this->job . '_load'; civicrm_api3('Setting', 'create', array( - 'omnimail_' . $this->job . '_load' => array( + $key => array_merge($this->settings[$key], array( $this->mail_provider . $this->job_suffix => $setting, - ), + )) )); } diff --git a/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php b/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php index f502fdd..ef7b939 100644 --- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php +++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php @@ -242,14 +242,18 @@ ), 'progress_end_date' => '1488495600', ), +'Silverpop' => array('last_timestamp' => '1487890800'), ), )); +$settings = $this->getJobSettings(array('mail_provider' => 'Silverpop')); civicrm_api3('Omnirecipient', 'load', array('mail_provider' => 'Silverpop', 'username' => 'Donald', 'password' => 'Duck', 'client' => $client, 'job_suffix' => '_woot')); $this->assertEquals(4, CRM_Core_DAO::singleValueQuery('SELECT COUNT(*) FROM civicrm_mailing_provider_data')); $this->assertEquals(array( 'last_timestamp' => '1488495600', ), $this->getJobSettings(array('mail_provider' => 'Silverpop', 'job_suffix' => '_woot'))); + +$this->assertEquals($settings, $this->getJobSettings(array('mail_provider' => 'Silverpop'))); } -- To view, visit https://gerrit.wikimedia.org/r/379456 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic9c396b2ce7226b0eee0fdcb2be55baa78e46017 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen Gerrit-Reviewer: Ejegg 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...parsoid[master]: Suppress logspam in production logs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379670 ) Change subject: Suppress logspam in production logs .. Suppress logspam in production logs * We have known about these for a long time and we've whacked moles over time, but this is the best we are doing for now till we do another round of investigation going over parser tests. * Production is configured for log message level warn and above. Change-Id: I7d3c870a8852c4419f4501b5c26f0e40699bd28b --- M lib/html2wt/separators.js 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Arlolra: Looks good to me, approved diff --git a/lib/html2wt/separators.js b/lib/html2wt/separators.js index 1a617d8..2c72f2e 100644 --- a/lib/html2wt/separators.js +++ b/lib/html2wt/separators.js @@ -90,7 +90,7 @@ if (b.min !== undefined) { if (nlConstraints.max !== undefined && nlConstraints.max < b.min) { // Conflict, warn and let nodeB win. - env.log("warn", "Incompatible constraints 1:", nodeA.nodeName, + env.log("info/html2wt", "Incompatible constraints 1:", nodeA.nodeName, nodeB.nodeName, loggableConstraints(nlConstraints)); nlConstraints.min = b.min; nlConstraints.max = b.min; @@ -102,7 +102,7 @@ if (b.max !== undefined) { if (nlConstraints.min !== undefined && nlConstraints.min > b.max) { // Conflict, warn and let nodeB win. - env.log("warn", "Incompatible constraints 2:", nodeA.nodeName, + env.log("info/html2wt", "Incompatible constraints 2:", nodeA.nodeName, nodeB.nodeName, loggableConstraints(nlConstraints)); nlConstraints.min = b.max; nlConstraints.max = b.max; @@ -278,7 +278,7 @@ } res.max = res.min; - env.log("warn", 'Incompatible constraints (merge):', res, + env.log("info/html2wt", 'Incompatible constraints (merge):', res, loggableConstraints(oldConstraints), loggableConstraints(newConstraints)); } return res; @@ -629,7 +629,7 @@ sep = src.substring(dsrA[1], dsrB[1] - dsrB[3]); } } else { - this.env.log("warn", "dsr backwards: should not happen!"); + this.env.log("info/html2wt", "dsr backwards: should not happen!"); } if (state.sep.lastSourceSep) { -- To view, visit https://gerrit.wikimedia.org/r/379670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d3c870a8852c4419f4501b5c26f0e40699bd28b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry Gerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs...heritage[master]: Add SQL table for `statistics`
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378974 ) Change subject: Add SQL table for `statistics` .. Add SQL table for `statistics` This adds a `statistics` and `statisticsct` table based on `maintenance/INSTALL` and `api/includes/StatsBuilder`. This is necessary to develop locally on the Statistics module. Change-Id: Iaa81caab01a236e67fe9fe5ec8587e3a1efa6041 --- A erfgoedbot/sql/create_table_statistics.sql 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: Lokal Profil: Looks good to me, approved jenkins-bot: Verified diff --git a/erfgoedbot/sql/create_table_statistics.sql b/erfgoedbot/sql/create_table_statistics.sql new file mode 100644 index 000..a409330 --- /dev/null +++ b/erfgoedbot/sql/create_table_statistics.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS `statistics` ( + `day` date NOT NULL, + `item` varchar(50) NOT NULL, + `idx` varchar(100) NOT NULL, + `value` varchar(16) NOT NULL DEFAULT '0', + PRIMARY KEY (`day`,`item`,`idx`), + KEY `idx_day_idx` (`day`,`idx`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `statisticsct` ( + `img_name` varbinary(255) NOT NULL, + `img_user_id` int(5) NOT NULL, + `img_user_name` varchar(255) NOT NULL, + `img_page_id` int(8) NOT NULL, + `img_wlm_country` varchar(20) NOT NULL DEFAULT '', + `img_wlm_id` varchar(25) NOT NULL DEFAULT '', + `img_timestamp` varchar(14) NOT NULL, + `img_has_changed` tinyint(1) NOT NULL, + PRIMARY KEY (`img_name`), + KEY `idx_wlm_id` (`img_wlm_id`), + KEY `idx_ts` (`img_timestamp`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- To view, visit https://gerrit.wikimedia.org/r/378974 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa81caab01a236e67fe9fe5ec8587e3a1efa6041 Gerrit-PatchSet: 2 Gerrit-Project: labs/tools/heritage Gerrit-Branch: master Gerrit-Owner: Jean-Frédéric Gerrit-Reviewer: Jean-Frédéric Gerrit-Reviewer: Lokal Profil Gerrit-Reviewer: Multichill 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]: Enable dummy statsv URL for wikimediaevents
Krinkle has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379516 ) Change subject: Enable dummy statsv URL for wikimediaevents .. Enable dummy statsv URL for wikimediaevents The requests 404, but it makes debugging easier to see them. Change-Id: I3a04aee71498d3654d2bf32fb6130ab4980d86c4 --- M puppet/modules/role/manifests/wikimediaevents.pp 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Krinkle: Verified; Looks good to me, approved diff --git a/puppet/modules/role/manifests/wikimediaevents.pp b/puppet/modules/role/manifests/wikimediaevents.pp index 86d17d8..fe445eb 100644 --- a/puppet/modules/role/manifests/wikimediaevents.pp +++ b/puppet/modules/role/manifests/wikimediaevents.pp @@ -5,5 +5,9 @@ include ::role::eventlogging include ::role::xanalytics -mediawiki::extension { 'WikimediaEvents': } +mediawiki::extension { 'WikimediaEvents': +settings => { +'wgWMEStatsdBaseUri' => '/beacon/statsv', +} +} } -- To view, visit https://gerrit.wikimedia.org/r/379516 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a04aee71498d3654d2bf32fb6130ab4980d86c4 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Gilles Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall 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] wikimedia...golden[master]: Add new datasets in search and portal
Bearloga has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/375408 ) Change subject: Add new datasets in search and portal .. Add new datasets in search and portal * wikipedia portal pageview by device (desktop vs mobile) * wikipedia portal clickthrough rate by device (desktop vs mobile) * proportion of wikipedia portal visitors on mobile devices in US vs elsewhere * pageviews from full-text search (desktop vs mobile) * search return rate on desktop * SERPs by access method Bug: T172453 Change-Id: I4615f4070ced26ce886b49be7393115953320cfe --- M docs/README.md A modules/metrics/portal/clickthrough_by_device M modules/metrics/portal/config.yaml M modules/metrics/portal/engagement.R A modules/metrics/portal/mobile_use_us_elsewhere A modules/metrics/portal/pageviews_by_device M modules/metrics/search/config.yaml A modules/metrics/search/desktop_return_rate A modules/metrics/search/desktop_return_rate.R A modules/metrics/search/pageviews_from_fulltext_search A modules/metrics/search/search_result_pages 11 files changed, 340 insertions(+), 2 deletions(-) Approvals: Bearloga: Verified; Looks good to me, approved diff --git a/docs/README.md b/docs/README.md index afc5111..88bec45 100644 --- a/docs/README.md +++ b/docs/README.md @@ -86,6 +86,12 @@ section - **most\_common\_per\_visit.tsv**: Most common action performed on Wikipedia.org Portal per user session +- **pageviews\_by\_device.tsv**: Pageviews broken down by device +(desktop vs mobile) +- **clickthrough\_by\_device.tsv**: Clickthroughs from Wikipedia.org +Portal, broken down by device (desktop vs mobile) +- **mobile\_use\_us\_elsewhere.tsv**: Number of Wikipedia.org Portal +visitors on mobile devices in U.S. vs everywhere else search/ --- @@ -184,6 +190,18 @@ Wikipedia searchers stay on full-text search results page after getting there from autocomplete search, split by English vs French and Catalan vs other languages. +- **pageviews\_from\_fulltext\_search.tsv**: Number of searches, +pageviews and users to articles from full-text search, broken down +by access method (desktop vs mobile web) and agent type (user vs +spider) +- **search\_result\_pages.tsv**: Number of searches, search result +pages and users, broken down by access method (desktop vs mobile +web) and agent type (user vs spider) +- **desktop\_return\_rate.tsv**: Number of searches with at least a +click and the number of searches that return to the same search page +after clickthrough; Number of sessions with at least a click and the +number of sessions that return to search for different things after +clickthrough. wdqs/ - diff --git a/modules/metrics/portal/clickthrough_by_device b/modules/metrics/portal/clickthrough_by_device new file mode 100755 index 000..f157c18 --- /dev/null +++ b/modules/metrics/portal/clickthrough_by_device @@ -0,0 +1,3 @@ +#!/bin/bash + +Rscript modules/metrics/portal/engagement.R -d $1 -o clickthrough_by_device diff --git a/modules/metrics/portal/config.yaml b/modules/metrics/portal/config.yaml index 3a44813..e969f91 100644 --- a/modules/metrics/portal/config.yaml +++ b/modules/metrics/portal/config.yaml @@ -133,3 +133,21 @@ starts: 2016-05-05 funnel: true type: script +pageviews_by_device: +description: Pageviews broken down by device (desktop vs mobile) +granularity: days +starts: 2017-08-01 +funnel: true +type: script +clickthrough_by_device: +description: Clickthroughs from Wikipedia.org Portal, broken down by device (desktop vs mobile) +granularity: days +starts: 2017-04-01 +funnel: true +type: script +mobile_use_us_elsewhere: +description: Number of Wikipedia.org Portal visitors on mobile devices in U.S. vs everywhere else +granularity: days +starts: 2017-04-01 +funnel: true +type: script diff --git a/modules/metrics/portal/engagement.R b/modules/metrics/portal/engagement.R index 5f734b9..695c2a6 100644 --- a/modules/metrics/portal/engagement.R +++ b/modules/metrics/portal/engagement.R @@ -10,7 +10,9 @@ * clickthrough_breakdown (can be broken down by country) * clickthrough_firstvisit (can be broken down by country) * clickthrough_sisterprojects - * most_common_per_visit (can be broken down by country)"), + * most_common_per_visit (can be broken down by country) + * clickthrough_by_device + * mobile_use_us_elsewhere"), make_option("--by_country", default = FALSE, action = "store_true", help = "Whether to break output down across all countries") ) @@ -34,7 +36,8 @@ UPPER(event_country) AS country, event_destination AS destination, event_e
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T170832: Don't emit template info in lint for extension tags
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379679 ) Change subject: T170832: Don't emit template info in lint for extension tags .. T170832: Don't emit template info in lint for extension tags * We could probably provide finer grained dsr for native extensions but hold off on that for now. Change-Id: Ie21c79e0193feef43a3a657a62dc53a4366191d9 --- M lib/wt2html/pp/handlers/linter.js M tests/mocha/linter.js 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/79/379679/1 diff --git a/lib/wt2html/pp/handlers/linter.js b/lib/wt2html/pp/handlers/linter.js index 8e95440..2a8bb3d 100644 --- a/lib/wt2html/pp/handlers/linter.js +++ b/lib/wt2html/pp/handlers/linter.js @@ -89,6 +89,10 @@ * @return {string} */ function findEnclosingTemplateName(env, tplInfo) { + var typeOf = tplInfo.first.getAttribute('typeof'); + if (!/(?:^|\s)mw:Transclusion(?=$|\s)/.test(typeOf)) { + return undefined; + } var dmw = DU.getDataMw(tplInfo.first); if (dmw.parts && dmw.parts.length === 1) { var p0 = dmw.parts[0]; diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js index f1ad362..ec1f91b 100644 --- a/tests/mocha/linter.js +++ b/tests/mocha/linter.js @@ -171,6 +171,14 @@ result[1].params.should.have.a.property("name", "tt"); }); }); + it('should not have template info for extension tags', function() { + return parseWT('\nFile:Test.jpg|foo\n') + .then(function(result) { + result.should.have.length(1); + result[0].should.have.a.property('type', 'obsolete-tag'); + result[0].should.not.have.a.property('templateInfo'); + }); + }); }); describe('FOSTERED CONTENT', function() { -- To view, visit https://gerrit.wikimedia.org/r/379679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie21c79e0193feef43a3a657a62dc53a4366191d9 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] mediawiki...CentralNotice[master]: Ensure numeric keys without gaps in ChoiceDataProvider::getC...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379576 ) Change subject: Ensure numeric keys without gaps in ChoiceDataProvider::getChoices() .. Ensure numeric keys without gaps in ChoiceDataProvider::getChoices() Bug: T175358 Change-Id: I566cf377e2675cb419b018c6a0cd1c8a6c45cc60 --- M includes/ChoiceDataProvider.php 1 file changed, 8 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/includes/ChoiceDataProvider.php b/includes/ChoiceDataProvider.php index 85c8051..1f43221 100644 --- a/includes/ChoiceDataProvider.php +++ b/includes/ChoiceDataProvider.php @@ -66,11 +66,15 @@ ); // Filter out campaigns that have ended since we last queried the - // database or which have not started yet. + // database or which have not started yet. array_values re-orders numeric + // keys, in case elements were removed. $now = time(); - return array_filter( $choices, function ( $choice ) use ( $now ) { - return $choice['end'] >= $now && $choice['start'] <= $now; - } ); + return array_values( array_filter( + $choices, + function ( $choice ) use ( $now ) { + return $choice['end'] >= $now && $choice['start'] <= $now; + } + ) ); } private static function fetchChoices( $project, $language, -- To view, visit https://gerrit.wikimedia.org/r/379576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I566cf377e2675cb419b018c6a0cd1c8a6c45cc60 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: AndyRussG Gerrit-Reviewer: Ejegg Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379678 ) Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: Ia071472531a5b60a23a8a30c016ca71e5956355c --- M extensions/DonationInterface 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index b25e018..0775011 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface @@ -1 +1 @@ -Subproject commit b25e0187ea17f3cee4be0e139557f817a29d3358 +Subproject commit 07750119540eea2ec876eb51f7c0792ea7cba258 -- To view, visit https://gerrit.wikimedia.org/r/379678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia071472531a5b60a23a8a30c016ca71e5956355c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_27 Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg 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...CentralNotice[master]: BannerHistoryLogger: Fix ajax options for when sendBeacon is...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377538 ) Change subject: BannerHistoryLogger: Fix ajax options for when sendBeacon is not available .. BannerHistoryLogger: Fix ajax options for when sendBeacon is not available Bug: T174719 Change-Id: Ifd7ab8768492584d72d954f19dc8a46d40e29f45 --- M resources/subscribing/ext.centralNotice.bannerHistoryLogger.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js index 7d6d6bb..103c3dd 100644 --- a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js +++ b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js @@ -225,7 +225,8 @@ elPromise = $.ajax( { url: makeEventLoggingURL( elData ), timeout: waitLogNoSendBeacon, - method: 'POST' + dataType: 'script', // Helps prevent CORS issues? See T174719 + cache: true // Prevent JQuery from adding a timestamp to the URL } ); } -- To view, visit https://gerrit.wikimedia.org/r/377538 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd7ab8768492584d72d954f19dc8a46d40e29f45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralNotice Gerrit-Branch: master Gerrit-Owner: AndyRussG Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Ejegg Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379678 ) Change subject: Update DonationInterface submodule .. Update DonationInterface submodule Change-Id: Ia071472531a5b60a23a8a30c016ca71e5956355c --- M extensions/DonationInterface 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/379678/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index b25e018..0775011 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface @@ -1 +1 @@ -Subproject commit b25e0187ea17f3cee4be0e139557f817a29d3358 +Subproject commit 07750119540eea2ec876eb51f7c0792ea7cba258 -- To view, visit https://gerrit.wikimedia.org/r/379678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia071472531a5b60a23a8a30c016ca71e5956355c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_27 Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Possibly re-attempt memcached touch when we've failed
Hello Aaron Schulz, Krinkle, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/379677 to review the following change. Change subject: Possibly re-attempt memcached touch when we've failed .. Possibly re-attempt memcached touch when we've failed Just copying my code comment here: // So the memcached client in pecl and actual memcached versions that support // touching vary greatly. Sometimes it's binary mode, sometimes it's ascii, // sometimes it might even be both. Rather than trying to deal with the myriad // of these let's re-attempt a lame touch (get/set) if we think we're failing // because of the weird bug. Otherwise, just re-raise the exception. Change-Id: Ie6fcea48375f6039efd78a23f02c908dac9bd736 --- M includes/libs/objectcache/MemcachedPeclBagOStuff.php 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/379677/1 diff --git a/includes/libs/objectcache/MemcachedPeclBagOStuff.php b/includes/libs/objectcache/MemcachedPeclBagOStuff.php index e3e66d5..61ad256 100644 --- a/includes/libs/objectcache/MemcachedPeclBagOStuff.php +++ b/includes/libs/objectcache/MemcachedPeclBagOStuff.php @@ -252,7 +252,21 @@ public function changeTTL( $key, $expiry = 0 ) { $this->debugLog( "touch($key)" ); - $result = $this->client->touch( $key, $expiry ); + + try { + $result = $this->client->touch( $key, $expiry ); + } catch ( ErrorException $ee ) { + // So the memcached client in pecl and actual memcached versions that support + // touching vary greatly. Sometimes it's binary mode, sometimes it's ascii, + // sometimes it might even be both. Rather than trying to deal with the myriad + // of these let's re-attempt a lame touch (get/set) if we think we're failing + // because of the weird bug. Otherwise, just re-raise the exception. + if ( !strpos( $ee->getMessage(), 'touch is only supported' ) ) { + throw $ee; + } + $result = $this->client->set( $key, $this->client->get( $key ), $expiry ); + } + return $this->checkResult( $key, $result ); } } -- To view, visit https://gerrit.wikimedia.org/r/379677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6fcea48375f6039efd78a23f02c908dac9bd736 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379675 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 2eef97c70 Record the form variant in contribution tracking 1ff09575c Fix empty( $thing->doStuff() ) use e43a17340 Localisation updates from https://translatewiki.net. ea05840f4 Remove old test harness e747406ee Adding getStatus tests 41a641740 When no form is found, retry without gateway a3bd506ea Fix Adyen iframe field styles on iOS Change-Id: I6213fa9cd3b76ce07f2a696c5a33a0a7d717f7ef --- D tests/phpunit/Adapter/Ingenico/IngenicoTest.php D tests/phpunit/BaseIngenicoTestCase.php 2 files changed, 0 insertions(+), 503 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/tests/phpunit/Adapter/Ingenico/IngenicoTest.php b/tests/phpunit/Adapter/Ingenico/IngenicoTest.php deleted file mode 100644 index c74b68f..000 --- a/tests/phpunit/Adapter/Ingenico/IngenicoTest.php +++ /dev/null @@ -1,410 +0,0 @@ -<<< HEAD (b25e01 Merge branch 'master' into deployment) -=== -partialUrl = 'poweredbyglobalcollect.com/pay8915-53ebca407e6b4a1dbd086aad4f10354d:' . - '8915-28e5b79c889641c8ba770f1ba576c1fe:9798f4c44ac6406e8288494332d1daa0'; - - $this->hostedCheckoutCreateResponse = array( - 'partialRedirectUrl' => $this->partialUrl, - 'hostedCheckoutId' => '8915-28e5b79c889641c8ba770f1ba576c1fe', - 'RETURNMAC' => 'f5b66cf9-c64c-4c8d-8171-b47205c89a56' - ); - } - - /** -* Non-exhaustive integration tests to verify that order_id, when in -* self-generation mode, won't regenerate until it is told to. -* @covers GatewayAdapter::normalizeOrderID -* @covers GatewayAdapter::regenerateOrderID -*/ - function testStickyGeneratedOrderID() { - $init = self::$initial_vars; - unset( $init['order_id'] ); - - // no order_id from anywhere, explicit generate - $gateway = $this->getFreshGatewayObject( $init, array( 'order_id_meta' => array( 'generate' => true ) ) ); - $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 'order_id' ), 'Generated order_id is null. The rest of this test is broken.' ); - $original_order_id = $gateway->getData_Unstaged_Escaped( 'order_id' ); - - $gateway->normalizeOrderID(); - $this->assertEquals( $original_order_id, $gateway->getData_Unstaged_Escaped( 'order_id' ), 'Re-normalized order_id has changed without explicit regeneration.' ); - - // this might look a bit strange, but we need to be able to generate valid order_ids without making them stick to anything. - $gateway->generateOrderID(); - $this->assertEquals( $original_order_id, $gateway->getData_Unstaged_Escaped( 'order_id' ), 'function generateOrderID auto-changed the selected order ID. Not cool.' ); - - $gateway->regenerateOrderID(); - $this->assertNotEquals( $original_order_id, $gateway->getData_Unstaged_Escaped( 'order_id' ), 'Re-normalized order_id has not changed, after explicit regeneration.' ); - } - - /** -* Integration test to verify that order_id can be retrieved from -* performing an createHostedCheckout. -*/ - function testGatewaySessionRetrieval() { - $init = $this->getDonorTestData(); - unset( $init['order_id'] ); - $init['payment_method'] = 'cc'; - $init['payment_submethod'] = 'visa'; - $this->hostedCheckoutProvider->expects( $this->once() ) - ->method( 'createHostedPayment' ) - ->willReturn( - $this->hostedCheckoutCreateResponse - ); - // no order_id from anywhere, explicit generate - $gateway = $this->getFreshGatewayObject( $init ); - $gateway->do_transaction( 'createHostedCheckout' ); - - $this->assertNotNull( - $gateway->getData_Unstaged_Escaped( 'gateway_session_id' ), - 'No gateway_session_id was retrieved from createHostedCheckout' - ); - } - - /** -* Just run the getHostedCheckoutStatus transaction and make sure we load the data -*/ - function testGetHostedPaymentStatus() { - $init = $this->getDonorTestData(); - $init['payment_method'] = 'cc'; - $init['payment_submethod'] = 'visa'; - $init['email'] = 'innoc...@safedomain.org'; - - $gateway = $this->getFreshGatewayObject( $init ); - - $this->hostedCheckoutProvider->expec
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update bundled CSS
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379676 ) Change subject: Update bundled CSS .. Update bundled CSS Change-Id: I128d27d4bf2972a8e6923677d31babb502765614 --- M app/src/main/assets/preview.css M app/src/main/assets/styles.css 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/76/379676/1 diff --git a/app/src/main/assets/preview.css b/app/src/main/assets/preview.css index 96275cd..d6903eb 100644 --- a/app/src/main/assets/preview.css +++ b/app/src/main/assets/preview.css @@ -316,7 +316,7 @@ a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); background-image: url(/w/skins/MinervaNeue/resources/skins.minerva.content.styles/images/external-link-ltr-icon.png?948bf)!ie; - background-image: linear-gradient(transparent, transparent), url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%3E%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%2336c%22%20d%3D%22M.5%203.518h5.982V9.5H.5z%22%2F%3E%3Cpath%20d%3D%22M4.755-.16H9.99v5.39L8.417%206.774l-1.31-1.31L4.383%208.19%201.695%205.5l2.808-2.807-1.31-1.31z%22%20fill%3D%22%2336c%22%2F%3E%3Cpath%20d%3D%22M8.984.845l.022%204.884L7.19%203.91%204.308%206.79%203.08%205.567l2.882-2.88L4.112.833z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E); + background-image: linear-gradient(transparent, transparent), url("data:image/svg+xml,%3C%3Fxml version=%221.0%22 encoding=%22UTF-8%22%3F%3E%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2210%22 height=%2210%22%3E%3Cpath fill=%22%23fff%22 stroke=%22%2336c%22 d=%22M.5 3.518h5.982V9.5H.5z%22/%3E%3Cpath d=%22M4.755-.16H9.99v5.39L8.417 6.774l-1.31-1.31L4.383 8.19 1.695 5.5l2.808-2.807-1.31-1.31z%22 fill=%22%2336c%22/%3E%3Cpath d=%22M8.984.845l.022 4.884L7.19 3.91 4.308 6.79 3.08 5.567l2.882-2.88L4.112.833z%22 fill=%22%23fff%22/%3E%3C/svg%3E"); background-image: -o-linear-gradient(transparent, transparent), url(/w/skins/MinervaNeue/resources/skins.minerva.content.styles/images/external-link-ltr-icon.png?948bf); background-repeat: no-repeat; background-position: center right; diff --git a/app/src/main/assets/styles.css b/app/src/main/assets/styles.css index 0be3a30..47bd4f0 100644 --- a/app/src/main/assets/styles.css +++ b/app/src/main/assets/styles.css @@ -316,7 +316,7 @@ a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); background-image: url(/w/skins/MinervaNeue/resources/skins.minerva.content.styles/images/external-link-ltr-icon.png?948bf)!ie; - background-image: linear-gradient(transparent, transparent), url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%3E%3Cpath%20fill%3D%22%23fff%22%20stroke%3D%22%2336c%22%20d%3D%22M.5%203.518h5.982V9.5H.5z%22%2F%3E%3Cpath%20d%3D%22M4.755-.16H9.99v5.39L8.417%206.774l-1.31-1.31L4.383%208.19%201.695%205.5l2.808-2.807-1.31-1.31z%22%20fill%3D%22%2336c%22%2F%3E%3Cpath%20d%3D%22M8.984.845l.022%204.884L7.19%203.91%204.308%206.79%203.08%205.567l2.882-2.88L4.112.833z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E); + background-image: linear-gradient(transparent, transparent), url("data:image/svg+xml,%3C%3Fxml version=%221.0%22 encoding=%22UTF-8%22%3F%3E%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2210%22 height=%2210%22%3E%3Cpath fill=%22%23fff%22 stroke=%22%2336c%22 d=%22M.5 3.518h5.982V9.5H.5z%22/%3E%3Cpath d=%22M4.755-.16H9.99v5.39L8.417 6.774l-1.31-1.31L4.383 8.19 1.695 5.5l2.808-2.807-1.31-1.31z%22 fill=%22%2336c%22/%3E%3Cpath d=%22M8.984.845l.022 4.884L7.19 3.91 4.308 6.79 3.08 5.567l2.882-2.88L4.112.833z%22 fill=%22%23fff%22/%3E%3C/svg%3E"); background-image: -o-linear-gradient(transparent, transparent), url(/w/skins/MinervaNeue/resources/skins.minerva.content.styles/images/external-link-ltr-icon.png?948bf); background-repeat: no-repeat; background-position: center right; -- To view, visit https://gerrit.wikimedia.org/r/379676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I128d27d4bf2972a8e6923677d31babb502765614 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://l
[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmf-auto-reimage: minor logging improvement
Volans has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379672 ) Change subject: wmf-auto-reimage: minor logging improvement .. wmf-auto-reimage: minor logging improvement Bug: T148814 Change-Id: I1f410d15985baa6317aa3d920a2df64c4557bbb6 --- M modules/profile/files/cumin/wmf_auto_reimage_lib.py 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Volans: Looks good to me, approved diff --git a/modules/profile/files/cumin/wmf_auto_reimage_lib.py b/modules/profile/files/cumin/wmf_auto_reimage_lib.py index 61cb365..d207ec6 100644 --- a/modules/profile/files/cumin/wmf_auto_reimage_lib.py +++ b/modules/profile/files/cumin/wmf_auto_reimage_lib.py @@ -531,7 +531,7 @@ logger.debug('Waiting for Puppet cert to sign ({retries})'.format(retries=retries)) if retries % WATCHER_LOG_LOOPS == 0: print_line('Still waiting for Puppet cert to sign after {min} minutes'.format( -min=(retries * WATCHER_LONG_SLEEP) / 60.0), host=host) +min=(retries * WATCHER_LONG_SLEEP) // 60.0), host=host) try: exit_code, worker = run_cumin( @@ -651,12 +651,13 @@ command = ("source /usr/local/share/bash/puppet-common.sh && last_run_success && " "grep last_run \"${PUPPET_SUMMARY}\" | awk '{ print $2 }'") +print_line('Polling the completion of a Puppet run', host=host) while True: retries += 1 logger.debug('Waiting for Puppet ({retries})'.format(retries=retries)) if retries % WATCHER_LOG_LOOPS == 0: print_line('Still waiting for Puppet after {min} minutes'.format( -min=(retries * WATCHER_LONG_SLEEP) / 60.0), host=host) +min=(retries * WATCHER_LONG_SLEEP) // 60.0), host=host) try: exit_code, worker = run_cumin('wait_puppet_run', host, [command]) @@ -719,7 +720,7 @@ logger.debug('Waiting for reboot ({retries})'.format(retries=retries)) if retries % WATCHER_LOG_LOOPS == 0: print_line('Still waiting for reboot after {min} minutes'.format( -min=(retries * WATCHER_LONG_SLEEP) / 60.0), host=host) +min=(retries * WATCHER_LONG_SLEEP) // 60.0), host=host) try: check_uptime(host, maximum=(datetime.now() - start).total_seconds(), -- To view, visit https://gerrit.wikimedia.org/r/379672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f410d15985baa6317aa3d920a2df64c4557bbb6 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans Gerrit-Reviewer: Elukey Gerrit-Reviewer: Volans 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...DonationInterface[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379675 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 2eef97c70 Record the form variant in contribution tracking 1ff09575c Fix empty( $thing->doStuff() ) use e43a17340 Localisation updates from https://translatewiki.net. ea05840f4 Remove old test harness e747406ee Adding getStatus tests 41a641740 When no form is found, retry without gateway a3bd506ea Fix Adyen iframe field styles on iOS Change-Id: I6213fa9cd3b76ce07f2a696c5a33a0a7d717f7ef --- D tests/phpunit/Adapter/Ingenico/IngenicoTest.php D tests/phpunit/BaseIngenicoTestCase.php 2 files changed, 0 insertions(+), 503 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/75/379675/1 diff --git a/tests/phpunit/Adapter/Ingenico/IngenicoTest.php b/tests/phpunit/Adapter/Ingenico/IngenicoTest.php deleted file mode 100644 index c74b68f..000 --- a/tests/phpunit/Adapter/Ingenico/IngenicoTest.php +++ /dev/null @@ -1,410 +0,0 @@ -<<< HEAD (b25e01 Merge branch 'master' into deployment) -=== -partialUrl = 'poweredbyglobalcollect.com/pay8915-53ebca407e6b4a1dbd086aad4f10354d:' . - '8915-28e5b79c889641c8ba770f1ba576c1fe:9798f4c44ac6406e8288494332d1daa0'; - - $this->hostedCheckoutCreateResponse = array( - 'partialRedirectUrl' => $this->partialUrl, - 'hostedCheckoutId' => '8915-28e5b79c889641c8ba770f1ba576c1fe', - 'RETURNMAC' => 'f5b66cf9-c64c-4c8d-8171-b47205c89a56' - ); - } - - /** -* Non-exhaustive integration tests to verify that order_id, when in -* self-generation mode, won't regenerate until it is told to. -* @covers GatewayAdapter::normalizeOrderID -* @covers GatewayAdapter::regenerateOrderID -*/ - function testStickyGeneratedOrderID() { - $init = self::$initial_vars; - unset( $init['order_id'] ); - - // no order_id from anywhere, explicit generate - $gateway = $this->getFreshGatewayObject( $init, array( 'order_id_meta' => array( 'generate' => true ) ) ); - $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 'order_id' ), 'Generated order_id is null. The rest of this test is broken.' ); - $original_order_id = $gateway->getData_Unstaged_Escaped( 'order_id' ); - - $gateway->normalizeOrderID(); - $this->assertEquals( $original_order_id, $gateway->getData_Unstaged_Escaped( 'order_id' ), 'Re-normalized order_id has changed without explicit regeneration.' ); - - // this might look a bit strange, but we need to be able to generate valid order_ids without making them stick to anything. - $gateway->generateOrderID(); - $this->assertEquals( $original_order_id, $gateway->getData_Unstaged_Escaped( 'order_id' ), 'function generateOrderID auto-changed the selected order ID. Not cool.' ); - - $gateway->regenerateOrderID(); - $this->assertNotEquals( $original_order_id, $gateway->getData_Unstaged_Escaped( 'order_id' ), 'Re-normalized order_id has not changed, after explicit regeneration.' ); - } - - /** -* Integration test to verify that order_id can be retrieved from -* performing an createHostedCheckout. -*/ - function testGatewaySessionRetrieval() { - $init = $this->getDonorTestData(); - unset( $init['order_id'] ); - $init['payment_method'] = 'cc'; - $init['payment_submethod'] = 'visa'; - $this->hostedCheckoutProvider->expects( $this->once() ) - ->method( 'createHostedPayment' ) - ->willReturn( - $this->hostedCheckoutCreateResponse - ); - // no order_id from anywhere, explicit generate - $gateway = $this->getFreshGatewayObject( $init ); - $gateway->do_transaction( 'createHostedCheckout' ); - - $this->assertNotNull( - $gateway->getData_Unstaged_Escaped( 'gateway_session_id' ), - 'No gateway_session_id was retrieved from createHostedCheckout' - ); - } - - /** -* Just run the getHostedCheckoutStatus transaction and make sure we load the data -*/ - function testGetHostedPaymentStatus() { - $init = $this->getDonorTestData(); - $init['payment_method'] = 'cc'; - $init['payment_submethod'] = 'visa'; - $init['email'] = 'innoc...@safedomain.org'; - - $gateway = $this->getFreshGatewayObject( $init ); - - $this->hoste
[MediaWiki-commits] [Gerrit] operations...cumin[debian]: Upstream release 1.1.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379638 ) Change subject: Upstream release 1.1.0 .. Upstream release 1.1.0 * Update Build-Depends. * Revert example files hotfix for https://phabricator.wikimedia.org/T174008. * Fix tests run with setuptools-scm Change-Id: I6203b6957bfa6d3938f1efdce5bb724204819f6a --- M debian/changelog M debian/control D debian/cumin.examples M debian/rules 4 files changed, 13 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Volans: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index b8b974e..d0106d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +cumin (1.1.0-1) jessie-wikimedia; urgency=medium + + * 1.1.0 upstream release. + * Update Build-Depends. + * Revert example files hotfix for https://phabricator.wikimedia.org/T174008. + * Fix tests run with setuptools-scm + + -- Riccardo Coccioli Thu, 21 Sep 2017 23:02:24 +0200 + cumin (1.0.0-1) jessie-wikimedia; urgency=medium * 1.0.0 upstream release. diff --git a/debian/control b/debian/control index 404433d..5338f64 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,10 @@ python-all (>= 2.7), python-colorama, python-flake8, + python-keystoneauth1, + python-keystoneclient, python-mock (>= 2.0.0), + python-novaclient, python-pyparsing, python-pytest, python-pytest-cov, diff --git a/debian/cumin.examples b/debian/cumin.examples deleted file mode 100644 index 09a90d6..000 --- a/debian/cumin.examples +++ /dev/null @@ -1 +0,0 @@ -doc/examples/* diff --git a/debian/rules b/debian/rules index 3a90a5f..0bc5fa0 100755 --- a/debian/rules +++ b/debian/rules @@ -7,9 +7,5 @@ dh $@ --with python2 --buildsystem=pybuild override_dh_auto_test: + SETUPTOOLS_SCM_PRETEND_VERSION="$(shell dpkg-parsechangelog -S version)" python setup.py develop --user py.test --strict --cov-report term-missing --cov=cumin cumin/tests/unit - -# Hotfix for https://phabricator.wikimedia.org/T174008 -override_dh_installexamples: - dh_installexamples - rm -rvf $(CURDIR)/debian/cumin/usr/doc -- To view, visit https://gerrit.wikimedia.org/r/379638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6203b6957bfa6d3938f1efdce5bb724204819f6a Gerrit-PatchSet: 2 Gerrit-Project: operations/software/cumin Gerrit-Branch: debian Gerrit-Owner: Volans Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Volans 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]: Fix: Prevent duplicate images in the gallery
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379674 ) Change subject: Fix: Prevent duplicate images in the gallery .. Fix: Prevent duplicate images in the gallery Due to a mismatched comparison between normalized and non-normalized filenames, images clicked to launch the gallery which contained spaces in their filenames were appearing in the gallery twice (i.e., injected a second time after not being found). With this patch we inject underscores for spaces on both sides to ensure we're comparing like with like. Test cases (both en): * Hester Thrale * Gennady Golovkin Change-Id: Iad727e9f06aa100208541ab35c8df12ede4b1e50 --- M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/74/379674/1 diff --git a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java index d299533..923fab0 100644 --- a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java +++ b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java @@ -61,6 +61,7 @@ import java.util.List; import java.util.Map; +import static org.wikipedia.util.StringUtil.addUnderscores; import static org.wikipedia.util.StringUtil.strip; import static org.wikipedia.util.UriUtil.handleExternalLink; import static org.wikipedia.util.UriUtil.resolveProtocolRelativeUrl; @@ -529,7 +530,7 @@ int initialImagePos = -1; if (initialFilename != null) { for (GalleryItem item : collection.getItemList()) { -if (item.getName().equals(initialFilename)) { +if (addUnderscores(item.getName()).equals(addUnderscores(initialFilename))) { initialImagePos = collection.getItemList().indexOf(item); break; } -- To view, visit https://gerrit.wikimedia.org/r/379674 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iad727e9f06aa100208541ab35c8df12ede4b1e50 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Mholloway ___ 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 2.0.6
Halfak has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379673 ) Change subject: Bumps revscoring to 2.0.6 .. Bumps revscoring to 2.0.6 Change-Id: I81764b74b0ca50c6dd84191466bd29c78d4c6df6 --- R revscoring-2.0.6-py2.py3-none-any.whl 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Halfak: Looks good to me, approved diff --git a/revscoring-2.0.2-py2.py3-none-any.whl b/revscoring-2.0.6-py2.py3-none-any.whl similarity index 76% rename from revscoring-2.0.2-py2.py3-none-any.whl rename to revscoring-2.0.6-py2.py3-none-any.whl index 366908d..a1ce2d2 100644 --- a/revscoring-2.0.2-py2.py3-none-any.whl +++ b/revscoring-2.0.6-py2.py3-none-any.whl Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/379673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I81764b74b0ca50c6dd84191466bd29c78d4c6df6 Gerrit-PatchSet: 1 Gerrit-Project: research/ores/wheels Gerrit-Branch: master Gerrit-Owner: Halfak Gerrit-Reviewer: Halfak Gerrit-Reviewer: jenkins-bot <> ___ 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 2.0.6
Halfak has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379673 ) Change subject: Bumps revscoring to 2.0.6 .. Bumps revscoring to 2.0.6 Change-Id: I81764b74b0ca50c6dd84191466bd29c78d4c6df6 --- R revscoring-2.0.6-py2.py3-none-any.whl 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels refs/changes/73/379673/1 diff --git a/revscoring-2.0.2-py2.py3-none-any.whl b/revscoring-2.0.6-py2.py3-none-any.whl similarity index 76% rename from revscoring-2.0.2-py2.py3-none-any.whl rename to revscoring-2.0.6-py2.py3-none-any.whl index 366908d..a1ce2d2 100644 --- a/revscoring-2.0.2-py2.py3-none-any.whl +++ b/revscoring-2.0.6-py2.py3-none-any.whl Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/379673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81764b74b0ca50c6dd84191466bd29c78d4c6df6 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] operations/puppet[production]: wmf-auto-reimage: minor logging improvement
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379672 ) Change subject: wmf-auto-reimage: minor logging improvement .. wmf-auto-reimage: minor logging improvement Bug: T148814 Change-Id: I1f410d15985baa6317aa3d920a2df64c4557bbb6 --- M modules/profile/files/cumin/wmf_auto_reimage_lib.py 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/379672/1 diff --git a/modules/profile/files/cumin/wmf_auto_reimage_lib.py b/modules/profile/files/cumin/wmf_auto_reimage_lib.py index 61cb365..d207ec6 100644 --- a/modules/profile/files/cumin/wmf_auto_reimage_lib.py +++ b/modules/profile/files/cumin/wmf_auto_reimage_lib.py @@ -531,7 +531,7 @@ logger.debug('Waiting for Puppet cert to sign ({retries})'.format(retries=retries)) if retries % WATCHER_LOG_LOOPS == 0: print_line('Still waiting for Puppet cert to sign after {min} minutes'.format( -min=(retries * WATCHER_LONG_SLEEP) / 60.0), host=host) +min=(retries * WATCHER_LONG_SLEEP) // 60.0), host=host) try: exit_code, worker = run_cumin( @@ -651,12 +651,13 @@ command = ("source /usr/local/share/bash/puppet-common.sh && last_run_success && " "grep last_run \"${PUPPET_SUMMARY}\" | awk '{ print $2 }'") +print_line('Polling the completion of a Puppet run', host=host) while True: retries += 1 logger.debug('Waiting for Puppet ({retries})'.format(retries=retries)) if retries % WATCHER_LOG_LOOPS == 0: print_line('Still waiting for Puppet after {min} minutes'.format( -min=(retries * WATCHER_LONG_SLEEP) / 60.0), host=host) +min=(retries * WATCHER_LONG_SLEEP) // 60.0), host=host) try: exit_code, worker = run_cumin('wait_puppet_run', host, [command]) @@ -719,7 +720,7 @@ logger.debug('Waiting for reboot ({retries})'.format(retries=retries)) if retries % WATCHER_LOG_LOOPS == 0: print_line('Still waiting for reboot after {min} minutes'.format( -min=(retries * WATCHER_LONG_SLEEP) / 60.0), host=host) +min=(retries * WATCHER_LONG_SLEEP) // 60.0), host=host) try: check_uptime(host, maximum=(datetime.now() - start).total_seconds(), -- To view, visit https://gerrit.wikimedia.org/r/379672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f410d15985baa6317aa3d920a2df64c4557bbb6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Volans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.30.0-wmf.19]: ApiVisualEditor: Stop an undefined variable error for preloa...
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379671 ) Change subject: ApiVisualEditor: Stop an undefined variable error for preload on existing pages .. ApiVisualEditor: Stop an undefined variable error for preload on existing pages Bug: T176440 Change-Id: I39c8efe6d59948170b848730c4cc20c80cc2d326 (cherry picked from commit 05bd8c19c8dca237c60a0c7d1cdd10198ec0879c) --- M ApiVisualEditor.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/71/379671/1 diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 285a953..2ebba05 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -566,7 +566,7 @@ ]; if ( $params['paction'] === 'parse' || $params['paction'] === 'wikitext' || -$params['preload'] +( $params['preload'] && $content ) ) { $result['content'] = $content; } -- To view, visit https://gerrit.wikimedia.org/r/379671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39c8efe6d59948170b848730c4cc20c80cc2d326 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.30.0-wmf.19 Gerrit-Owner: Jforrester Gerrit-Reviewer: DLynch ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Suppress logspam in production logs
Subramanya Sastry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379670 ) Change subject: Suppress logspam in production logs .. Suppress logspam in production logs * We have known about these for a long time and we've whacked moles over time, but this is the best we are doing for now till we do another round of investigation going over parser tests. * Production is configured for log message level warn and above. Change-Id: I7d3c870a8852c4419f4501b5c26f0e40699bd28b --- M lib/html2wt/separators.js 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/70/379670/1 diff --git a/lib/html2wt/separators.js b/lib/html2wt/separators.js index 1a617d8..2c72f2e 100644 --- a/lib/html2wt/separators.js +++ b/lib/html2wt/separators.js @@ -90,7 +90,7 @@ if (b.min !== undefined) { if (nlConstraints.max !== undefined && nlConstraints.max < b.min) { // Conflict, warn and let nodeB win. - env.log("warn", "Incompatible constraints 1:", nodeA.nodeName, + env.log("info/html2wt", "Incompatible constraints 1:", nodeA.nodeName, nodeB.nodeName, loggableConstraints(nlConstraints)); nlConstraints.min = b.min; nlConstraints.max = b.min; @@ -102,7 +102,7 @@ if (b.max !== undefined) { if (nlConstraints.min !== undefined && nlConstraints.min > b.max) { // Conflict, warn and let nodeB win. - env.log("warn", "Incompatible constraints 2:", nodeA.nodeName, + env.log("info/html2wt", "Incompatible constraints 2:", nodeA.nodeName, nodeB.nodeName, loggableConstraints(nlConstraints)); nlConstraints.min = b.max; nlConstraints.max = b.max; @@ -278,7 +278,7 @@ } res.max = res.min; - env.log("warn", 'Incompatible constraints (merge):', res, + env.log("info/html2wt", 'Incompatible constraints (merge):', res, loggableConstraints(oldConstraints), loggableConstraints(newConstraints)); } return res; @@ -629,7 +629,7 @@ sep = src.substring(dsrA[1], dsrB[1] - dsrB[3]); } } else { - this.env.log("warn", "dsr backwards: should not happen!"); + this.env.log("info/html2wt", "dsr backwards: should not happen!"); } if (state.sep.lastSourceSep) { -- To view, visit https://gerrit.wikimedia.org/r/379670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d3c870a8852c4419f4501b5c26f0e40699bd28b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] purtle[master]: Tweak JSON-LD support to generate more idiomatic JSON-LD
C. Scott Ananian has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379669 ) Change subject: Tweak JSON-LD support to generate more idiomatic JSON-LD .. Tweak JSON-LD support to generate more idiomatic JSON-LD Lean on the @context more to generate shortnames for fields and hoist @type declarations so that the actual node objects are as concise as possible. These structures are semantically equivalent to the previous markup, but should be smaller and easier for consumers to use. Change-Id: I45294572607926b68c60c9c2c0f306b8c8d14bc3 --- M src/JsonLdRdfWriter.php M tests/data/DumpHeader.jsonld M tests/data/EricMiller.jsonld M tests/data/LabeledBlankNode.jsonld M tests/data/NumberedBlankNode.jsonld M tests/data/Numbers.jsonld M tests/data/Predicates.jsonld M tests/data/Resources.jsonld M tests/data/TextWithSpecialChars.jsonld M tests/data/Texts.jsonld M tests/data/Triples.jsonld M tests/data/Values.jsonld 12 files changed, 207 insertions(+), 92 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/purtle refs/changes/69/379669/1 diff --git a/src/JsonLdRdfWriter.php b/src/JsonLdRdfWriter.php index 48dde9c..d9c1bd1 100644 --- a/src/JsonLdRdfWriter.php +++ b/src/JsonLdRdfWriter.php @@ -140,7 +140,13 @@ // Empty prefix not supported; use full IRI return $this->prefixes[ $base ] . $local; } - $this->context[ $base ] = $this->prefixes[ $base ]; + if ( !isset( $this->context[ $base ] ) ) { + $this->context[ $base ] = $this->prefixes[ $base ]; + } + if ( $this->context[ $base ] !== $this->prefixes[ $base ] ) { + // Context name conflict; use full IRI + return $this->prefixes[ $base ] . $local; + } } return $base . ':' . $local; } @@ -162,6 +168,32 @@ throw new LogicException( 'Unknown prefix: ' . $base ); } return $base; + } + + /** +* Return a appropriate term for the current predicate value. +*/ + private function getCurrentTerm() { + list( $base, $local ) = $this->currentPredicate; + $predIRI = $this->toIRI( $base, $local ); + if ( $predIRI === self::RDF_TYPE_IRI ) { + return $predIRI; + } + $this->expandShorthand( $base, $local ); + if ( $local === null ) { + return $base; + } elseif ( $base !== '_' && !isset( $this->prefixes[ $local ] ) ) { + // Prefixes get priority over field names in @context + $pred = $this->compactify( $base, $local ); + if ( !isset( $this->context[ $local ] ) ) { + $this->context[ $local ] = [ "@id" => $pred ]; + } + if ( $this->context[ $local ][ "@id" ] === $pred ) { + return $local; + } + return $pred; + } + return $this->compactify( $base, $local ); } /** @@ -256,6 +288,19 @@ * @param string|null $local */ protected function writeResource( $base, $local = null ) { + $pred = $this->getCurrentTerm(); + if ( $pred !== self::RDF_TYPE_IRI ) { + if ( !isset( $this->context[ $pred ] ) ) { + $this->context[ $pred ] = []; + } + if ( !isset( $this->context[ $pred ][ "@type" ] ) ) { + $this->context[ $pred ][ "@type" ] = "@id"; + } + if ( $this->context[ $pred ][ "@type" ] === "@id" ) { + $this->values[] = $this->compactify( $base, $local ); + return; + } + } $this->values[] = [ "@id" => $this->compactify( $base, $local ) ]; @@ -311,26 +356,33 @@ } } - $this->values[] = [ - "@type" => $this->compactify( $typeBase, $typeLocal ), - "@value" => strval( $literal ) - ]; + $type = $this->compactify( $typeBase, $typeLocal ); + $literal = strval( $literal ); + $pred = $this->getCurrentTerm(); + if ( !isset( $this->context[ $pred ] ) ) { +
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ApiVisualEditor: Stop an undefined variable error for preloa...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379666 ) Change subject: ApiVisualEditor: Stop an undefined variable error for preload on existing pages .. ApiVisualEditor: Stop an undefined variable error for preload on existing pages Bug: T176440 Change-Id: I39c8efe6d59948170b848730c4cc20c80cc2d326 --- M ApiVisualEditor.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, approved diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 285a953..2ebba05 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -566,7 +566,7 @@ ]; if ( $params['paction'] === 'parse' || $params['paction'] === 'wikitext' || -$params['preload'] +( $params['preload'] && $content ) ) { $result['content'] = $content; } -- To view, visit https://gerrit.wikimedia.org/r/379666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39c8efe6d59948170b848730c4cc20c80cc2d326 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: DLynch Gerrit-Reviewer: Esanders 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] mediawiki...DonationInterface[master]: Fix Adyen iframe field styles on iOS
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379665 ) Change subject: Fix Adyen iframe field styles on iOS .. Fix Adyen iframe field styles on iOS It seems the max-device-width media query is no longer working on iOS. This change should make sure they are visible and consistent across platforms. I don't know if it's sufficent to just deploy this on our systems, or if we need to send the updated file to Adyen? Bug: T176420 Change-Id: Ibcac3cfe3357a166acb744b593716966484fabc3 --- M adyen_gateway/forms/iframe/css/screen.css 1 file changed, 2 insertions(+), 12 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved Zoranzoki21: Looks good to me, but someone else must approve diff --git a/adyen_gateway/forms/iframe/css/screen.css b/adyen_gateway/forms/iframe/css/screen.css index 8e10c43..e8d66ed 100644 --- a/adyen_gateway/forms/iframe/css/screen.css +++ b/adyen_gateway/forms/iframe/css/screen.css @@ -37,6 +37,7 @@ input[name="card.cardNumber"], input[name="card.cvcCode"] { direction: ltr; text-align: left; + -webkit-appearance: none; } /* ensure the cvc hint doesn't wrap under the input box */ @@ -160,7 +161,7 @@ /* Form elements */ input,select { - background-color: #f6f6f6; + background-color: #fff; padding: 1em !important; -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1); -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1); @@ -307,15 +308,4 @@ .paySubmit { float: left; -} - -/* Responsive classes */ -@media only screen and (max-device-width: 700px) { - - input, select { - background-color: #ff; - } - -} - } -- To view, visit https://gerrit.wikimedia.org/r/379665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcac3cfe3357a166acb744b593716966484fabc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Pcoombe Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: Zoranzoki21 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]: Move dataset rsync config manifests to dumps module
ArielGlenn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379668 ) Change subject: Move dataset rsync config manifests to dumps module .. Move dataset rsync config manifests to dumps module Adjust roles and profiles accordingly: the active xml/sql dumps web server deals with all the rsyncs so that's the place for the rsync config classes to be included. Also minor cleanups as with all the patches in this series: get rid of useless 'enabled' parameter, rework params in general so they are passed into profiles. At a later date we will move hardcoded hostnames out of the module. Bug: T175528 Change-Id: Id8dd07005cf5740ce0b6fc01f8812c6cb229418d --- M modules/dataset/manifests/common.pp D modules/dataset/manifests/rsync/default.pp D modules/dataset/manifests/rsync/media.pp D modules/dataset/manifests/rsync/pagecounts_ez.pp D modules/dataset/manifests/rsync/peers.pp D modules/dataset/manifests/rsync/phab_dump.pp D modules/dataset/manifests/rsync/public.pp R modules/dumps/files/rsync/rsyncd.conf.datasets_to_peers R modules/dumps/files/rsync/rsyncd.conf.dumps_to_public R modules/dumps/files/rsync/rsyncd.conf.globalopts R modules/dumps/files/rsync/rsyncd.conf.media R modules/dumps/files/rsync/rsyncd.conf.pagecounts_ez R modules/dumps/files/rsync/rsyncd.conf.phab_dump R modules/dumps/manifests/rsync/common.pp A modules/dumps/manifests/rsync/default.pp A modules/dumps/manifests/rsync/media.pp A modules/dumps/manifests/rsync/memfix.pp A modules/dumps/manifests/rsync/pagecounts_ez.pp A modules/dumps/manifests/rsync/peers.pp A modules/dumps/manifests/rsync/phab_dump.pp A modules/dumps/manifests/rsync/public.pp R modules/dumps/templates/rsync/rsync.default.erb A modules/profile/manifests/dumps/rsyncer.pp A modules/profile/manifests/dumps/rsyncer_peer.pp M modules/role/manifests/dumps/web/xmldumps_active.pp M modules/role/manifests/dumps/web/xmldumps_fallback.pp 26 files changed, 104 insertions(+), 147 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/379668/1 diff --git a/modules/dataset/manifests/common.pp b/modules/dataset/manifests/common.pp index 85f8ace..07c9d63 100644 --- a/modules/dataset/manifests/common.pp +++ b/modules/dataset/manifests/common.pp @@ -1,7 +1,4 @@ class dataset::common { -package { 'rsync': -ensure => present, -} - +require_packages('rsync') include ::vm::higher_min_free_kbytes } diff --git a/modules/dataset/manifests/rsync/default.pp b/modules/dataset/manifests/rsync/default.pp deleted file mode 100644 index f0d21cc..000 --- a/modules/dataset/manifests/rsync/default.pp +++ /dev/null @@ -1,23 +0,0 @@ -class dataset::rsync::default( -$rsync_enable = true, -$public= true, -$rsync_opts= '--bwlimit=5', -$rsync_config_file = undef -) { -if $public == true { -$rsync_nice = undef -$rsync_ionice = undef -} -else { -$rsync_nice = '10' -$rsync_ionice = '-c3' -} - -file { '/etc/default/rsync': -ensure => 'present', -mode=> '0444', -owner => 'root', -group => 'root', -content => template('dataset/rsync.default.erb'), -} -} diff --git a/modules/dataset/manifests/rsync/media.pp b/modules/dataset/manifests/rsync/media.pp deleted file mode 100644 index 0db4da9..000 --- a/modules/dataset/manifests/rsync/media.pp +++ /dev/null @@ -1,20 +0,0 @@ -class dataset::rsync::media($enable=true) { -if ($enable) { -$ensure = 'present' -} -else { -$ensure = 'absent' -} - -include ::dataset::common -include ::dataset::rsync::common - -file { '/etc/rsyncd.d/30-rsync-media.conf': -ensure => $ensure, -mode => '0444', -owner => 'root', -group => 'root', -source => 'puppet:///modules/dataset/rsync/rsyncd.conf.media', -notify => Exec['update-rsyncd.conf'], -} -} diff --git a/modules/dataset/manifests/rsync/pagecounts_ez.pp b/modules/dataset/manifests/rsync/pagecounts_ez.pp deleted file mode 100644 index 6ff2de2..000 --- a/modules/dataset/manifests/rsync/pagecounts_ez.pp +++ /dev/null @@ -1,20 +0,0 @@ -class dataset::rsync::pagecounts_ez($enable=true) { -if ($enable) { -$ensure = 'present' -} -else { -$ensure = 'absent' -} - -include ::dataset::common -include ::dataset::rsync::common - -file { '/etc/rsyncd.d/30-rsync-pagecounts_ez.conf': -ensure => $ensure, -mode => '0444', -owner => 'root', -group => 'root', -source => 'puppet:///modules/dataset/rsync/rsyncd.conf.pagecounts_ez', -notify => Exec['update-rsyncd.conf'], -} -} diff --git a/modules/dataset/manifests/rsync/peers.pp b/modules/dataset/manifests/rsync/peers.pp deleted file mode 100644 index f831fdf..000 --- a/modules/dataset/manifests/rsy
[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: Update box-sizing of "Other languages" box
Petar.petkovic has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379667 ) Change subject: Update box-sizing of "Other languages" box .. Update box-sizing of "Other languages" box Bug: T176141 Change-Id: Ic1099e3855f2851076283213be6c7aec52487e78 --- M resources/css/ext.translate.tag.languages.css 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/67/379667/1 diff --git a/resources/css/ext.translate.tag.languages.css b/resources/css/ext.translate.tag.languages.css index 210ef48..7773e0e 100644 --- a/resources/css/ext.translate.tag.languages.css +++ b/resources/css/ext.translate.tag.languages.css @@ -1,6 +1,7 @@ .mw-pt-languages { display: table; border: 1px solid #a2a9b1; + box-sizing: border-box; background: #f8f9fa none repeat scroll 0 0; border-collapse: collapse; line-height: 1.2; -- To view, visit https://gerrit.wikimedia.org/r/379667 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1099e3855f2851076283213be6c7aec52487e78 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Petar.petkovic ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ApiVisualEditor: Stop an undefined variable error for preloa...
DLynch has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379666 ) Change subject: ApiVisualEditor: Stop an undefined variable error for preload on existing pages .. ApiVisualEditor: Stop an undefined variable error for preload on existing pages Bug: T176440 Change-Id: I39c8efe6d59948170b848730c4cc20c80cc2d326 --- M ApiVisualEditor.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/66/379666/1 diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 285a953..2ebba05 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -566,7 +566,7 @@ ]; if ( $params['paction'] === 'parse' || $params['paction'] === 'wikitext' || -$params['preload'] +( $params['preload'] && $content ) ) { $result['content'] = $content; } -- To view, visit https://gerrit.wikimedia.org/r/379666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39c8efe6d59948170b848730c4cc20c80cc2d326 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: DLynch ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TemplateData[master]: Update grammar to yield the results in the examples
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379267 ) Change subject: Update grammar to yield the results in the examples .. Update grammar to yield the results in the examples Change-Id: I5c546e8b80cd7668dce5867b5cabd7940765410e --- M Specification.md M TemplateDataBlob.php 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/Specification.md b/Specification.md index f0c3821..5e2e2e5 100644 --- a/Specification.md +++ b/Specification.md @@ -284,8 +284,8 @@ A format string describes how whitespace should be added to a template instantiation in wikitext. A format string looks like `{{_|_=_}}`, with optional whitespace and extended underscores. Formally, its structure is given by the following grammar: ``` FormatString = StartFormat ParameterFormat EndFormat -StartFormat = nl? "{{" ws* Hole ws* -ParameterFormat = nl? "|" nl? ws* Hole ws* "=" ws* Hole +StartFormat = nl? "{{" ws* Hole +ParameterFormat = nl? ws* "|" nl? ws* Hole ws* "=" ws* Hole EndFormat = nl? ws* "}}" nl? Hole = "_"+ ws = " " diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index e06bcd8..c024802 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -172,7 +172,7 @@ $data->format; if ( !is_string( $f ) || - !preg_match( '/^\n?\{\{ *_+ *\n?\|\n? *_+ *= *_+\n? *\}\}\n?$/', $f ) + !preg_match( '/^\n?\{\{ *_+\n? *\|\n? *_+ *= *_+\n? *\}\}\n?$/', $f ) ) { return Status::newFatal( 'templatedata-invalid-format', -- To view, visit https://gerrit.wikimedia.org/r/379267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c546e8b80cd7668dce5867b5cabd7940765410e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TemplateData Gerrit-Branch: master Gerrit-Owner: Arlolra Gerrit-Reviewer: Arlolra Gerrit-Reviewer: C. Scott Ananian Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix Adyen iframe field styles on iOS
Pcoombe has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379665 ) Change subject: Fix Adyen iframe field styles on iOS .. Fix Adyen iframe field styles on iOS It seems the max-device-width media query is no longer working on iOS. This change should make sure they are visible and consistent across platforms. I don't know if it's sufficent to just deploy this on our systems, or if we need to send the updated file to Adyen? Bug: T176420 Change-Id: Ibcac3cfe3357a166acb744b593716966484fabc3 --- M adyen_gateway/forms/iframe/css/screen.css 1 file changed, 2 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/65/379665/1 diff --git a/adyen_gateway/forms/iframe/css/screen.css b/adyen_gateway/forms/iframe/css/screen.css index 8e10c43..e8d66ed 100644 --- a/adyen_gateway/forms/iframe/css/screen.css +++ b/adyen_gateway/forms/iframe/css/screen.css @@ -37,6 +37,7 @@ input[name="card.cardNumber"], input[name="card.cvcCode"] { direction: ltr; text-align: left; + -webkit-appearance: none; } /* ensure the cvc hint doesn't wrap under the input box */ @@ -160,7 +161,7 @@ /* Form elements */ input,select { - background-color: #f6f6f6; + background-color: #fff; padding: 1em !important; -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1); -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1); @@ -307,15 +308,4 @@ .paySubmit { float: left; -} - -/* Responsive classes */ -@media only screen and (max-device-width: 700px) { - - input, select { - background-color: #ff; - } - -} - } -- To view, visit https://gerrit.wikimedia.org/r/379665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcac3cfe3357a166acb744b593716966484fabc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Pcoombe ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Open inter-language links and Gallery links in the same tab.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379592 ) Change subject: Open inter-language links and Gallery links in the same tab. .. Open inter-language links and Gallery links in the same tab. This patch makes PageActivity provide two separate newIntent..() builders, for loading a requested page in a new tab or the current tab. This now allows LangLinksActivity and GalleryActivity to load their pages in the current tab. And in other places in the code, this makes it more explicit whether the requested page will be loaded in a new or current tab. Bug: T176163 Bug: T156148 Change-Id: I64da49a9b49fb19fe62f3aa146e10dbfbb2ec74e --- M app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java M app/src/main/java/org/wikipedia/feed/news/NewsFragment.java M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java M app/src/main/java/org/wikipedia/language/LangLinksActivity.java M app/src/main/java/org/wikipedia/main/MainFragment.java M app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java M app/src/main/java/org/wikipedia/page/PageActivity.java M app/src/main/java/org/wikipedia/readinglist/ReadingListFragment.java 8 files changed, 37 insertions(+), 18 deletions(-) Approvals: jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java index 6233058..384daee 100644 --- a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java +++ b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java @@ -199,7 +199,7 @@ showLeavingEditDialogue(new Runnable() { @Override public void run() { -startActivity(PageActivity.newIntent(getContext(), new HistoryEntry(title, HistoryEntry.SOURCE_INTERNAL_LINK), title)); + startActivity(PageActivity.newIntentForNewTab(getContext(), new HistoryEntry(title, HistoryEntry.SOURCE_INTERNAL_LINK), title)); } }); } diff --git a/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java b/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java index 467ec15..30c262d 100644 --- a/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java +++ b/app/src/main/java/org/wikipedia/feed/news/NewsFragment.java @@ -132,7 +132,7 @@ private class Callback implements ListCardItemView.Callback { @Override public void onSelectPage(@NonNull Card card, @NonNull HistoryEntry entry) { -startActivity(PageActivity.newIntent(getContext(), entry, entry.getTitle())); +startActivity(PageActivity.newIntentForNewTab(getContext(), entry, entry.getTitle())); } @Override diff --git a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java index 980626e..d299533 100644 --- a/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java +++ b/app/src/main/java/org/wikipedia/gallery/GalleryActivity.java @@ -424,7 +424,7 @@ } public void finishWithPageResult(@NonNull PageTitle resultTitle, @NonNull HistoryEntry historyEntry) { -Intent intent = PageActivity.newIntent(GalleryActivity.this, historyEntry, resultTitle); +Intent intent = PageActivity.newIntentForCurrentTab(GalleryActivity.this, historyEntry, resultTitle); setResult(ACTIVITY_RESULT_PAGE_SELECTED, intent); finish(); } diff --git a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java index 2d82913..adb89f5 100644 --- a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java +++ b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java @@ -102,7 +102,7 @@ PageTitle langLink = (PageTitle) parent.getAdapter().getItem(position); app.setMruLanguageCode(langLink.getWikiSite().languageCode()); HistoryEntry historyEntry = new HistoryEntry(langLink, HistoryEntry.SOURCE_LANGUAGE_LINK); -Intent intent = PageActivity.newIntent(LangLinksActivity.this, historyEntry, langLink); +Intent intent = PageActivity.newIntentForCurrentTab(LangLinksActivity.this, historyEntry, langLink); setResult(ACTIVITY_RESULT_LANGLINK_SELECT, intent); hideSoftKeyboard(LangLinksActivity.this); finish(); diff --git a/app/src/main/java/org/wikipedia/main/MainFragment.java b/app/src/main/java/org/wikipedia/main/MainFragment.java index 24ec210..e8456b8 100644 --- a/app/src/main/java/org/wikipedia/main/MainFragment.java +++ b/app/src/main/java/org/wikipedia/main/Ma
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update ExtensionDistributer settings
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379524 ) Change subject: Update ExtensionDistributer settings .. Update ExtensionDistributer settings Change-Id: I0c5eb799b23e14368f9f7d7e3058933acc626f99 --- M wmf-config/CommonSettings.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index e5c84ff..cdd8e92 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -994,11 +994,12 @@ $wgExtDistDefaultSnapshot = 'REL1_29'; // Current development snapshot - // $wgExtDistCandidateSnapshot = 'REL1_30'; + $wgExtDistCandidateSnapshot = 'REL1_30'; // Available snapshots $wgExtDistSnapshotRefs = [ 'master', + 'REL1_30', 'REL1_29', 'REL1_28', 'REL1_27', -- To view, visit https://gerrit.wikimedia.org/r/379524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c5eb799b23e14368f9f7d7e3058933acc626f99 Gerrit-PatchSet: 4 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MacFan4000 Gerrit-Reviewer: Chad Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Make live update polling configurable
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379664 ) Change subject: RCFilters: Make live update polling configurable .. RCFilters: Make live update polling configurable Introducing $wgStructuredChangeFiltersLiveUpdatePollingRate to configure the polling rate for live update. Allows disabling polling completely by setting it to 0. Change-Id: I13d3a4bb642c55a16e442f8f8d650c637f13f72c --- M includes/DefaultSettings.php M includes/specialpage/ChangesListSpecialPage.php M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js M resources/src/mediawiki.rcfilters/mw.rcfilters.js 4 files changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/379664/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index cdb7ce8..3ca8d8c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6865,6 +6865,13 @@ $wgStructuredChangeFiltersOnWatchlist = false; /** + * Polling rate, in seconds, used by the 'live update' and 'view newest' features + * of the RCFilters app on SpecialRecentChanges and Special:Watchlist. + * 0 to disable completely. + */ +$wgStructuredChangeFiltersLiveUpdatePollingRate = 3; + +/** * Use new page patrolling to check new pages on Special:Newpages */ $wgUseNPPatrol = true; diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index dd0dd92..6415b2c 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -624,6 +624,11 @@ ] ); + $out->addJsConfigVars( + 'StructuredChangeFiltersLiveUpdatePollingRate', + $this->getConfig()->get( 'StructuredChangeFiltersLiveUpdatePollingRate' ) + ); + if ( static::$savedQueriesPreferenceName ) { $savedQueries = FormatJson::decode( $this->getUser()->getOption( static::$savedQueriesPreferenceName ) diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 507c979..afcb507 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -263,7 +263,10 @@ this.initializing = false; this.switchView( 'default' ); - this._scheduleLiveUpdate(); + this.pollingRate = mw.config.get( 'StructuredChangeFiltersLiveUpdatePollingRate' ); + if ( this.pollingRate ) { + this._scheduleLiveUpdate(); + } }; /** @@ -519,7 +522,7 @@ * @private */ mw.rcfilters.Controller.prototype._scheduleLiveUpdate = function () { - setTimeout( this._doLiveUpdate.bind( this ), 3000 ); + setTimeout( this._doLiveUpdate.bind( this ), this.pollingRate ); }; /** diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.js index d203328..e28f34a 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.js @@ -46,7 +46,7 @@ } }, featureFlags: { - liveUpdate: mw.config.get( 'wgStructuredChangeFiltersLiveUpdateSupported' ) && + liveUpdate: mw.config.get( 'StructuredChangeFiltersLiveUpdatePollingRate' ) && ( mw.user.options.get( 'rcenhancedfilters' ) || new mw.Uri().query.liveupdate ) } }; -- To view, visit https://gerrit.wikimedia.org/r/379664 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13d3a4bb642c55a16e442f8f8d650c637f13f72c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix Lift IP cap for account creation for John Michael Kohler...
Zoranzoki21 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379661 ) Change subject: Fix Lift IP cap for account creation for John Michael Kohler Art Center - Thur Sept 21, Sun Sept 24 & Tues Sept 26 throttle problem.. .. Fix Lift IP cap for account creation for John Michael Kohler Art Center - Thur Sept 21, Sun Sept 24 & Tues Sept 26 throttle problem.. Bug: T176287 Change-Id: I688118a376335d94bd4b59ce2a07947bde0641ea --- M wmf-config/throttle.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/61/379661/2 diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php index 4d3e40f..2f44aca 100644 --- a/wmf-config/throttle.php +++ b/wmf-config/throttle.php @@ -47,9 +47,7 @@ $wmgThrottlingExceptions[] = [ // T176287 - John Michael Kohler Art Center 'from' => '2017-09-21T13:00-05:00', // Central 'to' => '2017-09-26T22:00-05:00', - 'IP' => [ - '192.168.50.52', - ], + 'IP' => '192.168.50.52', 'dbname' => [ 'enwiki', 'commonswiki' ], 'value' => 100, // 100 expected participants (not specified) ]; -- To view, visit https://gerrit.wikimedia.org/r/379661 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I688118a376335d94bd4b59ce2a07947bde0641ea Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Zoranzoki21 Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379650 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 3bbac063c Remove unnecessary trigger refresh 0ca9c3be3 Retry deadlocked inserts, take two 77c0722c8 Use permissions hook to prevent unlimited dedupe a4bb77929 Submodule update Change-Id: Ic978420bc039044b8d9ee19030541f1acedca5c8 --- D sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php 1 file changed, 0 insertions(+), 39 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php deleted file mode 100644 index da9f432..000 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<<< HEAD (fc5690 Update vendor for Omnimail offset fix) -=== - 'USD', -'date' => time(), -'email' => 'nob...@wikimedia.org', -'gateway' => 'test_gateway', -'gateway_txn_id' => mt_rand(), -'gross' => '1.23', -'payment_method' => 'cc', -'phone' => $phoneNumber, -); - -$contribution = wmf_civicrm_contribution_message_import( $msg ); - -$phones = $this->callAPISuccess('Phone', 'get', array('contact_id' => $contribution['contact_id'], 'sequential' => 1)); -$phone = $phones['values'][0]; - -$this->assertEquals($phoneNumber, $phone['phone']); -$this->assertEquals(1, $phone['is_primary']); -$this->assertEquals(wmf_civicrm_get_default_location_type_id(), $phone['location_type_id']); - $this->assertEquals(CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Phone', 'phone_type_id', 'Phone'), $phone['phone_type_id']); -} - -} ->>> BRANCH (a4bb77 Submodule update) -- To view, visit https://gerrit.wikimedia.org/r/379650 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic978420bc039044b8d9ee19030541f1acedca5c8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Submodule update
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379648 ) Change subject: Submodule update .. Submodule update Change-Id: I91548ea1526197c7cf5578dc38c0e2c0908cffbd --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/civicrm b/civicrm index 30eb051..4aefec6 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 30eb051183dbf290a684d1ed2f72828feeedbe35 +Subproject commit 4aefec6f0a6dc54d0840609288bd98410663dc9b -- To view, visit https://gerrit.wikimedia.org/r/379648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91548ea1526197c7cf5578dc38c0e2c0908cffbd Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Add default limit
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379628 ) Change subject: Add default limit .. Add default limit Change-Id: I78509d3027975f0abd09f5f76cf0537c4de32e9a --- M CRM/Contact/Form/Merge.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index 146b153..1ebda3e 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -78,7 +78,7 @@ $this->_rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE); $this->_gid = $gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE); $this->_mergeId = CRM_Utils_Request::retrieve('mergeId', 'Positive', $this, FALSE); - $this->limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this, FALSE); + $this->limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this, FALSE, 500); $this->criteria = CRM_Utils_Request::retrieve('criteria', 'String', $this, FALSE, '{}'); $urlParams = "reset=1&rgid={$this->_rgid}&gid={$this->_gid}&limit=" . $this->limit . '&criteria=' . $this->criteria; -- To view, visit https://gerrit.wikimedia.org/r/379628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I78509d3027975f0abd09f5f76cf0537c4de32e9a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Mepps Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379650 ) Change subject: Merge branch 'master' into deployment .. Merge branch 'master' into deployment 3bbac063c Remove unnecessary trigger refresh 0ca9c3be3 Retry deadlocked inserts, take two 77c0722c8 Use permissions hook to prevent unlimited dedupe a4bb77929 Submodule update Change-Id: Ic978420bc039044b8d9ee19030541f1acedca5c8 --- D sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php 1 file changed, 0 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/50/379650/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php deleted file mode 100644 index da9f432..000 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/PhoneImportTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<<< HEAD (fc5690 Update vendor for Omnimail offset fix) -=== - 'USD', -'date' => time(), -'email' => 'nob...@wikimedia.org', -'gateway' => 'test_gateway', -'gateway_txn_id' => mt_rand(), -'gross' => '1.23', -'payment_method' => 'cc', -'phone' => $phoneNumber, -); - -$contribution = wmf_civicrm_contribution_message_import( $msg ); - -$phones = $this->callAPISuccess('Phone', 'get', array('contact_id' => $contribution['contact_id'], 'sequential' => 1)); -$phone = $phones['values'][0]; - -$this->assertEquals($phoneNumber, $phone['phone']); -$this->assertEquals(1, $phone['is_primary']); -$this->assertEquals(wmf_civicrm_get_default_location_type_id(), $phone['location_type_id']); - $this->assertEquals(CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_Phone', 'phone_type_id', 'Phone'), $phone['phone_type_id']); -} - -} ->>> BRANCH (a4bb77 Submodule update) -- To view, visit https://gerrit.wikimedia.org/r/379650 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic978420bc039044b8d9ee19030541f1acedca5c8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Submodule update
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379648 ) Change subject: Submodule update .. Submodule update Change-Id: I91548ea1526197c7cf5578dc38c0e2c0908cffbd --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/48/379648/1 diff --git a/civicrm b/civicrm index 30eb051..4aefec6 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 30eb051183dbf290a684d1ed2f72828feeedbe35 +Subproject commit 4aefec6f0a6dc54d0840609288bd98410663dc9b -- To view, visit https://gerrit.wikimedia.org/r/379648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91548ea1526197c7cf5578dc38c0e2c0908cffbd Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: WIP: Message boxes about book creator undergoing changes
Pmiazga has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379647 ) Change subject: WIP: Message boxes about book creator undergoing changes .. WIP: Message boxes about book creator undergoing changes While we work on PDF creation we want to disable the PDF feature for short period of time. We want to inform users about ongoing work and short lack of PDF support in Collection extension. Message boxes styles and images are stored under new ext.collection.bookcreator.messageBox module as we will remove those infoboxes, wrapping it into a single module will make our future work much easier. Changes: - changed existing warning box into two message boxes explaning changes applied to the Book Creator - added new styles for message boxes - added two SVG files for warning/info icons - changed showWarningBox() to static as this is used in two places Bug: T175996 Change-Id: Ic86465fa42854706ffee2c1bcf38e3735f02cd5f --- M Collection.body.php M Collection.php M i18n/en.json M i18n/qqq.json A resources/ext.collection.bookcreator.messageBox/images/info-icon.svg A resources/ext.collection.bookcreator.messageBox/images/warning-icon.svg A resources/ext.collection.bookcreator.messageBox/messageBox.css M templates/CollectionPageTemplate.php M templates/warning.mustache 9 files changed, 114 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/47/379647/1 diff --git a/Collection.body.php b/Collection.body.php index 7b4a0d7..05e8097 100644 --- a/Collection.body.php +++ b/Collection.body.php @@ -343,10 +343,11 @@ $this->setHeaders(); $out->setPageTitle( $this->msg( 'coll-book_creator' ) ); - $out->addWikiMsg( 'coll-book_creator_intro' ); + $out->addHTML( CollectionPageTemplate::getWarningBox() ); $out->addModules( 'ext.collection.checkLoadFromLocalStorage' ); + $out->addWikiMsg( 'coll-book_creator_intro' ); $title = Title::newFromText( $referer ); if ( is_null( $title ) || $title->equals( $this->getPageTitle( $par ) ) ) { $title = Title::newMainPage(); diff --git a/Collection.php b/Collection.php index 8bf64a7..8fd13e4 100644 --- a/Collection.php +++ b/Collection.php @@ -246,7 +246,12 @@ ], 'ext.collection.bookcreator' => $collResourceTemplate + [ 'scripts' => 'ext.collection.bookcreator/bookcreator.js', - 'dependencies' => [ 'jquery.jStorage', 'ext.collection.bookcreator.styles' ], + 'dependencies' => [ + 'jquery.jStorage', + 'ext.collection.bookcreator.styles', + // Message boxes introduced in T175996 to warn users about disabling PDF feature + 'ext.collection.bookcreator.messageBox' + ], ], 'ext.collection.checkLoadFromLocalStorage' => $collResourceTemplate + [ 'scripts' => 'ext.collection.checkLoadFromLocalStorage/check_load_from_localstorage.js', @@ -266,6 +271,12 @@ 'ext.collection.offline' => $collResourceTemplate + [ 'styles' => 'ext.collection.offline/offline.less', ], + 'ext.collection.bookcreator.messageBox' => $collResourceTemplate + [ + 'styles' => 'ext.collection.bookcreator.messageBox/messageBox.css', + 'dependencies' => [ + 'mediawiki.hlist' + ] + ], ]; # register global Ajax functions: diff --git a/i18n/en.json b/i18n/en.json index f217c25..0627409 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -182,9 +182,11 @@ "coll-attribution-page": "Text and image sources, contributors, and licenses\nText\n$1Images\n$2\nContent license\n$3", "coll-article-attribution": "$1 Source: $2 Contributors: $3", "coll-image-attribution": "$1 Source: $2 License: $3 Contributors: $4 Original artist: $5", - "coll-warning-text": "We're having significant problems with the function we currently use to create PDFs. We unfortunately have to replace it. This might affect the styling and feature set of Books. We would like to invite you to a conversation around the functionality necessary in the proposed replacement. For feedback, please visit the project page here: https://www.mediawiki.org/wiki/Reading/Web/PDF_Functionality";, - "coll-warning-leave-feedback": "Leave feedback", - "coll-warning-read-more": "Read more", + "coll-warning-disable-pdf-title": "Book Creator is undergoing changes", + "coll-warning-disable-pdf-text": "Due to severe issues with our existing system, the Book Creator will no longer support saving a book as a PDF for a short period of time. We are working hard to replace our system and re-enable PDFs within the Book Creator.", +
[MediaWiki-commits] [Gerrit] operations...cumin[debian]: Upstream release 1.1.0
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379638 ) Change subject: Upstream release 1.1.0 .. Upstream release 1.1.0 * Update Build-Depends. * Revert example files hotfix for https://phabricator.wikimedia.org/T174008. * Fix tests run with setuptools-scm Change-Id: I6203b6957bfa6d3938f1efdce5bb724204819f6a --- M debian/changelog M debian/control D debian/cumin.examples M debian/rules 4 files changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/38/379638/1 diff --git a/debian/changelog b/debian/changelog index b8b974e..cea8f5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +cumin (1.1.0-1) jessie-wikimedia; urgency=medium + + * 1.1.0 upstream release. + * Update Build-Depends. + * Revert example files hotfix for https://phabricator.wikimedia.org/T174008. + * Fix tests run with setuptools-scm + + -- Riccardo Coccioli Wed, 23 Aug 2017 23:02:24 +0200 + cumin (1.0.0-1) jessie-wikimedia; urgency=medium * 1.0.0 upstream release. diff --git a/debian/control b/debian/control index 404433d..5338f64 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,10 @@ python-all (>= 2.7), python-colorama, python-flake8, + python-keystoneauth1, + python-keystoneclient, python-mock (>= 2.0.0), + python-novaclient, python-pyparsing, python-pytest, python-pytest-cov, diff --git a/debian/cumin.examples b/debian/cumin.examples deleted file mode 100644 index 09a90d6..000 --- a/debian/cumin.examples +++ /dev/null @@ -1 +0,0 @@ -doc/examples/* diff --git a/debian/rules b/debian/rules index 3a90a5f..0bc5fa0 100755 --- a/debian/rules +++ b/debian/rules @@ -7,9 +7,5 @@ dh $@ --with python2 --buildsystem=pybuild override_dh_auto_test: + SETUPTOOLS_SCM_PRETEND_VERSION="$(shell dpkg-parsechangelog -S version)" python setup.py develop --user py.test --strict --cov-report term-missing --cov=cumin cumin/tests/unit - -# Hotfix for https://phabricator.wikimedia.org/T174008 -override_dh_installexamples: - dh_installexamples - rm -rvf $(CURDIR)/debian/cumin/usr/doc -- To view, visit https://gerrit.wikimedia.org/r/379638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6203b6957bfa6d3938f1efdce5bb724204819f6a Gerrit-PatchSet: 1 Gerrit-Project: operations/software/cumin Gerrit-Branch: debian Gerrit-Owner: Volans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Add default limit
Mepps has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379628 ) Change subject: Add default limit .. Add default limit Change-Id: I78509d3027975f0abd09f5f76cf0537c4de32e9a --- M CRM/Contact/Form/Merge.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/28/379628/1 diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index 146b153..1ebda3e 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -78,7 +78,7 @@ $this->_rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE); $this->_gid = $gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE); $this->_mergeId = CRM_Utils_Request::retrieve('mergeId', 'Positive', $this, FALSE); - $this->limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this, FALSE); + $this->limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this, FALSE, 500); $this->criteria = CRM_Utils_Request::retrieve('criteria', 'String', $this, FALSE, '{}'); $urlParams = "reset=1&rgid={$this->_rgid}&gid={$this->_gid}&limit=" . $this->limit . '&criteria=' . $this->criteria; -- To view, visit https://gerrit.wikimedia.org/r/379628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78509d3027975f0abd09f5f76cf0537c4de32e9a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Mepps ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations...cumin[master]: Upstream release 1.1.0
Volans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379626 ) Change subject: Upstream release 1.1.0 .. Upstream release 1.1.0 * Update Build-Depends. * Revert example files hotfix for https://phabricator.wikimedia.org/T174008. * Fix tests run with setuptools-scm Change-Id: If53601a91877c55f4a54befa69d62e4cf5ff3f56 --- M debian/changelog M debian/control D debian/cumin.examples M debian/rules 4 files changed, 13 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin refs/changes/26/379626/1 diff --git a/debian/changelog b/debian/changelog index b8b974e..cea8f5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +cumin (1.1.0-1) jessie-wikimedia; urgency=medium + + * 1.1.0 upstream release. + * Update Build-Depends. + * Revert example files hotfix for https://phabricator.wikimedia.org/T174008. + * Fix tests run with setuptools-scm + + -- Riccardo Coccioli Wed, 23 Aug 2017 23:02:24 +0200 + cumin (1.0.0-1) jessie-wikimedia; urgency=medium * 1.0.0 upstream release. diff --git a/debian/control b/debian/control index 404433d..5338f64 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,10 @@ python-all (>= 2.7), python-colorama, python-flake8, + python-keystoneauth1, + python-keystoneclient, python-mock (>= 2.0.0), + python-novaclient, python-pyparsing, python-pytest, python-pytest-cov, diff --git a/debian/cumin.examples b/debian/cumin.examples deleted file mode 100644 index 09a90d6..000 --- a/debian/cumin.examples +++ /dev/null @@ -1 +0,0 @@ -doc/examples/* diff --git a/debian/rules b/debian/rules index 3a90a5f..0bc5fa0 100755 --- a/debian/rules +++ b/debian/rules @@ -7,9 +7,5 @@ dh $@ --with python2 --buildsystem=pybuild override_dh_auto_test: + SETUPTOOLS_SCM_PRETEND_VERSION="$(shell dpkg-parsechangelog -S version)" python setup.py develop --user py.test --strict --cov-report term-missing --cov=cumin cumin/tests/unit - -# Hotfix for https://phabricator.wikimedia.org/T174008 -override_dh_installexamples: - dh_installexamples - rm -rvf $(CURDIR)/debian/cumin/usr/doc -- To view, visit https://gerrit.wikimedia.org/r/379626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If53601a91877c55f4a54befa69d62e4cf5ff3f56 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/cumin Gerrit-Branch: master Gerrit-Owner: Volans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: remove wgStructuredChangeFiltersEnableExperimenta...
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379615 ) Change subject: RCFilters: remove wgStructuredChangeFiltersEnableExperimentalViews .. RCFilters: remove wgStructuredChangeFiltersEnableExperimentalViews Not used anymore. Change-Id: I1afe736db76eef6ddae5c602d8e24fddfd807a3a --- M includes/DefaultSettings.php M includes/specialpage/ChangesListSpecialPage.php M tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js 3 files changed, 0 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/379615/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index cdb7ce8..9e9ac62 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6850,14 +6850,6 @@ $wgStructuredChangeFiltersShowPreference = false; /** - * Whether to show the new experimental views (like namespaces, tags, and users) in - * RecentChanges filters - * - * Temporary variable during development and will be removed. - */ -$wgStructuredChangeFiltersEnableExperimentalViews = false; - -/** * Whether to enable RCFilters app on Special:Watchlist * * Temporary variable during development and will be removed. diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index dd0dd92..cf6c8e3 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -600,14 +600,7 @@ ) ); - $experimentalStructuredChangeFilters = - $this->getConfig()->get( 'StructuredChangeFiltersEnableExperimentalViews' ); - $out->addJsConfigVars( 'wgStructuredChangeFilters', $jsData['groups'] ); - $out->addJsConfigVars( - 'wgStructuredChangeFiltersEnableExperimentalViews', - $experimentalStructuredChangeFilters - ); $out->addJsConfigVars( 'wgRCFiltersChangeTags', diff --git a/tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js b/tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js index 58e4d29..4eec02a 100644 --- a/tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js +++ b/tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js @@ -213,9 +213,6 @@ 'group2filter5-desc': 'Description of Filter 5 in Group 2', 'group2filter6-label': 'xGroup 2: Filter 6', 'group2filter6-desc': 'Description of Filter 6 in Group 2' - }, - config: { - wgStructuredChangeFiltersEnableExperimentalViews: true } } ) ); -- To view, visit https://gerrit.wikimedia.org/r/379615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1afe736db76eef6ddae5c602d8e24fddfd807a3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Tabs (Read / View Source / Search) collapsed under more in r...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/368803 ) Change subject: Tabs (Read / View Source / Search) collapsed under more in resolution < 700px .. Tabs (Read / View Source / Search) collapsed under more in resolution < 700px tabs such as read/view source are collapsed into more in screens whose resolution is less than 700 px so that they don't wrap to the next line and cover the content of the page Bug: T56919 Change-Id: I30e0642d3cb93c4d9a8b2bdfb7f04912d8ca8649 --- M VectorTemplate.php M components/watchstar.less 2 files changed, 6 insertions(+), 3 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/VectorTemplate.php b/VectorTemplate.php index 50c4439..c4c6aa5 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -538,9 +538,7 @@ // Add CSS class 'collapsible' to links which are not marked as "primary" if ( - isset( $options['vector-collapsible'] ) && $options['vector-collapsible'] - && !( isset( $item['primary'] ) && $item['primary'] ) - ) { + isset( $options['vector-collapsible'] ) && $options['vector-collapsible'] ) { $item['class'] = rtrim( 'collapsible ' . $item['class'], ' ' ); } diff --git a/components/watchstar.less b/components/watchstar.less index 17bcbd7..cdea9bc 100644 --- a/components/watchstar.less +++ b/components/watchstar.less @@ -17,21 +17,26 @@ background-position: 5px 60%; } #ca-unwatch.icon a { + background-repeat: no-repeat; .background-image-svg( 'images/unwatch-icon.svg', 'images/unwatch-icon.png' ); } #ca-watch.icon a { + background-repeat: no-repeat; .background-image-svg( 'images/watch-icon.svg', 'images/watch-icon.png' ); } #ca-unwatch.icon a:hover, #ca-unwatch.icon a:focus { + background-repeat: no-repeat; .background-image-svg( 'images/unwatch-icon-hl.svg', 'images/unwatch-icon-hl.png' ); } #ca-watch.icon a:hover, #ca-watch.icon a:focus { + background-repeat: no-repeat; .background-image-svg( 'images/watch-icon-hl.svg', 'images/watch-icon-hl.png' ); } #ca-unwatch.icon a.loading, #ca-watch.icon a.loading { + background-repeat: no-repeat; .background-image-svg( 'images/watch-icon-loading.svg', 'images/watch-icon-loading.png' ); .rotation( 700ms ); /* Suppress the hilarious rotating focus outline on Firefox */ -- To view, visit https://gerrit.wikimedia.org/r/368803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30e0642d3cb93c4d9a8b2bdfb7f04912d8ca8649 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Rammanojpotla Gerrit-Reviewer: 20after4 Gerrit-Reviewer: Aklapper Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jdlrobson 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]: RCFilters: Make 'lastRevision' filter include non-rev types
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379614 ) Change subject: RCFilters: Make 'lastRevision' filter include non-rev types .. RCFilters: Make 'lastRevision' filter include non-rev types Make 'lastRevision' filter behave like its predecessor (expanded) by including the non-rev types (RC_LOG and others added via hook). Bug: T176328 Change-Id: I2312fd536716f0b07637ed4caf225650a4ffe70c --- M includes/specialpage/ChangesListSpecialPage.php 1 file changed, 19 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/14/379614/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index dd0dd92..d3be680 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -84,6 +84,9 @@ public function __construct( $name, $restriction ) { parent::__construct( $name, $restriction ); + $nonRevisionTypes = [ RC_LOG ]; + Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', [ &$nonRevisionTypes ] ); + $this->filterGroupDefinitions = [ [ 'name' => 'registration', @@ -322,8 +325,14 @@ 'description' => 'rcfilters-filter-lastrevision-description', 'default' => false, 'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds, - &$query_options, &$join_conds ) { - $conds[] = 'rc_this_oldid <> page_latest'; + &$query_options, &$join_conds ) use ( $nonRevisionTypes ) { + $conds[] = $dbr->makeList( + [ + 'rc_this_oldid <> page_latest', + 'rc_type' => $nonRevisionTypes, + ], + LIST_OR + ); }, 'cssClassSuffix' => 'last', 'isRowApplicableCallable' => function ( $ctx, $rc ) { @@ -336,8 +345,14 @@ 'description' => 'rcfilters-filter-previousrevision-description', 'default' => false, 'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables, &$fields, &$conds, - &$query_options, &$join_conds ) { - $conds[] = 'rc_this_oldid = page_latest'; + &$query_options, &$join_conds ) use ( $nonRevisionTypes ) { + $conds[] = $dbr->makeList( + [ + 'rc_this_oldid = page_latest', + 'rc_type' => $nonRevisionTypes, + ], + LIST_OR + ); }, 'cssClassSuffix' => 'previous', 'isRowApplicableCallable' => function ( $ctx, $rc ) { -- To view, visit https://gerrit.wikimedia.org/r/379614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2312fd536716f0b07637ed4caf225650a4ffe70c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Use permissions hook to prevent unlimited dedupe
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379601 ) Change subject: Use permissions hook to prevent unlimited dedupe .. Use permissions hook to prevent unlimited dedupe Instead of pageRun hook, which fires too late Bug: T175382 Change-Id: I76462daaed35106ad57f2751c4a284e4d0b5f069 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 18 insertions(+), 9 deletions(-) Approvals: Mepps: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index dc81149..aa4b536 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -3701,24 +3701,33 @@ $message .= 'Queries : ' . print_r( $queries, true ) . '. '; $message .= 'Stack trace: ' . CRM_Core_Error::formatBacktrace( debug_backtrace() ); - watchdog( 'wmf_civicrm', $message, WATCHDOG_INFO ); + watchdog( 'wmf_civicrm', $message, array(), WATCHDOG_INFO ); return TRUE; } /** - * Block users from accessing the dedupe page without a limit. + * Abuse the permissions hook to prevent de-duping without a limit * - * @param CRM_Core_Page $page + * @param string $permission + * @param bool $granted + * @return bool */ -function wmf_civicrm_civicrm_pageRun(&$page) { - if (get_class($page) == 'CRM_Contact_Page_DedupeFind') { -$action = $page->get('action'); -if (!CRM_Utils_Request::retrieve('limit', 'Integer') && ($action != CRM_Core_Action::PREVIEW)) { - CRM_Core_Error::statusBounce(ts('The dedupe page can only be accessed with a limit. How did you get there without one? Tell fr-tech'), 'civicrm/contact/deduperules?reset=1'); +function wmf_civicrm_civicrm_permission_check($permission, &$granted) { + if ( $permission === 'merge duplicate contacts' ) { +$action = CRM_Utils_Request::retrieve( 'action', 'String' ); +$path = CRM_Utils_System::currentPath(); +if ( + $path === 'civicrm/contact/dedupefind' && + !CRM_Utils_Request::retrieve( 'limit', 'Integer' ) && + ( $action != CRM_Core_Action::PREVIEW ) + ) { + $granted = false; } } + return TRUE; +} -}/** +/** * @param array $blocks * @param array $lowerPriorityLocationBlock * @param array $block -- To view, visit https://gerrit.wikimedia.org/r/379601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I76462daaed35106ad57f2751c4a284e4d0b5f069 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg Gerrit-Reviewer: Mepps Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Guard against empty nodes
Arlolra has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379613 ) Change subject: Guard against empty nodes .. Guard against empty nodes Bug: T174774 Change-Id: Iec82a3ad2099c3c7205db230292bf084dec38412 --- M src/ce/selections/ve.ce.LinearSelection.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/13/379613/1 diff --git a/src/ce/selections/ve.ce.LinearSelection.js b/src/ce/selections/ve.ce.LinearSelection.js index 216783f..c16c2c5 100644 --- a/src/ce/selections/ve.ce.LinearSelection.js +++ b/src/ce/selections/ve.ce.LinearSelection.js @@ -154,7 +154,7 @@ } else if ( node.nodeType === Node.ELEMENT_NODE && ( offset === 0 || offset === node.childNodes.length ) ) { node = offset ? node.lastChild : node.firstChild; // Nail heights are 0, so use the annotation's height - if ( node.classList.contains( 've-ce-nail' ) ) { + if ( node && node.classList.contains( 've-ce-nail' ) ) { annotationNode = offset ? node.previousSibling : node.nextSibling; fixHeight = annotationNode.getClientRects()[ 0 ].height; } -- To view, visit https://gerrit.wikimedia.org/r/379613 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec82a3ad2099c3c7205db230292bf084dec38412 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor 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]: Configure agent to export Cassandra histogram metrics
Eevans has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379610 ) Change subject: Configure agent to export Cassandra histogram metrics .. Configure agent to export Cassandra histogram metrics Adds a new rule matching Cassandra histogram metrics. Additionally, filters `type=ColumnFamily` (redundant to `type=Table`), `type=Keyspace`, and any metrics for the `meta` tables (all more or less consistent with what is done in cassandra-metrics-collector). Bug: T171772 Change-Id: If73b32fe30aa2b29bf9a585ca31ea3afda6bf059 --- R modules/cassandra/files/prometheus_jmx_exporter-2.1.yaml A modules/cassandra/files/prometheus_jmx_exporter-2.2.yaml A modules/cassandra/files/prometheus_jmx_exporter-3.x.yaml A modules/cassandra/files/prometheus_jmx_exporter-dev.yaml M modules/cassandra/manifests/instance.pp 5 files changed, 25 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/379610/1 diff --git a/modules/cassandra/files/prometheus_jmx_exporter.yaml b/modules/cassandra/files/prometheus_jmx_exporter-2.1.yaml similarity index 100% rename from modules/cassandra/files/prometheus_jmx_exporter.yaml rename to modules/cassandra/files/prometheus_jmx_exporter-2.1.yaml diff --git a/modules/cassandra/files/prometheus_jmx_exporter-2.2.yaml b/modules/cassandra/files/prometheus_jmx_exporter-2.2.yaml new file mode 12 index 000..f18d738 --- /dev/null +++ b/modules/cassandra/files/prometheus_jmx_exporter-2.2.yaml @@ -0,0 +1 @@ +prometheus_jmx_exporter-2.1.yaml \ No newline at end of file diff --git a/modules/cassandra/files/prometheus_jmx_exporter-3.x.yaml b/modules/cassandra/files/prometheus_jmx_exporter-3.x.yaml new file mode 100644 index 000..58eb0a0 --- /dev/null +++ b/modules/cassandra/files/prometheus_jmx_exporter-3.x.yaml @@ -0,0 +1,21 @@ +--- +lowercaseOutputLabelNames: true +lowercaseOutputName: true +blacklistObjectNames: + - "org.apache.cassandra.metrics:type=ColumnFamily,*" + - "org.apache.cassandra.metrics:type=Keyspace,*" +rules: + - pattern: org.apache.cassandra.metrics<>(Count|Value) +name: cassandra_$1_$3 +labels: + address: "$2" + - pattern: org.apache.cassandra.metrics<>(50|75|95|99)thPercentile +name: cassandra_$1_$5_$6p +labels: + "$1": "$4" + "$2": "$3" + - pattern: org.apache.cassandra.metrics<>(Count|Value) +name: cassandra_$1_$5 +labels: + "$1": "$4" + "$2": "$3" diff --git a/modules/cassandra/files/prometheus_jmx_exporter-dev.yaml b/modules/cassandra/files/prometheus_jmx_exporter-dev.yaml new file mode 12 index 000..0f1b806 --- /dev/null +++ b/modules/cassandra/files/prometheus_jmx_exporter-dev.yaml @@ -0,0 +1 @@ +prometheus_jmx_exporter-3.x.yaml \ No newline at end of file diff --git a/modules/cassandra/manifests/instance.pp b/modules/cassandra/manifests/instance.pp index 955d16f..8890080 100644 --- a/modules/cassandra/manifests/instance.pp +++ b/modules/cassandra/manifests/instance.pp @@ -213,7 +213,7 @@ # the following parameters have defaults that are sane both for single- # and multi-instances -$jmx_exporter_enabled = false, +$jmx_exporter_enabled = false, $num_tokens = 256, $authenticator= true, $authorizor = true, @@ -416,7 +416,7 @@ file { "${config_directory}/prometheus_jmx_exporter.yaml": ensure => present, -source => "puppet:///modules/${module_name}/prometheus_jmx_exporter.yaml", +source => "puppet:///modules/${module_name}/prometheus_jmx_exporter-${target_version}.yaml", owner => 'cassandra', group => 'cassandra', mode=> '0400', -- To view, visit https://gerrit.wikimedia.org/r/379610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If73b32fe30aa2b29bf9a585ca31ea3afda6bf059 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Eevans ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Convert publishSettings widget to a toolbar group
Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379606 ) Change subject: Convert publishSettings widget to a toolbar group .. Convert publishSettings widget to a toolbar group Change-Id: Ic891bacd2db1ff86e37f83e3546f918de3abe60a --- M extension.json M modules/ui/mw.cx.ui.TranslationView.js M modules/ui/styles/mw.cx.ui.TranslationView.less A modules/ve-cx/ui/ve.ui.CXDestinationTool.js 4 files changed, 145 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/06/379606/1 diff --git a/extension.json b/extension.json index ee7d6ad..ec01ed5 100644 --- a/extension.json +++ b/extension.json @@ -1265,6 +1265,7 @@ "ve-cx/ce/ve.ce.CXSentenceSegmentAnnotation.js", "ve-cx/ce/ve.ce.CXSectionNode.js", "ve-cx/ce/ve.ce.CXPlaceholderNode.js", + "ve-cx/ui/ve.ui.CXDestinationTool.js", "ve-cx/ui/ve.ui.CXTranslationUnitContextItem.js", "ve-cx/ui/ve.ui.CXLinkContextItem.js", "ve-cx/ui/ve.ui.CXLinkAnnotationInspector.js", @@ -1276,7 +1277,12 @@ "ve-cx/ui/styles/ve.ui.CXSurface.css" ], "messages": [ - "cx-linkcontextitem-title" + "cx-linkcontextitem-title", + "cx-publish-destination-header", + "cx-publish-destination-tooltip", + "cx-publish-destination-namespace-main", + "cx-publish-destination-namespace-user", + "cx-publish-destination-namespace-draft" ], "dependencies": [ "ext.visualEditor.mediawiki", @@ -1419,7 +1425,6 @@ "mw.cx.tools", "mw.cx.ui.Header", "mw.cx.ui.TranslationUnits", - "mw.cx.ui.PublishSettingsWidget", "mw.cx.ui.SourceColumn", "mw.cx.ui.TargetColumn", "mw.cx.ui.ToolsColumn", diff --git a/modules/ui/mw.cx.ui.TranslationView.js b/modules/ui/mw.cx.ui.TranslationView.js index c78db5d..2d66879 100644 --- a/modules/ui/mw.cx.ui.TranslationView.js +++ b/modules/ui/mw.cx.ui.TranslationView.js @@ -29,7 +29,6 @@ this.translation = null; this.targetArticle = null; this.publishButton = null; - this.publishSettings = null; this.header = new mw.cx.ui.Header( config ); this.sourceColumn = new mw.cx.ui.SourceColumn( config ); this.targetColumn = new mw.cx.ui.TargetColumn( config ); @@ -68,13 +67,25 @@ /* Static properties */ mw.cx.ui.TranslationView.static.actionGroups = [ + // Help { include: [ 'help' ] }, + // Document options { type: 'list', icon: 'menu', indicator: null, title: ve.msg( 'visualeditor-pagemenu-tooltip' ), include: [ 'meta', 'categories', 'settings', 'advancedSettings', 'languages', 'templatesUsed', 'changeDirectionality', 'findAndReplace' ] + }, + // Publish destination + { + header: OO.ui.deferMsg( 'cx-publish-destination-header' ), + title: OO.ui.deferMsg( 'cx-publish-destination-tooltip' ), + icon: 'advanced', + indicator: null, + classes: [ 've-init-mw-cxTarget-publishGroup' ], + type: 'menu', + include: [ { group: 'cxDestination' } ] } ]; @@ -118,7 +129,7 @@ /* Methods */ mw.cx.ui.TranslationView.prototype.setupToolbar = function () { - var publishButton, publishSettings; + var publishButton; // Parent method mw.cx.ui.TranslationView.super.prototype.setupToolbar.apply( this, arguments ); @@ -129,21 +140,14 @@ classes: [ 'cx-header__publish-button' ], label: mw.msg( 'cx-publish-button' ) } ); - publishSettings = new mw.cx.ui.PublishSettingsWidget( { - destination: mw.cx.getDefaultTargetNamespace() - } ); publishButton.connect( this, { click: 'onPublishButtonClick' - } ); - publishSettings.connect( this, { - choose: 'onPublishNamespaceChange' } ); mw.hook( 'mw.cx.progress' ).add( function ( weights ) { publishButton.setDisabled( weights.any === 0 ); } ); this.publishButton = publishButton; - this.publishSettings = publishSettings; -
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Print styles: fix breaking of table of contents
Bmansurov has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379605 ) Change subject: Print styles: fix breaking of table of contents .. Print styles: fix breaking of table of contents By changing the display of the table of contents we'll make sure that it doesn't try to occupy the whole page width. This is useful when an infobox is floated to the right of the table of contents. Bug: T174957 Change-Id: Ifc808bdd2b65867d14278b12735103c761fb8111 --- M print.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/05/379605/1 diff --git a/print.less b/print.less index 2011d05..441d9cf 100644 --- a/print.less +++ b/print.less @@ -162,7 +162,7 @@ page-break-after: avoid; background: none; border: 0; - display: block; + display: table; a { border: 0; -- To view, visit https://gerrit.wikimedia.org/r/379605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc808bdd2b65867d14278b12735103c761fb8111 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Bmansurov ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Don't delete stuff from the pagetriage_log
Kaldari has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379604 ) Change subject: Don't delete stuff from the pagetriage_log .. Don't delete stuff from the pagetriage_log Bug: T168335 Change-Id: Id589a6f50d5171af8d2360d9d54f3f85d15cd79d --- M cron/updatePageTriageQueue.php M includes/PageTriage.php 2 files changed, 1 insertion(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage refs/changes/04/379604/1 diff --git a/cron/updatePageTriageQueue.php b/cron/updatePageTriageQueue.php index 3134ba2..b1e3dd6 100644 --- a/cron/updatePageTriageQueue.php +++ b/cron/updatePageTriageQueue.php @@ -99,12 +99,6 @@ __METHOD__, [] ); - $this->dbw->delete( - 'pagetriage_log', - [ 'ptrl_page_id' => $pageId ], - __METHOD__, - [] - ); $articleMetadata = new ArticleMetadata( $pageId ); $articleMetadata->deleteMetadata(); diff --git a/includes/PageTriage.php b/includes/PageTriage.php index e22bc79..1bb43ba 100644 --- a/includes/PageTriage.php +++ b/includes/PageTriage.php @@ -224,7 +224,7 @@ } /** -* Delete the page from page triage queue and log +* Delete the page from page triage queue */ public function deleteFromPageTriage() { $dbw = wfGetDB( DB_MASTER ); @@ -236,12 +236,6 @@ $dbw->delete( 'pagetriage_page', [ 'ptrp_page_id' => $this->mPageId ], - __METHOD__, - [] - ); - $dbw->delete( - 'pagetriage_log', - [ 'ptrl_page_id' => $this->mPageId ], __METHOD__, [] ); -- To view, visit https://gerrit.wikimedia.org/r/379604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id589a6f50d5171af8d2360d9d54f3f85d15cd79d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageTriage Gerrit-Branch: master Gerrit-Owner: Kaldari ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use #setupToolbar method to prepare publish button
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379581 ) Change subject: Use #setupToolbar method to prepare publish button .. Use #setupToolbar method to prepare publish button Change-Id: I346cd5f0639b6d53bf9b038d205634b5a875f337 --- M modules/ui/mw.cx.ui.TranslationView.js 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Divec: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ui/mw.cx.ui.TranslationView.js b/modules/ui/mw.cx.ui.TranslationView.js index 628f828..4317e7c 100644 --- a/modules/ui/mw.cx.ui.TranslationView.js +++ b/modules/ui/mw.cx.ui.TranslationView.js @@ -31,7 +31,6 @@ this.publishButton = null; this.publishSettings = null; this.header = new mw.cx.ui.Header( config ); - this.preparePublishButton(); this.sourceColumn = new mw.cx.ui.SourceColumn( config ); this.targetColumn = new mw.cx.ui.TargetColumn( config ); this.toolsColumn = new mw.cx.ui.ToolsColumn( config ); @@ -105,8 +104,12 @@ /* Methods */ -mw.cx.ui.TranslationView.prototype.preparePublishButton = function () { +mw.cx.ui.TranslationView.prototype.setupToolbar = function () { var publishButton, publishSettings; + + // Parent method + mw.cx.ui.TranslationView.super.prototype.setupToolbar.apply( this, arguments ); + publishButton = new OO.ui.ButtonWidget( { disabled: true, flags: [ 'progressive', 'primary' ], @@ -127,7 +130,6 @@ } ); this.publishButton = publishButton; this.publishSettings = publishSettings; - // this.header.$toolbar.prepend( this.publishSettings.$element, this.publishButton.$element ); this.getToolbar().$actions.append( this.publishSettings.$element, this.publishButton.$element ); }; -- To view, visit https://gerrit.wikimedia.org/r/379581 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I346cd5f0639b6d53bf9b038d205634b5a875f337 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Catrope Gerrit-Reviewer: DLynch Gerrit-Reviewer: Divec 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...JsonConfig[master]: Stop no-content-available warning
Hello Reedy, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/379603 to review the following change. Change subject: Stop no-content-available warning .. Stop no-content-available warning It's mostly harmless and nobody looks at this log Change-Id: I906fb4a0541cd7a8a47039f80762704bc2186fc6 --- M includes/JCCache.php 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig refs/changes/03/379603/1 diff --git a/includes/JCCache.php b/includes/JCCache.php index c852b2d..c538d5a 100644 --- a/includes/JCCache.php +++ b/includes/JCCache.php @@ -94,9 +94,6 @@ if ( !$value ) { $value = ''; $exp = 10; // caching an error condition for short time - wfLogWarning( - "No content is available, caching empty '$this->titleValue' for $exp seconds" - ); } elseif ( !is_string( $value ) ) { $value = $value->getNativeData(); } -- To view, visit https://gerrit.wikimedia.org/r/379603 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I906fb4a0541cd7a8a47039f80762704bc2186fc6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/JsonConfig Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Reedy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WLFilters: Live update and View newest
Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379602 ) Change subject: WLFilters: Live update and View newest .. WLFilters: Live update and View newest Moved handling for 'from', 'days' and 'limit' to base class (ChangesListSpecialPage) I moved 'days' because its implementation is related to 'from'. I moved 'limit' because it was getting lonely and it's identical in all cases. Bug: T176348 Change-Id: If6280ad6fbad65909e1d0b2a48344e24d485aca2 --- M includes/specialpage/ChangesListSpecialPage.php M includes/specials/SpecialRecentchanges.php M includes/specials/SpecialWatchlist.php M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js M resources/src/mediawiki.rcfilters/mw.rcfilters.js 5 files changed, 27 insertions(+), 80 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/02/379602/1 diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index dd0dd92..bfcd0f3 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -944,6 +944,11 @@ $opts->add( 'urlversion', 1 ); $opts->add( 'tagfilter', '' ); + $opts->add( 'days', $this->getDefaultDays(), FormOptions::FLOAT ); + $opts->add( 'limit', $this->getDefaultLimit(), FormOptions::INT ); + + $opts->add( 'from', '' ); + return $opts; } @@ -1097,6 +1102,9 @@ $query = wfArrayToCgi( $this->convertParamsForLink( $opts->getChangedValues() ) ); $this->getOutput()->redirect( $this->getPageTitle()->getCanonicalURL( $query ) ); } + + $opts->validateIntBounds( 'limit', 0, 5000 ); + $opts->validateBounds( 'days', 0, $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 * 24 ) ); } /** @@ -1236,6 +1244,19 @@ } $conds[] = "rc_namespace $operator $value"; } + + // Calculate cutoff + $cutoff_unixtime = time() - $opts['days'] * 3600 * 24; + $cutoff = $dbr->timestamp( $cutoff_unixtime ); + + $fromValid = preg_match( '/^[0-9]{14}$/', $opts['from'] ); + if ( $fromValid && $opts['from'] > wfTimestamp( TS_MW, $cutoff ) ) { + $cutoff = $dbr->timestamp( $opts['from'] ); + } else { + $opts->reset( 'from' ); + } + + $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff ); } /** diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 40834cb..3fb8f0d 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -164,10 +164,6 @@ true ); parent::execute( $subpage ); - - if ( $this->isStructuredFilterUiEnabled() ) { - $out->addJsConfigVars( 'wgStructuredChangeFiltersLiveUpdateSupported', true ); - } } /** @@ -232,10 +228,6 @@ public function getDefaultOptions() { $opts = parent::getDefaultOptions(); - $opts->add( 'days', $this->getDefaultDays(), FormOptions::FLOAT ); - $opts->add( 'limit', $this->getDefaultLimit() ); - $opts->add( 'from', '' ); - $opts->add( 'categories', '' ); $opts->add( 'categories_any', false ); @@ -285,36 +277,6 @@ $opts['tagfilter'] = $m[1]; } } - } - - public function validateOptions( FormOptions $opts ) { - $opts->validateIntBounds( 'limit', 0, 5000 ); - $opts->validateBounds( 'days', 0, $this->getConfig()->get( 'RCMaxAge' ) / ( 3600 * 24 ) ); - parent::validateOptions( $opts ); - } - - /** -* @inheritDoc -*/ - protected function buildQuery( &$tables, &$fields, &$conds, - &$query_options, &$join_conds, FormOptions $opts - ) { - $dbr = $this->getDB(); - parent::buildQuery( $tables, $fields, $conds, - $query_options, $join_conds, $opts ); - - // Calculate cutoff - $cutoff_unixtime = time() - $opts['days'] * 3600 * 24; - $cutoff = $dbr->timestamp( $cutoff_unixtime ); - - $fromValid = preg_match( '/^[0-9]{14}$/', $opts['from'] ); - if ( $fromValid && $opts['from'] > wfTimestamp( TS_MW, $cutoff ) ) { - $cutoff = $dbr->timestamp( $opts['from'] ); - } else { - $opts->reset( 'fr
[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Restrict `opacity` to non-flagged icons only
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379162 ) Change subject: demos: Restrict `opacity` to non-flagged icons only .. demos: Restrict `opacity` to non-flagged icons only Also make opacity follow base text color. Change-Id: I60532da11bcb52de314dc7f750c192839b0f31f6 --- M demos/styles/demo.css 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/demos/styles/demo.css b/demos/styles/demo.css index 76cebb1..733f980 100644 --- a/demos/styles/demo.css +++ b/demos/styles/demo.css @@ -280,18 +280,18 @@ .demo-icons .oo-ui-fieldLayout:nth-child( 4n ) { margin-right: 0; } - -.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement, +/* stylelint-disable indentation */ +.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement:not( .oo-ui-image-progressive ):not( .oo-ui-image-destructive ), .demo-icons .oo-ui-fieldLayout .oo-ui-indicatorElement { - opacity: 0.8; /* brings icons/indicators closer to text color */ + opacity: 0.87; /* brings icons/indicators closer to text color */ } - +/* stylelint-enable indentation */ .demo-icons .oo-ui-fieldLayout:hover .oo-ui-labelElement-label { color: #000; } .demo-icons .oo-ui-fieldLayout:hover .oo-ui-iconElement, .demo-icons .oo-ui-fieldLayout:hover .oo-ui-indicatorElement { - opacity: 1; + opacity: 1 !important; /* stylelint-disable-line declaration-no-important */ } /* Widgets demo */ -- To view, visit https://gerrit.wikimedia.org/r/379162 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60532da11bcb52de314dc7f750c192839b0f31f6 Gerrit-PatchSet: 2 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Jforrester Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: WIP Use permissions hook to prevent unlimited dedupe
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379601 ) Change subject: WIP Use permissions hook to prevent unlimited dedupe .. WIP Use permissions hook to prevent unlimited dedupe Instead of pageRun hook, which fires too late Bug: T175382 Change-Id: I76462daaed35106ad57f2751c4a284e4d0b5f069 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 13 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/01/379601/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index dc81149..821b90b 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -3701,24 +3701,28 @@ $message .= 'Queries : ' . print_r( $queries, true ) . '. '; $message .= 'Stack trace: ' . CRM_Core_Error::formatBacktrace( debug_backtrace() ); - watchdog( 'wmf_civicrm', $message, WATCHDOG_INFO ); + watchdog( 'wmf_civicrm', $message, array(), WATCHDOG_INFO ); return TRUE; } /** - * Block users from accessing the dedupe page without a limit. + * Abuse the permissions hook to prevent de-duping without a limit * - * @param CRM_Core_Page $page + * @param string $permission + * @param bool $granted + * @return bool */ -function wmf_civicrm_civicrm_pageRun(&$page) { - if (get_class($page) == 'CRM_Contact_Page_DedupeFind') { -$action = $page->get('action'); -if (!CRM_Utils_Request::retrieve('limit', 'Integer') && ($action != CRM_Core_Action::PREVIEW)) { - CRM_Core_Error::statusBounce(ts('The dedupe page can only be accessed with a limit. How did you get there without one? Tell fr-tech'), 'civicrm/contact/deduperules?reset=1'); +function wmf_civicrm_civicrm_permission_check($permission, &$granted) { + if ( $permission === 'merge duplicate contacts' ) { +$action = CRM_Utils_Request::retrieve( 'action', 'String' ); +if ( !CRM_Utils_Request::retrieve( 'limit', 'Integer' ) && ( $action != CRM_Core_Action::PREVIEW ) ) { + $granted = false; } } + return TRUE; +} -}/** +/** * @param array $blocks * @param array $lowerPriorityLocationBlock * @param array $block -- To view, visit https://gerrit.wikimedia.org/r/379601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76462daaed35106ad57f2751c4a284e4d0b5f069 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits