[MediaWiki-commits] [Gerrit] add labstore200[3-4] to site.pp, like existing [1-2] - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: add labstore200[3-4] to site.pp, like existing [1-2] .. add labstore200[3-4] to site.pp, like existing [1-2] Add labstore200[3-4] to site.pp, simply by extending the existing regex. I assume all servers are just "role labs::nfs::fileserver" like before, but adding Rush to confirm that. Bug:T128764 Change-Id: I8f40b73f32a5aa474c6d2093c9efc619bdf906ce --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 8b80722..1a5331d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1405,7 +1405,7 @@ role labs::nfs::extras } -node /labstore200[12]\.codfw\.wmnet/ { +node /labstore200[1-4]\.codfw\.wmnet/ { $cluster = 'labsnfs' role labs::nfs::fileserver } -- To view, visit https://gerrit.wikimedia.org/r/277716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f40b73f32a5aa474c6d2093c9efc619bdf906ce Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: Papaul Gerrit-Reviewer: RobH Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add labstore200[3-4] to site.pp, like existing [1-2] - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/277716 Change subject: add labstore200[3-4] to site.pp, like existing [1-2] .. add labstore200[3-4] to site.pp, like existing [1-2] Add labstore200[3-4] to site.pp, simply by extending the existing regex. This is only correct if they are supposed to use the same classes as 200[1-2]. Adding Chase for that. Bug:T128764 Change-Id: I8f40b73f32a5aa474c6d2093c9efc619bdf906ce --- M manifests/site.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/277716/1 diff --git a/manifests/site.pp b/manifests/site.pp index 8b80722..370effd 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1405,7 +1405,7 @@ role labs::nfs::extras } -node /labstore200[12]\.codfw\.wmnet/ { +node /labstore200[1234]\.codfw\.wmnet/ { $cluster = 'labsnfs' role labs::nfs::fileserver } -- To view, visit https://gerrit.wikimedia.org/r/277716 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f40b73f32a5aa474c6d2093c9efc619bdf906ce Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] partman: use lvm-ext-srv.cfg for labstore200[3-4] - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: partman: use lvm-ext-srv.cfg for labstore200[3-4] .. partman: use lvm-ext-srv.cfg for labstore200[3-4] Papaul has written a new partman recipe in Ib216daf905b21, as it was requested on T128764#2123686. Use it for labstore200[3-4] now so he can go ahead and install. Bug:T128764 Change-Id: I61636e4131a7e27226f4d6a1f42c27a085df1890 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 5c37555..772d064 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -86,6 +86,7 @@ labsdb100[45]) echo partman/osmlabsdb.cfg ;; \ labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \ labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \ +labstore200[3-4]) echo partman/lvm-ext-srv.cfg ;; \ labtestneutron2001) echo partman/mw.cfg ;; \ labtestnet2001) echo partman/raid1.cfg ;; \ labtestweb2001) echo partman/raid1.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/277715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61636e4131a7e27226f4d6a1f42c27a085df1890 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: Papaul Gerrit-Reviewer: RobH Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] partman: use lvm-ext-srv.cfg for labstore200[3-4] - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/277715 Change subject: partman: use lvm-ext-srv.cfg for labstore200[3-4] .. partman: use lvm-ext-srv.cfg for labstore200[3-4] Papaul has written a new partman recipe in Ib216daf905b21, as it was requested on T128764#2123686. Use it for labstore200[3-4] now so he can go ahead and use it. Bug:T128764 Change-Id: I61636e4131a7e27226f4d6a1f42c27a085df1890 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/277715/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 5c37555..5b41112 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -80,12 +80,13 @@ hydrogen) echo partman/raid1-1partition.cfg ;; \ kafka1013|kafka1014|kafka1020) echo partman/raid1-30G.cfg ;; \ kafka100[1-2]|kafka200[1-2]) echo partman/raid10-gpt-srv-ext4.cfg ;; \ - auth[1-2]001|einsteinium|labcontrol100[1-2]|labnodepool1001|lead|mira|neodymium|oresrdb100[1-2]|rdb200[1-6]|snapshot100[5-7]) echo partman/raid1-lvm-ext4-srv.cfg ;; \ + auth[1-2]001|einsteinium|labcontrol100[1-2]|labnodepool1001|lead|mira|neodymium|oresrdb100[1-2]|rdb200[1-6]) echo partman/raid1-lvm-ext4-srv.cfg ;; \ labmon1001) echo partman/raid1-lvm.cfg ;; \ labnet100[1-2]) echo partman/lvm.cfg ;; \ labsdb100[45]) echo partman/osmlabsdb.cfg ;; \ labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \ labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \ +labstore200[3-4]) echo partman/lvm-ext-srv.cfg ;; \ labtestneutron2001) echo partman/mw.cfg ;; \ labtestnet2001) echo partman/raid1.cfg ;; \ labtestweb2001) echo partman/raid1.cfg ;; \ @@ -132,5 +133,4 @@ virt101[0-2]) echo partman/virt-hp.cfg ;; \ wdqs100[1-9]) echo partman/lvm-wdqs.cfg ;; \ wtp[1-2]0[0-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ -wasat) echo partman/raid1-lvm-ext4-srv.cfg ;; \ esac -- To view, visit https://gerrit.wikimedia.org/r/277715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61636e4131a7e27226f4d6a1f42c27a085df1890 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] partman: New recipe for labstore200[3-4] Bug:T128764 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: partman: New recipe for labstore200[3-4] Bug:T128764 .. partman: New recipe for labstore200[3-4] Bug:T128764 Change-Id: Ib216daf905b219c7367808d465e6af9312e20fc6 --- A modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg 1 file changed, 55 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg b/modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg new file mode 100644 index 000..d7e4e73 --- /dev/null +++ b/modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg @@ -0,0 +1,55 @@ +# configuration to create: +# * no RAID (either single disk or hardware raid presenting a single device) +# * 300M on /boot outside of LVM +# * the rest formatted with LVM with 80% used +# ** 80G / ext4 in LVM +# ** no swap +# ** the rest as xfs on /srv + + +d-ipartman-auto/method string lvm +d-ipartman-auto/disk string /dev/sda + +# the install makes sure we want to wipe the lvm +d-ipartman-lvm/device_remove_lvm boolean true +d-ipartman-lvm/confirm boolean true +d-ipartman-lvm/confirm_nooverwrite true + +d-ipartman/confirm_nooverwrite true +d-ipartman/choose_partitionselect finish + +d-ipartman-auto/expert_recipe string es :: \ + 40 300 300 ext3 \ + $primary{ } \ + $bootable{ }\ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext3 } \ + mountpoint{ /boot } \ + . \ + 8 4 8 ext4 \ + $lvmok{ } \ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 64 1000 1000 ext4 \ + $primary{ } \ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + lv_name{ data } \ + $defaultignore{ } \ + $lvmok{ } \ + mountpoint{ /srv } \ + . + +d-ipartman-auto-lvm/guided_sizestring 80% + +d-ipartman-auto/choose_recipe es +partman-basicfilesystems partman-basicfilesystems/no_swap boolean false + -- To view, visit https://gerrit.wikimedia.org/r/277709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib216daf905b219c7367808d465e6af9312e20fc6 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.UploadWizardUpload: Disentangle JPEG metadata from fillin... - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/277714 Change subject: mw.UploadWizardUpload: Disentangle JPEG metadata from filling uploads .. mw.UploadWizardUpload: Disentangle JPEG metadata from filling uploads As far as I can tell (it's hard to tell because it's entangled), we only use this to render the thumbnails with the right rotation and aspect ratio. So let's just do it as part of the thumbnail generation. This should let us make other stuff less horrible. In particular, this means that the this.uploads array now holds uploads in the same order in which they were created (and in which they're shown in the interface), which in turn results in UW uploading files in the same order, and which allows us to remove some crappy sorting from elsewhere (added in a37bba8dbc2e87b108c7e22c7ef0dabe847f07c5). Change-Id: Ie9c0098074320a1fb9e63acab5672965f37a4700 --- M resources/controller/uw.controller.Step.js M resources/mw.UploadWizardUpload.js 2 files changed, 56 insertions(+), 63 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/14/277714/1 diff --git a/resources/controller/uw.controller.Step.js b/resources/controller/uw.controller.Step.js index c1fbef6..64804b1 100644 --- a/resources/controller/uw.controller.Step.js +++ b/resources/controller/uw.controller.Step.js @@ -88,18 +88,6 @@ this.uploads = uploads || []; - // Keep the uploads sorted in the order they were created in initially. - this.uploads = this.uploads.sort( function ( uploadA, uploadB ) { - // Can the uploads be undefined? Code below would imply they can, no idea how. - if ( !uploadA ) { - return 1; - } - if ( !uploadB ) { - return -1; - } - return uploadA.index - uploadB.index; - } ); - $.each( this.uploads, function ( i, upload ) { if ( upload !== undefined ) { upload.state = step.stepName; diff --git a/resources/mw.UploadWizardUpload.js b/resources/mw.UploadWizardUpload.js index 907bebf..2c7ef79 100644 --- a/resources/mw.UploadWizardUpload.js +++ b/resources/mw.UploadWizardUpload.js @@ -463,55 +463,8 @@ this.imageinfo = {}; } this.filename = filename; - - // For JPEGs, we use the JsJpegMeta library in core to extract metadata, - // including EXIF tags. This is done asynchronously once each file has been - // read. Only then is the file properly added to UploadWizard via fileChangedOk(). - // - // For all other file types, we don't need or want to run this. - // - // TODO: This should be refactored. - - if ( this.file.type === 'image/jpeg' ) { - binReader = new FileReader(); - binReader.onload = function () { - var binStr, arr, i, meta; - if ( typeof binReader.result === 'string' ) { - binStr = binReader.result; - } else { - // Array buffer; convert to binary string for the library. - arr = new Uint8Array( binReader.result ); - binStr = ''; - for ( i = 0; i < arr.byteLength; i++ ) { - binStr += String.fromCharCode( arr[ i ] ); - } - } - try { - meta = mw.libs.jpegmeta( binStr, upload.file.fileName ); - // jscs:disable requireCamelCaseOrUpperCaseIdentifiers, disallowDanglingUnderscores - meta._binary_data = null; -
[MediaWiki-commits] [Gerrit] uw.controller.Step: Emit 'load' earlier, so that mw.UploadWi... - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/277713 Change subject: uw.controller.Step: Emit 'load' earlier, so that mw.UploadWizard#removeErrorUploads works .. uw.controller.Step: Emit 'load' earlier, so that mw.UploadWizard#removeErrorUploads works We have this event handler defined in mw.UploadWizard: deeds: new uw.controller.Deed( this.api, this.config ) .on( 'load', function () { wizard.removeErrorUploads(); } ), But here, before we we emitted 'load', we did this: $.each( this.uploads, function ( i, upload ) { if ( upload !== undefined ) { upload.state = step.stepName; } } ); This would clear the 'error' state from each upload (replacing it with 'deeds'), and so none of the errored upload would be removed. They would then inevitably fail in the Details step, where they can't be removed. This is very brittle, maybe we can do this in a different way later. Change-Id: I89095f07e97fed9255a43ecf3a9191b541b51dab --- M resources/controller/uw.controller.Step.js 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/13/277713/1 diff --git a/resources/controller/uw.controller.Step.js b/resources/controller/uw.controller.Step.js index 10084e4..c1fbef6 100644 --- a/resources/controller/uw.controller.Step.js +++ b/resources/controller/uw.controller.Step.js @@ -82,6 +82,10 @@ this.movedFrom = false; + // Through some very convoluted route, this reached code in mw.UploadWizard that can + // remove items from the `uploads` array here. + this.emit( 'load' ); + this.uploads = uploads || []; // Keep the uploads sorted in the order they were created in initially. @@ -105,7 +109,6 @@ this.ui.moveTo( uploads ); ( new mw.UploadWizardTutorialEvent( 'load' ) ).dispatch(); uw.eventFlowLogger.logStep( this.stepName ); - this.emit( 'load' ); this.updateFileCounts( this.uploads ); }; -- To view, visit https://gerrit.wikimedia.org/r/277713 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89095f07e97fed9255a43ecf3a9191b541b51dab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mw.UploadWizard: Remove unused method #removeEmptyUploads - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/277711 Change subject: mw.UploadWizard: Remove unused method #removeEmptyUploads .. mw.UploadWizard: Remove unused method #removeEmptyUploads Unused since 59ebd690cab66fd1c97afe43d2abb35b66aaf10b, apparently? Definitely not needed after f9fe522b1594135201a65b9bccef4de3dc204d67. Change-Id: I9639665ada80d512a29a3cc40456d8bbaf252c98 --- M resources/mw.UploadWizard.js 1 file changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/11/277711/1 diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index 612b590..c1e3ef3 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -428,23 +428,6 @@ }, /** -* This is useful to clean out unused upload file inputs if the user hits GO. -* We are using a second array to iterate, because we will be splicing the main one, _this.uploads -*/ - removeEmptyUploads: function () { - - // First remove array keys that don't have an assigned upload object - this.uploads = $.grep( this.uploads, - function ( v ) { return v !== undefined; } - ); - - // Now remove upload objects that exist but are empty - this.removeMatchingUploads( function ( upload ) { - return mw.isEmpty( upload.filename ); - } ); - }, - - /** * Clear out uploads that are in error mode, perhaps before proceeding to the next step */ removeErrorUploads: function () { -- To view, visit https://gerrit.wikimedia.org/r/277711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9639665ada80d512a29a3cc40456d8bbaf252c98 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] uw.controller.Upload: Only reset failed uploads when we real... - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/277712 Change subject: uw.controller.Upload: Only reset failed uploads when we really mean to retry them .. uw.controller.Upload: Only reset failed uploads when we really mean to retry them Previously, any time a new file was added, all previously failed files would be uploaded again. Change-Id: I219507523879a77c08476ae8af306633d6284b66 --- M resources/controller/uw.controller.Upload.js 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/12/277712/1 diff --git a/resources/controller/uw.controller.Upload.js b/resources/controller/uw.controller.Upload.js index 8a79247..366761b 100644 --- a/resources/controller/uw.controller.Upload.js +++ b/resources/controller/uw.controller.Upload.js @@ -146,19 +146,6 @@ this.ui.hideEndButtons(); - // reset any uploads in error state back to be shiny & new - $.each( this.uploads, function ( i, upload ) { - if ( upload === undefined ) { - return; - } - - if ( upload.state === 'error' ) { - upload.state = 'new'; - upload.ui.clearIndicator(); - upload.ui.clearStatus(); - } - } ); - // remove ability to change files // ideally also hide the "button"... but then we require styleable file input CSS trickery // although, we COULD do this just for files already in progress... @@ -173,6 +160,20 @@ uw.controller.Upload.prototype.retry = function () { uw.eventFlowLogger.logEvent( 'retry-uploads-button-clicked' ); + + // reset any uploads in error state back to be shiny & new + $.each( this.uploads, function ( i, upload ) { + if ( upload === undefined ) { + return; + } + + if ( upload.state === 'error' ) { + upload.state = 'new'; + upload.ui.clearIndicator(); + upload.ui.clearStatus(); + } + } ); + this.startUploads(); }; -- To view, visit https://gerrit.wikimedia.org/r/277712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I219507523879a77c08476ae8af306633d6284b66 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] uw.controller.Upload: Remove unused 'prevent-close' event - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/277710 Change subject: uw.controller.Upload: Remove unused 'prevent-close' event .. uw.controller.Upload: Remove unused 'prevent-close' event The only handler for this event was removed in 52016c78fda00954b672573e692582da31899ed2. Change-Id: I2cb0e5e186a701654614505f16b1dc0f9e6de9a5 --- M resources/controller/uw.controller.Upload.js 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/10/277710/1 diff --git a/resources/controller/uw.controller.Upload.js b/resources/controller/uw.controller.Upload.js index 39102c8..8a79247 100644 --- a/resources/controller/uw.controller.Upload.js +++ b/resources/controller/uw.controller.Upload.js @@ -135,14 +135,6 @@ }; /** -* Make sure the window doesn't get closed accidentally during upload. -*/ - uw.controller.Upload.prototype.transitionAll = function () { - this.emit( 'prevent-close' ); - return uw.controller.Step.prototype.transitionAll.call( this ); - }; - - /** * Kick off the upload processes. * Does some precalculations, changes the interface to be less mutable, moves the uploads to a queue, * and kicks off a thread which will take from the queue. -- To view, visit https://gerrit.wikimedia.org/r/277710 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2cb0e5e186a701654614505f16b1dc0f9e6de9a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] params: New recipe for labstore200[3-4] Bug:T128764 - change (operations/puppet)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/277709 Change subject: params: New recipe for labstore200[3-4] Bug:T128764 .. params: New recipe for labstore200[3-4] Bug:T128764 Change-Id: Ib216daf905b219c7367808d465e6af9312e20fc6 --- A modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg 1 file changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/277709/1 diff --git a/modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg b/modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg new file mode 100644 index 000..bc60525 --- /dev/null +++ b/modules/install_server/files/autoinstall/partman/lvm-ext-srv.cfg @@ -0,0 +1,55 @@ +# configuration to create: +# * no RAID (either single disk or hardware raid presenting a single device) +# * 300M on /boot outside of LVM +# * the rest formatted with LVM with 80% used +# ** 80G / ext4 in LVM +# ** no swap +# ** the rest as xfs on /srv + + +d-ipartman-auto/method string lvm +d-ipartman-auto/disk string /dev/sda + +# the install makes sure we want to wipe the lvm +d-ipartman-lvm/device_remove_lvm boolean true +d-ipartman-lvm/confirm boolean true +d-ipartman-lvm/confirm_nooverwrite true + +d-ipartman/confirm_nooverwrite true +d-ipartman/choose_partitionselect finish + +d-ipartman-auto/expert_recipe string es :: \ + 40 300 300 ext3 \ + $primary{ } \ + $bootable{ }\ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext3 } \ + mountpoint{ /boot } \ + . \ + 2 4 2 ext4 \ + $lvmok{ } \ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 64 1000 1000 ext4 \ + $primary{ } \ + method{ format }\ + format{ } \ + use_filesystem{ } \ + filesystem{ ext4 } \ + lv_name{ data } \ + $defaultignore{ } \ + $lvmok{ } \ + mountpoint{ /srv } \ + . + +d-ipartman-auto-lvm/guided_sizestring 80% + +d-ipartman-auto/choose_recipe es +partman-basicfilesystems partman-basicfilesystems/no_swap boolean false + -- To view, visit https://gerrit.wikimedia.org/r/277709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib216daf905b219c7367808d465e6af9312e20fc6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't lazy-init db column indices. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/277708 Change subject: Don't lazy-init db column indices. .. Don't lazy-init db column indices. Column indices can vary between different tables. In a subsequent patch, we can lazy-init the indices on a per-table basis. In the meantime, this fixes the current bug. Fortunately, there's no issue with the integrity of our db itself. Bug: T130086 Change-Id: Ied03ebdbe6986217b2838d82a6fdfc0d03b5baba --- M app/src/main/java/org/wikipedia/database/column/Column.java 1 file changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/08/277708/1 diff --git a/app/src/main/java/org/wikipedia/database/column/Column.java b/app/src/main/java/org/wikipedia/database/column/Column.java index 20bd14b..ec459a3 100644 --- a/app/src/main/java/org/wikipedia/database/column/Column.java +++ b/app/src/main/java/org/wikipedia/database/column/Column.java @@ -2,12 +2,10 @@ import android.database.Cursor; import android.support.annotation.NonNull; -import android.support.annotation.Nullable; public abstract class Column { @NonNull private final String name; @NonNull private final String type; -@Nullable private Integer index; /** * @param name Column name. @@ -48,9 +46,6 @@ } protected int getIndex(@NonNull Cursor cursor) { -if (index == null) { -index = cursor.getColumnIndexOrThrow(getName()); -} -return index; +return cursor.getColumnIndexOrThrow(getName()); } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/277708 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ied03ebdbe6986217b2838d82a6fdfc0d03b5baba Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Groundwork for bottom sheets, part 2. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/277707 Change subject: Groundwork for bottom sheets, part 2. .. Groundwork for bottom sheets, part 2. - Expanded our ExclusiveBottomSheetHandler to be able to support regular Dialogs, not just DialogFragments (although Dialogs won't be saved in the activity's savedInstanceState, but that's alright). - Made a simple descendant of BottomSheetDialog that automatically disables dimming of the background when it's shown, which we need for some of our bottom sheets. - Transitioned the ReferenceDialog, PageInfoDialog, and ShareDialog to be BottomSheetDialogs, some without dimming. - Goodbye, old "BottomDialog" class. Change-Id: If5047635859d7a6b31634deb4b7c96ffe4801881 --- D app/src/main/java/org/wikipedia/page/BottomDialog.java M app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java A app/src/main/java/org/wikipedia/page/NoDimBottomSheetDialog.java M app/src/main/java/org/wikipedia/page/PageActivity.java M app/src/main/java/org/wikipedia/page/PageFragment.java M app/src/main/java/org/wikipedia/page/PageInfoDialog.java M app/src/main/java/org/wikipedia/page/ReferenceDialog.java M app/src/main/java/org/wikipedia/page/snippet/ShareHandler.java 8 files changed, 108 insertions(+), 109 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/07/277707/1 diff --git a/app/src/main/java/org/wikipedia/page/BottomDialog.java b/app/src/main/java/org/wikipedia/page/BottomDialog.java deleted file mode 100644 index ccd66e4..000 --- a/app/src/main/java/org/wikipedia/page/BottomDialog.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.wikipedia.page; - -import org.wikipedia.R; - -import android.content.Context; -import android.support.annotation.LayoutRes; -import android.support.v7.app.AppCompatDialog; -import android.view.Gravity; -import android.view.LayoutInflater; -import android.view.View; -import android.view.WindowManager; - -/** - * A dialog that appears at the bottom of the page. - * - * It slides up when the dialog is opened, and down when the dialog is closed. - * Uses the R.style.BottomDialog style, which specifies the animation. - */ -public class BottomDialog extends AppCompatDialog { -private View dialogLayout; - -public BottomDialog(Context context, @LayoutRes int dialogLayoutResId) { -super(context, R.style.BottomDialog); - -LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); -dialogLayout = inflater.inflate(dialogLayoutResId, null); -setContentView(dialogLayout); - -WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); -lp.copyFrom(getWindow().getAttributes()); -lp.width = WindowManager.LayoutParams.MATCH_PARENT; -lp.height = WindowManager.LayoutParams.WRAP_CONTENT; -lp.gravity = Gravity.BOTTOM; -getWindow().setAttributes(lp); -} - -protected View getDialogLayout() { -return dialogLayout; -} -} diff --git a/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java b/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java index bce3014..f79e9da 100644 --- a/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java +++ b/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java @@ -1,11 +1,14 @@ package org.wikipedia.page; +import android.app.Dialog; +import android.content.DialogInterface; import android.support.v4.app.DialogFragment; import android.support.v4.app.FragmentActivity; public class ExclusiveBottomSheetHandler { private static final String BOTTOM_SHEET_FRAGMENT_TAG = "bottom_sheet_fragment"; private FragmentActivity activity; +private Dialog currentDialog; public ExclusiveBottomSheetHandler(FragmentActivity activity) { this.activity = activity; @@ -16,10 +19,26 @@ dialog.show(activity.getSupportFragmentManager(), BOTTOM_SHEET_FRAGMENT_TAG); } +public void show(Dialog dialog) { +dismiss(); +currentDialog = dialog; +currentDialog.setOnDismissListener(new DialogInterface.OnDismissListener() { +@Override +public void onDismiss(DialogInterface dialogInterface) { +currentDialog = null; +} +}); +currentDialog.show(); +} + public void dismiss() { DialogFragment dialog = (DialogFragment) activity.getSupportFragmentManager().findFragmentByTag(BOTTOM_SHEET_FRAGMENT_TAG); if (dialog != null) { dialog.dismiss(); } +if (currentDialog != null && currentDialog.isShowing()) { +currentDialog.dismiss(); +} +currentDialog = null; } } diff --git a/app/src/main/java/org/wikipedia/page/NoDimBottomSheetDialog.java
[MediaWiki-commits] [Gerrit] WIP: pull payment methods out of GC adapter - change (mediawiki...DonationInterface)
Cdentinger has uploaded a new change for review. https://gerrit.wikimedia.org/r/277706 Change subject: WIP: pull payment methods out of GC adapter .. WIP: pull payment methods out of GC adapter put them in yaml files !!! I am getting an error in this state that i think is from another patch: Fatal error: Undefined interface: GatewayType in /srv/core/extensions/DonationInterface/gateway_common/gateway.adapter.php on line 29 will investigate tomorrow Bug: T130056 Change-Id: Ic484fd15045bc978be78c456566ab19d3b01de69 --- M composer.json M composer.lock A globalcollect_gateway/config/payment_methods.yaml A globalcollect_gateway/config/payment_submethods.yaml M globalcollect_gateway/globalcollect.adapter.php 5 files changed, 372 insertions(+), 415 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/06/277706/1 diff --git a/composer.json b/composer.json index 04bc7b6..e708146 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,8 @@ "predis/predis": "1.*", "psr/log": "1.0.0", "zordius/lightncandy": "0.18", - "amzn/login-and-pay-with-amazon-sdk-php": "dev-master" + "amzn/login-and-pay-with-amazon-sdk-php": "dev-master", + "symfony/yaml": "^3.0" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 19ff33d..e746ce2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, "This file is @generated automatically" ], -"hash": "ff013da3789a0273f27c829cd90f8139", -"content-hash": "49fdfddba5b55ae89176be632d632ce7", +"hash": "aceecf8c101670b56e9b28c946ff9533", +"content-hash": "612235b1b32c77ed46898eacb77bc4c5", "packages": [ { "name": "amzn/login-and-pay-with-amazon-sdk-php", @@ -400,6 +400,55 @@ "time": "2012-12-21 11:40:51" }, { +"name": "symfony/yaml", +"version": "v3.0.3", +"source": { +"type": "git", +"url": "https://github.com/symfony/yaml.git;, +"reference": "b5ba64cd67ecd6887f63868fa781ca094bd1377c" +}, +"dist": { +"type": "zip", +"url": "https://api.github.com/repos/symfony/yaml/zipball/b5ba64cd67ecd6887f63868fa781ca094bd1377c;, +"reference": "b5ba64cd67ecd6887f63868fa781ca094bd1377c", +"shasum": "" +}, +"require": { +"php": ">=5.5.9" +}, +"type": "library", +"extra": { +"branch-alias": { +"dev-master": "3.0-dev" +} +}, +"autoload": { +"psr-4": { +"Symfony\\Component\\Yaml\\": "" +}, +"exclude-from-classmap": [ +"/Tests/" +] +}, +"notification-url": "https://packagist.org/downloads/;, +"license": [ +"MIT" +], +"authors": [ +{ +"name": "Fabien Potencier", +"email": "fab...@symfony.com" +}, +{ +"name": "Symfony Community", +"homepage": "https://symfony.com/contributors; +} +], +"description": "Symfony Yaml Component", +"homepage": "https://symfony.com;, +"time": "2016-02-23 15:16:06" +}, +{ "name": "zordius/lightncandy", "version": "v0.18", "source": { diff --git a/globalcollect_gateway/config/payment_methods.yaml b/globalcollect_gateway/config/payment_methods.yaml new file mode 100644 index 000..daab320 --- /dev/null +++ b/globalcollect_gateway/config/payment_methods.yaml @@ -0,0 +1,35 @@ +bt: +label: 'Bank transfer' +validation: +creditCard: false +short_circuit_at: first_iop +cc: +label: 'Credit Cards' +dd: +label: 'Direct Debit' +validation: +creditCard: false +short_circuit_at: first_iop +ew: +label: eWallets +validation: +address: false +creditCard: false +short_circuit_at: first_iop +additional_success_status: +- 20 +obt: +label: 'Online bank transfer' +validation: +creditCard: false +short_circuit_at: first_iop +rtbt: +label: 'Real time bank transfer' +short_circuit_at: first_iop +additional_success_status: +- 20 +cash: +label: 'Cash payments' +short_circuit_at: first_iop +additional_success_status: +- 55 diff --git
[MediaWiki-commits] [Gerrit] [WIP] Encapsulate AstroPay staging methods - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/277705 Change subject: [WIP] Encapsulate AstroPay staging methods .. [WIP] Encapsulate AstroPay staging methods Change-Id: I9f3c16b63aa79e2624e8119026ea43eb2bbdd748 --- M DonationInterface.php A astropay_gateway/AstroPayFinancialNumbers.php A astropay_gateway/AstroPayMethodCodec.php M astropay_gateway/astropay.adapter.php A gateway_common/DonorEmail.php A gateway_common/DonorFullName.php M gateway_common/GatewayType.php M gateway_common/gateway.adapter.php 8 files changed, 117 insertions(+), 97 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/05/277705/1 diff --git a/DonationInterface.php b/DonationInterface.php index 40af499..e4d8e71 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -46,6 +46,8 @@ $wgAutoloadClasses['DonationLogProcessor'] = __DIR__ . '/gateway_common/DonationLogProcessor.php'; $wgAutoloadClasses['DonationProfiler'] = __DIR__ . '/gateway_common/DonationProfiler.php'; $wgAutoloadClasses['DonationQueue'] = __DIR__ . '/gateway_common/DonationQueue.php'; +$wgAutoloadClasses['DonorEmail'] = __DIR__ . '/gateway_common/DonorEmail.php'; +$wgAutoloadClasses['DonorFullName'] = __DIR__ . '/gateway_common/DonorFullName.php'; $wgAutoloadClasses['EncodingMangler'] = __DIR__ . '/gateway_common/EncodingMangler.php'; $wgAutoloadClasses['FinalStatus'] = __DIR__ . '/gateway_common/FinalStatus.php'; $wgAutoloadClasses['GatewayAdapter'] = __DIR__ . '/gateway_common/gateway.adapter.php'; @@ -96,6 +98,8 @@ $wgAutoloadClasses['AstropayGateway'] = __DIR__ . '/astropay_gateway/astropay_gateway.body.php'; $wgAutoloadClasses['AstropayGatewayResult'] = __DIR__ . '/astropay_gateway/astropay_resultswitcher.body.php'; $wgAutoloadClasses['AstropayAdapter'] = __DIR__ . '/astropay_gateway/astropay.adapter.php'; +$wgAutoloadClasses['AstroPayFinancialNumbers'] = __DIR__ . '/astropay_gateway/AstroPayFinancialNumbers.php'; +$wgAutoloadClasses['AstroPayMethodCodec'] = __DIR__ . '/astropay_gateway/AstroPayMethodCodec.php'; // Paypal $wgAutoloadClasses['PaypalGateway'] = __DIR__ . '/paypal_gateway/paypal_gateway.body.php'; diff --git a/astropay_gateway/AstroPayFinancialNumbers.php b/astropay_gateway/AstroPayFinancialNumbers.php new file mode 100644 index 000..67f5afb --- /dev/null +++ b/astropay_gateway/AstroPayFinancialNumbers.php @@ -0,0 +1,41 @@ +stage_donor_id( $adapter, $unstagedData, $stagedData ); + $this->stage_bank_code( $adapter, $unstagedData, $stagedData ); + } + + /** +* They need a 20 char string for a customer ID - give them the first 20 +* characters of the email address for easy lookup +*/ + protected function stage_donor_id( GatewayType $adapter, $unstagedData, &$stagedData ) { + // We use these to look up donations by email, so strip out the trailing + // spam-tracking sub-address to get the email we'd see complaints from. + $email = preg_replace( '/\+[^@]*/', '', $stagedData['email'] ); + $stagedData['donor_id'] = substr( $email, 0, 20 ); + } + + protected function stage_bank_code( GatewayType $adapter, $unstagedData, &$stagedData ) { + $submethod = $adapter->getPaymentSubmethod(); + if ( $submethod ) { + $meta = $adapter->getPaymentSubmethodMeta( $submethod ); + if ( isset( $meta['bank_code'] ) ) { + $stagedData['bank_code'] = $meta['bank_code']; + } + } + } + + /** +* Strip any punctuation from fiscal number before submitting +*/ + protected function stage_fiscal_number( GatewayType $adapter, $unstagedData, &$stagedData ) { + if ( !empty( $unstagedData['fiscal_number'] ) ) { + $stagedData['fiscal_number'] = preg_replace( '/[^a-zA-Z0-9]/', '', $unstagedData['fiscal_number'] ); + } + } + + // No-op + public function unstage( GatewayType $adapter, $stagedData, &$unstagedData ) {} +} diff --git a/astropay_gateway/AstroPayMethodCodec.php b/astropay_gateway/AstroPayMethodCodec.php new file mode 100644 index 000..d34ed0d --- /dev/null +++ b/astropay_gateway/AstroPayMethodCodec.php @@ -0,0 +1,22 @@ +getPaymentSubmethods(), $filter ); + + if ( count( $candidates ) !== 1 ) { + throw new UnexpectedValueException( "No unique payment submethod defined for payment method $method and bank code $bank." ); + } + $keys = array_keys( $candidates ); + $unstagedData['payment_submethod'] = $keys[0]; + } +} diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index 34166dc..455a4d9
[MediaWiki-commits] [Gerrit] Groundwork for bottom sheets, part 1. - change (apps...wikipedia)
Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/277704 Change subject: Groundwork for bottom sheets, part 1. .. Groundwork for bottom sheets, part 1. This is the first patch of the "bottom sheets" series. This does the following: - Create an "ExclusiveBottomSheetHandler" class that is bound to PageActivity, and is responsible for ensuring that only a single modal bottom sheet can be shown at a time. It handles the work of placing a DialogFragment onto the activity's fragment manager, and making sure that any previous DialogFragments are dismissed. - Start feeding the LinkPreviewDialog into the bottom sheet handler, which simplifies the code for launching link previews. (this does not yet transition the LinkPreviewDialog to be an actual BottomSheetDialog) - Transition the ThemeChooserDialog to be a BottomSheetDialogFragment, as an introduction to the power of the new bottom sheets functionality. We also now feed the ThemeChooserDialog into the exclusive bottom sheet handler. Since the theme chooser is now a DialogFragment, and lives in the activity's fragment manager, its instanceState is automatically saved, so we no longer have to maintain its state manually (a significant benefit and simplification)! - This also fixes one other possible leak cause in LinkPreviewDialog. To come: transition the References dialog and the PageIssues/Disambig dialog to be bottom sheets. And later -- make a new bottom sheet dialog: Add to Category. Change-Id: I510afa1e88783fcd960f8097e317cb0ff497e50b --- A app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java M app/src/main/java/org/wikipedia/page/PageActivity.java M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java M app/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java 4 files changed, 73 insertions(+), 62 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/04/277704/1 diff --git a/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java b/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java new file mode 100644 index 000..bce3014 --- /dev/null +++ b/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetHandler.java @@ -0,0 +1,25 @@ +package org.wikipedia.page; + +import android.support.v4.app.DialogFragment; +import android.support.v4.app.FragmentActivity; + +public class ExclusiveBottomSheetHandler { +private static final String BOTTOM_SHEET_FRAGMENT_TAG = "bottom_sheet_fragment"; +private FragmentActivity activity; + +public ExclusiveBottomSheetHandler(FragmentActivity activity) { +this.activity = activity; +} + +public void show(DialogFragment dialog) { +dismiss(); +dialog.show(activity.getSupportFragmentManager(), BOTTOM_SHEET_FRAGMENT_TAG); +} + +public void dismiss() { +DialogFragment dialog = (DialogFragment) activity.getSupportFragmentManager().findFragmentByTag(BOTTOM_SHEET_FRAGMENT_TAG); +if (dialog != null) { +dialog.dismiss(); +} +} +} diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java b/app/src/main/java/org/wikipedia/page/PageActivity.java index 7863a96..90012cc 100644 --- a/app/src/main/java/org/wikipedia/page/PageActivity.java +++ b/app/src/main/java/org/wikipedia/page/PageActivity.java @@ -54,7 +54,6 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.NavigationView; -import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; @@ -102,7 +101,6 @@ private static final String LANGUAGE_CODE_BUNDLE_KEY = "language"; private static final String PLAIN_TEXT_MIME_TYPE = "text/plain"; -private static final String LINK_PREVIEW_FRAGMENT_TAG = "link_preview_dialog"; private Bus bus; private EventBusMethods busMethods; @@ -120,11 +118,11 @@ private SearchBarHideHandler searchBarHideHandler; private boolean isZeroEnabled; private ZeroConfig currentZeroConfig; -private ThemeChooserDialog themeChooser; private RandomHandler randomHandler; private NavDrawerHelper navDrawerHelper; private boolean navItemSelected; private WikipediaZeroUsageFunnel zeroFunnel; +private ExclusiveBottomSheetHandler bottomSheetHandler = new ExclusiveBottomSheetHandler(this); public View getContentView() { return fragmentContainerView; @@ -253,11 +251,6 @@ if (savedInstanceState != null) { isZeroEnabled = savedInstanceState.getBoolean("pausedZeroEnabledState"); currentZeroConfig = savedInstanceState.getParcelable("pausedZeroConfig"); -if (savedInstanceState.containsKey("themeChooserShowing"))
[MediaWiki-commits] [Gerrit] Clicking a marked-as-unread notification should mark it as read - change (mediawiki...Echo)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/277703 Change subject: Clicking a marked-as-unread notification should mark it as read .. Clicking a marked-as-unread notification should mark it as read Bug: T129898 Change-Id: Ia8c699ccc4bb0feba0949082608357d35971a515 --- M modules/ooui/mw.echo.ui.NotificationItemWidget.js 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/03/277703/1 diff --git a/modules/ooui/mw.echo.ui.NotificationItemWidget.js b/modules/ooui/mw.echo.ui.NotificationItemWidget.js index 4351e2e..fb8e3c8 100644 --- a/modules/ooui/mw.echo.ui.NotificationItemWidget.js +++ b/modules/ooui/mw.echo.ui.NotificationItemWidget.js @@ -195,6 +195,9 @@ // Source of this notification if it is cross-wiki widget.bundle ? widget.getModel().getSource() : '' ); + + // Toggle the notification as read + widget.model.toggleRead( true ); } ) ); } -- To view, visit https://gerrit.wikimedia.org/r/277703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8c699ccc4bb0feba0949082608357d35971a515 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mooeypoo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] make-all-blobs: Password from MW (i.e. ultimately PrivateSet... - change (mediawiki...WikimediaMaintenance)
jenkins-bot has submitted this change and it was merged. Change subject: make-all-blobs: Password from MW (i.e. ultimately PrivateSettings.php) .. make-all-blobs: Password from MW (i.e. ultimately PrivateSettings.php) wikiadmin_pass does not exist anymore. Bug: T95871 Change-Id: Id5ac4b8b14175d7112abb000a683bb49e1f1da9e --- M storage/make-all-blobs 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/storage/make-all-blobs b/storage/make-all-blobs index 9a955eb..8f93447 100755 --- a/storage/make-all-blobs +++ b/storage/make-all-blobs @@ -16,9 +16,10 @@ FILE="$MEDIAWIKI_STAGING_DIR/dblists/all.dblist" fi -# Note, wikiadmin_pass no longer exists, so the password has to be set manually. -for db in `<$FILE`;do - echo "CREATE DATABASE IF NOT EXISTS $db" | mysql -u wikiadmin -p`wikiadmin_pass` -h $server && \ - sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin -p`wikiadmin_pass` -h $server $db -done +# Assumes password is the same everywhere +pass=$(echo 'echo $wgDBadminpassword;' | mwscript eval.php --wiki="enwiki"); +for db in `<$FILE`;do + echo "CREATE DATABASE IF NOT EXISTS $db" | mysql -u wikiadmin "-p$pass" -h $server && \ + sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin "-p$pass" -h $server $db +done -- To view, visit https://gerrit.wikimedia.org/r/275680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5ac4b8b14175d7112abb000a683bb49e1f1da9e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikimediaMaintenance Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Chad Gerrit-Reviewer: Hashar Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Mattflaschen 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] [WIP] Add LdapAuthentication role - change (mediawiki/vagrant)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/277702 Change subject: [WIP] Add LdapAuthentication role .. [WIP] Add LdapAuthentication role Add a role to provision an openldap server and "ldapauth" wiki. Bug: T128501 Change-Id: I11eb9e8ae9dc26ba9ea52219b770d9736cb914b3 --- M puppet/hieradata/common.yaml A puppet/modules/openldap/files/rfc2307bis.schema A puppet/modules/openldap/manifests/init.pp A puppet/modules/openldap/templates/base-acls.erb A puppet/modules/openldap/templates/base-indices.erb A puppet/modules/openldap/templates/default.erb A puppet/modules/openldap/templates/ldap.conf.erb A puppet/modules/openldap/templates/slapd.erb A puppet/modules/role/manifests/ldapauth.pp A puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb A puppet/modules/role/templates/ldapauth/check_db.erb A puppet/modules/role/templates/ldapauth/create_db.erb 12 files changed, 782 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/02/277702/1 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 30c5b2e..48e5167 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -279,6 +279,10 @@ payments::branch: fundraising/REL1_25 payments::dir: /vagrant/mediawiki-fr +role::ldapauth::proxy_agent_password: vagrant_agent +role::ldapauth::writer_password: vagrant_writer +role::ldapauth::admin_password: vagrant_admin + role::mediawiki::hostname: "dev%{hiera('mediawiki::multiwiki::base_domain')}" role::quips::vhost_name: "quips%{hiera('mwv::tld')}%{::port_fragment}" diff --git a/puppet/modules/openldap/files/rfc2307bis.schema b/puppet/modules/openldap/files/rfc2307bis.schema new file mode 100644 index 000..db34365 --- /dev/null +++ b/puppet/modules/openldap/files/rfc2307bis.schema @@ -0,0 +1,288 @@ +# builtin +# +#attributetype ( 1.3.6.1.1.1.1.0 NAME 'uidNumber' +# DESC 'An integer uniquely identifying a user in an administrative domain' +# EQUALITY integerMatch +# SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 +# SINGLE-VALUE ) + +# builtin +# +#attributetype ( 1.3.6.1.1.1.1.1 NAME 'gidNumber' +# DESC 'An integer uniquely identifying a group in an +#administrative domain' +# EQUALITY integerMatch +# SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 +# SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.2 NAME 'gecos' + DESC 'The GECOS field; the common name' + EQUALITY caseIgnoreIA5Match + SUBSTR caseIgnoreIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.3 NAME 'homeDirectory' + DESC 'The absolute path to the home directory' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.4 NAME 'loginShell' + DESC 'The path to the login shell' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.5 NAME 'shadowLastChange' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.6 NAME 'shadowMin' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.7 NAME 'shadowMax' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.8 NAME 'shadowWarning' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.9 NAME 'shadowInactive' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.10 NAME 'shadowExpire' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.11 NAME 'shadowFlag' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.12 NAME 'memberUid' + EQUALITY caseExactIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.1.1.1.13 NAME 'memberNisNetgroup' + EQUALITY caseExactIA5Match + SUBSTR caseExactIA5SubstringsMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.1.1.1.14 NAME 'nisNetgroupTriple' + DESC 'Netgroup triple' + EQUALITY caseIgnoreIA5Match + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) + +attributetype ( 1.3.6.1.1.1.1.15 NAME 'ipServicePort' + DESC 'Service port number' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.16 NAME 'ipServiceProtocol' + DESC 'Service protocol name' + SUP name ) + +attributetype ( 1.3.6.1.1.1.1.17 NAME 'ipProtocolNumber' + DESC 'IP protocol number' + EQUALITY integerMatch + SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 + SINGLE-VALUE ) + +attributetype ( 1.3.6.1.1.1.1.18 NAME 'oncRpcNumber' + DESC 'ONC RPC number' + EQUALITY integerMatch + SYNTAX
[MediaWiki-commits] [Gerrit] Allow global extension to be disabled per-wiki - change (mediawiki/vagrant)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/277701 Change subject: Allow global extension to be disabled per-wiki .. Allow global extension to be disabled per-wiki Some extensions (e.g. AuthPlugins) are mutually exclusive. Roles like role::centralauth that setup an extension globally for the MediaWiki-Vagrant managed wiki farm are the norm due to simplicity. Another role however may want to setup a single wiki that deviates from the norm for the rest of the wiki farm. This change introduces a method for disabling an extension that has been installed globally on a per-wiki basis using the new $wmvExtensions global PHP variable. This variable is expected to be an array with extension names as keys and booleans as values. If an extension is not listed in the array or maps to true then it will be loaded. If it maps to anything else it will not be loaded. ::mediawiki::wiki is extended to allow providing a hash of additional $wgConf settings for the wiki. This can be used to set $wmvExtensions flags or change any other setting currently handled by $wgConf. Bug: T128501 Change-Id: I2ad8cc316d99c27e1d92c2bb776a4224e57ec08c --- M puppet/modules/mediawiki/manifests/extension.pp M puppet/modules/mediawiki/manifests/wiki.pp M puppet/modules/mediawiki/templates/extension.php.erb M puppet/modules/mediawiki/templates/multiwiki/LoadWgConf.php.erb M puppet/modules/mediawiki/templates/wiki/wgConf.php.erb 5 files changed, 63 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/01/277701/1 diff --git a/puppet/modules/mediawiki/manifests/extension.pp b/puppet/modules/mediawiki/manifests/extension.pp index abf8bd1..1f567fb 100644 --- a/puppet/modules/mediawiki/manifests/extension.pp +++ b/puppet/modules/mediawiki/manifests/extension.pp @@ -173,6 +173,7 @@ ensure => $ensure, wiki => $ext_wiki, header => template('mediawiki/extension.php.erb'), +footer => '}', # Close if opened in header values => $settings, priority => $priority, require => Git::Clone[$ext_repo], diff --git a/puppet/modules/mediawiki/manifests/wiki.pp b/puppet/modules/mediawiki/manifests/wiki.pp index 8c17fe2..dc0fab8 100644 --- a/puppet/modules/mediawiki/manifests/wiki.pp +++ b/puppet/modules/mediawiki/manifests/wiki.pp @@ -61,11 +61,33 @@ # Full base URL of host (example: 'http://mywiki.net:8080'). # # [*primary_wiki*] -# Whether this is the primary wiki (defaults false) +# Whether this is the primary wiki (default: false) # # [*priority*] # Position of this wiki in foreachwiki. Uses the scale of -# the LOAD_ constants from site.php. Default is $LOAD_NORMAL. +# the LOAD_ constants from site.php. (default: $LOAD_NORMAL) +# +# [*wgconf*] +# Hash of extra wgConf settings for this wiki. One use case for this is +# selectively disabling a globally installed extension for a particular +# wiki by setting wmvExtensions[] = false. (default: {}) +# +# === Examples +# +# Add a wiki named 'testwiki': +# +# mediawiki::wiki { 'test': } +# +# Disable the CentralAuth extension on a wiki named 'nocawiki': +# +# mediawiki::wiki { 'noca': +# wgconf => { +# 'wmvExtensions' => { +# 'CentralAuth' => false, +# }, +# }, +# } +# define mediawiki::wiki( $wiki_name= $title, $db_host = $::mysql::grant_host_name, @@ -81,6 +103,7 @@ $server_url = "http://${title}${::mediawiki::multiwiki::base_domain}${::port_fragment};, $primary_wiki = false, $priority = $::LOAD_NORMAL, +$wgconf = {}, ) { include ::mwv include ::mediawiki diff --git a/puppet/modules/mediawiki/templates/extension.php.erb b/puppet/modules/mediawiki/templates/extension.php.erb index 21f9a97..cb8e93b 100644 --- a/puppet/modules/mediawiki/templates/extension.php.erb +++ b/puppet/modules/mediawiki/templates/extension.php.erb @@ -1,6 +1,12 @@ -if ( class_exists( 'ExtensionRegistry' ) && file_exists( "$IP/extensions/<%= @ext_name %>/extension.json" ) ) { - wfLoadExtension( '<%= @ext_name %>' ); -} elseif ( file_exists( "$IP/extensions/<%= @ext_name %>/<%= @ext_entrypoint %>" ) ) { - include_once "$IP/extensions/<%= @ext_name %>/<%= @ext_entrypoint %>"; -} +// Load extension +if ( !isset( $wmvExtensions['<%= @ext_name %>'] ) || + $wmvExtensions['<%= @ext_name %>'] === true +) { + if ( class_exists( 'ExtensionRegistry' ) && + file_exists( "$IP/extensions/<%= @ext_name %>/extension.json" ) + ) { + wfLoadExtension( '<%= @ext_name %>' ); + } elseif ( file_exists( "$IP/extensions/<%= @ext_name %>/<%= @ext_entrypoint %>" ) ) { + include_once "$IP/extensions/<%= @ext_name %>/<%= @ext_entrypoint %>"; + } diff --git
[MediaWiki-commits] [Gerrit] Use scap subcommands - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/277700 Change subject: Use scap subcommands .. Use scap subcommands https://phabricator.wikimedia.org/D145 consolidates all of the scap scripts into subcommands of the `scap` command. This patch updates all paths for operations/puppet Change-Id: If5d588671d4af1171367da67c6b63b1503c7dc33 --- M modules/admin/files/home/ori/.hosts/tin M modules/mediawiki/manifests/scap.pp M modules/mediawiki/templates/mediawiki.sh.erb M modules/scap/files/l10nupdate-1 M modules/scap/files/set-group-write2 M modules/scap/lib/puppet/provider/package/scap3.rb M modules/scap/manifests/l10nupdate.pp M modules/scap/spec/provider/package/scap3_spec.rb 8 files changed, 17 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/277700/1 diff --git a/modules/admin/files/home/ori/.hosts/tin b/modules/admin/files/home/ori/.hosts/tin index 5cf4b1e..0dbe5d0 100755 --- a/modules/admin/files/home/ori/.hosts/tin +++ b/modules/admin/files/home/ori/.hosts/tin @@ -87,8 +87,8 @@ echo >&2 "No such file: ${target}" return 1 elif [ -d "$target" ]; then -DOLOGMSGNOLOG="$QUIET" sync-dir "$target" "$message" +DOLOGMSGNOLOG="$QUIET" scap sync-dir "$target" "$message" else -DOLOGMSGNOLOG="$QUIET" sync-file "$target" "$message" +DOLOGMSGNOLOG="$QUIET" scap sync-file "$target" "$message" fi } diff --git a/modules/mediawiki/manifests/scap.pp b/modules/mediawiki/manifests/scap.pp index 8702c0d..73d72fd 100644 --- a/modules/mediawiki/manifests/scap.pp +++ b/modules/mediawiki/manifests/scap.pp @@ -41,7 +41,7 @@ # the current MediaWiki deployment tree from the deployment server. exec { 'fetch_mediawiki': -command => "${scap_bin_dir}/sync-common", +command => "${scap_bin_dir}/scap pull", creates => "${mediawiki_deployment_dir}/docroot", require => [ File[$mediawiki_deployment_dir], Package['scap'] ], timeout => 30 * 60, # 30 minutes diff --git a/modules/mediawiki/templates/mediawiki.sh.erb b/modules/mediawiki/templates/mediawiki.sh.erb index 1b16432..5ff249f 100644 --- a/modules/mediawiki/templates/mediawiki.sh.erb +++ b/modules/mediawiki/templates/mediawiki.sh.erb @@ -4,12 +4,10 @@ MEDIAWIKI_STAGING_DIR="<%= @mediawiki_staging_dir %>" MEDIAWIKI_WEB_USER="<%= @mediawiki_web_user %>" -# Members of the wikidev group are deployers, so we add scap's bin -# directory to their $PATH. Do the same for l10nupdate, which calls +# Members of the wikidev group are deployers, keep the things they do +# group readable/writable. Do the same for l10nupdate, which calls # into scap. if groups | grep -Pqw '(wikidev|l10nupdate)'; then - # scap is now in /usr/bin thanks to debian package 'scap' - # PATH="${PATH}:/srv/deployment/scap/scap/bin" umask 0002 fi diff --git a/modules/scap/files/l10nupdate-1 b/modules/scap/files/l10nupdate-1 index 7b0f6c8..de086a9 100755 --- a/modules/scap/files/l10nupdate-1 +++ b/modules/scap/files/l10nupdate-1 @@ -71,7 +71,7 @@ echo "git clone updated." # Get all MW message cache versions (and a wiki DB name for each) -mwVerDbSets=$(mwversionsinuse --withdb) +mwVerDbSets=$(scap wikiversions-inuse --withdb) if [ -z "$mwVerDbSets" ]; then $BINDIR/dologmsg "!log $LOGNAME@$HOSTNAME LocalisationUpdate failed: mwversionsinuse returned empty list" echo "Obtaining MediaWiki version list FAILED" @@ -104,7 +104,7 @@ ${SCAPDIR}/refreshCdbJsonFiles --directory="$MEDIAWIKI_STAGING_DIR/php-$mwVerNum/cache/l10n" echo "Syncing to Apaches at `date --rfc-3339=seconds`" - sudo -u mwdeploy -n -- $SCAPDIR/sync-l10n --verbose $mwVerNum + sudo -u mwdeploy -n -- $SCAPDIR/scap sync-l10n --verbose $mwVerNum if [[ $? -ne 0 ]]; then echo "Failed to sync-l10n '$mwVerNum'" exit 1 diff --git a/modules/scap/files/set-group-write2 b/modules/scap/files/set-group-write2 index 1cdd126..20d8b97 100755 --- a/modules/scap/files/set-group-write2 +++ b/modules/scap/files/set-group-write2 @@ -2,7 +2,7 @@ BINDIR=/usr/local/bin . /etc/profile.d/mediawiki.sh -mwVersionNums=$(mwversionsinuse) +mwVersionNums=$(scap wikiversions-inuse) for mwVerNum in ${mwVersionNums[@]}; do find "$MEDIAWIKI_STAGING_DIR"/php-"$mwVerNum" -group wikidev -not -perm -020 -exec chmod g+w '{}' ';' done diff --git a/modules/scap/lib/puppet/provider/package/scap3.rb b/modules/scap/lib/puppet/provider/package/scap3.rb index 8b3d6e3..bdc7948 100644 --- a/modules/scap/lib/puppet/provider/package/scap3.rb +++ b/modules/scap/lib/puppet/provider/package/scap3.rb @@ -30,7 +30,7 @@ has_feature :installable, :uninstallable, :install_options - commands :deploy_local => '/usr/bin/deploy-local', :git => '/usr/bin/git' +
[MediaWiki-commits] [Gerrit] Track the # of times remnant refreshLinks jobs divide - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Track the # of times remnant refreshLinks jobs divide .. Track the # of times remnant refreshLinks jobs divide Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 --- M includes/jobqueue/utils/BacklinkJobUtils.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/jobqueue/utils/BacklinkJobUtils.php b/includes/jobqueue/utils/BacklinkJobUtils.php index 7fb020b..a81cade 100644 --- a/includes/jobqueue/utils/BacklinkJobUtils.php +++ b/includes/jobqueue/utils/BacklinkJobUtils.php @@ -137,6 +137,10 @@ 'batchSize' => $realBSize, 'subranges' => array_slice( $ranges, 1 ) ], + // Track how many times the base job divided for debugging + 'division' => isset( $params['division'] ) + ? ( $params['division'] + 1 ) + : 1 ] + $extraParams ); } -- To view, visit https://gerrit.wikimedia.org/r/277699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Ori.livnehGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Track the # of times remnant refreshLinks jobs divide - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Track the # of times remnant refreshLinks jobs divide .. Track the # of times remnant refreshLinks jobs divide Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 --- M includes/jobqueue/utils/BacklinkJobUtils.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/jobqueue/utils/BacklinkJobUtils.php b/includes/jobqueue/utils/BacklinkJobUtils.php index 7fb020b..a81cade 100644 --- a/includes/jobqueue/utils/BacklinkJobUtils.php +++ b/includes/jobqueue/utils/BacklinkJobUtils.php @@ -137,6 +137,10 @@ 'batchSize' => $realBSize, 'subranges' => array_slice( $ranges, 1 ) ], + // Track how many times the base job divided for debugging + 'division' => isset( $params['division'] ) + ? ( $params['division'] + 1 ) + : 1 ] + $extraParams ); } -- To view, visit https://gerrit.wikimedia.org/r/277681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Track the # of times remnant refreshLinks jobs divide - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/277699 Change subject: Track the # of times remnant refreshLinks jobs divide .. Track the # of times remnant refreshLinks jobs divide Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 --- M includes/jobqueue/utils/BacklinkJobUtils.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/99/277699/1 diff --git a/includes/jobqueue/utils/BacklinkJobUtils.php b/includes/jobqueue/utils/BacklinkJobUtils.php index 7fb020b..a81cade 100644 --- a/includes/jobqueue/utils/BacklinkJobUtils.php +++ b/includes/jobqueue/utils/BacklinkJobUtils.php @@ -137,6 +137,10 @@ 'batchSize' => $realBSize, 'subranges' => array_slice( $ranges, 1 ) ], + // Track how many times the base job divided for debugging + 'division' => isset( $params['division'] ) + ? ( $params['division'] + 1 ) + : 1 ] + $extraParams ); } -- To view, visit https://gerrit.wikimedia.org/r/277699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Ori.livnehGerrit-Reviewer: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DNS: Adding production entries for wasat Bug:T129930 - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: DNS: Adding production entries for wasat Bug:T129930 .. DNS: Adding production entries for wasat Bug:T129930 Change-Id: I1f665177be05eecf449993b494fc33eed7834531 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index a071417..5089fc7 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3196,6 +3196,7 @@ 42 1H IN PTR es2019.codfw.wmnet. 43 1H IN PTR scb2002.codfw.wmnet. 44 1H IN PTR rdb2006.codfw.wmnet. +45 1H IN PTR wasat.codfw.wmnet. $ORIGIN 49.192.{{ zonename }}. 1 1H IN PTR vl2020-eth3.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 9816c36..1bbef27 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2774,6 +2774,7 @@ subra 1H IN A10.192.16.124 sinistra1H IN A10.192.32.131 suhail 1H IN A10.192.0.121 +wasat 1H IN A10.192.48.45 wtp2001 1H IN A10.192.16.43 wtp2002 1H IN A10.192.16.44 wtp2003 1H IN A10.192.16.45 -- To view, visit https://gerrit.wikimedia.org/r/277680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f665177be05eecf449993b494fc33eed7834531 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Prototype encapsulation for staging functions - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/277698 Change subject: [WIP] Prototype encapsulation for staging functions .. [WIP] Prototype encapsulation for staging functions Bug: T130075 Change-Id: Ifab742e712a6f6f732bbf3d9a7acd21add9628f6 --- M DonationInterface.php A gateway_common/AmountInCents.php M gateway_common/GatewayType.php A gateway_common/StagingHelper.php M gateway_common/gateway.adapter.php 5 files changed, 71 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/98/277698/1 diff --git a/DonationInterface.php b/DonationInterface.php index fb0d627..40f09d3 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -37,6 +37,7 @@ /** * CLASSES */ +$wgAutoloadClasses['AmountInCents'] = __DIR__ . '/gateway_common/AmountInCents.php'; $wgAutoloadClasses['CurrencyRates'] = __DIR__ . '/gateway_common/CurrencyRates.php'; $wgAutoloadClasses['CurrencyRatesModule'] = __DIR__ . '/modules/CurrencyRatesModule.php'; $wgAutoloadClasses['CyclicalArray'] = __DIR__ . '/globalcollect_gateway/CyclicalArray.php'; @@ -60,6 +61,7 @@ $wgAutoloadClasses['ResponseCodes'] = __DIR__ . '/gateway_common/ResponseCodes.php'; $wgAutoloadClasses['ResponseProcessingException'] = __DIR__ . '/gateway_common/ResponseProcessingException.php'; $wgAutoloadClasses['ResultPages'] = __DIR__ . '/gateway_common/ResultPages.php'; +$wgAutoloadClasses['StagingHelper'] = __DIR__ . '/gateway_common/StagingHelper.php'; $wgAutoloadClasses['WmfFramework_Mediawiki'] = __DIR__ . '/gateway_common/WmfFramework.mediawiki.php'; $wgAutoloadClasses['WmfFrameworkLogHandler'] = __DIR__ . '/gateway_common/WmfFrameworkLogHandler.php'; diff --git a/gateway_common/AmountInCents.php b/gateway_common/AmountInCents.php new file mode 100644 index 000..c99d4ed --- /dev/null +++ b/gateway_common/AmountInCents.php @@ -0,0 +1,31 @@ +defineDataConstraints(); $this->definePaymentMethods(); + $this->defineStagingHelpers(); + $this->session_resetOnSwitch(); // Need to do this before creating DonationData // FIXME: this should not have side effects like setting order_id_meta['final'] @@ -363,6 +371,15 @@ return null; } } + } + + /** +* FIXME: sloppy. Not sure what we want to do instead. +*/ + public function getCoreStagingHelpers() { + return array( + new AmountInCents(), + ); } /** @@ -1681,10 +1698,16 @@ $this->staged_data = $this->unstaged_data; // This allows transactions to each stage different data. + // FIXME: These are actually constant. We should move this to + // object initialization. $this->defineStagedVars(); // Always stage email address first, to set default if missing array_unshift( $this->staged_vars, 'email' ); + + foreach ( $this->staging_helpers as $staging_helper ) { + $staging_helper->stage( $this, $this->unstaged_data, $this->staged_data ); + } foreach ( $this->staged_vars as $field ) { $function_name = 'stage_' . $field; @@ -1701,6 +1724,10 @@ * @param array $data response data */ protected function unstageData( $data ) { + foreach ( $this->staging_helpers as $staging_helper ) { + $staging_helper->unstage( $this, $this->staged_data, $this->unstaged_data ); + } + foreach ( $data as $field => $value ) { // Run custom unstaging function if available. $function_name = 'unstage_' . $field; @@ -1747,33 +1774,6 @@ $this->staged_data[ $field ] = $value; } - } - - /** -* Stage: amount -* -* For example: JPY 1000.05 get changed to 15. This need to be 10. -* For example: JPY 1000.95 get changed to 100095. This need to be 10. -*/ - protected function stage_amount() { - if ( !$this->getData_Unstaged_Escaped( 'amount' ) - || !$this->getData_Unstaged_Escaped( 'currency_code' ) - ) { - //can't do anything with amounts at all. Just go home. - unset( $this->staged_data['amount'] ); - return; - } - - $amount = $this->getData_Unstaged_Escaped( 'amount' ); - if ( !DataValidator::is_fractional_currency( $this->getData_Unstaged_Escaped( 'currency_code' ) ) ) { - $amount = floor( $amount
[MediaWiki-commits] [Gerrit] Enable Flow by default in all talk namespaces on gomwiki - change (operations/mediawiki-config)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/277697 Change subject: Enable Flow by default in all talk namespaces on gomwiki .. Enable Flow by default in all talk namespaces on gomwiki Bug: T128359 Change-Id: I1ee706c1e1c2dac93cd51240eecb405339868ebb --- M wmf-config/InitialiseSettings.php 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/97/277697/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1a0cc3a..8988508 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -15384,6 +15384,19 @@ 2301, // Gadget_talk from Gadgets 2303, // Gadget_definition_talk from Gadgets ), + 'gomwiki' => array( + NS_TALK, + NS_USER_TALK, + NS_PROJECT_TALK, + NS_FILE_TALK, + NS_MEDIAWIKI_TALK, + NS_TEMPLATE_TALK, + NS_HELP_TALK, + NS_CATEGORY_TALK, + 829, // Module_talk from Scribunto + 2301, // Gadget_talk from Gadgets + 2303, // Gadget_definition_talk from Gadgets + ), ), // Enable editing other users posts by autoconfirmed -- To view, visit https://gerrit.wikimedia.org/r/277697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ee706c1e1c2dac93cd51240eecb405339868ebb Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CiviCRM submodule update, lybunt, export - change (wikimedia...crm)
Eileen has submitted this change and it was merged. Change subject: CiviCRM submodule update, lybunt, export .. CiviCRM submodule update, lybunt, export 96ed41f Increase time out while doing exports 0fbaa27 CRM-18246 Lybunt group clause not being included in temp table due to order of operations Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Eileen: Looks good to me, approved jenkins-bot: Verified diff --git a/civicrm b/civicrm index da438df..96ed41f 16 --- a/civicrm +++ b/civicrm -Subproject commit da438dfd7328e4c7e0ee90ed06a0a7f82b6b782c +Subproject commit 96ed41f07d9922efb453442e9adf9283090304e9 -- To view, visit https://gerrit.wikimedia.org/r/277696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: 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] CiviCRM submodule update, lybunt, export - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/277696 Change subject: CiviCRM submodule update, lybunt, export .. CiviCRM submodule update, lybunt, export 96ed41f Increase time out while doing exports 0fbaa27 CRM-18246 Lybunt group clause not being included in temp table due to order of operations Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/96/277696/1 diff --git a/civicrm b/civicrm index da438df..96ed41f 16 --- a/civicrm +++ b/civicrm -Subproject commit da438dfd7328e4c7e0ee90ed06a0a7f82b6b782c +Subproject commit 96ed41f07d9922efb453442e9adf9283090304e9 -- To view, visit https://gerrit.wikimedia.org/r/277696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CiviCRM submodule update, lybunt, export - change (wikimedia...crm)
Eileen has submitted this change and it was merged. Change subject: CiviCRM submodule update, lybunt, export .. CiviCRM submodule update, lybunt, export 96ed41f Increase time out while doing exports 0fbaa27 CRM-18246 Lybunt group clause not being included in temp table due to order of operations Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Eileen: Looks good to me, approved jenkins-bot: Verified diff --git a/civicrm b/civicrm index da438df..96ed41f 16 --- a/civicrm +++ b/civicrm -Subproject commit da438dfd7328e4c7e0ee90ed06a0a7f82b6b782c +Subproject commit 96ed41f07d9922efb453442e9adf9283090304e9 -- To view, visit https://gerrit.wikimedia.org/r/277695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: 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] CiviCRM submodule update, lybunt, export - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/277695 Change subject: CiviCRM submodule update, lybunt, export .. CiviCRM submodule update, lybunt, export 96ed41f Increase time out while doing exports 0fbaa27 CRM-18246 Lybunt group clause not being included in temp table due to order of operations Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d --- M civicrm 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/95/277695/1 diff --git a/civicrm b/civicrm index da438df..96ed41f 16 --- a/civicrm +++ b/civicrm -Subproject commit da438dfd7328e4c7e0ee90ed06a0a7f82b6b782c +Subproject commit 96ed41f07d9922efb453442e9adf9283090304e9 -- To view, visit https://gerrit.wikimedia.org/r/277695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3645049a742b7a8ff249e9d79a4e0c02cfad982d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding install params for wasat Bug:T129930 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Adding install params for wasat Bug:T129930 .. Adding install params for wasat Bug:T129930 Change-Id: Ic009b58a351b33eb49a6b18b4be6a05b885f2098 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index b14dc0e..5c37555 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -132,4 +132,5 @@ virt101[0-2]) echo partman/virt-hp.cfg ;; \ wdqs100[1-9]) echo partman/lvm-wdqs.cfg ;; \ wtp[1-2]0[0-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ +wasat) echo partman/raid1-lvm-ext4-srv.cfg ;; \ esac -- To view, visit https://gerrit.wikimedia.org/r/277694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic009b58a351b33eb49a6b18b4be6a05b885f2098 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add infrastructure for handling different formats. - change (wikidata...rdf)
jenkins-bot has submitted this change and it was merged. Change subject: Add infrastructure for handling different formats. .. Add infrastructure for handling different formats. Bug: T130066 Change-Id: Ia572b27f9d522770fae9419263295eb7cb52f7c7 --- M common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java M gui M tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java M tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java 6 files changed, 125 insertions(+), 2 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java b/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java index 0b99d2b..d8a39ab 100644 --- a/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java +++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java @@ -13,6 +13,10 @@ */ public static final String VERSION = NAMESPACE + "version"; /** + * Wikibase uses the MediaWiki revision as the version. + */ +public static final String SOFTWARE_VERSION = NAMESPACE + "softwareVersion"; +/** * Wikibase adds this to EntityData with the date of the revision of the entity. */ public static final String DATE_MODIFIED = NAMESPACE + "dateModified"; diff --git a/gui b/gui index bd20993..ea4bc83 16 --- a/gui +++ b/gui -Subproject commit bd209932b4d7a577218999f943ec285932aef335 +Subproject commit ea4bc83d78a8fe2016bc12fe7798eaf2d9a18d72 diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java b/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java index 8f284f3..8f456b9 100644 --- a/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java +++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java @@ -313,6 +313,9 @@ return; } if (subject.equals(Ontology.DUMP)) { +if (statement.getPredicate().stringValue().equals(SchemaDotOrg.SOFTWARE_VERSION)) { + munger.setFormatVersion(statement.getObject().stringValue()); +} /* * Just pipe dump statements strait through. */ diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java index 67d1ee5..6e2509a 100644 --- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java +++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java @@ -6,10 +6,12 @@ import java.util.Collection; import java.util.Collections; import java.util.Date; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Set; import java.util.TimeZone; @@ -77,6 +79,28 @@ */ private boolean keepTypes; +/** + * Format version we're dealing with. + */ +private String dumpFormatVersion; + +/** + * Interface to handle format transformations. + */ +public interface FormatHandler { +/** + * Transform statement to current latest format. + * @param statement + * @return Transformed statement or null if it needs to be deleted. + */ +Statement handle(Statement statement); +} + +/** + * Map of format handlers. + */ +private final MapformatHandlers; + public Munger(WikibaseUris uris) { this(uris, null, null, false); } @@ -87,6 +111,7 @@ this.limitLabelLanguages = limitLabelLanguages; this.singleLabelModeLanguages = singleLabelModeLanguages; this.removeSiteLinks = removeSiteLinks; +this.formatHandlers = new HashMap<>(); } /** @@ -140,6 +165,23 @@ */ public Munger removeSiteLinks() { return new Munger(uris, limitLabelLanguages, singleLabelModeLanguages, true); +} + +/** + * Set format version. + * @param version + */ +public void setFormatVersion(String version) { +this.dumpFormatVersion = version; +} + +/** + * Add handler for specific non-default format. + * @param version Version to handle. + * @param handler Handler. + */ +public void addFormatHandler(String version, FormatHandler handler) { +formatHandlers.put(version, handler); } /** @@ -278,6 +320,11 @@ */ private String predicate; +/** + * Format handler for current format. + */ +private FormatHandler formatHandler; + public MungeOperation(String entityId,
[MediaWiki-commits] [Gerrit] Increase time out while doing exports - change (wikimedia...civicrm)
Eileen has submitted this change and it was merged. Change subject: Increase time out while doing exports .. Increase time out while doing exports Bug: T120892 Change-Id: Id786b03fb06469d0d5fb4d5e9e3840e467ff664e --- M CRM/Export/BAO/Export.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index fae116b..58e419a 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -664,6 +664,9 @@ $outputColumns[$key] = $value; } $limitReached = FALSE; +// T120892 I couldn't quite bring myself to put this inside the loop in case an infinite loop +// happened for some reason - which I can't think of - sensible or paranoid? +set_time_limit(ini_get('max_execution_time') + 180); while (!$limitReached) { $limitQuery = "{$queryString} LIMIT {$offset}, {$rowCount}"; $dao = CRM_Core_DAO::executeUnbufferedQuery($limitQuery); -- To view, visit https://gerrit.wikimedia.org/r/275615 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id786b03fb06469d0d5fb4d5e9e3840e467ff664e Gerrit-PatchSet: 3 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: 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] Show pagination and search for huge results - change (wikidata...gui)
jenkins-bot has submitted this change and it was merged. Change subject: Show pagination and search for huge results .. Show pagination and search for huge results Change-Id: I7417dd6ceac4092601f9dd4e6ed65cf079f5dfde --- M index.html A vendor/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js A vendor/bootstrap-table/extensions/cookie/bootstrap-table-cookie.min.js A vendor/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js A vendor/bootstrap-table/extensions/key-events/bootstrap-table-key-events.min.js M wikibase/queryService/ui/resultBrowser/TableResultBrowser.js 6 files changed, 447 insertions(+), 2 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/index.html b/index.html index a02f887..7653cc2 100644 --- a/index.html +++ b/index.html @@ -184,6 +184,8 @@ + + diff --git a/vendor/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js b/vendor/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js new file mode 100644 index 000..333165a --- /dev/null +++ b/vendor/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js @@ -0,0 +1,335 @@ +/** + * @author: Dennis Hernández + * @webSite: http://djhvscf.github.io/Blog + * @version: v1.2.0 + * + * @update zhixin wen+ */ + +(function ($) { +'use strict'; + +var cookieIds = { +sortOrder: 'bs.table.sortOrder', +sortName: 'bs.table.sortName', +pageNumber: 'bs.table.pageNumber', +pageList: 'bs.table.pageList', +columns: 'bs.table.columns', +searchText: 'bs.table.searchText', +filterControl: 'bs.table.filterControl' +}; + +var getCurrentHeader = function (that) { +var header = that.$header; +if (that.options.height) { +header = that.$tableHeader; +} + +return header; +}; + +var getCurrentSearchControls = function (that) { +var searchControls = 'select, input'; +if (that.options.height) { +searchControls = 'table select, table input'; +} + +return searchControls; +}; + +var cookieEnabled = function () { +return !!(navigator.cookieEnabled); +}; + +var inArrayCookiesEnabled = function (cookieName, cookiesEnabled) { +var index = -1; + +for (var i = 0; i < cookiesEnabled.length; i++) { +if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) { +index = i; +break; +} +} + +return index; +}; + +var setCookie = function (that, cookieName, cookieValue) { +if ((!that.options.cookie) || (!cookieEnabled()) || (that.options.cookieIdTable === '')) { +return; +} + +if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) { +return; +} + +cookieName = that.options.cookieIdTable + '.' + cookieName; +if (!cookieName || /^(?:expires|max\-age|path|domain|secure)$/i.test(cookieName)) { +return false; +} + +document.cookie = encodeURIComponent(cookieName) + '=' + encodeURIComponent(cookieValue) + calculateExpiration(that.options.cookieExpire) + (that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '') + (that.options.cookiePath ? '; path=' + that.options.cookiePath : '') + (that.cookieSecure ? '; secure' : ''); +return true; +}; + +var getCookie = function (that, tableName, cookieName) { +if (!cookieName) { +return null; +} + +if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) { +return null; +} + +cookieName = tableName + '.' + cookieName; + +return decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\s*' + encodeURIComponent(cookieName).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=\\s*([^;]*).*$)|^.*$'), '$1')) || null; +}; + +var hasCookie = function (cookieName) { +if (!cookieName) { +return false; +} +return (new RegExp('(?:^|;\\s*)' + encodeURIComponent(cookieName).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=')).test(document.cookie); +}; + +var deleteCookie = function (tableName, cookieName, sPath, sDomain) { +cookieName = tableName + '.' + cookieName; +if (!hasCookie(cookieName)) { +return false; +} +document.cookie = encodeURIComponent(cookieName) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT' + (sDomain ? '; domain=' + sDomain : '') + (sPath ? '; path=' + sPath : ''); +return true; +}; + +var calculateExpiration = function(cookieExpire) { +var time = cookieExpire.replace(/[0-9]*/, ''); //s,mi,h,d,m,y +cookieExpire =
[MediaWiki-commits] [Gerrit] DHCP: Adding MAC address for wasat Bug:T129930 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: DHCP: Adding MAC address for wasat Bug:T129930 .. DHCP: Adding MAC address for wasat Bug:T129930 Change-Id: Ic46eb9ad40ee091967833e42603fe515fe87c558 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 648e810..b1b2c6d 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -6719,6 +6719,11 @@ fixed-address uranium.wikimedia.org; } +host wasat { +hardware ethernet 14:02:ec:3f:47:8c; +fixed-address wasat.codfw.wmnet; +} + host wdqs1001 { hardware ethernet 90:b1:1c:1d:e7:e5; fixed-address wdqs1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/277691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic46eb9ad40ee091967833e42603fe515fe87c558 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify option value retrieval, fail fast - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Simplify option value retrieval, fail fast .. Simplify option value retrieval, fail fast Searching the group cache for $key was a bug. We assign using $row->value as the key, and worse, this function can be legitimately invoked with $key = null. Throw an exception when we fail to find a value. Calling code can catch if desired, but we almost always want to halt execution. Bug: T128389 Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 7 insertions(+), 11 deletions(-) Approvals: Awight: 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 4a31066..b0999de 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -5,6 +5,8 @@ /** * return a map of option value (id) => option name + * + * FIXME: Break into separate functions rather than magically switching return type */ function civicrm_api_option_group($group_name, $key = null, $force = FALSE) { @@ -18,23 +20,17 @@ )); $cached_group[$group_name] = array(); $option_values = $api->values(); - foreach ($option_values as $row) - { - if (!array_search($key, $cached_group[$group_name])) { - $cached_group[$group_name][$row->value] = $row->name; - if (empty($row->name)) { - watchdog('wmf_civicrm', 'Option Value Not Found: %group_name -> %value', - array('%group_name' => $group_name, '%value' => print_r($row, TRUE)), - WATCHDOG_NOTICE - ); - } - } + foreach ($option_values as $row) { + $cached_group[$group_name][$row->value] = $row->name; } } if ($key) { // In this case, just lookup name and return the option value $forwards = array_flip( $cached_group[$group_name] ); + if ( !array_key_exists( $key, $forwards ) ) { + throw new DomainException( "Option value not found: {$group_name} -> {$key}" ); + } return $forwards[$key]; } return $cached_group[$group_name]; -- To view, visit https://gerrit.wikimedia.org/r/277692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: AwightGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger 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] CRM-18246 Lybunt group clause not being included in temp tab... - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18246 Lybunt group clause not being included in temp table due to order of operations .. CRM-18246 Lybunt group clause not being included in temp table due to order of operations Bug: T123671 Change-Id: Ic21e5df2666ff68a1f089e1f24cbb699071a2a26 --- M CRM/Report/Form/Contribute/Lybunt.php 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index 3e344b3..ae9ded9 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -414,7 +414,13 @@ * @return string */ public function whereGroupClause($field, $value, $op) { -if (empty($this->contactTempTable)) { +if ($op == 'notin') { + // We do not have an optimisation for this scenario at this stage. Use + // parent. + return parent::whereGroupClause($field, $value, $op); +} + +if (empty($this->groupTempTable)) { $group = new CRM_Contact_DAO_Group(); $group->is_active = 1; $group->find(); @@ -654,10 +660,13 @@ * @return string */ public function buildQuery($applyLimit = TRUE) { + +// Calling where & select before FROM allows us to build temp tables to use in from. +$this->where(); $this->select(); $this->from(); $this->customDataFrom(empty($this->contactTempTable)); -$this->where(); + $this->groupBy(); $this->orderBy(); $limitFilter = ''; -- To view, visit https://gerrit.wikimedia.org/r/277686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic21e5df2666ff68a1f089e1f24cbb699071a2a26 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: 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] Adding install params for wasat Bug:T129930 - change (operations/puppet)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/277694 Change subject: Adding install params for wasat Bug:T129930 .. Adding install params for wasat Bug:T129930 Change-Id: Ic009b58a351b33eb49a6b18b4be6a05b885f2098 --- M modules/install_server/files/autoinstall/netboot.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/277694/1 diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index b14dc0e..5c37555 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -132,4 +132,5 @@ virt101[0-2]) echo partman/virt-hp.cfg ;; \ wdqs100[1-9]) echo partman/lvm-wdqs.cfg ;; \ wtp[1-2]0[0-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ +wasat) echo partman/raid1-lvm-ext4-srv.cfg ;; \ esac -- To view, visit https://gerrit.wikimedia.org/r/277694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic009b58a351b33eb49a6b18b4be6a05b885f2098 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjust line-height of bundle group titles - change (mediawiki...Echo)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/277693 Change subject: Adjust line-height of bundle group titles .. Adjust line-height of bundle group titles Bug: T128069 Change-Id: Ic968e00c789e8dbb20d04bb1d277afec57a2bebc --- M modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/93/277693/1 diff --git a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less index 18fb016..1b747d4 100644 --- a/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less +++ b/modules/ooui/styles/mw.echo.ui.BundledNotificationGroupWidget.less @@ -7,6 +7,8 @@ } &-title { + // Override OOUI's line height for labels + line-height: 1em !important; font-weight: bold; color: #66; margin-bottom: @bundle-group-padding; -- To view, visit https://gerrit.wikimedia.org/r/277693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic968e00c789e8dbb20d04bb1d277afec57a2bebc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mooeypoo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Apply buttons styling to 'expand' bundle button - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Apply buttons styling to 'expand' bundle button .. Apply buttons styling to 'expand' bundle button Bug: T126686 Change-Id: I4c6064fffae00b499de607598257828d9d0c05ee --- M modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less b/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less index 58af9c4..c3b9690 100644 --- a/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less +++ b/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less @@ -58,6 +58,7 @@ vertical-align: middle; } + &-button, .mw-echo-ui-menuItemWidget { margin-right: 1.2em; } -- To view, visit https://gerrit.wikimedia.org/r/277689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c6064fffae00b499de607598257828d9d0c05ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: MooeypooGerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify option value retrieval, fail fast - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/277692 Change subject: Simplify option value retrieval, fail fast .. Simplify option value retrieval, fail fast Searching the group cache for $key was a bug. We assign using $row->value as the key, and worse, this function can be legitimately invoked with $key = null. Throw an exception when we fail to find a value. Calling code can catch if desired, but we almost always want to halt execution. Bug: T128389 Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/92/277692/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 4a31066..b0999de 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -5,6 +5,8 @@ /** * return a map of option value (id) => option name + * + * FIXME: Break into separate functions rather than magically switching return type */ function civicrm_api_option_group($group_name, $key = null, $force = FALSE) { @@ -18,23 +20,17 @@ )); $cached_group[$group_name] = array(); $option_values = $api->values(); - foreach ($option_values as $row) - { - if (!array_search($key, $cached_group[$group_name])) { - $cached_group[$group_name][$row->value] = $row->name; - if (empty($row->name)) { - watchdog('wmf_civicrm', 'Option Value Not Found: %group_name -> %value', - array('%group_name' => $group_name, '%value' => print_r($row, TRUE)), - WATCHDOG_NOTICE - ); - } - } + foreach ($option_values as $row) { + $cached_group[$group_name][$row->value] = $row->name; } } if ($key) { // In this case, just lookup name and return the option value $forwards = array_flip( $cached_group[$group_name] ); + if ( !array_key_exists( $key, $forwards ) ) { + throw new DomainException( "Option value not found: {$group_name} -> {$key}" ); + } return $forwards[$key]; } return $cached_group[$group_name]; -- To view, visit https://gerrit.wikimedia.org/r/277692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjust bottom-alignment of action buttons in notifications - change (mediawiki...Echo)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/277690 Change subject: Adjust bottom-alignment of action buttons in notifications .. Adjust bottom-alignment of action buttons in notifications Bug: T125969 Change-Id: If13fa27ede927901cf2fd9ffe99784b5086bd9e3 --- M modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/90/277690/1 diff --git a/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less b/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less index 58af9c4..e4e75be 100644 --- a/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less +++ b/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less @@ -2,7 +2,7 @@ @import '../../echo.mixins'; .mw-echo-ui-notificationItemWidget { - padding: 0.8em 1em; + padding: 0.8em 1em 0.5em 1em; background-color: #F1F1F1; border-bottom: 1px solid #DD; white-space: normal; @@ -55,7 +55,7 @@ & > &-buttons.oo-ui-buttonSelectWidget { display: table-cell; - vertical-align: middle; + vertical-align: bottom; } .mw-echo-ui-menuItemWidget { @@ -65,7 +65,7 @@ &-menu { .mw-echo-ui-mixin-hover-opacity(); display: table-cell; - vertical-align: middle; + vertical-align: bottom; padding: 0; .oo-ui-popupWidget-popup { @@ -76,7 +76,7 @@ &-timestamp { display: table-cell; - vertical-align: middle; + vertical-align: bottom; text-align: right; color: black; opacity: @opacity-low; -- To view, visit https://gerrit.wikimedia.org/r/277690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If13fa27ede927901cf2fd9ffe99784b5086bd9e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mooeypoo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DHCP: Adding MAC address for wasat Bug:T129930 - change (operations/puppet)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/277691 Change subject: DHCP: Adding MAC address for wasat Bug:T129930 .. DHCP: Adding MAC address for wasat Bug:T129930 Change-Id: Ic46eb9ad40ee091967833e42603fe515fe87c558 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/277691/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index a95b26d..531b9fe 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -6684,6 +6684,11 @@ fixed-address uranium.wikimedia.org; } +host wasat { +hardware ethernet 14:02:ec:3f:47:8c; +fixed-address wasat.codfw.wmnet; +} + host wdqs1001 { hardware ethernet 90:b1:1c:1d:e7:e5; fixed-address wdqs1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/277691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic46eb9ad40ee091967833e42603fe515fe87c558 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify option value retrieval, fail fast - change (wikimedia...crm)
Eileen has submitted this change and it was merged. Change subject: Simplify option value retrieval, fail fast .. Simplify option value retrieval, fail fast Searching the group cache for $key was a bug. We assign using $row->value as the key, and worse, this function can be legitimately invoked with $key = null. Throw an exception when we fail to find a value. Calling code can catch if desired, but we almost always want to halt execution. Bug: T128389 Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 7 insertions(+), 11 deletions(-) Approvals: Eileen: 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 4a31066..b0999de 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -5,6 +5,8 @@ /** * return a map of option value (id) => option name + * + * FIXME: Break into separate functions rather than magically switching return type */ function civicrm_api_option_group($group_name, $key = null, $force = FALSE) { @@ -18,23 +20,17 @@ )); $cached_group[$group_name] = array(); $option_values = $api->values(); - foreach ($option_values as $row) - { - if (!array_search($key, $cached_group[$group_name])) { - $cached_group[$group_name][$row->value] = $row->name; - if (empty($row->name)) { - watchdog('wmf_civicrm', 'Option Value Not Found: %group_name -> %value', - array('%group_name' => $group_name, '%value' => print_r($row, TRUE)), - WATCHDOG_NOTICE - ); - } - } + foreach ($option_values as $row) { + $cached_group[$group_name][$row->value] = $row->name; } } if ($key) { // In this case, just lookup name and return the option value $forwards = array_flip( $cached_group[$group_name] ); + if ( !array_key_exists( $key, $forwards ) ) { + throw new DomainException( "Option value not found: {$group_name} -> {$key}" ); + } return $forwards[$key]; } return $cached_group[$group_name]; -- To view, visit https://gerrit.wikimedia.org/r/277684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: AwightGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Katie Horn Gerrit-Reviewer: Pcoombe 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] Improve word detection of Sparql hint - change (wikidata...gui)
jenkins-bot has submitted this change and it was merged. Change subject: Improve word detection of Sparql hint .. Improve word detection of Sparql hint Change-Id: I5d54af01c236e895b2b2e70223ab26f40a7557f0 --- M wikibase/queryService/ui/editor/hint/Sparql.js 1 file changed, 19 insertions(+), 15 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/wikibase/queryService/ui/editor/hint/Sparql.js b/wikibase/queryService/ui/editor/hint/Sparql.js index 7e6ffb6..624495f 100755 --- a/wikibase/queryService/ui/editor/hint/Sparql.js +++ b/wikibase/queryService/ui/editor/hint/Sparql.js @@ -111,26 +111,30 @@ }; SELF.prototype._getCurrentWord = function( line, position ) { - var words = line.split( ' ' ), matchedWord = '', scannedPostion = 0; + var pos = position -1; - $.each( words, function ( key, word ) { - scannedPostion += word.length; + if( pos < 0 ){ + pos = 0; + } - if ( key > 0 ) { // add spaces to position - scannedPostion++; + while( line.charAt( pos ) !== ' ' ){ + pos--; + if( pos < 0 ){ + break; } + } + var left = pos + 1; - if ( scannedPostion >= position ) { - matchedWord = word; - return; + pos = position; + while( line.charAt( pos ) !== ' ' ){ + pos++; + if( pos >= line.length ){ + break; } - } ); - - return { - word: matchedWord, - start: scannedPostion - matchedWord.length, - end: scannedPostion - }; + } + var right = pos; + var word = line.substring( left, right ); + return { word: word, start: left, end: right }; }; -- To view, visit https://gerrit.wikimedia.org/r/277513 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d54af01c236e895b2b2e70223ab26f40a7557f0 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)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] Apply buttons styling to 'expand' bundle button - change (mediawiki...Echo)
Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/277689 Change subject: Apply buttons styling to 'expand' bundle button .. Apply buttons styling to 'expand' bundle button Bug: T126686 Change-Id: I4c6064fffae00b499de607598257828d9d0c05ee --- M modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/89/277689/1 diff --git a/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less b/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less index 58af9c4..c3b9690 100644 --- a/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less +++ b/modules/ooui/styles/mw.echo.ui.NotificationItemWidget.less @@ -58,6 +58,7 @@ vertical-align: middle; } + &-button, .mw-echo-ui-menuItemWidget { margin-right: 1.2em; } -- To view, visit https://gerrit.wikimedia.org/r/277689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c6064fffae00b499de607598257828d9d0c05ee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Mooeypoo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add getFreeFormStopTransaction to GatewayType interface - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Add getFreeFormStopTransaction to GatewayType interface .. Add getFreeFormStopTransaction to GatewayType interface Another candidate for a helper class Change-Id: I1b7453d9b6f408715d5caf9242512879dc414440 --- M gateway_common/GatewayType.php M gateway_common/gateway.adapter.php 2 files changed, 9 insertions(+), 7 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php index 0a8679a..a4b3f4d 100644 --- a/gateway_common/GatewayType.php +++ b/gateway_common/GatewayType.php @@ -326,4 +326,13 @@ */ public function getCurrentTransaction(); + /** +* For making freeform stomp messages. +* As these are all non-critical, we don't need to be as strict as we have been with the other stuff. +* But, we've got to have some standards. +* @param array $transaction The fields that we are interested in sending. +* @return array The fields that will actually be sent. So, $transaction ++ some other things we think we're likely to always need. +*/ + public function makeFreeformStompTransaction( $transaction ); + } diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index e57cc4f..b1f70a8 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -1614,13 +1614,6 @@ return $transaction; } - /** -* For making freeform stomp messages. -* As these are all non-critical, we don't need to be as strict as we have been with the other stuff. -* But, we've got to have some standards. -* @param array $transaction The fields that we are interested in sending. -* @return array The fields that will actually be sent. So, $transaction ++ some other things we think we're likely to always need. -*/ public function makeFreeformStompTransaction( $transaction ) { if ( !array_key_exists( 'php-message-class', $transaction ) ) { $this->logger->warning( "Trying to send a freeform STOMP message with no class defined. Bad programmer." ); -- To view, visit https://gerrit.wikimedia.org/r/277685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b7453d9b6f408715d5caf9242512879dc414440 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith 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] More type hints in extras, no passing objects by ref - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: More type hints in extras, no passing objects by ref .. More type hints in extras, no passing objects by ref &$this should never be necessary Change-Id: I920dee6bf1e9286b4f83e361e67073366d595fad --- M extras/banner_history/BannerHistoryLogIdProcessor.php M extras/conversion_log/conversion_log.body.php M extras/custom_filters/custom_filters.body.php M extras/custom_filters/filters/functions/functions.body.php M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php M extras/custom_filters/filters/minfraud/minfraud.body.php M extras/custom_filters/filters/referrer/referrer.body.php M extras/custom_filters/filters/source/source.body.php M extras/extras.body.php M extras/session_velocity/session_velocity.body.php M gateway_common/gateway.adapter.php 11 files changed, 100 insertions(+), 44 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/extras/banner_history/BannerHistoryLogIdProcessor.php b/extras/banner_history/BannerHistoryLogIdProcessor.php index 9f620c9..20fa9a5 100644 --- a/extras/banner_history/BannerHistoryLogIdProcessor.php +++ b/extras/banner_history/BannerHistoryLogIdProcessor.php @@ -22,7 +22,7 @@ */ protected $gatewayAdapter; - protected static function singleton( $gatewayAdapter ) { + protected static function singleton( GatewayType $gatewayAdapter ) { static $instance; if ( !$instance ) { @@ -31,7 +31,7 @@ return $instance; } - protected function __construct( $gatewayAdapter ) { + protected function __construct( GatewayType $gatewayAdapter ) { $this->gatewayAdapter = $gatewayAdapter; $this->logger = DonationLoggerFactory::getLogger( @@ -80,9 +80,9 @@ * Handler for the GatewayReady hook. This is the class's entry point. * * @param GatewayType $gatewayAdapter -* @param DonationData $donationData +* @return bool always true */ - public static function onGatewayReady( $gatewayAdapter ) { + public static function onGatewayReady( GatewayType $gatewayAdapter ) { self::singleton( $gatewayAdapter ) ->queueAssociationOfIds(); diff --git a/extras/conversion_log/conversion_log.body.php b/extras/conversion_log/conversion_log.body.php index a41fdf8..585dfaa 100644 --- a/extras/conversion_log/conversion_log.body.php +++ b/extras/conversion_log/conversion_log.body.php @@ -33,7 +33,7 @@ return true; } - static function onPostProcess( GatewayType &$gateway_adapter ) { + static function onPostProcess( GatewayType $gateway_adapter ) { if ( !$gateway_adapter->getGlobal( 'EnableConversionLog' ) ) { return true; } @@ -41,7 +41,7 @@ return self::singleton( $gateway_adapter )->post_process(); } - static function singleton( GatewayType &$gateway_adapter ) { + static function singleton( GatewayType $gateway_adapter ) { if ( !self::$instance ) { self::$instance = new self( $gateway_adapter ); } diff --git a/extras/custom_filters/custom_filters.body.php b/extras/custom_filters/custom_filters.body.php index 6ee5f71..86855b1 100644 --- a/extras/custom_filters/custom_filters.body.php +++ b/extras/custom_filters/custom_filters.body.php @@ -33,7 +33,7 @@ */ protected $fraud_logger; - public function __construct( GatewayType &$gateway_adapter ) { + public function __construct( GatewayType $gateway_adapter ) { parent::__construct( $gateway_adapter ); //gateway_adapter is set in there. // load user action ranges and risk score $this->action_ranges = $this->gateway_adapter->getGlobal( 'CustomFiltersActionRanges' ); @@ -110,7 +110,7 @@ */ public function validate() { // expose a hook for custom filters - WmfFramework::runHooks( 'GatewayCustomFilter', array( &$this->gateway_adapter, &$this ) ); + WmfFramework::runHooks( 'GatewayCustomFilter', array( $this->gateway_adapter, $this ) ); $localAction = $this->determineAction(); $this->gateway_adapter->setValidationAction( $localAction ); @@ -153,7 +153,7 @@ return TRUE; } - static function onValidate( &$gateway_adapter ) { + static function onValidate( GatewayType $gateway_adapter ) { if ( !$gateway_adapter->getGlobal( 'EnableCustomFilters' ) ){ return true; } @@ -161,7 +161,7 @@ return self::singleton( $gateway_adapter )->validate(); } - static
[MediaWiki-commits] [Gerrit] Fix brokenness in FlowPresentationModel::isUserTalkPage() - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Fix brokenness in FlowPresentationModel::isUserTalkPage() .. Fix brokenness in FlowPresentationModel::isUserTalkPage() It had false positives on page names like Talk:USERNAME because it didn't check the namespace, and it had false negatives on user names with spaces in them because it compared DB keys (which use underscores) with user names (which use spaces). Change-Id: I37d6c21c863d9e5f3f0376a80fc406d282eee788 --- M includes/Notifications/FlowPresentationModel.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Notifications/FlowPresentationModel.php b/includes/Notifications/FlowPresentationModel.php index c79db7a..872dbc9 100644 --- a/includes/Notifications/FlowPresentationModel.php +++ b/includes/Notifications/FlowPresentationModel.php @@ -145,7 +145,10 @@ } protected function isUserTalkPage() { + // Would like to do $this->event->getTitle()->equals( $this->user->getTalkPage() ) + // but $this->user is private in the parent class $username = $this->getViewingUserForGender(); - return $this->event->getTitle()->getDBkey() === $username; + return $this->event->getTitle()->getNamespace() === NS_USER_TALK && + $this->event->getTitle()->getText() === $username; } } -- To view, visit https://gerrit.wikimedia.org/r/277682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I37d6c21c863d9e5f3f0376a80fc406d282eee788 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Mattflaschen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Strip rather than hide HTML - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Strip rather than hide HTML .. Strip rather than hide HTML We will aim to load these via the API after we have got references working via lazy loading. Bug: T110613 Change-Id: Ia548ef2286dc7bdc39a3f673ea2b5b5b34f3ee3a --- M wmf-config/InitialiseSettings.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 09f808f..ea209c9 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13959,6 +13959,14 @@ 'wikivoyage' => array( 'h2', 'h3', 'h4', 'h5', 'h6' ), // T110436, T110837 ), +'wgMFRemovableClasses' => array( + 'default' => array( + 'base' => array( '.navbox', '.nomobile' ), + 'beta' => array( '.navbox', '.nomobile' ), + 'HTML' => array(), + ), +), + // Formerly known as $wgMFAnonymousEditing 'wmgMFEditorOptions' => array( 'default' => array( 'anonymousEditing' => true, ), // T93210 -- To view, visit https://gerrit.wikimedia.org/r/276809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia548ef2286dc7bdc39a3f673ea2b5b5b34f3ee3a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WikidataPageBanner config changes - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: WikidataPageBanner config changes .. WikidataPageBanner config changes Enable on all namespaces by default to save confusion. Enable WPBEnablePageImagesBanners on wikis that do not use the magic word. Bug: T129099 Change-Id: I9776d7cd4e516806ba3dd8c6435d24770e7e516d --- M wmf-config/InitialiseSettings.php 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1a0cc3a..2dcdfe0 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -16611,12 +16611,18 @@ 'default' => array(), 'enwiki' => array( 'monobook', 'modern', 'vector', 'cologneblue', 'minerva' ), // T101108 ), + +'wgWPBEnablePageImagesBanners' => array( + 'default' => false, + 'enwiki' => true, // T101108 +), + 'wgWPBEnableHeadingOverride' => array( 'default' => true, 'enwiki' => false, // T101108 ), 'wgWPBNamespaces' => array( - 'default' => array( NS_MAIN, NS_USER ), + 'default' => true, // T129099 'frwikivoyage' => array( NS_MAIN, NS_USER, NS_PROJECT, NS_HELP ), // T123084 'ruwikivoyage' => array( 0, 1, 10, 11, 12, 13, 14, 15, 2, 2300, 2301, 2302, 2303, 2600, 3, 4, 5, 6, 7, 8, 828, 829, 9 ), // T114566, T114723 -- To view, visit https://gerrit.wikimedia.org/r/277431 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9776d7cd4e516806ba3dd8c6435d24770e7e516d Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] This now does stuff. - change (mediawiki...CollaborationKit)
Isarra has uploaded a new change for review. https://gerrit.wikimedia.org/r/277688 Change subject: This now does stuff. .. This now does stuff. Or something. Changes largely stolen out of extension:massmessage. Change-Id: Ied9dbff2754672ec5bd3c5cb355f3342a02cbeee --- D CollaborationKit.php A content/.CollaborationHubContent.php.kate-swp A content/CollaborationHubContent.php A content/CollaborationHubContentHandler.php M extension.json A includes/CollaborationKit.php 6 files changed, 420 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit refs/changes/88/277688/1 diff --git a/CollaborationKit.php b/CollaborationKit.php deleted file mode 100644 index 5452e3c..000 --- a/CollaborationKit.php +++ /dev/null @@ -1,6 +0,0 @@ -decode(); + return $this->hubID; + } + + /** +* @return string|null +*/ + public function getHubName() { + $this->decode(); + return $this->hubName; + } + + /** +* @return array +*/ + public function getHubScope() { + $this->decode(); + return $this->hubScope; + } + + /** +* @return boolean +*/ + public function isHubHub() { + $this->decode(); + return $this->isHubHub; + } + + /** +* @return string|null +*/ + public function getPageName() { + $this->decode(); + return $this->pageName; + } + + /** +* @return string|null +*/ + public function getDescription() { + $this->decode(); + return $this->description; + } + + /** +* @return array|null +*/ + public function getContent() { + $this->decode(); + return $this->content; + } + + /** +* @return array|null +*/ + public function getContentType() { + $this->decode(); + return $this->contentType; + } + + function __construct( $text ) { + parent::__construct( $text, 'CollaborationHubContent' ); + } + + /** +* Decodes the JSON schema into a PHP associative array. +* @return array: Schema array. +*/ + function getJsonData() { + return FormatJson::decode( $this->getNativeData() ); + } + + /** +* Decode and validate the contents. +* @return bool Whether the contents are valid +*/ + public function isValid() { + $this->decode(); // Populate $this->stuff stuff. + + // Required fields + if ( + !is_string( $this->getHubID() ) || + !is_string( $this->getDescription() ) + ) { + return false; + } + // HubHub fields + if ( $this->isHubHub() === true ) { + if ( + !is_string( $this->getHubName() ) || + !is_array( $this->getHubScope() ) + ) { + return false; + } + } else { + // HubPage fields + if ( + !is_string( $this->getPageName() ) + ) { + return false; + } + } + + // Content needs to either be wikitext or a sensible array. + if ( !is_string( $this->getContent() ) && !is_array( $this->getContent() ) ) { + return false; + } + if ( is_array( $this->getContent() ) ) { + $content = $this->getContent(); + foreach ( $content as $contentItem ) { + // 'item' is required; 'icon' and 'notes' are optional + if ( + !is_string( $contentItem['item'] ) || + ( !is_string( $contentItem['icon'] ) && $contentItem['icon'] !== null ) || + ( !is_string( $contentItem['notes'] ) && $contentItem['notes'] !== null ) + ) { + return false; + } + } + } + + return true; + } + + /** +* Decode the JSON contents and populate protected variables. +*/ + protected function decode() { + if ( $this->decoded ) { + return; + } + $jsonParse = $this->getData(); +
[MediaWiki-commits] [Gerrit] On Beta Cluster: Use different logo for login form - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: On Beta Cluster: Use different logo for login form .. On Beta Cluster: Use different logo for login form Bug: T115078 Change-Id: I8e6ca67736b03807c12268dde6849b8a17e9e591 --- M wmf-config/mobile-labs.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/mobile-labs.php b/wmf-config/mobile-labs.php index 765468f..2bea97a 100644 --- a/wmf-config/mobile-labs.php +++ b/wmf-config/mobile-labs.php @@ -17,6 +17,9 @@ } } +// T114552 +$wgMobileFrontendLogo = $wgLogo; + $wgMFForceSecureLogin = false; $wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; $wgMFSpecialCaseMainPage = $wmgMFSpecialCaseMainPage; -- To view, visit https://gerrit.wikimedia.org/r/243732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e6ca67736b03807c12268dde6849b8a17e9e591 Gerrit-PatchSet: 3 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Alex Monk Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Catrope Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More type hints in extras, no passing objects by ref - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/277687 Change subject: More type hints in extras, no passing objects by ref .. More type hints in extras, no passing objects by ref &$this should never be necessary Change-Id: I920dee6bf1e9286b4f83e361e67073366d595fad --- M extras/banner_history/BannerHistoryLogIdProcessor.php M extras/conversion_log/conversion_log.body.php M extras/custom_filters/custom_filters.body.php M extras/custom_filters/filters/functions/functions.body.php M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php M extras/custom_filters/filters/minfraud/minfraud.body.php M extras/custom_filters/filters/referrer/referrer.body.php M extras/custom_filters/filters/source/source.body.php M extras/extras.body.php M extras/session_velocity/session_velocity.body.php M gateway_common/gateway.adapter.php 11 files changed, 100 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/87/277687/1 diff --git a/extras/banner_history/BannerHistoryLogIdProcessor.php b/extras/banner_history/BannerHistoryLogIdProcessor.php index 9f620c9..20fa9a5 100644 --- a/extras/banner_history/BannerHistoryLogIdProcessor.php +++ b/extras/banner_history/BannerHistoryLogIdProcessor.php @@ -22,7 +22,7 @@ */ protected $gatewayAdapter; - protected static function singleton( $gatewayAdapter ) { + protected static function singleton( GatewayType $gatewayAdapter ) { static $instance; if ( !$instance ) { @@ -31,7 +31,7 @@ return $instance; } - protected function __construct( $gatewayAdapter ) { + protected function __construct( GatewayType $gatewayAdapter ) { $this->gatewayAdapter = $gatewayAdapter; $this->logger = DonationLoggerFactory::getLogger( @@ -80,9 +80,9 @@ * Handler for the GatewayReady hook. This is the class's entry point. * * @param GatewayType $gatewayAdapter -* @param DonationData $donationData +* @return bool always true */ - public static function onGatewayReady( $gatewayAdapter ) { + public static function onGatewayReady( GatewayType $gatewayAdapter ) { self::singleton( $gatewayAdapter ) ->queueAssociationOfIds(); diff --git a/extras/conversion_log/conversion_log.body.php b/extras/conversion_log/conversion_log.body.php index a41fdf8..585dfaa 100644 --- a/extras/conversion_log/conversion_log.body.php +++ b/extras/conversion_log/conversion_log.body.php @@ -33,7 +33,7 @@ return true; } - static function onPostProcess( GatewayType &$gateway_adapter ) { + static function onPostProcess( GatewayType $gateway_adapter ) { if ( !$gateway_adapter->getGlobal( 'EnableConversionLog' ) ) { return true; } @@ -41,7 +41,7 @@ return self::singleton( $gateway_adapter )->post_process(); } - static function singleton( GatewayType &$gateway_adapter ) { + static function singleton( GatewayType $gateway_adapter ) { if ( !self::$instance ) { self::$instance = new self( $gateway_adapter ); } diff --git a/extras/custom_filters/custom_filters.body.php b/extras/custom_filters/custom_filters.body.php index 6ee5f71..86855b1 100644 --- a/extras/custom_filters/custom_filters.body.php +++ b/extras/custom_filters/custom_filters.body.php @@ -33,7 +33,7 @@ */ protected $fraud_logger; - public function __construct( GatewayType &$gateway_adapter ) { + public function __construct( GatewayType $gateway_adapter ) { parent::__construct( $gateway_adapter ); //gateway_adapter is set in there. // load user action ranges and risk score $this->action_ranges = $this->gateway_adapter->getGlobal( 'CustomFiltersActionRanges' ); @@ -110,7 +110,7 @@ */ public function validate() { // expose a hook for custom filters - WmfFramework::runHooks( 'GatewayCustomFilter', array( &$this->gateway_adapter, &$this ) ); + WmfFramework::runHooks( 'GatewayCustomFilter', array( $this->gateway_adapter, $this ) ); $localAction = $this->determineAction(); $this->gateway_adapter->setValidationAction( $localAction ); @@ -153,7 +153,7 @@ return TRUE; } - static function onValidate( &$gateway_adapter ) { + static function onValidate( GatewayType $gateway_adapter ) { if ( !$gateway_adapter->getGlobal( 'EnableCustomFilters' ) ){ return true; } @@ -161,7 +161,7 @@ return
[MediaWiki-commits] [Gerrit] CRM-18246 Lybunt group clause not being included in temp tab... - change (wikimedia...civicrm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/277686 Change subject: CRM-18246 Lybunt group clause not being included in temp table due to order of operations .. CRM-18246 Lybunt group clause not being included in temp table due to order of operations Bug: T123671 Change-Id: Ic21e5df2666ff68a1f089e1f24cbb699071a2a26 --- M CRM/Report/Form/Contribute/Lybunt.php 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/86/277686/1 diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index 3e344b3..ae9ded9 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -414,7 +414,13 @@ * @return string */ public function whereGroupClause($field, $value, $op) { -if (empty($this->contactTempTable)) { +if ($op == 'notin') { + // We do not have an optimisation for this scenario at this stage. Use + // parent. + return parent::whereGroupClause($field, $value, $op); +} + +if (empty($this->groupTempTable)) { $group = new CRM_Contact_DAO_Group(); $group->is_active = 1; $group->find(); @@ -654,10 +660,13 @@ * @return string */ public function buildQuery($applyLimit = TRUE) { + +// Calling where & select before FROM allows us to build temp tables to use in from. +$this->where(); $this->select(); $this->from(); $this->customDataFrom(empty($this->contactTempTable)); -$this->where(); + $this->groupBy(); $this->orderBy(); $limitFilter = ''; -- To view, visit https://gerrit.wikimedia.org/r/277686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic21e5df2666ff68a1f089e1f24cbb699071a2a26 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Simplify option value retrieval, fail fast - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/277684 Change subject: Simplify option value retrieval, fail fast .. Simplify option value retrieval, fail fast Bug: T128389 Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/84/277684/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index 4a31066..b0999de 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -5,6 +5,8 @@ /** * return a map of option value (id) => option name + * + * FIXME: Break into separate functions rather than magically switching return type */ function civicrm_api_option_group($group_name, $key = null, $force = FALSE) { @@ -18,23 +20,17 @@ )); $cached_group[$group_name] = array(); $option_values = $api->values(); - foreach ($option_values as $row) - { - if (!array_search($key, $cached_group[$group_name])) { - $cached_group[$group_name][$row->value] = $row->name; - if (empty($row->name)) { - watchdog('wmf_civicrm', 'Option Value Not Found: %group_name -> %value', - array('%group_name' => $group_name, '%value' => print_r($row, TRUE)), - WATCHDOG_NOTICE - ); - } - } + foreach ($option_values as $row) { + $cached_group[$group_name][$row->value] = $row->name; } } if ($key) { // In this case, just lookup name and return the option value $forwards = array_flip( $cached_group[$group_name] ); + if ( !array_key_exists( $key, $forwards ) ) { + throw new DomainException( "Option value not found: {$group_name} -> {$key}" ); + } return $forwards[$key]; } return $cached_group[$group_name]; -- To view, visit https://gerrit.wikimedia.org/r/277684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcb4864ee347f45aaa000260cc73445029fc1eb8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add getFreeFormStopTransaction to GatewayType interface - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/277685 Change subject: Add getFreeFormStopTransaction to GatewayType interface .. Add getFreeFormStopTransaction to GatewayType interface Another candidate for a helper class Change-Id: I1b7453d9b6f408715d5caf9242512879dc414440 --- M gateway_common/GatewayType.php M gateway_common/gateway.adapter.php 2 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/85/277685/1 diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php index 0a8679a..a4b3f4d 100644 --- a/gateway_common/GatewayType.php +++ b/gateway_common/GatewayType.php @@ -326,4 +326,13 @@ */ public function getCurrentTransaction(); + /** +* For making freeform stomp messages. +* As these are all non-critical, we don't need to be as strict as we have been with the other stuff. +* But, we've got to have some standards. +* @param array $transaction The fields that we are interested in sending. +* @return array The fields that will actually be sent. So, $transaction ++ some other things we think we're likely to always need. +*/ + public function makeFreeformStompTransaction( $transaction ); + } diff --git a/gateway_common/gateway.adapter.php b/gateway_common/gateway.adapter.php index e57cc4f..b1f70a8 100644 --- a/gateway_common/gateway.adapter.php +++ b/gateway_common/gateway.adapter.php @@ -1614,13 +1614,6 @@ return $transaction; } - /** -* For making freeform stomp messages. -* As these are all non-critical, we don't need to be as strict as we have been with the other stuff. -* But, we've got to have some standards. -* @param array $transaction The fields that we are interested in sending. -* @return array The fields that will actually be sent. So, $transaction ++ some other things we think we're likely to always need. -*/ public function makeFreeformStompTransaction( $transaction ) { if ( !array_key_exists( 'php-message-class', $transaction ) ) { $this->logger->warning( "Trying to send a freeform STOMP message with no class defined. Bad programmer." ); -- To view, visit https://gerrit.wikimedia.org/r/277685 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b7453d9b6f408715d5caf9242512879dc414440 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] MentionPresentationModel: use Title::equals() - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/277683 Change subject: MentionPresentationModel: use Title::equals() .. MentionPresentationModel: use Title::equals() Change-Id: Ib0c5b0f5649edef79cf7ad272eb207711af8608d --- M includes/formatters/MentionPresentationModel.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/83/277683/1 diff --git a/includes/formatters/MentionPresentationModel.php b/includes/formatters/MentionPresentationModel.php index 4340a58..10328c4 100644 --- a/includes/formatters/MentionPresentationModel.php +++ b/includes/formatters/MentionPresentationModel.php @@ -149,7 +149,7 @@ } private function onAgentTalkpage() { - return $this->event->getTitle()->getPrefixedText() === $this->event->getAgent()->getTalkPage()->getPrefixedText(); + return $this->event->getTitle()->equals( $this->event->getAgent()->getTalkPage() ); } private function onUserTalkpage() { -- To view, visit https://gerrit.wikimedia.org/r/277683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0c5b0f5649edef79cf7ad272eb207711af8608d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Google detection bug fix - change (analytics...source)
OliverKeyes has submitted this change and it was merged. Change subject: Google detection bug fix .. Google detection bug fix - We noticed that requests referred from http://google.com were not being detected as coming from Google. This patch aims to fix that. Change-Id: Iab14d7398031f447e2aa8305a36895bfd17d141c --- M refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java M refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java M refinery-core/src/test/resources/referer_test_data.csv 3 files changed, 3 insertions(+), 2 deletions(-) Approvals: OliverKeyes: Verified; Looks good to me, approved diff --git a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java index 2339abf..60f121e 100644 --- a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java +++ b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java @@ -25,7 +25,7 @@ * to specify a string with spaces and symbols if needed. */ public enum SearchEngine { -GOOGLE("Google", "\\.google\\."), +GOOGLE("Google", "\\.?google\\."), YAHOO("Yahoo", "search\\.yahoo\\."), BING("Bing", "\\.bing\\."), YANDEX("Yandex", "yandex\\."), diff --git a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java index 8fe4bb8..c4a4b7a 100644 --- a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java +++ b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java @@ -38,7 +38,7 @@ /* * A simple pattern for search identification */ -private static final Pattern searchPattern = Pattern.compile("(\\.(baidu|bing|google)|search\\.yahoo|yandex)\\."); +private static final Pattern searchPattern = Pattern.compile("(\\.?(baidu|bing|google)|search\\.yahoo|yandex)\\."); /** * Crudely subsets a referer to just contain the domain, diff --git a/refinery-core/src/test/resources/referer_test_data.csv b/refinery-core/src/test/resources/referer_test_data.csv index c6de7b8..8e88ffa 100644 --- a/refinery-core/src/test/resources/referer_test_data.csv +++ b/refinery-core/src/test/resources/referer_test_data.csv @@ -2,6 +2,7 @@ Random internal link,https://zh.wikipedia.org/zh-tw/%E6%96%B9%E6%9D%B1%E6%98%87,internal,false,none Nada,-,none,false,none Google,https://www.google.co.id/,external (search engine),true,Google +Google,http://google.com/,external (search engine),true,Google Yahoo,http://search.yahoo.co.jp/search?fr=slv1-necpc9=%E4%B8%89%E5%8F%88=UTF-8,external (search engine),true,Yahoo Random external link,http://www.cowboom.com/product/1617241,external,false,none Bing,http://www.bing.com/search?q=Svengali+movie+1931=ufn,external (search engine),true,Bing -- To view, visit https://gerrit.wikimedia.org/r/277679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab14d7398031f447e2aa8305a36895bfd17d141c Gerrit-PatchSet: 2 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: BearlogaGerrit-Reviewer: Bearloga Gerrit-Reviewer: Nuria Gerrit-Reviewer: OliverKeyes Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix brokenness in FlowPresentationModel::isUserTalkPage() - change (mediawiki...Flow)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/277682 Change subject: Fix brokenness in FlowPresentationModel::isUserTalkPage() .. Fix brokenness in FlowPresentationModel::isUserTalkPage() It had false positives on page names like Talk:USERNAME because it didn't check the namespace, and it had false negatives on user names with spaces in them because it compared DB keys (which use underscores) with user names (which use spaces). Change-Id: I37d6c21c863d9e5f3f0376a80fc406d282eee788 --- M includes/Notifications/FlowPresentationModel.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/82/277682/1 diff --git a/includes/Notifications/FlowPresentationModel.php b/includes/Notifications/FlowPresentationModel.php index c79db7a..466dde0 100644 --- a/includes/Notifications/FlowPresentationModel.php +++ b/includes/Notifications/FlowPresentationModel.php @@ -145,7 +145,10 @@ } protected function isUserTalkPage() { + // Would like to do $this->event->getTitle()->equals( $this->user->getTalkPage() ) + // but $this->user is private in the parent class $username = $this->getViewingUserForGender(); - return $this->event->getTitle()->getDBkey() === $username; + return $this->event->getTitle()->getNamespace() === NS_USER_TALK && + $this->event->getTitle()->getPrefixedText() === $username; } } -- To view, visit https://gerrit.wikimedia.org/r/277682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I37d6c21c863d9e5f3f0376a80fc406d282eee788 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lazy loaded images in beta - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Lazy loaded images in beta .. Lazy loaded images in beta Arguably we can do this now. This will not work for Grade C browsers, but I suspect there are a low number of grade C browsers in mobile. Also beta users should expect experimental software. We should wait on outcome of T126793 and preferably merge after but lets not block merging this sprint... the bugs we can uncover by putting this in beta are far more important. (Note not done in beta given this is expected to be a default recommended config in future) Bug: T126590 Change-Id: I80dd9d92d42a674c57e98800277caa0e0d30b59e --- M extension.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 7fa686d..cfdb469 100644 --- a/extension.json +++ b/extension.json @@ -1994,7 +1994,7 @@ }, "MFLazyLoadImages": { "base": false, - "beta": false + "beta": true }, "MFLazyLoadReferences": { "base": false, -- To view, visit https://gerrit.wikimedia.org/r/275672 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80dd9d92d42a674c57e98800277caa0e0d30b59e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JdlrobsonGerrit-Reviewer: Bmansurov Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Track the # of times remnant refreshLinks jobs divide - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/277681 Change subject: Track the # of times remnant refreshLinks jobs divide .. Track the # of times remnant refreshLinks jobs divide Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 --- M includes/jobqueue/utils/BacklinkJobUtils.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/277681/1 diff --git a/includes/jobqueue/utils/BacklinkJobUtils.php b/includes/jobqueue/utils/BacklinkJobUtils.php index 7fb020b..a81cade 100644 --- a/includes/jobqueue/utils/BacklinkJobUtils.php +++ b/includes/jobqueue/utils/BacklinkJobUtils.php @@ -137,6 +137,10 @@ 'batchSize' => $realBSize, 'subranges' => array_slice( $ranges, 1 ) ], + // Track how many times the base job divided for debugging + 'division' => isset( $params['division'] ) + ? ( $params['division'] + 1 ) + : 1 ] + $extraParams ); } -- To view, visit https://gerrit.wikimedia.org/r/277681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32ec09cf1fc6d3a14d99b30ad465fcf6912ce9e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DNS: Adding production entries for wasat Bug:T129930 - change (operations/dns)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/277680 Change subject: DNS: Adding production entries for wasat Bug:T129930 .. DNS: Adding production entries for wasat Bug:T129930 Change-Id: I1f665177be05eecf449993b494fc33eed7834531 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/80/277680/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index e7c8195..7be00ea 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3196,6 +3196,7 @@ 42 1H IN PTR es2019.codfw.wmnet. 43 1H IN PTR scb2002.codfw.wmnet. 44 1H IN PTR rdb2006.codfw.wmnet. +45 1H IN PTR wasat.codfw.wmnet. $ORIGIN 49.192.{{ zonename }}. 1 1H IN PTR vl2020-eth3.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 08dc4f9..486ac48 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2774,6 +2774,7 @@ subra 1H IN A10.192.16.124 sinistra1H IN A10.192.32.131 suhail 1H IN A10.192.0.121 +wasat 1H IN A10.192.48.45 wtp2001 1H IN A10.192.16.43 wtp2002 1H IN A10.192.16.44 wtp2003 1H IN A10.192.16.45 -- To view, visit https://gerrit.wikimedia.org/r/277680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f665177be05eecf449993b494fc33eed7834531 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Search engine detection bug fix - change (analytics...source)
Bearloga has uploaded a new change for review. https://gerrit.wikimedia.org/r/277679 Change subject: Search engine detection bug fix .. Search engine detection bug fix - We noticed that requests referred from http://google.com were not being detected as coming from Google. This patch aims to fix that. - Also adds the Russian search engine Rambler.ru to the SE enum. Change-Id: Iab14d7398031f447e2aa8305a36895bfd17d141c --- M refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java M refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java M refinery-core/src/test/resources/referer_test_data.csv 3 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source refs/changes/79/277679/1 diff --git a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java index 2339abf..0150907 100644 --- a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java +++ b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngine.java @@ -25,11 +25,12 @@ * to specify a string with spaces and symbols if needed. */ public enum SearchEngine { -GOOGLE("Google", "\\.google\\."), +GOOGLE("Google", "\\.?google\\."), YAHOO("Yahoo", "search\\.yahoo\\."), BING("Bing", "\\.bing\\."), YANDEX("Yandex", "yandex\\."), -BAIDU("Baidu", "\\.baidu\\."); +BAIDU("Baidu", "\\.baidu\\."), +RAMBLER("Rambler", "\\.rambler\\."); private final String searchEngineName; private final Pattern pattern; diff --git a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java index 8fe4bb8..9cf6655 100644 --- a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java +++ b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/SearchEngineClassifier.java @@ -38,7 +38,7 @@ /* * A simple pattern for search identification */ -private static final Pattern searchPattern = Pattern.compile("(\\.(baidu|bing|google)|search\\.yahoo|yandex)\\."); +private static final Pattern searchPattern = Pattern.compile("(\\.?(rambler|baidu|bing|google)|search\\.yahoo|yandex)\\."); /** * Crudely subsets a referer to just contain the domain, diff --git a/refinery-core/src/test/resources/referer_test_data.csv b/refinery-core/src/test/resources/referer_test_data.csv index c6de7b8..16ada44 100644 --- a/refinery-core/src/test/resources/referer_test_data.csv +++ b/refinery-core/src/test/resources/referer_test_data.csv @@ -2,8 +2,10 @@ Random internal link,https://zh.wikipedia.org/zh-tw/%E6%96%B9%E6%9D%B1%E6%98%87,internal,false,none Nada,-,none,false,none Google,https://www.google.co.id/,external (search engine),true,Google +Google,http://google.com/,external (search engine),true,Google Yahoo,http://search.yahoo.co.jp/search?fr=slv1-necpc9=%E4%B8%89%E5%8F%88=UTF-8,external (search engine),true,Yahoo Random external link,http://www.cowboom.com/product/1617241,external,false,none Bing,http://www.bing.com/search?q=Svengali+movie+1931=ufn,external (search engine),true,Bing Baidu,https://www.baidu.com/link?url=,external (search engine),true,Baidu Yandex,http://yandex.ru/clck/jsredir?from=yandex.ru%3Bsearch%2F%3Bweb%3B%3B,external (search engine),true,Yandex +Rambler,http://www.rambler.ru/,external (search engine),true,Rambler -- To view, visit https://gerrit.wikimedia.org/r/277679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab14d7398031f447e2aa8305a36895bfd17d141c Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery/source Gerrit-Branch: master Gerrit-Owner: Bearloga___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add test case for last section - change (mediawiki...MobileFrontend)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/277678 Change subject: Add test case for last section .. Add test case for last section (Sumit feel free to merge into your patchset) Bug: T130025 Change-Id: Icd67432f022787bbf12ebaf46a5033b6f6564dbf --- M tests/phpunit/MobileFormatterTest.php 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/78/277678/1 diff --git a/tests/phpunit/MobileFormatterTest.php b/tests/phpunit/MobileFormatterTest.php index 115c789..bc20c8f 100644 --- a/tests/phpunit/MobileFormatterTest.php +++ b/tests/phpunit/MobileFormatterTest.php @@ -83,6 +83,18 @@ $enableSections, false, false, true, ), + // https://phabricator.wikimedia.org/T130025 + array( + 'textheading 1text' . $originalImage + 'text' + . 'heading 1' + . 'text' + . $noscript + . $placeholder + . '' + $enableSections, + false, false, true, + ), // # Removal of images array( -- To view, visit https://gerrit.wikimedia.org/r/277678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd67432f022787bbf12ebaf46a5033b6f6564dbf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Turn on RecursiveLinkPurge log bucket, for I29636c045 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Turn on RecursiveLinkPurge log bucket, for I29636c045 .. Turn on RecursiveLinkPurge log bucket, for I29636c045 Change-Id: I87c174cf8379268e5b2fdf93af51a1f6e890f9da --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1a0cc3a..c92530c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -4509,6 +4509,7 @@ 'ratelimit' => 'debug', 'recursion-guard' => 'debug', 'redis' => 'info', // -asher 2012/10/12 + 'RecursiveLinkPurge' => 'debug', 'Renameuser' => 'debug', 'resourceloader' => 'debug', 'ResourceLoaderImage' => 'debug', // - demon, matmarex -- To view, visit https://gerrit.wikimedia.org/r/277677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87c174cf8379268e5b2fdf93af51a1f6e890f9da Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livnehGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use GatewayType hints for everything in extras - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Use GatewayType hints for everything in extras .. Use GatewayType hints for everything in extras Add functions to GatewayType interface as needed, move PHPDoc comments there from abstract adapter class. Also declare two implicitly defined fields. Change-Id: I71461f9cd979252702fb679954833d9087095efd --- M extras/banner_history/BannerHistoryLogIdProcessor.php M extras/conversion_log/conversion_log.body.php M extras/custom_filters/custom_filters.body.php M extras/custom_filters/filters/functions/functions.body.php M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php M extras/custom_filters/filters/minfraud/minfraud.body.php M extras/custom_filters/filters/referrer/referrer.body.php M extras/custom_filters/filters/source/source.body.php M extras/extras.body.php M extras/session_velocity/session_velocity.body.php M gateway_common/GatewayType.php M gateway_common/gateway.adapter.php 12 files changed, 133 insertions(+), 83 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/extras/banner_history/BannerHistoryLogIdProcessor.php b/extras/banner_history/BannerHistoryLogIdProcessor.php index 3761bb5..9f620c9 100644 --- a/extras/banner_history/BannerHistoryLogIdProcessor.php +++ b/extras/banner_history/BannerHistoryLogIdProcessor.php @@ -18,7 +18,7 @@ protected $logger; /** -* @var GatewayAdapter +* @var GatewayType */ protected $gatewayAdapter; @@ -79,7 +79,7 @@ /** * Handler for the GatewayReady hook. This is the class's entry point. * -* @param GatewayAdapter $gatewayAdapter +* @param GatewayType $gatewayAdapter * @param DonationData $donationData */ public static function onGatewayReady( $gatewayAdapter ) { @@ -89,4 +89,4 @@ return true; } -} \ No newline at end of file +} diff --git a/extras/conversion_log/conversion_log.body.php b/extras/conversion_log/conversion_log.body.php index 2ec09c7..a41fdf8 100644 --- a/extras/conversion_log/conversion_log.body.php +++ b/extras/conversion_log/conversion_log.body.php @@ -16,8 +16,9 @@ return true; } + $response = $this->gateway_adapter->getTransactionResponse(); // make sure the response property has been set (signifying a transaction has been made) - if ( !$this->gateway_adapter->getTransactionResponse() ) { + if ( !$response ) { return false; } @@ -26,13 +27,13 @@ 'contribution_tracking_id' ), "Gateway response: " . addslashes( - $this->gateway_adapter->getTransactionMessage() - ), '"' . addslashes( json_encode( $this->gateway_adapter->getTransactionData() ) ) . '"' + $response->getTxnMessage() + ), '"' . addslashes( json_encode( $response->getData() ) ) . '"' ); return true; } - static function onPostProcess( &$gateway_adapter ) { + static function onPostProcess( GatewayType &$gateway_adapter ) { if ( !$gateway_adapter->getGlobal( 'EnableConversionLog' ) ) { return true; } @@ -40,7 +41,7 @@ return self::singleton( $gateway_adapter )->post_process(); } - static function singleton( &$gateway_adapter ) { + static function singleton( GatewayType &$gateway_adapter ) { if ( !self::$instance ) { self::$instance = new self( $gateway_adapter ); } diff --git a/extras/custom_filters/custom_filters.body.php b/extras/custom_filters/custom_filters.body.php index c424c9e..6ee5f71 100644 --- a/extras/custom_filters/custom_filters.body.php +++ b/extras/custom_filters/custom_filters.body.php @@ -33,7 +33,7 @@ */ protected $fraud_logger; - public function __construct( &$gateway_adapter ) { + public function __construct( GatewayType &$gateway_adapter ) { parent::__construct( $gateway_adapter ); //gateway_adapter is set in there. // load user action ranges and risk score $this->action_ranges = $this->gateway_adapter->getGlobal( 'CustomFiltersActionRanges' ); diff --git a/extras/custom_filters/filters/functions/functions.body.php b/extras/custom_filters/filters/functions/functions.body.php index 77f94e3..ba80abd 100644 --- a/extras/custom_filters/filters/functions/functions.body.php +++ b/extras/custom_filters/filters/functions/functions.body.php @@ -14,7 +14,7 @@ */ public $cfo; -
[MediaWiki-commits] [Gerrit] Turn on RecursiveLinkPurge log bucket, for I29636c045 - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/277677 Change subject: Turn on RecursiveLinkPurge log bucket, for I29636c045 .. Turn on RecursiveLinkPurge log bucket, for I29636c045 Change-Id: I87c174cf8379268e5b2fdf93af51a1f6e890f9da --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/77/277677/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 1a0cc3a..c92530c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -4509,6 +4509,7 @@ 'ratelimit' => 'debug', 'recursion-guard' => 'debug', 'redis' => 'info', // -asher 2012/10/12 + 'RecursiveLinkPurge' => 'debug', 'Renameuser' => 'debug', 'resourceloader' => 'debug', 'ResourceLoaderImage' => 'debug', // - demon, matmarex -- To view, visit https://gerrit.wikimedia.org/r/277677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87c174cf8379268e5b2fdf93af51a1f6e890f9da Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use GatewayType hints in a few places, add functions - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Use GatewayType hints in a few places, add functions .. Use GatewayType hints in a few places, add functions Also moves the PHPDoc comments from the abstract adapter class into the interface. Change-Id: Ifc040dd7d069d087f38befb8d99cd3eb8d79c7e3 --- M gateway_common/DataValidator.php M gateway_common/DonationLoggerFactory.php M gateway_common/GatewayType.php M gateway_common/PaymentMethod.php M gateway_common/ResultPages.php M gateway_common/gateway.adapter.php 6 files changed, 97 insertions(+), 72 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php index 956d439..a6e2457 100644 --- a/gateway_common/DataValidator.php +++ b/gateway_common/DataValidator.php @@ -180,7 +180,7 @@ * validate * Run all the validation rules we have defined against a (hopefully * normalized) DonationInterface data set. -* @param GatewayAdapter $gateway +* @param GatewayType $gateway * @param array $data The DonationInterface data set, or a subset thereof. * @param array $check_not_empty An array of fields to do empty validation * on. If this is not populated, no fields will throw errors for being empty, @@ -191,7 +191,7 @@ * the main DonationInterface Form class to display. The array will be empty * if no errors were generated and everything passed OK. */ - public static function validate( GatewayAdapter $gateway, $data, $check_not_empty = array() ){ + public static function validate( GatewayType $gateway, $data, $check_not_empty = array() ){ //return the array of errors that should be generated on validate. //just the same way you'd do it if you were a form passing the error array around. diff --git a/gateway_common/DonationLoggerFactory.php b/gateway_common/DonationLoggerFactory.php index 63d324f..7e69ae3 100644 --- a/gateway_common/DonationLoggerFactory.php +++ b/gateway_common/DonationLoggerFactory.php @@ -16,13 +16,13 @@ public static $overrideLogger = null; /** -* @param GatewayAdapter $adapter Get settings from this instance +* @param GatewayType $adapter Get settings from this instance * @param string $suffix Append this string to the adapter identifier * @param LogPrefixProvider $prefixer Optionally use this to override *prefixing via the adapter. * @return \Psr\Log\LoggerInterface */ - public static function getLogger( GatewayAdapter $adapter = null, $suffix = '', LogPrefixProvider $prefixer = null ) { + public static function getLogger( GatewayType $adapter = null, $suffix = '', LogPrefixProvider $prefixer = null ) { if ( self::$overrideLogger !== null ) { return self::$overrideLogger; } @@ -65,10 +65,10 @@ /** * Retrieve a profiler instance which saves communication statistics * if the adapter's SaveCommStats global is set to true. -* @param GatewayAdapter $adapter +* @param GatewayType $adapter * @return DonationProfiler */ - public static function getProfiler( GatewayAdapter $adapter ) { + public static function getProfiler( GatewayType $adapter ) { if ( $adapter::getGlobal( 'SaveCommStats' ) ) { $commLogger = self::getLogger( $adapter, '_commstats' ); } else { diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php index c84ef79..93e33dd 100644 --- a/gateway_common/GatewayType.php +++ b/gateway_common/GatewayType.php @@ -8,6 +8,40 @@ // all the particulars of the child classes. All. /** +* Gets the name of the payment processor, e.g. Adyen +* @return string +*/ + public static function getGatewayName(); + + /** +* Get a tag to use to identify this adapter in logs, e.g. amazon_gateway +* @return string +*/ + public static function getLogIdentifier(); + + /** +* This function is important. +* All the globals in Donation Interface should be accessed in this manner +* if they are meant to have a default value, but can be overridden by any +* of the gateways. It will check to see if a gateway-specific global +* exists, and if one is not set, it will pull the default from the +* wgDonationInterface definitions. Through this function, it is no longer +* necessary to define gateway-specific globals in LocalSettings unless you +* wish to override the default value for all gateways. +* If the variable exists in
[MediaWiki-commits] [Gerrit] Call instance method 'cause we have an instance - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Call instance method 'cause we have an instance .. Call instance method 'cause we have an instance Change-Id: I9d7a4bfb9d3c3baf952ea28e996db53644437d18 --- M gateway_common/DonationLoggerFactory.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/DonationLoggerFactory.php b/gateway_common/DonationLoggerFactory.php index 7e69ae3..ec71fe6 100644 --- a/gateway_common/DonationLoggerFactory.php +++ b/gateway_common/DonationLoggerFactory.php @@ -69,7 +69,7 @@ * @return DonationProfiler */ public static function getProfiler( GatewayType $adapter ) { - if ( $adapter::getGlobal( 'SaveCommStats' ) ) { + if ( $adapter->getGlobal( 'SaveCommStats' ) ) { $commLogger = self::getLogger( $adapter, '_commstats' ); } else { $commLogger = null; @@ -77,7 +77,7 @@ return new DonationProfiler( self::getLogger( $adapter ), $commLogger, - $adapter::getGatewayName() + $adapter->getGatewayName() ); } } -- To view, visit https://gerrit.wikimedia.org/r/277608 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d7a4bfb9d3c3baf952ea28e996db53644437d18 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith 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] Use GatewayType hints for everything in extras - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/277676 Change subject: Use GatewayType hints for everything in extras .. Use GatewayType hints for everything in extras Add functions to GatewayType interface as needed, move PHPDoc comments there from abstract adapter class. Also declare two implicitly defined fields. Change-Id: I71461f9cd979252702fb679954833d9087095efd --- M extras/banner_history/BannerHistoryLogIdProcessor.php M extras/conversion_log/conversion_log.body.php M extras/custom_filters/custom_filters.body.php M extras/custom_filters/filters/functions/functions.body.php M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php M extras/custom_filters/filters/minfraud/minfraud.body.php M extras/custom_filters/filters/referrer/referrer.body.php M extras/custom_filters/filters/source/source.body.php M extras/extras.body.php M extras/session_velocity/session_velocity.body.php M gateway_common/GatewayType.php M gateway_common/gateway.adapter.php 12 files changed, 133 insertions(+), 83 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/76/277676/1 diff --git a/extras/banner_history/BannerHistoryLogIdProcessor.php b/extras/banner_history/BannerHistoryLogIdProcessor.php index 3761bb5..9f620c9 100644 --- a/extras/banner_history/BannerHistoryLogIdProcessor.php +++ b/extras/banner_history/BannerHistoryLogIdProcessor.php @@ -18,7 +18,7 @@ protected $logger; /** -* @var GatewayAdapter +* @var GatewayType */ protected $gatewayAdapter; @@ -79,7 +79,7 @@ /** * Handler for the GatewayReady hook. This is the class's entry point. * -* @param GatewayAdapter $gatewayAdapter +* @param GatewayType $gatewayAdapter * @param DonationData $donationData */ public static function onGatewayReady( $gatewayAdapter ) { @@ -89,4 +89,4 @@ return true; } -} \ No newline at end of file +} diff --git a/extras/conversion_log/conversion_log.body.php b/extras/conversion_log/conversion_log.body.php index 2ec09c7..a41fdf8 100644 --- a/extras/conversion_log/conversion_log.body.php +++ b/extras/conversion_log/conversion_log.body.php @@ -16,8 +16,9 @@ return true; } + $response = $this->gateway_adapter->getTransactionResponse(); // make sure the response property has been set (signifying a transaction has been made) - if ( !$this->gateway_adapter->getTransactionResponse() ) { + if ( !$response ) { return false; } @@ -26,13 +27,13 @@ 'contribution_tracking_id' ), "Gateway response: " . addslashes( - $this->gateway_adapter->getTransactionMessage() - ), '"' . addslashes( json_encode( $this->gateway_adapter->getTransactionData() ) ) . '"' + $response->getTxnMessage() + ), '"' . addslashes( json_encode( $response->getData() ) ) . '"' ); return true; } - static function onPostProcess( &$gateway_adapter ) { + static function onPostProcess( GatewayType &$gateway_adapter ) { if ( !$gateway_adapter->getGlobal( 'EnableConversionLog' ) ) { return true; } @@ -40,7 +41,7 @@ return self::singleton( $gateway_adapter )->post_process(); } - static function singleton( &$gateway_adapter ) { + static function singleton( GatewayType &$gateway_adapter ) { if ( !self::$instance ) { self::$instance = new self( $gateway_adapter ); } diff --git a/extras/custom_filters/custom_filters.body.php b/extras/custom_filters/custom_filters.body.php index c424c9e..6ee5f71 100644 --- a/extras/custom_filters/custom_filters.body.php +++ b/extras/custom_filters/custom_filters.body.php @@ -33,7 +33,7 @@ */ protected $fraud_logger; - public function __construct( &$gateway_adapter ) { + public function __construct( GatewayType &$gateway_adapter ) { parent::__construct( $gateway_adapter ); //gateway_adapter is set in there. // load user action ranges and risk score $this->action_ranges = $this->gateway_adapter->getGlobal( 'CustomFiltersActionRanges' ); diff --git a/extras/custom_filters/filters/functions/functions.body.php b/extras/custom_filters/filters/functions/functions.body.php index 77f94e3..ba80abd 100644 --- a/extras/custom_filters/filters/functions/functions.body.php +++ b/extras/custom_filters/filters/functions/functions.body.php
[MediaWiki-commits] [Gerrit] Add infrastructure for handling different formats. - change (wikidata...rdf)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/277674 Change subject: Add infrastructure for handling different formats. .. Add infrastructure for handling different formats. Bug: T130066 Change-Id: Ia572b27f9d522770fae9419263295eb7cb52f7c7 --- M common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java M gui M tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java M tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java M tools/src/test/java/org/wikidata/query/rdf/tool/rdf/MungerUnitTest.java 5 files changed, 124 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf refs/changes/74/277674/1 diff --git a/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java b/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java index 0b99d2b..d8a39ab 100644 --- a/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java +++ b/common/src/main/java/org/wikidata/query/rdf/common/uri/SchemaDotOrg.java @@ -13,6 +13,10 @@ */ public static final String VERSION = NAMESPACE + "version"; /** + * Wikibase uses the MediaWiki revision as the version. + */ +public static final String SOFTWARE_VERSION = NAMESPACE + "softwareVersion"; +/** * Wikibase adds this to EntityData with the date of the revision of the entity. */ public static final String DATE_MODIFIED = NAMESPACE + "dateModified"; diff --git a/gui b/gui index 653f08e..e3a44e2 16 --- a/gui +++ b/gui -Subproject commit 653f08e654eff0bebf34ad088edddf60cb62bde2 +Subproject commit e3a44e2fa619d2ba9fa4bb5e1cff6a6448001063 diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java b/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java index 8f284f3..8f456b9 100644 --- a/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java +++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Munge.java @@ -313,6 +313,9 @@ return; } if (subject.equals(Ontology.DUMP)) { +if (statement.getPredicate().stringValue().equals(SchemaDotOrg.SOFTWARE_VERSION)) { + munger.setFormatVersion(statement.getObject().stringValue()); +} /* * Just pipe dump statements strait through. */ diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java index 67d1ee5..6e2509a 100644 --- a/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java +++ b/tools/src/main/java/org/wikidata/query/rdf/tool/rdf/Munger.java @@ -6,10 +6,12 @@ import java.util.Collection; import java.util.Collections; import java.util.Date; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Set; import java.util.TimeZone; @@ -77,6 +79,28 @@ */ private boolean keepTypes; +/** + * Format version we're dealing with. + */ +private String dumpFormatVersion; + +/** + * Interface to handle format transformations. + */ +public interface FormatHandler { +/** + * Transform statement to current latest format. + * @param statement + * @return Transformed statement or null if it needs to be deleted. + */ +Statement handle(Statement statement); +} + +/** + * Map of format handlers. + */ +private final MapformatHandlers; + public Munger(WikibaseUris uris) { this(uris, null, null, false); } @@ -87,6 +111,7 @@ this.limitLabelLanguages = limitLabelLanguages; this.singleLabelModeLanguages = singleLabelModeLanguages; this.removeSiteLinks = removeSiteLinks; +this.formatHandlers = new HashMap<>(); } /** @@ -140,6 +165,23 @@ */ public Munger removeSiteLinks() { return new Munger(uris, limitLabelLanguages, singleLabelModeLanguages, true); +} + +/** + * Set format version. + * @param version + */ +public void setFormatVersion(String version) { +this.dumpFormatVersion = version; +} + +/** + * Add handler for specific non-default format. + * @param version Version to handle. + * @param handler Handler. + */ +public void addFormatHandler(String version, FormatHandler handler) { +formatHandlers.put(version, handler); } /** @@ -278,6 +320,11 @@ */ private String predicate; +/** + * Format handler for current format. + */ +private FormatHandler formatHandler; + public MungeOperation(String entityId, Collection statements, Collection existingValues,
[MediaWiki-commits] [Gerrit] DNS:Adding mgmt entries for wasat Bug:T129930 - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: DNS:Adding mgmt entries for wasat Bug:T129930 .. DNS:Adding mgmt entries for wasat Bug:T129930 Change-Id: I0e37550a8e7bd3fbf6a709b7b0ffcce441329f43 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 6 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index e7c8195..a071417 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -4127,6 +4127,9 @@ 247 1H IN PTR wmf6400.mgmt.codfw.wmnet. 248 1H IN PTR rdb2006.mgmt.codfw.wmnet. 248 1H IN PTR wmf6401.mgmt.codfw.wmnet. +249 1H IN PTR wasat.mgmt.codfw.wmnet. +249 1H IN PTR wmf6402.mgmt.codfw.wmnet. + ; 10.195.0.0/25 - frack.codfw subnets $ORIGIN 0.195.{{ zonename }}. diff --git a/templates/wmnet b/templates/wmnet index 08dc4f9..9816c36 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -3410,6 +3410,7 @@ tegmen 1H IN A10.193.1.27 tmh2001 1H IN A10.193.1.8 tmh2002 1H IN A10.193.1.9 +wasat 1H IN A10.193.2.249 wtp2001 1H IN A10.193.2.15 wtp2002 1H IN A10.193.2.16 wtp2003 1H IN A10.193.2.17 @@ -3789,6 +3790,8 @@ WMF6399 1H IN A10.193.2.246 WMF6400 1H IN A10.193.2.247 WMF6401 1H IN A10.193.2.248 +WMF6402 1H IN A10.193.2.249 + ; ; ESAMS -- To view, visit https://gerrit.wikimedia.org/r/277597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e37550a8e7bd3fbf6a709b7b0ffcce441329f43 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Follow-up to sign-up portion of the login form - change (mediawiki/core)
VolkerE has uploaded a new change for review. https://gerrit.wikimedia.org/r/277647 Change subject: Follow-up to sign-up portion of the login form .. Follow-up to sign-up portion of the login form Following up patch I2cc642ddc78f1b436e47261568601be592fe1fa4 and fixing selector specifity issue and open design request on making sign-up label bold. Also making login button following `ButtonWidget (progressive)` from OOjs UI. As this is about this specific button only, we're staying with styles on specific selector for now. Bug: T89860 Change-Id: I565cab504be40e8a97695f1416437348d39695fc --- M resources/src/mediawiki.special/mediawiki.special.userlogin.common.css M resources/src/mediawiki.special/mediawiki.special.userlogin.login.css 2 files changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/47/277647/1 diff --git a/resources/src/mediawiki.special/mediawiki.special.userlogin.common.css b/resources/src/mediawiki.special/mediawiki.special.userlogin.common.css index fd907ac..9da6c83 100644 --- a/resources/src/mediawiki.special/mediawiki.special.userlogin.common.css +++ b/resources/src/mediawiki.special/mediawiki.special.userlogin.common.css @@ -1,5 +1,5 @@ -/* Styles for user login and signup forms */ -.mw-form-related-link-container { +/* User login and signup forms */ +.mw-ui-vform .mw-form-related-link-container { margin-bottom: 0.5em; text-align: center; } diff --git a/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css b/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css index 42d5693..bd778b2 100644 --- a/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css +++ b/resources/src/mediawiki.special/mediawiki.special.userlogin.login.css @@ -5,4 +5,30 @@ background: url( images/glyph-people-large.png ) no-repeat 50%; margin: 0 auto; padding-top: 7.8em; + font-weight: bold; } + +/* Login Button, following `ButtonWidget (progressive)` from OOjs UI */ +#mw-createaccount-join { + color: #347bff; +} + #mw-createaccount-join:hover { + background-color: #ebf2ff; /* rgba(52, 123, 255, 0.1); */ + border-color: #859ecc; + box-shadow: none; + } + #mw-createaccount-join:active { + background-color: #ebf2ff; + color: #1f4999; + border-color: #1f4999; + } + #mw-createaccount-join:focus { + background-color: #fff; + color: #1f4999; + border-color: #1f4999; + box-shadow: inset 0 0 0 1px #1f4999; + } + #mw-createaccount-join:active:focus { + background-color: #ebf2ff; + } + -- To view, visit https://gerrit.wikimedia.org/r/277647 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I565cab504be40e8a97695f1416437348d39695fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] Introduce magic comments for setting default view - change (wikidata...gui)
jenkins-bot has submitted this change and it was merged. Change subject: Introduce magic comments for setting default view .. Introduce magic comments for setting default view This enables defining a default view for a SPARQL query by adding a comment like #defaultView:ImageGrid or #defaultView:Map Change-Id: Icfd05a37b33e0642aa02b5bff1bc95f3ff443273 --- M wikibase/queryService/ui/App.js M wikibase/queryService/ui/editor/hint/Sparql.js M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js M wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js 4 files changed, 50 insertions(+), 19 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js index 46e65da..41fea75 100644 --- a/wikibase/queryService/ui/App.js +++ b/wikibase/queryService/ui/App.js @@ -68,9 +68,9 @@ * @private **/ SELF.prototype._resultBrowsers = { - TableResultBrowser: {icon: 'th', label: 'Table', object: null, $element: null }, - ImageResultBrowser: {icon: 'picture', label: 'Image Grid', object: null, $element: null }, - CoordinateResultBrowser: {icon: 'map-marker', label: 'Map', object: null, $element: null } + Table: {icon: 'th', label: 'Table', class: 'TableResultBrowser', object: null, $element: null }, + ImageGrid: {icon: 'picture', label: 'Image Grid', class: 'ImageResultBrowser', object: null, $element: null }, + Map: {icon: 'map-marker', label: 'Map', class: 'CoordinateResultBrowser', object: null, $element: null } }; /** @@ -405,25 +405,12 @@ return false; } - var defaultBrowser = null; - $.each( this._resultBrowsers, function( className, b ){ - var instance = new wikibase.queryService.ui.resultBrowser[ className ](); - instance.setResult ( api.getResultRawData() ); - - if( !defaultBrowser ){ - defaultBrowser = instance; - } else { - defaultBrowser.addVisitor( instance ); - } - - b.object = instance; - } ); - + var defaultBrowser = this._createResultBrowsers( api.getResultRawData() ); this._showActionMessage( 'Generating View' , 'success', 100); window.setTimeout( function() { + $queryResult.show(); defaultBrowser.draw( $queryResult ); self._hideActionMessage(); - $queryResult.show(); self._handleQueryResultBrowsers(); }, 20 ); @@ -432,6 +419,45 @@ /** * @private +* @return {object} default result browser +*/ + SELF.prototype._createResultBrowsers = function( resultData ) { + + var defaultBrowser = this._getDefaultResultBrowser(); + + //instantiate + $.each( this._resultBrowsers, function( key, b ){ + var instance = new wikibase.queryService.ui.resultBrowser[ b.class ](); + if( defaultBrowser === null || defaultBrowser === key ){ + defaultBrowser = instance; + } + b.object = instance; + } ); + + //wire up + $.each( this._resultBrowsers, function( key, b ){ + defaultBrowser.addVisitor( b.object ); + b.object.setResult( resultData ); + } ); + + return defaultBrowser; + }; + + /** +* @private +*/ + SELF.prototype._getDefaultResultBrowser = function() { + var match = this._editor.getValue().match(/\#defaultView:(.*)/); + + if( match && this._resultBrowsers[ match[1] ] ){ + return match[1]; + } + + return null; + }; + + /** +* @private */ SELF.prototype._handleQueryResultBrowsers = function() { var self = this; diff --git a/wikibase/queryService/ui/editor/hint/Sparql.js b/wikibase/queryService/ui/editor/hint/Sparql.js index 7e6ffb6..c68fc6c 100755 --- a/wikibase/queryService/ui/editor/hint/Sparql.js +++ b/wikibase/queryService/ui/editor/hint/Sparql.js @@ -20,7 +20,9 @@ 'SERVICE', 'SERVICE wikibase:label {\n bd:serviceParam wikibase:language "en" .\n}', 'BASE', 'PREFIX', 'REDUCED', 'FROM', 'LIMIT', 'OFFSET', 'HAVING', -
[MediaWiki-commits] [Gerrit] Update VE-MW submodule to wmf/1.27.0-wmf.16 - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update VE-MW submodule to wmf/1.27.0-wmf.16 .. Update VE-MW submodule to wmf/1.27.0-wmf.16 Change-Id: Id72d0ba717965c4abf24615f5c5d3119508020af --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/VisualEditor b/extensions/VisualEditor index c8bf325..99cd40b 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit c8bf32596fbd57c2f2371355b99acc50b614ac2a +Subproject commit 99cd40bccd32645155ccb158beaab5d092013274 -- To view, visit https://gerrit.wikimedia.org/r/277618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id72d0ba717965c4abf24615f5c5d3119508020af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: KrinkleGerrit-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] Add RecursiveLinkPurge log for API requests - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add RecursiveLinkPurge log for API requests .. Add RecursiveLinkPurge log for API requests Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7 --- M includes/api/ApiPurge.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 36b62f5..64bb9ba 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -24,6 +24,7 @@ * * @file */ +use MediaWiki\Logger\LoggerFactory; /** * API interface for page purging @@ -75,6 +76,17 @@ $enableParserCache ); + # Logging to better see expensive usage patterns + if ( $forceRecursiveLinkUpdate ) { + LoggerFactory::getInstance( 'RecursiveLinkPurge' )->info( + "Recursive link purge enqueued for {title}", + [ + 'user' => $this->getUser()->getName(), + 'title' => $title->getPrefixedText() + ] + ); + } + # Update the links tables $updates = $content->getSecondaryDataUpdates( $title, null, $forceRecursiveLinkUpdate, $p_result ); -- To view, visit https://gerrit.wikimedia.org/r/277620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Ori.livnehGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Anomie Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add RecursiveLinkPurge log for API requests - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add RecursiveLinkPurge log for API requests .. Add RecursiveLinkPurge log for API requests Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7 --- M includes/api/ApiPurge.php 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 36b62f5..64bb9ba 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -24,6 +24,7 @@ * * @file */ +use MediaWiki\Logger\LoggerFactory; /** * API interface for page purging @@ -75,6 +76,17 @@ $enableParserCache ); + # Logging to better see expensive usage patterns + if ( $forceRecursiveLinkUpdate ) { + LoggerFactory::getInstance( 'RecursiveLinkPurge' )->info( + "Recursive link purge enqueued for {title}", + [ + 'user' => $this->getUser()->getName(), + 'title' => $title->getPrefixedText() + ] + ); + } + # Update the links tables $updates = $content->getSecondaryDataUpdates( $title, null, $forceRecursiveLinkUpdate, $p_result ); -- To view, visit https://gerrit.wikimedia.org/r/277353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Anomie Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add mysql_wmf::mylvmbackup define, use this for backups of a... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/277640 Change subject: Add mysql_wmf::mylvmbackup define, use this for backups of analytics-meta mysql instance .. Add mysql_wmf::mylvmbackup define, use this for backups of analytics-meta mysql instance mylvmbackup's prebackup hook allows us to define our own backup method. This hook runs after the LVM snapshot has been taken and mounted at $mountdir. We rsync $mountdir to $dest at this time. Bug: T127991 Change-Id: I6b0c6e0b819c837b8dbffc97be0c08ee4f66a452 --- M manifests/site.pp A modules/mysql_wmf/manifests/mylvmbackup.pp A modules/mysql_wmf/templates/mylvmbackup-prebackup.erb A modules/role/manifests/analytics_cluster/database/meta/backup.pp 4 files changed, 116 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/277640/1 diff --git a/manifests/site.pp b/manifests/site.pp index 8b80722..654982e 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -68,6 +68,7 @@ node 'analytics1015.eqiad.wmnet' { role analytics_cluster::client, analytics_cluster::database::meta, +analytics_cluster::database::backup, analytics_cluster::hive::metastore::database, analytics_cluster::oozie::server::database, analytics_cluster::hive::metastore, diff --git a/modules/mysql_wmf/manifests/mylvmbackup.pp b/modules/mysql_wmf/manifests/mylvmbackup.pp new file mode 100644 index 000..d5b5073 --- /dev/null +++ b/modules/mysql_wmf/manifests/mylvmbackup.pp @@ -0,0 +1,89 @@ +# == Define mysql_wmf::mylvmbackup +# Uses mylvmbackup to periodically rsync an LVM snapshot of the +# MySQL data directory to a destination. +# +# == Parameters +# +# [*dest*] +# Rsync destination of backup. +# +# [*vgname*] +# Specifies the volume group of the logical volume where the MySQL data +# directory is located. Default: $::hostname-vg +# +# [*lvname*] +# Specifies the name of the logical volume where the MySQL data directory is +# located. Default: mysql +# +# [*mountdir*] +# Path for mounting the snapshot volume to. +# See: --mountdir option for mylvmbackup. +# Default: /var/cache/mylvmbackup/mnt/${title} +# +# ...standard cron resource parameters... +# +# == Usage +# +# # Back up the mysql data directory to host.example.org every hour. +# mysql_wmf::mylvmbackup { 'myinstance': +# dest => 'host.example.org::rsync_module/path/to/backups/' +# minute => 0, +# } +# +define mysql_wmf::mylvmbackup( +$dest, +$vgname = "${::hostname}-vg", +$lvname = 'mysql', +$mountdir = "/var/cache/mylvmbackup/mnt/${title}", +$hour = undef, +$minute = undef, +$month= undef, +$monthday = undef, +$weekday = undef, +$ensure = 'present' +) +{ +require_package('mylvmbackup') + +# The prebackup rsync hook for this mylvmbackup +# job will be stored in this directory. +$hooksdir = "/usr/share/mylvmbackup/${title}" +file { $hooksdir: +ensure => ensure_directory($ensure) +owner => 'root', +group => 'root', +mode => 0555, +} +# Always use the preflush.pm that ships with mylvmbackup +file { "${hooksdir}/preflush.pm": +ensure => ensure_link($ensure), +target => '/usr/share/mylvmbackup/preflush.pm', +require => Package['mylvmbackup'], +} + +# prebackup rsyncs the LVM snapshot to $dest. +file { "${hooksdir}/prebackup": +ensure => $ensure, +owner => 'root', +group => 'root', +mode=> 0444, +content => template('mysql_wmf/mylvmbackup-prebackup.erb'), +require => Package['mylvmbackup'], +} + +# --backuptype none will mean no copy of the lvm snapshot will be made +# by mylvmbackup. Instead, this is handled by the prebackup hook, +# which just rsyncs the lvm snapshot to a destination. +$command = "/usr/bin/mylvmbackup --hooksdir ${hooksdir} --vgname ${vgname} --lvname ${lvname} --backuptype none", +cron { "mylvmbackup-${title}": +ensure => $ensure, +command => $command, +user => 'root', +hour => $hour, +minute => $minute, +month=> $month, +monthday => $monthday, +weekday => $weekday, +require => File["/usr/share/mylvmbackup/$title/prebackup"], +} +} diff --git a/modules/mysql_wmf/templates/mylvmbackup-prebackup.erb b/modules/mysql_wmf/templates/mylvmbackup-prebackup.erb new file mode 100644 index 000..9a38fbe --- /dev/null +++ b/modules/mysql_wmf/templates/mylvmbackup-prebackup.erb @@ -0,0 +1,7 @@ +# NOTE: This file is managed by Puppet. + +# This command will be run instead of using one of mylvmbackup's +# default backup types. This allows us to do incremental backups +# directly from mysql data directories. + +/usr/bin/rsync --progress --delete -av <%=
[MediaWiki-commits] [Gerrit] [ApiSVGProxy] Archive repo - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [ApiSVGProxy] Archive repo .. [ApiSVGProxy] Archive repo See I2b4ba8fdb058009fc18fa80b12f345ee77da3e7c Change-Id: I9332eb6dc639548e5a66a77b70df2979effc1e45 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index fdddbd9..605dbd2 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4017,7 +4017,7 @@ - name: mediawiki/extensions/ApiSVGProxy template: - - name: extension-unittests-generic + - name: archived - name: mediawiki/extensions/ArticleCreationWorkflow template: -- To view, visit https://gerrit.wikimedia.org/r/277106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9332eb6dc639548e5a66a77b70df2979effc1e45 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update horizon login splash logo, again - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Update horizon login splash logo, again .. Update horizon login splash logo, again Change-Id: Ie9eed86a825eefd1eb451cc11312ec55b11bd67f --- M modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png b/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png index 3d4783e..77b4671 100644 --- a/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png +++ b/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/277622 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9eed86a825eefd1eb451cc11312ec55b11bd67f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-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] [AssertEdit] Archive extension - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [AssertEdit] Archive extension .. [AssertEdit] Archive extension See Idcbd5c9c636485058dfa779e111ee2f55a3dc0fa Change-Id: Ifd6ba2f320c7196af67d5cb28782783874e81a82 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index d4367dc..fdddbd9 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4034,7 +4034,7 @@ - name: mediawiki/extensions/AssertEdit template: - - name: extension-unittests-generic + - name: archived - name: mediawiki/extensions/Auth_remoteuser template: -- To view, visit https://gerrit.wikimedia.org/r/277291 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd6ba2f320c7196af67d5cb28782783874e81a82 Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Define compatibility with DataModel 6.0 - change (mediawiki...WikibaseQualityExternalValidation)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/277623 Change subject: Define compatibility with DataModel 6.0 .. Define compatibility with DataModel 6.0 Change-Id: I15c3a1839fac515c124a21a6ec7b1079237d6400 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation refs/changes/23/277623/1 diff --git a/composer.json b/composer.json index 24ae6b7..0b03537 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "data-values/time": "~0.8", "php": ">=5.3.0", "serialization/serialization": "3.*,>=3.2.1", - "wikibase/data-model": "~4.2|~5.0", + "wikibase/data-model": "~4.2|~5.0|~6.0", "wikibase/data-model-serialization": "~2.0", "wikibase/data-model-services": "~2.0|~3.0", "wikimedia/assert": ">=0.1 <0.3" -- To view, visit https://gerrit.wikimedia.org/r/277623 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I15c3a1839fac515c124a21a6ec7b1079237d6400 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation Gerrit-Branch: master Gerrit-Owner: Aude___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [E3Experiments] Archive extension - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [E3Experiments] Archive extension .. [E3Experiments] Archive extension See I0a0e68ef12353837c635918ba89f1cb0d7d3657b Change-Id: I8835e3e3fbe5838d9eec6e93df02c97725f4780f --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index ebeb335..d4367dc 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2951,9 +2951,7 @@ - name: mediawiki/extensions/E3Experiments template: - - name: jshint - - name: jsonlint - - name: extension-unittests-generic + - name: archived - name: mediawiki/extensions/Echo template: -- To view, visit https://gerrit.wikimedia.org/r/276031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8835e3e3fbe5838d9eec6e93df02c97725f4780f Gerrit-PatchSet: 2 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update horizon login splash logo, again - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/277622 Change subject: Update horizon login splash logo, again .. Update horizon login splash logo, again Change-Id: Ie9eed86a825eefd1eb451cc11312ec55b11bd67f --- M modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/277622/1 diff --git a/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png b/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png index 3d4783e..77b4671 100644 --- a/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png +++ b/modules/openstack/files/horizon/180px-Wikimedia_labs_dashboard_splash.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/277622 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9eed86a825eefd1eb451cc11312ec55b11bd67f 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] Define compatibility for Wikibase DataModel 6.0 - change (mediawiki...WikibaseQualityConstraints)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/277621 Change subject: Define compatibility for Wikibase DataModel 6.0 .. Define compatibility for Wikibase DataModel 6.0 Change-Id: Ie81e865f94460ba52ffdf615a9665067346ee8d4 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints refs/changes/21/277621/1 diff --git a/composer.json b/composer.json index 27b9baf..58040e5 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "require": { "php": ">=5.3.0", "serialization/serialization": "^3.2.1", - "wikibase/data-model": "~4.2|~5.0", + "wikibase/data-model": "~4.2|~5.0|~6.0", "wikibase/data-model-services": "~2.0|~3.0" }, "require-dev": { -- To view, visit https://gerrit.wikimedia.org/r/277621 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie81e865f94460ba52ffdf615a9665067346ee8d4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Aude___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...BibManager)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: Icbf582561e7a5aed3b1d1e3bd9fb67a9e8f05e24 --- M .gitignore A .jshintignore A .jshintrc A Gruntfile.js A package.json M resources/ext.bibManager.List.js 6 files changed, 71 insertions(+), 4 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..fda95d3 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,24 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false, + "addOnloadHook": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..2ea9e32 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,30 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + // grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**' + ] + }, + /* banana: { + all: 'i18n/' + }, */ + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint' /* 'banana' */ ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..a0b255c --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-contrib-jshint": "1.0.0", +"grunt-jsonlint": "1.0.7" + } +} diff --git a/resources/ext.bibManager.List.js b/resources/ext.bibManager.List.js index 25642bb..793e3c8 100644 --- a/resources/ext.bibManager.List.js +++ b/resources/ext.bibManager.List.js @@ -6,6 +6,7 @@ var inputs = table.getElementsByTagName( 'input' ); var exportheading = d.getElementById( 'bm_table_export_column_heading' ); var exportallcheckbox = d.createElement( 'input' ); + var bm_export_checkboxes; exportallcheckbox.type = 'checkbox'; exportallcheckbox.style.margin = '0 0 0 10px'; exportheading.style.width = '75px'; @@ -13,14 +14,14 @@ bm_export_checkboxes = []; for( var i = 0; i < inputs.length; i++ ) { - if( inputs[i].type == "checkbox" ) { + if( inputs[i].type === "checkbox" ) { bm_export_checkboxes.push( inputs[i] ); } } - exportallcheckbox.onclick = function (e) { + exportallcheckbox.onclick = function () { for( var j = 0; j < bm_export_checkboxes.length; j++ ){ bm_export_checkboxes[j].checked = this.checked; } - } + }; } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/277548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbf582561e7a5aed3b1d1e3bd9fb67a9e8f05e24 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/BibManager Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add translatable description, Add npm entry point - change (mediawiki...BreadCrumbs2)
jenkins-bot has submitted this change and it was merged. Change subject: Add translatable description, Add npm entry point .. Add translatable description, Add npm entry point Change-Id: I193a758cd0e5b57ad778e76c41a7025940628ee4 --- M .gitignore M BreadCrumbs2.php A Gruntfile.js A i18n/en.json A i18n/qqq.json A package.json 6 files changed, 47 insertions(+), 2 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/BreadCrumbs2.php b/BreadCrumbs2.php index e678a17..400ef5f 100644 --- a/BreadCrumbs2.php +++ b/BreadCrumbs2.php @@ -34,10 +34,12 @@ 'version' => '2.0.0', 'author' => 'Eric Hartwell', 'Ike Hecht', 'url' => 'https://www.mediawiki.org/wiki/Extension:BreadCrumbs2', - 'description' => 'Implements a breadcrumb navigation based on categories', + 'descriptionmsg' => 'breadcrumbs2-desc', 'license-name' => 'CC-BY-3.0' ); +$wgMessagesDirs['BreadCrumbs2'] = __DIR__ . '/i18n'; + $wgAutoloadClasses['BreadCrumbs2'] = __DIR__ . '/BreadCrumbs2.class.php'; $wgAutoloadClasses['BreadCrumbs2Hooks'] = __DIR__ . '/BreadCrumbs2.hooks.php'; diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..7756e75 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 000..50520fe --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,6 @@ +{ + "@metadata": { + "authors": [] + }, + "breadcrumbs2-desc": "Implements a breadcrumb navigation based on categories" +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 000..0b9a0bd --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,6 @@ +{ + "@metadata": { + "authors": [] + }, + "breadcrumbs2-desc": "{{desc|what=extension|name=BreadCrumbs2|url=https://www.mediawiki.org/wiki/Extension:BreadCrumbs2}}; +} diff --git a/package.json b/package.json new file mode 100644 index 000..41cecca --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I193a758cd0e5b57ad778e76c41a7025940628ee4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BreadCrumbs2 Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: Siebrand Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Bootstrap)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: I972f2c0fdaac70dc101a319fd137ed4e1dd89dd2 --- A Gruntfile.js A package.json 2 files changed, 31 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..7756e75 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..41cecca --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I972f2c0fdaac70dc101a319fd137ed4e1dd89dd2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Bootstrap Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...BiblioPlus)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: I86e3f1d5a8ae56a426ab1eb648332487478df139 --- M .gitignore A .jshintignore A .jshintrc A Gruntfile.js A package.json M resources/ext.biblioPlus.qtip.config.js 6 files changed, 76 insertions(+), 7 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..2752891 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.js +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..04c3a97 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,23 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..e7059eb --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,31 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**', + '!resources/ext.biblioPlus.qtip/ext.biblioPlus.qtip.min.js' + ] + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..ec97d7b --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-contrib-jshint": "1.0.0", +"grunt-jsonlint": "1.0.7" + } +} diff --git a/resources/ext.biblioPlus.qtip.config.js b/resources/ext.biblioPlus.qtip.config.js index 1b53dd6..73d9e26 100644 --- a/resources/ext.biblioPlus.qtip.config.js +++ b/resources/ext.biblioPlus.qtip.config.js @@ -1,11 +1,12 @@ jQuery( document ).ready( function () { var key; + var ref; - $( '.tooltip-from-element' ).qtip ( { + jQuery( '.tooltip-from-element' ).qtip ( { content: { - text: function( api ) { - key = $( this ).attr( 'href' ); - ref = $( key ).html(); + text: function() { + key = jQuery( this ).attr( 'href' ); + ref = jQuery( key ).html(); if ( ref.length !== 0 ) { return ref; } @@ -20,12 +21,12 @@ delay: 500 }, position: { - viewport: $( window ), + viewport: jQuery( window ), my: 'top left', at: 'bottom center', adjust: { method: 'flip', } } - }) + }); }); -- To view, visit https://gerrit.wikimedia.org/r/277546 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I86e3f1d5a8ae56a426ab1eb648332487478df139 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BiblioPlus Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___
[MediaWiki-commits] [Gerrit] Add RecursiveLinkPurge log for API requests - change (mediawiki/core)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/277620 Change subject: Add RecursiveLinkPurge log for API requests .. Add RecursiveLinkPurge log for API requests Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7 --- M includes/api/ApiPurge.php 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/277620/1 diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 36b62f5..64bb9ba 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -24,6 +24,7 @@ * * @file */ +use MediaWiki\Logger\LoggerFactory; /** * API interface for page purging @@ -75,6 +76,17 @@ $enableParserCache ); + # Logging to better see expensive usage patterns + if ( $forceRecursiveLinkUpdate ) { + LoggerFactory::getInstance( 'RecursiveLinkPurge' )->info( + "Recursive link purge enqueued for {title}", + [ + 'user' => $this->getUser()->getName(), + 'title' => $title->getPrefixedText() + ] + ); + } + # Update the links tables $updates = $content->getSecondaryDataUpdates( $title, null, $forceRecursiveLinkUpdate, $p_result ); -- To view, visit https://gerrit.wikimedia.org/r/277620 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Ori.livnehGerrit-Reviewer: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Carp)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: If318b9b947d81ef9f24cbd7ec2c9f8544106cc00 --- M .gitignore A Gruntfile.js A package.json 3 files changed, 32 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..7756e75 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..41cecca --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If318b9b947d81ef9f24cbd7ec2c9f8544106cc00 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Carp Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...BlockAndNuke)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: I668649339863b29504f59ec648d03c32cb6dc704 --- A Gruntfile.js A package.json 2 files changed, 30 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..545b62a --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + // grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + /* banana: { + all: 'i18n/' + }, */ + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..1819ae0 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I668649339863b29504f59ec648d03c32cb6dc704 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/BlockAndNuke Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Blackout)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: I2077529c25eed217164289abbcddaab8069393d5 --- M .gitignore A Gruntfile.js A package.json 3 files changed, 31 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..545b62a --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + // grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + /* banana: { + all: 'i18n/' + }, */ + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..1819ae0 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2077529c25eed217164289abbcddaab8069393d5 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Blackout Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...BatchUserRights)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: I526fb2baf3415aef8529d21cfd93188e739cb135 --- M .gitignore A Gruntfile.js A package.json 3 files changed, 32 insertions(+), 1 deletion(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..7756e75 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..41cecca --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I526fb2baf3415aef8529d21cfd93188e739cb135 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BatchUserRights Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adding number of changes info for grouped category changes - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Adding number of changes info for grouped category changes .. Adding number of changes info for grouped category changes This patch addes the summarized number of category changes for grouped category changes on the EnhancedChangesList. Bug: T126849 Change-Id: I3c8ccb2ad6310dac19a724b2ce923c1e67e588be --- M includes/changes/EnhancedChangesList.php 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Addshore: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index 4a028bb..946c6d1 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -503,10 +503,11 @@ /** @var $block0 RecentChange */ $block0 = $block[0]; $last = $block[count( $block ) - 1]; - if ( !$allLogs && $rcObj->mAttribs['rc_type'] != RC_CATEGORIZE ) { - if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) { - $links['total-changes'] = $nchanges[$n]; - } elseif ( $isnew ) { + if ( !$allLogs ) { + if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) || + $isnew || + $rcObj->mAttribs['rc_type'] == RC_CATEGORIZE + ) { $links['total-changes'] = $nchanges[$n]; } else { $links['total-changes'] = Linker::link( -- To view, visit https://gerrit.wikimedia.org/r/276503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c8ccb2ad6310dac19a724b2ce923c1e67e588be Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: WMDE-FischGerrit-Reviewer: Addshore Gerrit-Reviewer: Daniel Kinzler Gerrit-Reviewer: Danny B. Gerrit-Reviewer: Kaldari Gerrit-Reviewer: StudiesWorld Gerrit-Reviewer: Tobias Gritschacher Gerrit-Reviewer: WMDE-Fisch Gerrit-Reviewer: WMDE-leszek Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...BayesianFilter)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: Idbe7cc3c1a7ebf3d69da4aa9b127c03313da0e13 --- A Gruntfile.js A package.json 2 files changed, 31 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..7756e75 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..41cecca --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/277543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbe7cc3c1a7ebf3d69da4aa9b127c03313da0e13 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BayesianFilter Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't serve spinner in raw HTML - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Don't serve spinner in raw HTML .. Don't serve spinner in raw HTML Only show the spinner when we commence loading an image Only show the spinner if the image meets certain height and width requirements. Bug: T129098 Bug: T129202 Change-Id: Ie78688491dfcbdb6679f4f2d6f234ccc1de288e1 --- M includes/MobileFormatter.php M resources/mobile.startup/Skin.js M tests/phpunit/MobileFormatterTest.php 3 files changed, 12 insertions(+), 15 deletions(-) Approvals: Jhobs: Looks good to me, but someone else must approve Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php index d6579de..2f248e4 100644 --- a/includes/MobileFormatter.php +++ b/includes/MobileFormatter.php @@ -201,12 +201,6 @@ // HTML only clients $noscript = $doc->createElement( 'noscript' ); - // Loading status of image placeholder - $spinner = $doc->createElement( 'span' ); - $spinner->setAttribute( 'class', MobileUI::iconClass( - 'spinner', 'element', 'loading spinner' - ) ); - // To be loaded image placeholder $imgPlaceholder = $doc->createElement( 'span' ); $imgPlaceholder->setAttribute( 'class', 'lazy-image-placeholder' ); @@ -218,8 +212,6 @@ } // Assume data saving and remove srcset attribute from the non-js experience $img->removeAttribute( 'srcset' ); - - $imgPlaceholder->appendChild( $spinner ); // Set the placeholder where the original image was $parent->replaceChild( $imgPlaceholder, $img ); diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js index f7771c3..0d5442b 100644 --- a/resources/mobile.startup/Skin.js +++ b/resources/mobile.startup/Skin.js @@ -2,6 +2,7 @@ var browser = M.require( 'mobile.browser/browser' ), View = M.require( 'mobile.view/View' ), + Icon = M.require( 'mobile.startup/Icon' ), context = M.require( 'mobile.context/context' ); /** @@ -219,9 +220,18 @@ */ loadImage: function ( $placeholder ) { var + width = $placeholder.attr( 'data-width' ), + height = $placeholder.attr( 'data-height' ), // Grab the image markup from the HTML only fallback // Image will start downloading $downloadingImage = $( '' ); + + if ( width > 80 && height > 80 ) { + new Icon( { + name: 'spinner', + additionalClassNames: 'loading' + } ).appendTo( $placeholder ); + } // When the image has loaded $downloadingImage.on( 'load', function () { @@ -235,8 +245,8 @@ // Trigger image download after binding the load handler $downloadingImage.attr( { - width: $placeholder.attr( 'data-width' ), - height: $placeholder.attr( 'data-height' ), + width: width, + height: height, src: $placeholder.attr( 'data-src' ), alt: $placeholder.attr( 'data-alt' ), srcset: $placeholder.attr( 'data-srcset' ) diff --git a/tests/phpunit/MobileFormatterTest.php b/tests/phpunit/MobileFormatterTest.php index 115c789..2bc8109 100644 --- a/tests/phpunit/MobileFormatterTest.php +++ b/tests/phpunit/MobileFormatterTest.php @@ -47,11 +47,6 @@ . 'style="width: 100px;height: 100px;" ' . 'data-src="foo.jpg" data-alt="foo" data-width="100" data-height="100" ' . 'data-srcset="foo-1.5x.jpg 1.5x, foo-2x.jpg 2x">' - . Html::element( 'span', - array( - 'class' => MobileUI::iconClass( 'spinner', 'element', 'loading spinner' ), - ) - ) . ''; $noscript = ''; -- To view, visit https://gerrit.wikimedia.org/r/277568 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] Update VE-MW submodule to wmf/1.27.0-wmf.16 - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/277618 Change subject: Update VE-MW submodule to wmf/1.27.0-wmf.16 .. Update VE-MW submodule to wmf/1.27.0-wmf.16 Change-Id: Id72d0ba717965c4abf24615f5c5d3119508020af --- M extensions/VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/18/277618/1 diff --git a/extensions/VisualEditor b/extensions/VisualEditor index c8bf325..99cd40b 16 --- a/extensions/VisualEditor +++ b/extensions/VisualEditor -Subproject commit c8bf32596fbd57c2f2371355b99acc50b614ac2a +Subproject commit 99cd40bccd32645155ccb158beaab5d092013274 -- To view, visit https://gerrit.wikimedia.org/r/277618 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id72d0ba717965c4abf24615f5c5d3119508020af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.27.0-wmf.16 Gerrit-Owner: Krinkle___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits