[MediaWiki-commits] [Gerrit] phab should get standard - change (operations/puppet)
Rush has submitted this change and it was merged. Change subject: phab should get standard .. phab should get standard no-exim as phab uses special exim settings Change-Id: Icc0505e0f4848afdb288ac0868dc220c285afa43 --- M manifests/site.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Rush: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index 3af9a51..b35ad7c 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2348,6 +2348,7 @@ node 'radon.eqiad.wmnet' { class { 'base::firewall': } include admin +include standard-noexim include role::phabricator::legalpad } -- To view, visit https://gerrit.wikimedia.org/r/170943 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icc0505e0f4848afdb288ac0868dc220c285afa43 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org Gerrit-Reviewer: Rush r...@wikimedia.org 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 UniversalLanguageSelector for bugfix - change (mediawiki/core)
Manybubbles has submitted this change and it was merged. Change subject: Update UniversalLanguageSelector for bugfix .. Update UniversalLanguageSelector for bugfix Change-Id: Ide125584d23fe24916567f6d6a2990a161906800 --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Manybubbles: Verified; Looks good to me, approved diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 29184ae..f749450 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 29184aeb73dd8c21b1a50192168cdf03dee59528 +Subproject commit f7494504dcbbcec0d1500ba53f22de2061c39518 -- To view, visit https://gerrit.wikimedia.org/r/170947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide125584d23fe24916567f6d6a2990a161906800 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org 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 UniversalLanguageSelector for bugfix - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/170948 Change subject: Update UniversalLanguageSelector for bugfix .. Update UniversalLanguageSelector for bugfix Change-Id: Ib26f32dd762aed46eaedd14154a78a05ac2968bf --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/170948/1 diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 72dfbc0..1f39802 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 72dfbc00d0071d4b60822b8d1fcb68659ad14fc8 +Subproject commit 1f3980231ccb99fb8b4c7d2628e2b569a49f2f0a -- To view, visit https://gerrit.wikimedia.org/r/170948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib26f32dd762aed46eaedd14154a78a05ac2968bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update UniversalLanguageSelector for bugfix - change (mediawiki/core)
Manybubbles has submitted this change and it was merged. Change subject: Update UniversalLanguageSelector for bugfix .. Update UniversalLanguageSelector for bugfix Change-Id: Ib26f32dd762aed46eaedd14154a78a05ac2968bf --- M extensions/UniversalLanguageSelector 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Manybubbles: Verified; Looks good to me, approved diff --git a/extensions/UniversalLanguageSelector b/extensions/UniversalLanguageSelector index 72dfbc0..1f39802 16 --- a/extensions/UniversalLanguageSelector +++ b/extensions/UniversalLanguageSelector -Subproject commit 72dfbc00d0071d4b60822b8d1fcb68659ad14fc8 +Subproject commit 1f3980231ccb99fb8b4c7d2628e2b569a49f2f0a -- To view, visit https://gerrit.wikimedia.org/r/170948 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib26f32dd762aed46eaedd14154a78a05ac2968bf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move updateFileCounts to the upload controller - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Move updateFileCounts to the upload controller .. Move updateFileCounts to the upload controller ...mostly. This method had a lot of step-specific stuff in it, but it's looking much neater now. It'll improve as I move more things out into the Upload step. Change-Id: I5a1be4ae4b4bf42f12fd599b626e5b132ae7ea30 --- M UploadWizardHooks.php M resources/controller/uw.controller.Step.js M resources/controller/uw.controller.Upload.js M resources/mw.UploadWizard.js A resources/ui/uw.ui.Upload.js 5 files changed, 224 insertions(+), 94 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index 09a1514..0e15ea0 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -174,14 +174,10 @@ 'mwe-upwiz-tutorial-error-file-missing', 'mwe-upwiz-tutorial-error-cannot-transform', 'mwe-upwiz-help-desk', - 'mwe-upwiz-add-file-n', 'mwe-upwiz-multi-file-select', - 'mwe-upwiz-add-file-0-free', 'mwe-upwiz-flickr-input-placeholder', 'mwe-upwiz-add-flickr-or', 'mwe-upwiz-add-flickr', - 'mwe-upwiz-add-file-flickr', - 'mwe-upwiz-add-file-flickr-n', 'mwe-upwiz-select-flickr', 'mwe-upwiz-flickr-disclaimer1', 'mwe-upwiz-flickr-disclaimer2', @@ -573,8 +569,7 @@ 'dependencies' = array( 'oojs', 'uw.controller.Step', - 'uw.controller.base', - 'uw.ui.Step', + 'uw.ui.Upload', ), ), @@ -616,7 +611,7 @@ 'dependencies' = array( 'oojs', - 'uw.ui.base', + 'uw.ui.Step', ), ), @@ -686,6 +681,24 @@ 'prefs-upwiz-interface', ), ), + + 'uw.ui.Upload' = array( + 'scripts' = array( + 'resources/ui/uw.ui.Upload.js', + ), + + 'dependencies' = array( + 'oojs', + 'uw.ui.Step', + ), + + 'messages' = array( + 'mwe-upwiz-add-file-n', + 'mwe-upwiz-add-file-0-free', + 'mwe-upwiz-add-file-flickr-n', + 'mwe-upwiz-add-file-flickr', + ), + ), ); /** diff --git a/resources/controller/uw.controller.Step.js b/resources/controller/uw.controller.Step.js index b74663d..5cad482 100644 --- a/resources/controller/uw.controller.Step.js +++ b/resources/controller/uw.controller.Step.js @@ -47,7 +47,8 @@ * Move to this step. * @param {mw.UploadWizardUpload[]} uploads List of uploads being carried forward. */ - SP.moveTo = function () { + SP.moveTo = function ( uploads ) { + this.uploads = uploads; this.ui.moveTo(); }; @@ -59,5 +60,10 @@ this.ui.moveFrom(); }; + /** +* Update file counts for the step. +*/ + SP.updateFileCounts = function () {}; + uw.controller.Step = Step; }( mediaWiki.uploadWizard, OO ) ); diff --git a/resources/controller/uw.controller.Upload.js b/resources/controller/uw.controller.Upload.js index 3c28068..647e43b 100644 --- a/resources/controller/uw.controller.Upload.js +++ b/resources/controller/uw.controller.Upload.js @@ -16,14 +16,31 @@ */ ( function ( uw, $, oo ) { + var UP; + function Upload() { uw.controller.Step.call( this, - new uw.ui.Step( $( '#mwe-upwiz-stepdiv-file' ), $( '#mwe-upwiz-step-file' ) ) + new uw.ui.Upload() ); } oo.inheritClass( Upload, uw.controller.Step ); + UP = Upload.prototype; + + /** +* Updates the upload step data when a file is added or removed. +*/ + UP.updateFileCounts = function ( haveUploads, max, uploadToAdd ) { + var fewerThanMax = this.uploads.length max; + + this.ui.updateFileCounts(
[MediaWiki-commits] [Gerrit] Make load.php parse in PHP 4 again - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/170949 Change subject: Make load.php parse in PHP 4 again .. Make load.php parse in PHP 4 again Not sure what for, but if it needs to parse, then let's make it parse… Change-Id: I28ec3b3a86f6eb90e3341f967649fb4c910966d7 --- M load.php 1 file changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/49/170949/1 diff --git a/load.php b/load.php index fc6cf98..8b23909 100644 --- a/load.php +++ b/load.php @@ -38,16 +38,15 @@ return; } -// Respond to resource loading request -$resourceLoader = new ResourceLoader( - ConfigFactory::getDefaultInstance()-makeConfig( 'main' ) -); +// Respond to resource loading request. +// foo()-bar() syntax is not supported in PHP4, and this file needs to *parse* in PHP4. +$configFactory = ConfigFactory::getDefaultInstance(); +$resourceLoader = new ResourceLoader( $configFactory-makeConfig( 'main' ) ); $resourceLoader-respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) ); wfProfileOut( 'load.php' ); wfLogProfilingData(); -// Shut down the database. foo()-bar() syntax is not supported in PHP4, and this file -// needs to *parse* in PHP4, although we'll never get down here to worry about = vs = +// Shut down the database. $lb = wfGetLBFactory(); $lb-shutdown(); -- To view, visit https://gerrit.wikimedia.org/r/170949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28ec3b3a86f6eb90e3341f967649fb4c910966d7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support foundationwiki. - change (mediawiki...deploy)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170950 Change subject: Support foundationwiki. .. Support foundationwiki. OCG is enabled on foundationwiki, so it would be good if Parsoid supported it! Note that wgRawHtml is turned on on foundationwiki, though, so not all pages will probably parse correctly. Change-Id: I7e0e1471019caa2f2d95d3d17d5628e9ff529ffd --- M conf/wmf/localsettings.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy refs/changes/50/170950/1 diff --git a/conf/wmf/localsettings.js b/conf/wmf/localsettings.js index 224cc7c..3e1bf76 100644 --- a/conf/wmf/localsettings.js +++ b/conf/wmf/localsettings.js @@ -5,6 +5,7 @@ 'testwiki': 'http://test.wikipedia.org/w/api.php', 'test2wiki': 'http://test2.wikipedia.org/w/api.php', + 'foundationwiki', 'http://wikimediafoundation.org/w/api.php', 'metawiki': 'http://meta.wikimedia.org/w/api.php', 'incubatorwiki': 'http://incubator.wikimedia.org/w/api.php', 'outreachwiki': 'http://outreach.wikimedia.org/w/api.php', -- To view, visit https://gerrit.wikimedia.org/r/170950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e0e1471019caa2f2d95d3d17d5628e9ff529ffd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid/deploy Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phab explicity default setting is deprecated - change (operations/puppet)
Rush has uploaded a new change for review. https://gerrit.wikimedia.org/r/170951 Change subject: phab explicity default setting is deprecated .. phab explicity default setting is deprecated Change-Id: I84f1df8158917759ad74f5ab8ea8b8a988b399fd --- M modules/phabricator/data/fixed_settings.yaml 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/51/170951/1 diff --git a/modules/phabricator/data/fixed_settings.yaml b/modules/phabricator/data/fixed_settings.yaml index bb9489a..85fe720 100644 --- a/modules/phabricator/data/fixed_settings.yaml +++ b/modules/phabricator/data/fixed_settings.yaml @@ -144,8 +144,6 @@ phpmailer.smtp-port: '25' -phabricator.env: 'default' - # Do not try to call out for external resouces such as avatars security.allow-outbound-http: false -- To view, visit https://gerrit.wikimedia.org/r/170951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84f1df8158917759ad74f5ab8ea8b8a988b399fd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Nearby should use core templating mechanism - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Nearby should use core templating mechanism .. Hygiene: Nearby should use core templating mechanism Change-Id: I9d6f9bdc63069004ca106841ca6f26917cd106b0 --- M includes/Resources.php M javascripts/modules/nearby/Nearby.js 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index a214a6c..04cefc8 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -851,7 +851,7 @@ ), ), - 'mobile.nearby' = $wgMFMobileResourceBoilerplate + array( + 'mobile.nearby' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array( 'mobile.ajax', 'mobile.stable.common', @@ -884,7 +884,7 @@ 'javascripts/modules/nearby/Nearby.js', ), 'templates' = array( - 'modules/nearby/nearby.hogan', + 'Nearby.hogan' = 'templates/modules/nearby/nearby.hogan', ), ), diff --git a/javascripts/modules/nearby/Nearby.js b/javascripts/modules/nearby/Nearby.js index 267696a..c4724dd 100644 --- a/javascripts/modules/nearby/Nearby.js +++ b/javascripts/modules/nearby/Nearby.js @@ -37,7 +37,7 @@ spinner: M.template.get( 'spinner.hogan' ), pageList: PageList.prototype.template }, - template: M.template.get( 'modules/nearby/nearby.hogan' ), + template: mw.template.get( 'mobile.nearby', 'Nearby.hogan' ), getCurrentPosition: function () { var result = $.Deferred(); if ( M.supportsGeoLocation() ) { -- To view, visit https://gerrit.wikimedia.org/r/170783 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d6f9bdc63069004ca106841ca6f26917cd106b0 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] phab explicity default setting is deprecated - change (operations/puppet)
Rush has submitted this change and it was merged. Change subject: phab explicity default setting is deprecated .. phab explicity default setting is deprecated Change-Id: I84f1df8158917759ad74f5ab8ea8b8a988b399fd --- M modules/phabricator/data/fixed_settings.yaml 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Rush: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/phabricator/data/fixed_settings.yaml b/modules/phabricator/data/fixed_settings.yaml index bb9489a..85fe720 100644 --- a/modules/phabricator/data/fixed_settings.yaml +++ b/modules/phabricator/data/fixed_settings.yaml @@ -144,8 +144,6 @@ phpmailer.smtp-port: '25' -phabricator.env: 'default' - # Do not try to call out for external resouces such as avatars security.allow-outbound-http: false -- To view, visit https://gerrit.wikimedia.org/r/170951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84f1df8158917759ad74f5ab8ea8b8a988b399fd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Rush r...@wikimedia.org Gerrit-Reviewer: Rush r...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consolidate debugging-related configurations in hhvm::debug - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: Consolidate debugging-related configurations in hhvm::debug .. Consolidate debugging-related configurations in hhvm::debug The various tidbits designed to make debugging HHVM more pleasant were clogging up init.pp, which I'd like to be a concise description of the things that are absolutely essential to the setup (rather than peripheral to it, as the debugging helpers are). For that reason, introduce a separate hhvm::debug module, and move the debugging symbol package declarations there, too. Since this leaves hhvm::packages practically empty, move the hhvm package declarations back to init.pp. Add a fix to a libstdc++ pretty-printer and source HHVM's pretty printers in /etc/gdb/gdbinit. Change-Id: Ie3e5f6cb158e89dd4aaf0fe765bc39e2306ce8e3 --- A modules/hhvm/files/debug/gdbinit R modules/hhvm/files/debug/hhvm-dump-debug A modules/hhvm/files/debug/printers.py A modules/hhvm/manifests/debug.pp M modules/hhvm/manifests/init.pp D modules/hhvm/manifests/packages.pp M modules/mediawiki/manifests/hhvm.pp 7 files changed, 1,287 insertions(+), 84 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/hhvm/files/debug/gdbinit b/modules/hhvm/files/debug/gdbinit new file mode 100644 index 000..6e8c144 --- /dev/null +++ b/modules/hhvm/files/debug/gdbinit @@ -0,0 +1,16 @@ +# /etc/gdb/gdbinit: global gdb configuration +# This file was provisioned by Puppet. +set verbose off +set print pretty on +set prompt (\033[32mgdb\033[0m) + +# Don't pause output +set height 0 +set width 0 + +# Load pretty printers for libstdc++ +python import sys; sys.path.insert(0, '/usr/share/gcc-4.8/python') +add-auto-load-safe-path /usr/lib/x86_64-linux-gnu + +# Load utilities and pretty printers for HHVM +source /usr/local/src/hhvm/hphp/tools/gdb/hhvm.py diff --git a/modules/hhvm/files/hhvm-dump-debug b/modules/hhvm/files/debug/hhvm-dump-debug similarity index 100% rename from modules/hhvm/files/hhvm-dump-debug rename to modules/hhvm/files/debug/hhvm-dump-debug diff --git a/modules/hhvm/files/debug/printers.py b/modules/hhvm/files/debug/printers.py new file mode 100644 index 000..9f9f6fb --- /dev/null +++ b/modules/hhvm/files/debug/printers.py @@ -0,0 +1,1165 @@ +# Pretty-printers for libstdc++. + +# Copyright (C) 2008-2013 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +import gdb +import itertools +import re +import sys + +# Python 2 + Python 3 compatibility code + +# Resources about compatibility: +# +# * http://pythonhosted.org/six/: Documentation of the six module + +# FIXME: The handling of e.g. std::basic_string (at least on char) +# probably needs updating to work with Python 3's new string rules. +# +# In particular, Python 3 has a separate type (called byte) for +# bytestrings, and a special b syntax for the byte literals; the old +# str() type has been redefined to always store Unicode text. +# +# We probably can't do much about this until this GDB PR is addressed: +# https://sourceware.org/bugzilla/show_bug.cgi?id=17138 + +if sys.version_info[0] 2: +# Python 3 stuff +Iterator = object +# Python 3 folds these into the normal functions. +imap = map +izip = zip +# Also, int subsumes long +long = int +else: +# Python 2 stuff +class Iterator: + +Compatibility mixin for iterators + +Instead of writing next() methods for iterators, write +__next__() methods and use this mixin to make them work in +Python 2 as well as Python 3. + +Idea stolen from the six documentation: +http://pythonhosted.org/six/#six.Iterator + + +def next(self): +return self.__next__() + +# In Python 2, we still need these from itertools +from itertools import imap, izip + +# Try to use the new-style pretty-printing if available. +_use_gdb_pp = True +try: +import gdb.printing +except ImportError: +_use_gdb_pp = False + +# Try to install type-printers. +_use_type_printing = False +try: +import gdb.types +if hasattr(gdb.types, 'TypePrinter'): +_use_type_printing = True +except ImportError: +pass + +# Starting with the type ORIG, search for the member type NAME. This +# handles searching
[MediaWiki-commits] [Gerrit] Hygiene: mobile.ajax should use core template mechanism - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: mobile.ajax should use core template mechanism .. Hygiene: mobile.ajax should use core template mechanism Change-Id: I0fcb28af4952653647f9ce8e8952644734d21da3 --- M includes/Resources.php M javascripts/Overlay.js M javascripts/modules/nearby/Nearby.js M javascripts/specials/uploads.js 4 files changed, 5 insertions(+), 5 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index 04cefc8..7a6993f 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -162,9 +162,9 @@ 'position' = 'top', ), - 'mobile.ajax' = $wgMFMobileResourceBoilerplate + array( + 'mobile.ajax' = $wgMFResourceFileModuleBoilerplate + array( 'templates' = array( - 'spinner.hogan', + 'spinner.hogan' = 'templates/spinner.hogan', ), ), diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js index 1d0b31c..7af2751 100644 --- a/javascripts/Overlay.js +++ b/javascripts/Overlay.js @@ -42,7 +42,7 @@ */ className: 'overlay', templatePartials: { - spinner: M.template.get( 'spinner.hogan' ) + spinner: mw.template.get( 'mobile.ajax', 'spinner.hogan' ) }, template: M.template.get( 'Overlay.hogan' ), defaults: { diff --git a/javascripts/modules/nearby/Nearby.js b/javascripts/modules/nearby/Nearby.js index c4724dd..8cded34 100644 --- a/javascripts/modules/nearby/Nearby.js +++ b/javascripts/modules/nearby/Nearby.js @@ -34,7 +34,7 @@ } }, templatePartials: { - spinner: M.template.get( 'spinner.hogan' ), + spinner: mw.template.get( 'mobile.ajax', 'spinner.hogan' ), pageList: PageList.prototype.template }, template: mw.template.get( 'mobile.nearby', 'Nearby.hogan' ), diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js index 1e1cd82..7a3c860 100644 --- a/javascripts/specials/uploads.js +++ b/javascripts/specials/uploads.js @@ -86,7 +86,7 @@ PhotoList = View.extend( { template: M.template.get( 'specials/userGallery.hogan' ), templatePartials: { - spinner: M.template.get( 'spinner.hogan' ) + spinner: mw.template.get( 'mobile.ajax', 'spinner.hogan' ) }, initialize: function () { // how close a spinner needs to be to the viewport to trigger loading (px) -- To view, visit https://gerrit.wikimedia.org/r/170798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fcb28af4952653647f9ce8e8952644734d21da3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HHVM: install-pkg-src - debug/install-pkg-src - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/170952 Change subject: HHVM: install-pkg-src - debug/install-pkg-src .. HHVM: install-pkg-src - debug/install-pkg-src Follows Ie3e5f6cb158e. Change-Id: If6e8943097a7fbbe5222a345ba161b96f757c2c0 --- R modules/hhvm/files/debug/install-pkg-src 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/170952/1 diff --git a/modules/hhvm/files/install-pkg-src b/modules/hhvm/files/debug/install-pkg-src similarity index 100% rename from modules/hhvm/files/install-pkg-src rename to modules/hhvm/files/debug/install-pkg-src -- To view, visit https://gerrit.wikimedia.org/r/170952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6e8943097a7fbbe5222a345ba161b96f757c2c0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HHVM: install-pkg-src - debug/install-pkg-src - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: HHVM: install-pkg-src - debug/install-pkg-src .. HHVM: install-pkg-src - debug/install-pkg-src Follows Ie3e5f6cb158e. Change-Id: If6e8943097a7fbbe5222a345ba161b96f757c2c0 --- R modules/hhvm/files/debug/install-pkg-src 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/modules/hhvm/files/install-pkg-src b/modules/hhvm/files/debug/install-pkg-src similarity index 100% rename from modules/hhvm/files/install-pkg-src rename to modules/hhvm/files/debug/install-pkg-src -- To view, visit https://gerrit.wikimedia.org/r/170952 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6e8943097a7fbbe5222a345ba161b96f757c2c0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into deployment - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/170953 Change subject: Merge remote-tracking branch 'origin/master' into deployment .. Merge remote-tracking branch 'origin/master' into deployment 240d5ec Avoid some trouble in non-USD contribution recalc Change-Id: If88015428290ccac2b6595a2798244511009ec13 --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/53/170953/1 -- To view, visit https://gerrit.wikimedia.org/r/170953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If88015428290ccac2b6595a2798244511009ec13 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg eeggles...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed Style/SpaceAfterComma RuboCop offense - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed Style/SpaceAfterComma RuboCop offense .. Fixed Style/SpaceAfterComma RuboCop offense Change-Id: I55d73cc65d3cfb365a6490fe2e421aba8e6462be Paired-With: Baochuan Lu Bug: 63307 --- M .rubocop_todo.yml M tests/browser/features/step_definitions/aftv5_steps.rb 2 files changed, 1 insertion(+), 6 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index efec294..8079646 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -21,11 +21,6 @@ # Offense count: 1 # Cop supports --auto-correct. -Style/SpaceAfterComma: - Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. Style/SpaceInsideRangeLiteral: Enabled: false diff --git a/tests/browser/features/step_definitions/aftv5_steps.rb b/tests/browser/features/step_definitions/aftv5_steps.rb index c13de23..2c182f0 100644 --- a/tests/browser/features/step_definitions/aftv5_steps.rb +++ b/tests/browser/features/step_definitions/aftv5_steps.rb @@ -60,7 +60,7 @@ end Then(/^I can enter and save text$/) do on(AFTv5Page) do |page| -@input_string = Automated test did this #{('a' .. 'z').to_a.shuffle[0,10].join} +@input_string = Automated test did this #{('a' .. 'z').to_a.shuffle[0, 10].join} page.input_area_element.send_keys Hello from #{@input_string} page.post_feedback_element.when_present.click page.wait_until(10) do -- To view, visit https://gerrit.wikimedia.org/r/170911 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55d73cc65d3cfb365a6490fe2e421aba8e6462be Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Dduvall dduv...@wikimedia.org Gerrit-Reviewer: Lubaochuan lubaoch...@gmail.com Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] UserGetLanguageObject hook should accept any IContextSource - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: UserGetLanguageObject hook should accept any IContextSource .. UserGetLanguageObject hook should accept any IContextSource Bug: 72951 Change-Id: I7c385a2cac0696493dd1c97268e5c4d03829234a --- M RELEASE-NOTES-1.25 M docs/hooks.txt 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index d75d1f5..fa870bb 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -16,6 +16,9 @@ validity must be checked by passing the user-supplied token to User::matchEditToken rather than by testing for equality with a newly-generated token. +* (bug 72951) The UserGetLanguageObject hook may be passed any IContextSource + for its $context parameter. Formerly it was documented as receiving a + RequestContext specifically. === New features in 1.25 === * (bug 62861) Updated plural rules to CLDR 26. Includes incompatible changes diff --git a/docs/hooks.txt b/docs/hooks.txt index 7afbf1c..18b7099 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2872,7 +2872,7 @@ 'UserGetLanguageObject': Called when getting user's interface language object. $user: User object $code: Language code that will be used to create the object -$context: RequestContext object +$context: IContextSource object 'UserGetReservedNames': Allows to modify $wgReservedUsernames at run time. $reservedUsernames: $wgReservedUsernames -- To view, visit https://gerrit.wikimedia.org/r/170940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c385a2cac0696493dd1c97268e5c4d03829234a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/master' into deployment - change (wikimedia...crm)
Ejegg has submitted this change and it was merged. Change subject: Merge remote-tracking branch 'origin/master' into deployment .. Merge remote-tracking branch 'origin/master' into deployment 240d5ec Avoid some trouble in non-USD contribution recalc Change-Id: If88015428290ccac2b6595a2798244511009ec13 --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/170953 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If88015428290ccac2b6595a2798244511009ec13 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make wtp a ganglia aggregator - change (operations/puppet)
Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/170954 Change subject: Make wtp a ganglia aggregator .. Make wtp a ganglia aggregator Having only one ganglia aggregator for the entire parsoid cluster means a SPOF. Avoid that by adding another ganglia aggregator in the cluster Change-Id: Ic380ee5d0e5601703493b2a854fcf4d48a1a659f --- M manifests/ganglia.pp M manifests/site.pp 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/54/170954/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index c3d2eac..425d9b5 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -335,7 +335,7 @@ 'Memcached eqiad'= 'mc1001.eqiad.wmnet mc1002.eqiad.wmnet', 'Text caches esams' = 'hooft.esams.wikimedia.org:11669', 'Upload caches esams'= 'hooft.esams.wikimedia.org:11671 cp3003.esams.wikimedia.org cp3004.esams.wikimedia.org', -'Parsoid eqiad' = 'wtp1001.eqiad.wmnet', +'Parsoid eqiad' = 'wtp1001.eqiad.wmnet wtp1002.eqiad.wmnet', 'Parsoid Varnish eqiad' = 'cp1045.eqiad.wmnet cp1058.eqiad.wmnet', 'Redis eqiad'= 'rdb1001.eqiad.wmnet rdb1002.eqiad.wmnet', 'Text caches eqiad' = 'cp1052.eqiad.wmnet cp1053.eqiad.wmnet', diff --git a/manifests/site.pp b/manifests/site.pp index b35ad7c..17574be 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -3002,7 +3002,7 @@ node /^wtp10(0[1-9]|1[0-9]|2[0-4])\.eqiad\.wmnet$/ { $cluster = 'parsoid' -if $::hostname == 'wtp1001' { +if $::hostname == 'wtp1001' or $::hostname == 'wtp1002' { $ganglia_aggregator = true } -- To view, visit https://gerrit.wikimedia.org/r/170954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic380ee5d0e5601703493b2a854fcf4d48a1a659f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expand anchors to full URL on server rendering - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Expand anchors to full URL on server rendering .. Expand anchors to full URL on server rendering This fixes bug 72490 and any similar issues where we're doing: [$1 text of link] but $1 is not a fully qualified URL. There is a bug (bug 66746) to provide i18n support so it can be done without creating an external link (which the above does), but this fixes the broken user experience in the meantime. Bug: 72490 Change-Id: I615a1178be61ea911855e92a131dea980ef27554 --- M includes/View.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved EBernhardson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/View.php b/includes/View.php index b002862..e5e62a6 100644 --- a/includes/View.php +++ b/includes/View.php @@ -152,7 +152,15 @@ array_walk_recursive( $apiResponse, function( $value ) { if ( $value instanceof Anchor ) { + $anchor = $value; $value = $value-toArray(); + + // TODO: We're looking into another approach for this + // using a parser function, so the URL doesn't have to be + // fully qualified. + // See https://bugzilla.wikimedia.org/show_bug.cgi?id=66746 + $value['url'] = $anchor-getFullURL(); + } elseif ( $value instanceof Message ) { $value = $value-text(); } -- To view, visit https://gerrit.wikimedia.org/r/170785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I615a1178be61ea911855e92a131dea980ef27554 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing old public ip's for aluminium - change (operations/dns)
Cmjohnson has uploaded a new change for review. https://gerrit.wikimedia.org/r/170955 Change subject: Removing old public ip's for aluminium .. Removing old public ip's for aluminium Change-Id: I1f5817bae746ef0d74460fee04c8d2a0a0a9d887 --- M templates/155.80.208.in-addr.arpa M templates/wikimedia.org 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/55/170955/1 diff --git a/templates/155.80.208.in-addr.arpa b/templates/155.80.208.in-addr.arpa index 962438c..82c02a7 100644 --- a/templates/155.80.208.in-addr.arpa +++ b/templates/155.80.208.in-addr.arpa @@ -30,7 +30,6 @@ 12 1H IN PTR thulium.wikimedia.org. 13 1H IN PTR lutetium.wikimedia.org. 14 1H IN PTR barium-fundraising.wikimedia.org. -15 1H IN PTR aluminium.wikimedia.org. ; 208.80.155.32/27 Infrastructure block diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 7194a81..e91aaf4 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -107,7 +107,6 @@ 1H IN 2620:0:860:1:208:80:153:12 achernar1H IN A208.80.153.42 1H IN 2620:0:860:2:208:80:153:42 -aluminium 1H IN A208.80.155.15 antimony1H IN A208.80.154.7 argon 1H IN A208.80.154.160 astatine1H IN A208.80.155.110 -- To view, visit https://gerrit.wikimedia.org/r/170955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f5817bae746ef0d74460fee04c8d2a0a0a9d887 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix undefined offset in updateOneSearchIndexConfig - change (mediawiki...CirrusSearch)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/170956 Change subject: Fix undefined offset in updateOneSearchIndexConfig .. Fix undefined offset in updateOneSearchIndexConfig isset( $wgCirrusSearchReplicas[ $this-indexType ] ) returns true if $wgCirrusSearchReplicas is a string, so we need to also check type of $wgCirrusSearchReplicas. Bug: 72888 Change-Id: I1d8c13cbc2dd5a34b0e5b877a046d314fdefc236 (cherry picked from commit 96a1d2c9ce234879b283b67be0fc820d9378500d) --- M maintenance/updateOneSearchIndexConfig.php 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/56/170956/1 diff --git a/maintenance/updateOneSearchIndexConfig.php b/maintenance/updateOneSearchIndexConfig.php index b314a4a..09eb1c2 100644 --- a/maintenance/updateOneSearchIndexConfig.php +++ b/maintenance/updateOneSearchIndexConfig.php @@ -1023,13 +1023,16 @@ private function getReplicaCount() { global $wgCirrusSearchReplicas; + // If $wgCirrusSearchReplicas is an array of index type to number of replicas then respect that - if ( isset( $wgCirrusSearchReplicas[ $this-indexType ] ) ) { - return $wgCirrusSearchReplicas[ $this-indexType ]; - } if ( is_array( $wgCirrusSearchReplicas ) ) { - $this-error( 'If wgCirrusSearchReplicas is an array it must contain all index types.', 1 ); + if ( isset( $wgCirrusSearchReplicas[ $this-indexType ] ) ) { + return $wgCirrusSearchReplicas[ $this-indexType ]; + } else { + $this-error( 'If wgCirrusSearchReplicas is an array it must contain all index types.', 1 ); + } } + // Otherwise its just a raw scalar so we should respect that too return $wgCirrusSearchReplicas; } -- To view, visit https://gerrit.wikimedia.org/r/170956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d8c13cbc2dd5a34b0e5b877a046d314fdefc236 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix undefined offset in updateOneSearchIndexConfig - change (mediawiki...CirrusSearch)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/170957 Change subject: Fix undefined offset in updateOneSearchIndexConfig .. Fix undefined offset in updateOneSearchIndexConfig isset( $wgCirrusSearchReplicas[ $this-indexType ] ) returns true if $wgCirrusSearchReplicas is a string, so we need to also check type of $wgCirrusSearchReplicas. Bug: 72888 Change-Id: I1d8c13cbc2dd5a34b0e5b877a046d314fdefc236 (cherry picked from commit 96a1d2c9ce234879b283b67be0fc820d9378500d) --- M maintenance/updateOneSearchIndexConfig.php 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/57/170957/1 diff --git a/maintenance/updateOneSearchIndexConfig.php b/maintenance/updateOneSearchIndexConfig.php index f348dd9..6c22cbb 100644 --- a/maintenance/updateOneSearchIndexConfig.php +++ b/maintenance/updateOneSearchIndexConfig.php @@ -1021,13 +1021,16 @@ private function getReplicaCount() { global $wgCirrusSearchReplicas; + // If $wgCirrusSearchReplicas is an array of index type to number of replicas then respect that - if ( isset( $wgCirrusSearchReplicas[ $this-indexType ] ) ) { - return $wgCirrusSearchReplicas[ $this-indexType ]; - } if ( is_array( $wgCirrusSearchReplicas ) ) { - $this-error( 'If wgCirrusSearchReplicas is an array it must contain all index types.', 1 ); + if ( isset( $wgCirrusSearchReplicas[ $this-indexType ] ) ) { + return $wgCirrusSearchReplicas[ $this-indexType ]; + } else { + $this-error( 'If wgCirrusSearchReplicas is an array it must contain all index types.', 1 ); + } } + // Otherwise its just a raw scalar so we should respect that too return $wgCirrusSearchReplicas; } -- To view, visit https://gerrit.wikimedia.org/r/170957 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d8c13cbc2dd5a34b0e5b877a046d314fdefc236 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: wmf/1.25wmf6 Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing old public ip's for aluminium - change (operations/dns)
Cmjohnson has submitted this change and it was merged. Change subject: Removing old public ip's for aluminium .. Removing old public ip's for aluminium Change-Id: I1f5817bae746ef0d74460fee04c8d2a0a0a9d887 --- M templates/155.80.208.in-addr.arpa M templates/wikimedia.org 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Cmjohnson: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/templates/155.80.208.in-addr.arpa b/templates/155.80.208.in-addr.arpa index 962438c..82c02a7 100644 --- a/templates/155.80.208.in-addr.arpa +++ b/templates/155.80.208.in-addr.arpa @@ -30,7 +30,6 @@ 12 1H IN PTR thulium.wikimedia.org. 13 1H IN PTR lutetium.wikimedia.org. 14 1H IN PTR barium-fundraising.wikimedia.org. -15 1H IN PTR aluminium.wikimedia.org. ; 208.80.155.32/27 Infrastructure block diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 7194a81..e91aaf4 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -107,7 +107,6 @@ 1H IN 2620:0:860:1:208:80:153:12 achernar1H IN A208.80.153.42 1H IN 2620:0:860:2:208:80:153:42 -aluminium 1H IN A208.80.155.15 antimony1H IN A208.80.154.7 argon 1H IN A208.80.154.160 astatine1H IN A208.80.155.110 -- To view, visit https://gerrit.wikimedia.org/r/170955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1f5817bae746ef0d74460fee04c8d2a0a0a9d887 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Cmjohnson cmjohn...@wikimedia.org 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 undefined offset in updateOneSearchIndexConfig - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix undefined offset in updateOneSearchIndexConfig .. Fix undefined offset in updateOneSearchIndexConfig isset( $wgCirrusSearchReplicas[ $this-indexType ] ) returns true if $wgCirrusSearchReplicas is a string, so we need to also check type of $wgCirrusSearchReplicas. Bug: 72888 Change-Id: I1d8c13cbc2dd5a34b0e5b877a046d314fdefc236 (cherry picked from commit 96a1d2c9ce234879b283b67be0fc820d9378500d) --- M maintenance/updateOneSearchIndexConfig.php 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/updateOneSearchIndexConfig.php b/maintenance/updateOneSearchIndexConfig.php index b314a4a..09eb1c2 100644 --- a/maintenance/updateOneSearchIndexConfig.php +++ b/maintenance/updateOneSearchIndexConfig.php @@ -1023,13 +1023,16 @@ private function getReplicaCount() { global $wgCirrusSearchReplicas; + // If $wgCirrusSearchReplicas is an array of index type to number of replicas then respect that - if ( isset( $wgCirrusSearchReplicas[ $this-indexType ] ) ) { - return $wgCirrusSearchReplicas[ $this-indexType ]; - } if ( is_array( $wgCirrusSearchReplicas ) ) { - $this-error( 'If wgCirrusSearchReplicas is an array it must contain all index types.', 1 ); + if ( isset( $wgCirrusSearchReplicas[ $this-indexType ] ) ) { + return $wgCirrusSearchReplicas[ $this-indexType ]; + } else { + $this-error( 'If wgCirrusSearchReplicas is an array it must contain all index types.', 1 ); + } } + // Otherwise its just a raw scalar so we should respect that too return $wgCirrusSearchReplicas; } -- To view, visit https://gerrit.wikimedia.org/r/170956 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d8c13cbc2dd5a34b0e5b877a046d314fdefc236 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: wmf/1.25wmf5 Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support toDomElements returning an empty array - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/170958 Change subject: Support toDomElements returning an empty array .. Support toDomElements returning an empty array Change-Id: I7c526a206a5166b601c1e9dff679a195a0029e6a --- M src/dm/ve.dm.Converter.js 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/58/170958/1 diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js index 095dfad..2e12030 100644 --- a/src/dm/ve.dm.Converter.js +++ b/src/dm/ve.dm.Converter.js @@ -1475,7 +1475,11 @@ dataElementOrSlice = getDataElementOrSlice(); childDomElements = this.getDomElementsFromDataElement( dataElementOrSlice, doc ); - if ( childDomElements ) { + if ( childDomElements !childDomElements.length ) { + // Support toDomElements returning an empty array + i = findEndOfNode( i ) - 1; + continue; + } else if ( childDomElements ) { // Add clone of internal data; we use a clone rather than a reference because // we modify .veInternal.whitespace[1] in some cases childDomElements[0].veInternal = ve.extendObject( -- To view, visit https://gerrit.wikimedia.org/r/170958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c526a206a5166b601c1e9dff679a195a0029e6a Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Placholder - placeholder - change (VisualEditor/VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/170959 Change subject: Placholder - placeholder .. Placholder - placeholder Change-Id: I40178739f988085ce6588f52b6ee3f5314747286 --- M src/dm/ve.dm.TableSelection.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/59/170959/1 diff --git a/src/dm/ve.dm.TableSelection.js b/src/dm/ve.dm.TableSelection.js index d658de1..a283147 100644 --- a/src/dm/ve.dm.TableSelection.js +++ b/src/dm/ve.dm.TableSelection.js @@ -262,7 +262,7 @@ /** * Clone this selection with adjusted row and column positions * - * Placholder cells are skipped over so this method can be used for cursoring. + * Placeholder cells are skipped over so this method can be used for cursoring. * * @param {number} fromColOffset Starting column offset * @param {number} fromRowOffset Starting row offset -- To view, visit https://gerrit.wikimedia.org/r/170959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40178739f988085ce6588f52b6ee3f5314747286 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make load.php parse in PHP 4 again - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Make load.php parse in PHP 4 again .. Make load.php parse in PHP 4 again Not sure what for, but if it needs to parse, then let's make it parse… Change-Id: I28ec3b3a86f6eb90e3341f967649fb4c910966d7 --- M load.php 1 file changed, 5 insertions(+), 6 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/load.php b/load.php index fc6cf98..8b23909 100644 --- a/load.php +++ b/load.php @@ -38,16 +38,15 @@ return; } -// Respond to resource loading request -$resourceLoader = new ResourceLoader( - ConfigFactory::getDefaultInstance()-makeConfig( 'main' ) -); +// Respond to resource loading request. +// foo()-bar() syntax is not supported in PHP4, and this file needs to *parse* in PHP4. +$configFactory = ConfigFactory::getDefaultInstance(); +$resourceLoader = new ResourceLoader( $configFactory-makeConfig( 'main' ) ); $resourceLoader-respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) ); wfProfileOut( 'load.php' ); wfLogProfilingData(); -// Shut down the database. foo()-bar() syntax is not supported in PHP4, and this file -// needs to *parse* in PHP4, although we'll never get down here to worry about = vs = +// Shut down the database. $lb = wfGetLBFactory(); $lb-shutdown(); -- To view, visit https://gerrit.wikimedia.org/r/170949 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28ec3b3a86f6eb90e3341f967649fb4c910966d7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Parent5446 tylerro...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de 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 API parameter handling details for the bounehandler API - change (mediawiki...BounceHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Add API parameter handling details for the bounehandler API .. Add API parameter handling details for the bounehandler API * Updated tests too to work with with the change * The API now receive parameters from $this-extractRequestParams(); * Updated API to use i18n messages Bug: 72685 Change-Id: I83f6854a8ee007e1944d2501d11b244e0254fd91 --- M i18n/en.json M i18n/qqq.json M includes/ApiBounceHandler.php M tests/ApiBounceHandlerTest.php 4 files changed, 57 insertions(+), 28 deletions(-) Approvals: Anomie: Looks good to me, but someone else must approve Reedy: Looks good to me, approved 01tonythomas: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index ad7c7cd..2c3c0d2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,5 +5,8 @@ ] }, bouncehandler-desc: Helps in handling email bounces for MediaWiki, - bouncehandler-notify_subject: Returning temporary bounce + bouncehandler-notify_subject: Returning temporary bounce, + apihelp-bouncehandler-example-1: Receive a bounce email for processing with the content \This is a test email\., + apihelp-bouncehandler-description: Receive a bounce email and process it to handle the failing recipient., + apihelp-bouncehandler-param-email: The bounced email. } \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index 8f3aafe..3e79b9e 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -5,5 +5,8 @@ ] }, bouncehandler-desc: {{desc|name=Bounce Handler|url=https://www.mediawiki.org/wiki/Extension:BounceHandler}};, - bouncehandler-notify_subject: Subject of notification email sent to wiki administrators on a failed to parse bounce + bouncehandler-notify_subject: Subject of notification email sent to wiki administrators on a failed to parse bounce, + apihelp-bouncehandler-example-1: {{doc-apihelp-example|bouncehandler}}, + apihelp-bouncehandler-description: {{doc-apihelp-description|bouncehandler}}, + apihelp-bouncehandler-param-email: {{doc-apihelp-param|bouncehandler|email}} } diff --git a/includes/ApiBounceHandler.php b/includes/ApiBounceHandler.php index f6c78ca..403058e 100644 --- a/includes/ApiBounceHandler.php +++ b/includes/ApiBounceHandler.php @@ -19,26 +19,17 @@ $this-dieUsage( 'This API module is for internal use only.', 'invalid-ip' ); } - $email = $this-getMain()-getVal( 'email' ); + $params = $this-extractRequestParams(); - if ( $email ) { - $params = array ( 'email' = $email ); - $title = Title::newFromText( 'BounceHandler Job' ); - $job = new BounceHandlerJob( $title, $params ); - JobQueueGroup::singleton()-push( $job ); + $title = Title::newFromText( 'BounceHandler Job' ); + $job = new BounceHandlerJob( $title, $params ); + JobQueueGroup::singleton()-push( $job ); - $this-getResult()-addValue( - null, - $this-getModuleName(), - array ( 'submitted' = 'job' ) - ); - } else { - $this-getResult()-addValue( - null, - $this-getModuleName(), - array ( 'submitted' = 'failure' ) - ); - } + $this-getResult()-addValue( + null, + $this-getModuleName(), + array ( 'submitted' = 'job' ) + ); return true; } @@ -52,4 +43,35 @@ return true; } + public function mustBePosted() { + return true; + } + + public function isWriteMode() { + return true; + } + + public function getAllowedParams() { + return array( + 'email' = array( + ApiBase::PARAM_TYPE = 'string', + ApiBase::PARAM_REQUIRED = true + ) + ); + } + + /** +* @see ApiBase::getExamplesMessages() +*/ + public function getExamplesMessages() { + return array( + 'action=bouncehandleremail=This%20is%20a%20test%20email' + = 'apihelp-bouncehandler-example-1' + ); + } + + public function getHelpUrls() { + return https://www.mediawiki.org/wiki/Extension:BounceHandler#API;; + } + } \ No
[MediaWiki-commits] [Gerrit] Hygiene: Fix method chaining code style - change (mediawiki...MobileFrontend)
Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/170960 Change subject: Hygiene: Fix method chaining code style .. Hygiene: Fix method chaining code style As we can see in here: https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Creating_elements Change-Id: Iba2fab07157539edb389d2960f5940ec2b0d8c7c --- M javascripts/loggingSchemas/MobileWebClickTracking.js M javascripts/mainmenu.js M javascripts/modules/editor/EditorOverlay.js M javascripts/modules/editor/editor.js M javascripts/modules/issues/issues.js M javascripts/modules/lastEdited/lastEdited.js M javascripts/modules/search/SearchOverlay.js M javascripts/modules/talk/talk.js M javascripts/modules/uploads/PhotoApi.js M javascripts/modules/uploads/PhotoUploadOverlay.js M javascripts/modules/uploads/PhotoUploaderButton.js M javascripts/modules/wikigrok/WikiGrokDialogB.js M javascripts/specials/preferences.js M javascripts/specials/uploads.js M javascripts/toast.js M tests/qunit/modules/editor/test_EditorApi.js M tests/qunit/modules/editor/test_EditorOverlay.js M tests/qunit/modules/nearby/test_Nearby.js M tests/qunit/modules/test_PageList.js M tests/qunit/modules/uploads/test_PhotoApi.js M tests/qunit/modules/watchlist/test_Watchlist.js M tests/qunit/modules/watchstar/test_Watchstar.js 22 files changed, 126 insertions(+), 122 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/60/170960/1 diff --git a/javascripts/loggingSchemas/MobileWebClickTracking.js b/javascripts/loggingSchemas/MobileWebClickTracking.js index 37df7fe..746882f 100644 --- a/javascripts/loggingSchemas/MobileWebClickTracking.js +++ b/javascripts/loggingSchemas/MobileWebClickTracking.js @@ -49,8 +49,8 @@ $( function () { var $profileLink; if ( !M.isApp() ) { - $profileLink = $( '#mw-mf-last-modified a' ). - filter( function () { + $profileLink = $( '#mw-mf-last-modified a' ) + .filter( function () { return $( this ).children().length === 0; } ); diff --git a/javascripts/mainmenu.js b/javascripts/mainmenu.js index 52f9e6d..8958b14 100644 --- a/javascripts/mainmenu.js +++ b/javascripts/mainmenu.js @@ -8,9 +8,9 @@ * Closes all open navigation drawers */ function closeNavigationDrawers() { - $( 'body' ).removeClass( 'navigation-enabled' ). - removeClass( 'secondary-navigation-enabled' ). - removeClass( 'primary-navigation-enabled' ); + $( 'body' ).removeClass( 'navigation-enabled' ) + .removeClass( 'secondary-navigation-enabled' ) + .removeClass( 'primary-navigation-enabled' ); } /* @@ -20,8 +20,8 @@ // close any existing ones first. closeNavigationDrawers(); drawerType = drawerType || 'primary'; - $( 'body' ).toggleClass( 'navigation-enabled' ). - toggleClass( drawerType + '-navigation-enabled' ); + $( 'body' ).toggleClass( 'navigation-enabled' ) + .toggleClass( drawerType + '-navigation-enabled' ); } function initialize() { diff --git a/javascripts/modules/editor/EditorOverlay.js b/javascripts/modules/editor/EditorOverlay.js index e0ec5aa..39b0d2d 100644 --- a/javascripts/modules/editor/EditorOverlay.js +++ b/javascripts/modules/editor/EditorOverlay.js @@ -58,8 +58,8 @@ EditorOverlayBase.prototype.postRender.apply( this, arguments ); this.$preview = this.$( '.preview' ); - this.$content = this.$( '.wikitext-editor' ). - on( 'input', function () { + this.$content = this.$( '.wikitext-editor' ) + .on( 'input', function () { self.api.setContent( self.$content.val() ); self.$( '.continue, .submit' ).prop( 'disabled', false ); } ); @@ -177,15 +177,15 @@ this.$content.hide(); this.showSpinner(); - this.api.getContent(). - done( function ( content ) { - self.$content. - show(). - val( content ). - microAutosize(); + this.api.getContent() + .done( function ( content ) { + self.$content +
[MediaWiki-commits] [Gerrit] Determin update actions based on usage aspects. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/170961 Change subject: Determin update actions based on usage aspects. .. Determin update actions based on usage aspects. This greatly simplifies test cases for ChangeHandler. Change-Id: I4ef7a9315b110caf29ae43c30c582fe6623e2581 --- M client/includes/AffectedPagesFinder.php M client/includes/ChangeHandler.php M client/includes/PageUpdater.php M client/includes/Usage/EntityUsage.php M client/includes/WikiPageUpdater.php M client/includes/WikibaseClient.php M client/tests/phpunit/MockPageUpdater.php M client/tests/phpunit/includes/ChangeHandlerTest.php 8 files changed, 336 insertions(+), 425 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/61/170961/1 diff --git a/client/includes/AffectedPagesFinder.php b/client/includes/AffectedPagesFinder.php index 0a174f5..146436f 100644 --- a/client/includes/AffectedPagesFinder.php +++ b/client/includes/AffectedPagesFinder.php @@ -103,7 +103,7 @@ /** * @since 0.5 * -* @param Change $change +* @param EntityChange $change * * @return IteratorPageEntityUsages */ diff --git a/client/includes/ChangeHandler.php b/client/includes/ChangeHandler.php index c2f192d..95cc27b 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/ChangeHandler.php @@ -2,16 +2,16 @@ namespace Wikibase; +use Exception; use InvalidArgumentException; use MWException; use Title; use Wikibase\Client\Changes\AffectedPagesFinder; use Wikibase\Client\Store\TitleFactory; -use Wikibase\DataModel\Entity\Diff\EntityDiff; -use Wikibase\DataModel\Entity\Diff\ItemDiff; +use Wikibase\Client\Usage\EntityUsage; +use Wikibase\Client\Usage\PageEntityUsages; use Wikibase\Lib\Changes\EntityChangeFactory; use Wikibase\Lib\Store\EntityRevisionLookup; -use Wikibase\Lib\Store\StorageException; /** * Interface for change handling. Whenever a change is detected, @@ -31,28 +31,28 @@ /** * The change requites any rendered version of the page to be purged from the parser cache. */ - const PARSER_PURGE_ACTION = 1; + const PARSER_PURGE_ACTION = 'parser'; /** * The change requites a LinksUpdate job to be scheduled to update any links * associated with the page. */ - const LINKS_UPDATE_ACTION = 2; + const LINKS_UPDATE_ACTION = 'links'; /** * The change requites any HTML output generated from the page to be purged from web cached. */ - const WEB_PURGE_ACTION = 4; + const WEB_PURGE_ACTION = 'web'; /** * The change requites an entry to be injected into the recentchanges table. */ - const RC_ENTRY_ACTION = 8; + const RC_ENTRY_ACTION = 'rc'; /** * The change requites an entry to be injected into the revision table. */ - const HISTORY_ENTRY_ACTION = 16; + const HISTORY_ENTRY_ACTION = 'history'; /** * @var EntityChangeFactory @@ -91,8 +91,7 @@ PageUpdater $updater, EntityRevisionLookup $entityRevisionLookup, $localSiteId, - $injectRC, - $allowDataTransclusion + $injectRC ) { $this-changeFactory = $changeFactory; $this-affectedPagesFinder = $affectedPagesFinder; @@ -108,13 +107,8 @@ throw new InvalidArgumentException( '$injectRC must be a bool' ); } - if ( !is_bool( $allowDataTransclusion ) ) { - throw new InvalidArgumentException( '$allowDataTransclusion must be a bool' ); - } - $this-localSiteId = $localSiteId; $this-injectRC = (bool)$injectRC; - $this-dataTransclusionAllowed = $allowDataTransclusion; $this-mirrorUpdater = null; } @@ -419,7 +413,7 @@ /** * Main entry point for handling changes * -* @see https://www.mediawiki.org/wiki/Manual:Hooks/WikibasePollHandle +* @todo: process multiple changes at once! * * @since 0.1 * @@ -436,120 +430,150 @@ wfDebugLog( __CLASS__, __FUNCTION__ . : handling change #$chid . ( . $change-getType() . ) ); - //TODO: Actions may be per-title, depending on how the change applies to that page. - // We'll need on list of titles per action. - $actions = $this-getActions( $change ); + $usagesPerPage = $this-affectedPagesFinder-getPagesToUpdate( $change ); - if ( $actions === 0 ) { - // nothing to do - wfDebugLog( __CLASS__, __FUNCTION__ . : No actions to
[MediaWiki-commits] [Gerrit] Profiler: Call getContentType() only once in logData() - change (mediawiki/core)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/170962 Change subject: Profiler: Call getContentType() only once in logData() .. Profiler: Call getContentType() only once in logData() Each call potentially does a regular expression check per output header. No point in multiplying that by 3. Change-Id: I30e9a6b5df1a773e9448ec9b77d0e79339f19738 --- M includes/profiler/ProfilerSimpleText.php M includes/profiler/ProfilerSimpleTrace.php 2 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/170962/1 diff --git a/includes/profiler/ProfilerSimpleText.php b/includes/profiler/ProfilerSimpleText.php index 2d96b88..cc18890 100644 --- a/includes/profiler/ProfilerSimpleText.php +++ b/includes/profiler/ProfilerSimpleText.php @@ -50,17 +50,18 @@ : 0; // profiling mismatch error? uasort( $this-mCollated, array( 'self', 'sort' ) ); array_walk( $this-mCollated, array( 'self', 'format' ), $totalReal ); + $contentType = $this-getContentType(); if ( PHP_SAPI === 'cli' ) { print !--\n . self::$out . \n--\n; - } elseif ( $this-getContentType() === 'text/html' ) { + } elseif ( $contentType === 'text/html' ) { if ( $this-visible ) { print 'pre' . self::$out . '/pre'; } else { print !--\n . self::$out . \n--\n; } - } elseif ( $this-getContentType() === 'text/javascript' ) { + } elseif ( $contentType === 'text/javascript' ) { print \n/*\n . self::$out . */\n; - } elseif ( $this-getContentType() === 'text/css' ) { + } elseif ( $contentType === 'text/css' ) { print \n/*\n . self::$out . */\n; } } diff --git a/includes/profiler/ProfilerSimpleTrace.php b/includes/profiler/ProfilerSimpleTrace.php index 95e4bc6..0dd4067 100644 --- a/includes/profiler/ProfilerSimpleTrace.php +++ b/includes/profiler/ProfilerSimpleTrace.php @@ -67,13 +67,14 @@ public function logData() { if ( $this-mTemplated ) { + $contentType = $this-getContentType(); if ( PHP_SAPI === 'cli' ) { print !-- \n {$this-trace} \n --; - } elseif ( $this-getContentType() === 'text/html' ) { + } elseif ( $contentType === 'text/html' ) { print !-- \n {$this-trace} \n --; - } elseif ( $this-getContentType() === 'text/javascript' ) { + } elseif ( $contentType === 'text/javascript' ) { print \n/*\n {$this-trace}\n*/; - } elseif ( $this-getContentType() === 'text/css' ) { + } elseif ( $contentType === 'text/css' ) { print \n/*\n {$this-trace}\n*/; } } -- To view, visit https://gerrit.wikimedia.org/r/170962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30e9a6b5df1a773e9448ec9b77d0e79339f19738 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Placholder - placeholder - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Placholder - placeholder .. Placholder - placeholder Change-Id: I40178739f988085ce6588f52b6ee3f5314747286 --- M src/dm/ve.dm.TableSelection.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/ve.dm.TableSelection.js b/src/dm/ve.dm.TableSelection.js index d658de1..a283147 100644 --- a/src/dm/ve.dm.TableSelection.js +++ b/src/dm/ve.dm.TableSelection.js @@ -262,7 +262,7 @@ /** * Clone this selection with adjusted row and column positions * - * Placholder cells are skipped over so this method can be used for cursoring. + * Placeholder cells are skipped over so this method can be used for cursoring. * * @param {number} fromColOffset Starting column offset * @param {number} fromRowOffset Starting row offset -- To view, visit https://gerrit.wikimedia.org/r/170959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I40178739f988085ce6588f52b6ee3f5314747286 Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Alex Monk kren...@wikimedia.org 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 default tags and default project to cohorts - change (analytics/wikimetrics)
Mforns has uploaded a new change for review. https://gerrit.wikimedia.org/r/170963 Change subject: Add default tags and default project to cohorts .. Add default tags and default project to cohorts This change adds a script that inserts all the predefined tags into the tag table in the wikimetrics database. The tags are hardcoded inside the script, and they won't be duplicated nor deleted by executing the script many times. This change also adds the default project to the cohort detail view, together with a notification whenever the cohort has been uploaded with centralauth expansion. Bug: 72746 Change-Id: I2ee332698e6f223370e7def1b8922f4b41359648 --- A scripts/populate_tags M wikimetrics/controllers/cohorts.py M wikimetrics/templates/cohorts.html 3 files changed, 106 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/63/170963/1 diff --git a/scripts/populate_tags b/scripts/populate_tags new file mode 100755 index 000..4c72061 --- /dev/null +++ b/scripts/populate_tags @@ -0,0 +1,98 @@ +#!/usr/bin/python +#!coding: utf-8 + +# Enters the predefined wikimetrics cohort tags to the database. +# There's no problem if some tags are already there, the script +# will leave them untouched and won't create any duplicates. + +from wikimetrics.configurables import db +from wikimetrics.models.storage import TagStore + + +DEFAULT_COHORT_TAGS = [ +# Program tags +'gp:Editing-Workshop', +'gp:Edit-a-thon', +'gp:Micro-Grants', +'gp:Hack-a-thon', +'gp:On-wiki-Writing-Contest', +'gp:Press-Passes', +'gp:Travel-Grants', +'gp:Wikimedia-Conference', +'gp:Wikipedia-Adventure', +'gp:Wikipedian-Wikimedian-in-Residence', +'gp:Wikipedia-Education-Program ', +'gp:Wiki-Expedition', +'gp:Wiki-Takes', +'gp:Wiki-Loves-Monuments', +'gp:Other-Photo-Upload-Project', +'gp:Other-Classroom-Editing', + +# Organization/Affiliation tags +'wm:AM-Wikimedia-Armenia', +'wm:AR-Wikimedia-Argentina', +'wm:AT-Wikimedia-Österreich', +'wm:AU-Wikimedia-Australia', +'wm:BD-Wikimedia-Bangladesh', +'wm:CA-Wikimedia-Canada', +'wm:CH-Wikimedia-CH', +'wm:CL-Wikimedia-Chile', +'wm:CZ-Wikimedia-Česká-republika', +'wm:DE-Wikimedia-Deutschland', +'wm:DK-Wikimedia-Danmark', +'wm:EE-Wikimedia-Eesti', +'wm:ES-Wikimedia-España', +'wm:FI-Wikimedia-Suomi', +'wm:FR-Wikimédia-France', +'wm:HK-Wikimedia-Hong-Kong', +'wm:HU-Wikimédia-Magyarország', +'wm:ID-Wikimedia-Indonesia', +'wm:IL-Wikimedia-Israel', +'wm:IN-Wikimedia-India', +'wm:IT-Wikimedia-Italia', +'wm:MK-Викимедија-Македонија', +'wm:MO-Wikimedia-Macau', +'wm:MX-Wikimedia-México', +'wm:NL-Wikimedia-Nederland', +'wm:NO-Wikimedia-Norge', +'wm:PH-Wikimedia-Philippines', +'wm:PL-Wikimedia-Polska', +'wm:PT-Wikimedia-Portugal', +'wm:RS-Викимедија-Србије', +'wm:RU-Викимедиа-РУ', +'wm:SE-Wikimedia-Sverige', +'wm:TW-Wikimedia-Taiwan', +'wm:UA-Вікімедіа-Україна', +'wm:UK-Wikimedia-UK', +'wm:US-DC-Wikimedia-District-of-Columbia', +'wm:US-NYC-Wikimedia-New-York-City', +'wm:UY-Wikimedia-Uruguay', +'wm:VE-Wikimedia-Venezuela', +'wm:ZA-Wikimedia-South-Africa', +'wm:Amical-Wikimedia', +'wm:Esperanto-kaj-Libera-Scio-(ELiSo)', +'wm:GLAM-Wiki-US-Consortium-en', +'wm:New-England-Wikimedians-en', +'wm:MediaWiki-Group-Promotion-en-', +'wm:Wikimedia-Community-User-Group-Greece', +'wm:Wikimedians-of-Nepal', +'wm:Independent-Volunteer', +] + + +def main(): +session = db.get_session() +for tag in DEFAULT_COHORT_TAGS: +record = TagStore(name=tag) +session.add(record) +try: +session.commit() +print 'ADDED:', tag +except: +# the tag already exists +print 'ALREADY EXISTS:', tag +session.rollback() + + +if __name__ == '__main__': +main() diff --git a/wikimetrics/controllers/cohorts.py b/wikimetrics/controllers/cohorts.py index c706334..ee21ba2 100644 --- a/wikimetrics/controllers/cohorts.py +++ b/wikimetrics/controllers/cohorts.py @@ -15,6 +15,7 @@ CohortStore, CohortUserStore, UserStore, WikiUserStore, CohortWikiUserStore, MediawikiUser, ValidateCohort, TagStore, CohortTagStore ) +from wikimetrics.models.cohorts.centralauth_cohort import CentralAuthCohort from wikimetrics.enums import CohortUserRole from wikimetrics.api import CohortService, TagService, CentralAuthService @@ -62,6 +63,8 @@ 'id': c.id, 'name': c.name, 'description': c.description, +'default_project': c.default_project, +'centralauth': type(c) == CentralAuthCohort, } for c in cohorts]) diff --git a/wikimetrics/templates/cohorts.html b/wikimetrics/templates/cohorts.html index 4786e5a..e9ed480 100644 ---
[MediaWiki-commits] [Gerrit] Missed function rename from RangeFix change - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Missed function rename from RangeFix change .. Missed function rename from RangeFix change Follow up to I7f6cb6cb. Change-Id: I027b0ffba4c11031adb4ea12c50471b41472cc2f --- M src/ui/ve.ui.Toolbar.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/src/ui/ve.ui.Toolbar.js b/src/ui/ve.ui.Toolbar.js index 2a28845..dd73d73 100644 --- a/src/ui/ve.ui.Toolbar.js +++ b/src/ui/ve.ui.Toolbar.js @@ -134,7 +134,7 @@ return null; } - clientRect = surfaceView.getNativeRangeBoundingClientRect( nativeRange ); + clientRect = RangeFix.getBoundingClientRect( nativeRange ); if ( !clientRect ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/170898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I027b0ffba4c11031adb4ea12c50471b41472cc2f Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Disable desktop context on table selections - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Disable desktop context on table selections .. Disable desktop context on table selections Prevents link inpsector from trying to open on table cell containing only a link. Bonus: Disable links with CSS when in ce=false table cells. Bug: 72802 Change-Id: Iac21496e897b9e06c5e4233384952e6625c55d4c --- M demos/ve/pages/tables.html M src/ce/styles/nodes/ve.ce.TableCellNode.css M src/ui/ve.ui.Context.js 3 files changed, 16 insertions(+), 4 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/demos/ve/pages/tables.html b/demos/ve/pages/tables.html index 34632cc..56c5eea 100644 --- a/demos/ve/pages/tables.html +++ b/demos/ve/pages/tables.html @@ -130,7 +130,7 @@ table tr thLorembr /ipsum/th -thdolor/th +tha href=dolordolor/a/th thsit amet/th thconsectetur adipiscing elit/th thFusce sit/th diff --git a/src/ce/styles/nodes/ve.ce.TableCellNode.css b/src/ce/styles/nodes/ve.ce.TableCellNode.css index f2b08df..76c527e 100644 --- a/src/ce/styles/nodes/ve.ce.TableCellNode.css +++ b/src/ce/styles/nodes/ve.ce.TableCellNode.css @@ -17,6 +17,14 @@ outline: none; } +.ve-ce-tableCellNode a { + pointer-events: none; +} + +.ve-ce-tableCellNode-editing a { + pointer-events: auto; +} + /* Use child selectors to avoid making nested tables look active */ .ve-ce-tableNode-active thead tr .ve-ce-tableCellNode, .ve-ce-tableNode-active tfoot tr .ve-ce-tableCellNode, diff --git a/src/ui/ve.ui.Context.js b/src/ui/ve.ui.Context.js index 3a74350..a7e7e38 100644 --- a/src/ui/ve.ui.Context.js +++ b/src/ui/ve.ui.Context.js @@ -229,9 +229,13 @@ */ ve.ui.Context.prototype.getAvailableTools = function () { if ( !this.availableTools ) { - this.availableTools = ve.ui.toolFactory.getToolsForFragment( - this.surface.getModel().getFragment() - ); + if ( this.surface.getModel().getSelection() instanceof ve.dm.LinearSelection ) { + this.availableTools = ve.ui.toolFactory.getToolsForFragment( + this.surface.getModel().getFragment() + ); + } else { + this.availableTools = []; + } } return this.availableTools; }; -- To view, visit https://gerrit.wikimedia.org/r/170896 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac21496e897b9e06c5e4233384952e6625c55d4c Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Select column page_lang in prop=info - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/170964 Change subject: Select column page_lang in prop=info .. Select column page_lang in prop=info The new field needs to be part of the select to init the title object correct. Only needed when $wgPageLanguageUseDB = true Change-Id: I30e8bb1dd493148cba9fec214718f80d04b7638b --- M includes/api/ApiQueryInfo.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/170964/1 diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 7ecb429..5e61ed1 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -70,6 +70,9 @@ if ( $config-get( 'ContentHandlerUseDB' ) ) { $pageSet-requestField( 'page_content_model' ); } + if ( $config-get( 'PageLanguageUseDB' ) ) { + $pageSet-requestField( 'page_lang' ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/170964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30e8bb1dd493148cba9fec214718f80d04b7638b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Move tests over to core templating mechanism - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Move tests over to core templating mechanism .. Hygiene: Move tests over to core templating mechanism Change-Id: If16727940dfe39658f0b316f4add670a7e20b799 --- M includes/MobileFrontend.hooks.php M tests/qunit/modules/issues/test_issues.js M tests/qunit/modules/toggling/test_toggle.js 3 files changed, 6 insertions(+), 7 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 4c66342..f287a4b 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -260,11 +260,10 @@ ) { global $wgResourceModules; + $baseTemplateDir = 'tests/qunit/templates/'; $testModuleBoilerplate = array( 'localBasePath' = dirname( __DIR__ ), 'remoteExtPath' = 'MobileFrontend', - 'localTemplateBasePath' = dirname( __DIR__ ) . '/tests/qunit/templates', - 'class' = 'ResourceLoaderTemplateModule', 'targets' = array( 'mobile' ), ); @@ -281,11 +280,11 @@ $testFiles[] = $testFile; } + // FIXME: Rewrite/cleanup the template logic // save the relative name of the template directory $templateDir = str_replace( 'javascripts/', '', dirname( $script ) ); // absolute filepath to the template dir (for several checks) - $templateAbsoluteDir = $testModuleBoilerplate['localTemplateBasePath'] - . '/' . $templateDir; + $templateAbsoluteDir = dirname( __DIR__ ) . '/' . $baseTemplateDir . $templateDir; // check, if there is a template directory to load templates from if ( file_exists( $templateAbsoluteDir ) is_dir( $templateAbsoluteDir ) ) { @@ -301,7 +300,7 @@ continue; } // add this template to the templates array - $templates[] = $templateDir . '/' . $template; + $templates[$template] = $baseTemplateDir . $templateDir . '/' . $template; } // close the directory handle closedir( $templateHandle ); diff --git a/tests/qunit/modules/issues/test_issues.js b/tests/qunit/modules/issues/test_issues.js index c914d51..5794b03 100644 --- a/tests/qunit/modules/issues/test_issues.js +++ b/tests/qunit/modules/issues/test_issues.js @@ -5,7 +5,7 @@ QUnit.module( 'MobileFrontend issues', { setup: function() { $( 'div id=mfe-test-issues' + - M.template.get( 'modules/issues/issues.hogan' ).text + + mw.template.get( 'mobile.issues.tests', 'issues.hogan' ).text + '/div' ).appendTo( '#qunit-fixture' ); }, teardown: function() { diff --git a/tests/qunit/modules/toggling/test_toggle.js b/tests/qunit/modules/toggling/test_toggle.js index d94e51e..834d033 100644 --- a/tests/qunit/modules/toggling/test_toggle.js +++ b/tests/qunit/modules/toggling/test_toggle.js @@ -1,6 +1,6 @@ ( function ( M, $ ) { -var sectionHtml = M.template.get( 'modules/toggling/section.hogan' ).render(), +var sectionHtml = mw.template.get( 'mobile.toggling.tests', 'section.hogan' ).render(), toggle = M.require( 'toggle' ); /** -- To view, visit https://gerrit.wikimedia.org/r/170808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If16727940dfe39658f0b316f4add670a7e20b799 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: delete header test - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/170965 Change subject: QA: delete header test .. QA: delete header test This test has never worked and is now obsolete Change-Id: Icd51d8c4cf3fae3114a781076b347704adcf4c35 --- D tests/browser/features/header.feature D tests/browser/features/step_definitions/header_steps.rb 2 files changed, 0 insertions(+), 44 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/65/170965/1 diff --git a/tests/browser/features/header.feature b/tests/browser/features/header.feature deleted file mode 100644 index 7f85a78..000 --- a/tests/browser/features/header.feature +++ /dev/null @@ -1,19 +0,0 @@ -@chrome @firefox @internet_explorer_10 @login -Feature: Headers - - Assumes Flow is enabled for the User_talk namespace. - - Background: -Given I am logged in - - Scenario: No header on a new board -Given I am on a new board -Then The header should say - - Scenario: Edit header on a new board -Given I am on a new board -When I click the edit header link - And I see the edit header form - And I type test12345 into the header textbox - And I click Save -Then The header should say test12345 diff --git a/tests/browser/features/step_definitions/header_steps.rb b/tests/browser/features/step_definitions/header_steps.rb deleted file mode 100644 index 1210550..000 --- a/tests/browser/features/step_definitions/header_steps.rb +++ /dev/null @@ -1,25 +0,0 @@ -Then(/^The header should say (.*?)$/) do |content| - on(FlowPage) do |page| -page.header_content_element.when_visible -page.header_content.should match Regexp.escape( content ) - end -end - -When(/^I click the edit header link$/) do - on(FlowPage) do |page| -page.header_content_element.when_present.hover -page.edit_header_link_element.when_present.click - end -end - -Then(/^I see the edit header form$/) do - on(FlowPage).edit_header_form_element.when_visible.should be_visible -end - -When(/^I type (.*?) into the header textbox$/) do |arg1| - on(FlowPage).edit_header_textbox_element.when_present.send_keys( arg1 ) -end - -When(/^I click Save$/) do - on(FlowPage).edit_header_save_element.when_present.click -end -- To view, visit https://gerrit.wikimedia.org/r/170965 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd51d8c4cf3fae3114a781076b347704adcf4c35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: mobile.special.uploads.scripts should use core temp... - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: mobile.special.uploads.scripts should use core templates .. Hygiene: mobile.special.uploads.scripts should use core templates Change-Id: Ia4b08b8a0dc003c7391232071b77abe3bfc9f4ca --- M includes/Resources.php M javascripts/specials/uploads.js 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index 7a6993f..0e0d5ef 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -1067,13 +1067,13 @@ ), ), - 'mobile.special.uploads.scripts' = $wgMFMobileResourceBoilerplate + array( + 'mobile.special.uploads.scripts' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array( 'mobile.stable' ), 'templates' = array( - 'specials/photo.hogan', - 'specials/userGallery.hogan', + 'PhotoItem.hogan' = 'templates/specials/photo.hogan', + 'PhotoList.hogan' = 'templates/specials/userGallery.hogan', ), 'messages' = array( 'mobile-frontend-donate-image-nouploads', diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js index 7a3c860..3ad6495 100644 --- a/javascripts/specials/uploads.js +++ b/javascripts/specials/uploads.js @@ -73,7 +73,7 @@ * @extends View */ PhotoItem = View.extend( { - template: M.template.get( 'specials/photo.hogan' ), + template: mw.template.get( 'mobile.special.uploads.scripts', 'PhotoItem.hogan' ), tagName: 'li' } ); @@ -84,7 +84,7 @@ * @extends View */ PhotoList = View.extend( { - template: M.template.get( 'specials/userGallery.hogan' ), + template: mw.template.get( 'mobile.special.uploads.scripts', 'PhotoList.hogan' ), templatePartials: { spinner: mw.template.get( 'mobile.ajax', 'spinner.hogan' ) }, -- To view, visit https://gerrit.wikimedia.org/r/170810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia4b08b8a0dc003c7391232071b77abe3bfc9f4ca Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Dropped support for old jobs - change (mediawiki...Parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Dropped support for old jobs .. Dropped support for old jobs * Also removed $wgMaxBacklinksInvalidate reference since that var was removed Change-Id: Ibd6d647bb7af0d4b18d69b8683c8defb49b19583 --- M ParsoidCacheUpdateJob.php 1 file changed, 3 insertions(+), 39 deletions(-) Approvals: GWicke: Looks good to me, approved jenkins-bot: Verified diff --git a/ParsoidCacheUpdateJob.php b/ParsoidCacheUpdateJob.php index 1f544d5..867f7af 100644 --- a/ParsoidCacheUpdateJob.php +++ b/ParsoidCacheUpdateJob.php @@ -30,34 +30,19 @@ } function run() { - global $wgParsoidCacheUpdateTitlesPerJob, $wgUpdateRowsPerJob, $wgMaxBacklinksInvalidate; + global $wgParsoidCacheUpdateTitlesPerJob, $wgUpdateRowsPerJob; if ( $this-params['type'] === 'OnEdit' ) { $this-invalidateTitle( $this-title ); } elseif ( $this-params['type'] === 'OnDependencyChange' ) { static $expected = array( 'recursive', 'pages' ); // new jobs have one of these - - $oldRangeJob = false; if ( !array_intersect( array_keys( $this-params ), $expected ) ) { - // B/C for older job params formats that lack these fields: - // a) base jobs with just (table) and b) range jobs with (table,start,end) - if ( isset( $this-params['start'] ) isset( $this-params['end'] ) ) { - $oldRangeJob = true; - } else { - $this-params['recursive'] = true; // base job - } + // Old-style job; discard + return true; } // Job to purge all (or a range of) backlink pages for a page if ( !empty( $this-params['recursive'] ) ) { - // @TODO: try to use delayed jobs if possible? - if ( !isset( $this-params['range'] ) $wgMaxBacklinksInvalidate !== false ) { - $numRows = $this-title-getBacklinkCache()-getNumLinks( - $this-params['table'], $wgMaxBacklinksInvalidate ); - if ( $numRows $wgMaxBacklinksInvalidate ) { - return true; - } - } // Convert this into some title-batch jobs and possibly a // recursive ParsoidCacheUpdateJob job for the rest of the backlinks $jobs = BacklinkJobUtils::partitionBacklinkJob( @@ -74,27 +59,6 @@ // Job to purge pages for for a set of titles } elseif ( isset( $this-params['pages'] ) ) { $this-invalidateTitles( $this-params['pages'] ); - // B/C for job to purge a range of backlink pages for a given page - } elseif ( $oldRangeJob ) { - $titleArray = $this-title-getBacklinkCache()-getLinks( - $this-params['table'], $this-params['start'], $this-params['end'] ); - - $pages = array(); // same format BacklinkJobUtils uses - foreach ( $titleArray as $tl ) { - $pages[$tl-getArticleId()] = array( $tl-getNamespace(), $tl-getDbKey() ); - } - - $jobs = array(); - foreach ( array_chunk( $wgParsoidCacheUpdateTitlesPerJob, $pages ) as $pageChunk ) { - $jobs[] = new ParsoidCacheUpdateJob( $this-title, - array( - 'type' = 'OnDependencyChange', - 'table' = $this-table, - 'pages' = $pageChunk - ) + $this-getRootJobParams() // carry over information for de-duplication - ); - } - JobQueueGroup::singleton()-push( $jobs ); } } -- To view, visit https://gerrit.wikimedia.org/r/170761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id:
[MediaWiki-commits] [Gerrit] GlobalRenameUser: Warn if there are AntiSpoof conflicts - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: GlobalRenameUser: Warn if there are AntiSpoof conflicts .. GlobalRenameUser: Warn if there are AntiSpoof conflicts Bug: 70380 Change-Id: I4452ef2eb67815fe01c7444ca8dce7c47f0ef8a1 --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialGlobalRenameUser.php 3 files changed, 27 insertions(+), 1 deletion(-) Approvals: CSteipp: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index fe52581..64eceec 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -365,6 +365,7 @@ centralauth-rename-form-reason : Reason, centralauth-rename-form-movepages : Move user pages, centralauth-rename-form-suppressredirects : Suppress creation of redirects, + centralauth-rename-form-overrideantispoof: Override any AntiSpoof conflicts, centralauth-rename-notinstalled : The Renameuser extension is not installed., centralauth-rename-doesnotexist : The provided account does not exist., centralauth-rename-alreadyexists : The requested username already exists., @@ -374,6 +375,7 @@ centralauth-rename-alreadyinprogress : There is already a rename for this user in [[Special:GlobalRenameProgress/$1|progress]]., centralauth-renameuser-global-inprogress: There is already a global rename for $1 in [[Special:GlobalRenameProgress/$1|progress]]., centralauth-rename-queued : Jobs to rename $1 to $2 have been queued on $3.\n\nView the progress at [[Special:GlobalRenameProgress/$2]]., + centralauth-rename-antispoofconflicts: The chosen username is too similar to existing usernames., centralauth-rename-progress-username : Username, centralauth-rename-notinprogress : There are no renames in progress for $1. They may have already finished., centralauth-rename-table-domain : Local wiki, diff --git a/i18n/qqq.json b/i18n/qqq.json index 1b6d508..9d1627f 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -375,6 +375,7 @@ centralauth-rename-form-reason: {{Identical|Reason}}\nLabel for form field of log reason for the rename, centralauth-rename-form-movepages: Label for checkbox of whether to move the user\s userpages, centralauth-rename-form-suppressredirects: Label for checkbox of whether to suppress redirects when moving the user\s userpages, + centralauth-rename-form-overrideantispoof: Label for checkbox on whether to override any AntiSpoof conflicts, centralauth-rename-notinstalled: Error message if the RenameUser extension is not installed., centralauth-rename-doesnotexist: Error message if the account provided does not exist., centralauth-rename-alreadyexists: Error message if there is already an account at the new username., @@ -384,6 +385,7 @@ centralauth-rename-alreadyinprogress: Error message if the user is already being renamed. $1 the new username., centralauth-renameuser-global-inprogress: Error message shown on Special:RenameUser if a local rename is attempted while a global one is in progress.\n\n* $1 is the user being renamed's username, centralauth-rename-queued: Message shown after the rename has started.\n\n* $1 is the user's old name\n* $2 is the user's new name\n* $3 is a list of the database names where rename jobs have been queued, + centralauth-rename-antispoofconflicts: Error message shown if the username conflicts with an existing one in AntiSpoof, centralauth-rename-progress-username: {{identical|Username}}\nLabel for username form field on Special:RenameProgress, centralauth-rename-notinprogress: Message shown when there is no rename in progress for the provided user\n* $1 is the username, centralauth-rename-table-domain: {{Identical|Local wiki}}\nTable column header for domain name of wiki, diff --git a/includes/specials/SpecialGlobalRenameUser.php b/includes/specials/SpecialGlobalRenameUser.php index 4c2878d..da0aeaf 100644 --- a/includes/specials/SpecialGlobalRenameUser.php +++ b/includes/specials/SpecialGlobalRenameUser.php @@ -12,6 +12,11 @@ */ private $oldUsername; + /** +* @var bool +*/ + private $overrideAntiSpoof = false; + function __construct() { parent::__construct( 'GlobalRenameUser', 'centralauth-rename' ); } @@ -61,7 +66,13 @@ 'name' = 'suppressredirects', 'label-message' = 'centralauth-rename-form-suppressredirects', 'type' = 'check', - ) + ), + 'overrideantispoof' = array( + 'id' = 'mw-globalrenameuser-overrideantispoof', + 'name' =
[MediaWiki-commits] [Gerrit] Hygiene: Migrate mobile.contentOverlay to new template mecha... - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Migrate mobile.contentOverlay to new template mechanism .. Hygiene: Migrate mobile.contentOverlay to new template mechanism Change-Id: Ib8ef1d96b55957bd7e31f01642f287dfc7dd94ce --- M includes/Resources.php M javascripts/modules/tutorials/PageActionOverlay.js 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index 0e0d5ef..ae0f5d9 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -715,7 +715,7 @@ ), ), - 'mobile.contentOverlays' = $wgMFMobileResourceBoilerplate + array( + 'mobile.contentOverlays' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array( 'mobile.overlays', ), @@ -724,7 +724,7 @@ 'javascripts/modules/tutorials/PageActionOverlay.js', ), 'templates' = array( - 'modules/tutorials/PageActionOverlay.hogan', + 'PageActionOverlay.hogan' = 'templates/modules/tutorials/PageActionOverlay.hogan', ), ), diff --git a/javascripts/modules/tutorials/PageActionOverlay.js b/javascripts/modules/tutorials/PageActionOverlay.js index ded283e..1c891eb 100644 --- a/javascripts/modules/tutorials/PageActionOverlay.js +++ b/javascripts/modules/tutorials/PageActionOverlay.js @@ -8,7 +8,7 @@ * @extends ContentOverlay */ PageActionOverlay = ContentOverlay.extend( { - template: M.template.get( 'modules/tutorials/PageActionOverlay.hogan' ), + template: mw.template.get( 'mobile.contentOverlays', 'PageActionOverlay.hogan' ), defaults: { cancelMsg: mw.msg( 'cancel' ) } -- To view, visit https://gerrit.wikimedia.org/r/170811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8ef1d96b55957bd7e31f01642f287dfc7dd94ce Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change phab_update_tag script to remove library lock file - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Change phab_update_tag script to remove library lock file .. Change phab_update_tag script to remove library lock file Change library_lock path to $lock_file_libext Update library tag Change-Id: Ie9704746d33f2852387b47abff9b146f50559dbc --- M manifests/role/phabricator.pp M modules/phabricator/manifests/init.pp M modules/phabricator/templates/phab_update_tag.erb 3 files changed, 12 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/phabricator.pp b/manifests/role/phabricator.pp index 1245394..9b07fcd 100644 --- a/manifests/role/phabricator.pp +++ b/manifests/role/phabricator.pp @@ -127,7 +127,7 @@ git_tag = $current_tag, lock_file= '/var/run/phab_repo_lock', auth_type= 'local', -libext_tag = 'HEAD', +libext_tag = '0.5.2', libraries= { 'burndown' = '/srv/phab/libext/Sprint', }, diff --git a/modules/phabricator/manifests/init.pp b/modules/phabricator/manifests/init.pp index 27cfe39..8122390 100644 --- a/modules/phabricator/manifests/init.pp +++ b/modules/phabricator/manifests/init.pp @@ -172,7 +172,7 @@ $phab_settings['load-libraries'] = $libraries -$libext_lock_path = ${phabdir}/library_lock_${libext_tag} +$libext_lock_path = ${lock_file}_libext phabricator::libext { 'Sprint': rootdir = $phabdir, diff --git a/modules/phabricator/templates/phab_update_tag.erb b/modules/phabricator/templates/phab_update_tag.erb index b7a4f1e..cfb9be8 100644 --- a/modules/phabricator/templates/phab_update_tag.erb +++ b/modules/phabricator/templates/phab_update_tag.erb @@ -57,6 +57,7 @@ gitcmd rev-parse HEAD %= @phabdir %/phabricator/ gitcmd rev-parse HEAD %= @phabdir %/arcanist/ gitcmd rev-parse HEAD %= @phabdir %/libphutil/ + gitcmd rev-parse HEAD %= @phabdir %/libext/Sprint/ } if [ $1 != '-y' ] @@ -75,7 +76,6 @@ %# if lock_file is '' don't deal with status % % if @lock_file != ''-% - if [ -e %= @lock_file % ] then $rm -v %= @lock_file % @@ -84,6 +84,15 @@ fi % end -% +% if @libext_tag != ''-% +if [ -e %= @libext_lock_path % ] + then + $rm -v %= @libext_lock_path % + else +log %= @libext_lock_path % not found +fi +% end -% + /etc/init.d/puppet stop /etc/init.d/apache2 stop %= @phabdir %/phabricator/bin/phd stop -- To view, visit https://gerrit.wikimedia.org/r/166406 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9704746d33f2852387b47abff9b146f50559dbc Gerrit-PatchSet: 6 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Christopher Johnson (WMDE) christopher.john...@wikimedia.de Gerrit-Reviewer: Christopher Johnson (WMDE) christopher.john...@wikimedia.de Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de Gerrit-Reviewer: Rush r...@wikimedia.org 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 role for SecurePoll - change (mediawiki/vagrant)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/170966 Change subject: Add role for SecurePoll .. Add role for SecurePoll Change-Id: I5831daaf0ddb55bc3ba55110053a43f87dfe391d --- A puppet/modules/role/manifests/securepoll.pp A puppet/modules/role/templates/securepoll.php.erb 2 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/66/170966/1 diff --git a/puppet/modules/role/manifests/securepoll.pp b/puppet/modules/role/manifests/securepoll.pp new file mode 100644 index 000..f1808cd --- /dev/null +++ b/puppet/modules/role/manifests/securepoll.pp @@ -0,0 +1,18 @@ +# == Class: role::securepoll +# This role installs the SecurePoll extension and creates an additional wiki: +# +# _vote.wiki.local.wmftest.net_:: +# Wiki where voting happens. Sysops here can create polls. +# +class role::securepoll { +require ::role::mediawiki + +require_package('gnupg') + +mediawiki::extension { 'SecurePoll': +needs_update = true, +settings = template( 'role/securepoll.php.erb' ) +} + +mediawiki::wiki{ 'vote': } +} diff --git a/puppet/modules/role/templates/securepoll.php.erb b/puppet/modules/role/templates/securepoll.php.erb new file mode 100644 index 000..0ef8bfb --- /dev/null +++ b/puppet/modules/role/templates/securepoll.php.erb @@ -0,0 +1,7 @@ +if ( $wgDBname === 'votewiki' ) { + $wgSecurePollUseNamespace = true; + $wgGroupPermissions[sysop][securepoll-create-poll] = true; +} + +# It seems https isn't configured right in Vagrant, so use http instead. +$wgSecurePollCreateRemoteScriptPath = 'http:$wgServer/w'; -- To view, visit https://gerrit.wikimedia.org/r/170966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5831daaf0ddb55bc3ba55110053a43f87dfe391d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Profiler: Call getContentType() only once in logData() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Profiler: Call getContentType() only once in logData() .. Profiler: Call getContentType() only once in logData() Each call potentially does a regular expression check per output header. No point in multiplying that by 3. Change-Id: I30e9a6b5df1a773e9448ec9b77d0e79339f19738 --- M includes/profiler/ProfilerSimpleText.php M includes/profiler/ProfilerSimpleTrace.php 2 files changed, 8 insertions(+), 6 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/profiler/ProfilerSimpleText.php b/includes/profiler/ProfilerSimpleText.php index 2d96b88..cc18890 100644 --- a/includes/profiler/ProfilerSimpleText.php +++ b/includes/profiler/ProfilerSimpleText.php @@ -50,17 +50,18 @@ : 0; // profiling mismatch error? uasort( $this-mCollated, array( 'self', 'sort' ) ); array_walk( $this-mCollated, array( 'self', 'format' ), $totalReal ); + $contentType = $this-getContentType(); if ( PHP_SAPI === 'cli' ) { print !--\n . self::$out . \n--\n; - } elseif ( $this-getContentType() === 'text/html' ) { + } elseif ( $contentType === 'text/html' ) { if ( $this-visible ) { print 'pre' . self::$out . '/pre'; } else { print !--\n . self::$out . \n--\n; } - } elseif ( $this-getContentType() === 'text/javascript' ) { + } elseif ( $contentType === 'text/javascript' ) { print \n/*\n . self::$out . */\n; - } elseif ( $this-getContentType() === 'text/css' ) { + } elseif ( $contentType === 'text/css' ) { print \n/*\n . self::$out . */\n; } } diff --git a/includes/profiler/ProfilerSimpleTrace.php b/includes/profiler/ProfilerSimpleTrace.php index 95e4bc6..0dd4067 100644 --- a/includes/profiler/ProfilerSimpleTrace.php +++ b/includes/profiler/ProfilerSimpleTrace.php @@ -67,13 +67,14 @@ public function logData() { if ( $this-mTemplated ) { + $contentType = $this-getContentType(); if ( PHP_SAPI === 'cli' ) { print !-- \n {$this-trace} \n --; - } elseif ( $this-getContentType() === 'text/html' ) { + } elseif ( $contentType === 'text/html' ) { print !-- \n {$this-trace} \n --; - } elseif ( $this-getContentType() === 'text/javascript' ) { + } elseif ( $contentType === 'text/javascript' ) { print \n/*\n {$this-trace}\n*/; - } elseif ( $this-getContentType() === 'text/css' ) { + } elseif ( $contentType === 'text/css' ) { print \n/*\n {$this-trace}\n*/; } } -- To view, visit https://gerrit.wikimedia.org/r/170962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30e9a6b5df1a773e9448ec9b77d0e79339f19738 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad ch...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] i18n: Add missing please wait message to watchstar - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: i18n: Add missing please wait message to watchstar .. i18n: Add missing please wait message to watchstar Change-Id: Ia753a8b08f7ef5e57a2f287828414936bb14ee9c --- M includes/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index 7fe6233..bbd6a27 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -752,6 +752,7 @@ 'mobile-frontend-watchlist-add', 'mobile-frontend-watchlist-removed', 'mobile-frontend-watchlist-cta', + 'mobile-frontend-watchlist-please-wait', ), ), -- To view, visit https://gerrit.wikimedia.org/r/170888 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia753a8b08f7ef5e57a2f287828414936bb14ee9c Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move ChangeHandler and friends to new namespace. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/170967 Change subject: Move ChangeHandler and friends to new namespace. .. Move ChangeHandler and friends to new namespace. This introduces the Wikibase\Client\Changes namespace Change-Id: I7ef4c2004825c54e2f22c2326eae4096f9f8955a --- M client/WikibaseClient.hooks.php R client/includes/Changes/AffectedPagesFinder.php R client/includes/Changes/ChangeHandler.php R client/includes/Changes/PageUpdater.php R client/includes/Changes/WikiPageUpdater.php M client/includes/WikibaseClient.php R client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php R client/tests/phpunit/includes/Changes/ChangeHandlerTest.php R client/tests/phpunit/includes/Changes/MockPageUpdater.php M client/tests/phpunit/includes/WikibaseClientTest.php M lib/includes/ChangeNotificationJob.php 11 files changed, 29 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/67/170967/1 diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php index 3879270..b7eccc6 100644 --- a/client/WikibaseClient.hooks.php +++ b/client/WikibaseClient.hooks.php @@ -24,6 +24,7 @@ use Title; use UnexpectedValueException; use User; +use Wikibase\Client\Changes\ChangeHandler; use Wikibase\Client\Hooks\BaseTemplateAfterPortletHandler; use Wikibase\Client\Hooks\BeforePageDisplayHandler; use Wikibase\Client\Hooks\ChangesPageWikibaseFilterHandler; diff --git a/client/includes/AffectedPagesFinder.php b/client/includes/Changes/AffectedPagesFinder.php similarity index 100% rename from client/includes/AffectedPagesFinder.php rename to client/includes/Changes/AffectedPagesFinder.php diff --git a/client/includes/ChangeHandler.php b/client/includes/Changes/ChangeHandler.php similarity index 98% rename from client/includes/ChangeHandler.php rename to client/includes/Changes/ChangeHandler.php index 98a192b..5ff4576 100644 --- a/client/includes/ChangeHandler.php +++ b/client/includes/Changes/ChangeHandler.php @@ -1,15 +1,20 @@ ?php -namespace Wikibase; +namespace Wikibase\Client\Changes; use InvalidArgumentException; use MWException; use Title; +use Wikibase\Change; use Wikibase\Client\Changes\AffectedPagesFinder; +use Wikibase\Client\Changes\PageUpdater; use Wikibase\DataModel\Entity\Diff\EntityDiff; use Wikibase\DataModel\Entity\Diff\ItemDiff; +use Wikibase\EntityChange; +use Wikibase\ItemChange; use Wikibase\Lib\Changes\EntityChangeFactory; use Wikibase\Lib\Store\EntityRevisionLookup; +use Wikibase\SiteLinkCommentCreator; /** * Interface for change handling. Whenever a change is detected, @@ -344,7 +349,7 @@ $coalesced = array_merge( $coalesced, $entityChanges ); } - usort( $coalesced, 'Wikibase\ChangeHandler::compareChangesByTimestamp' ); + usort( $coalesced, 'Wikibase\Client\Changes\ChangeHandler::compareChangesByTimestamp' ); wfDebugLog( __CLASS__, __METHOD__ . : coalesced . count( $changes ) . into . count( $coalesced ) . changes ); diff --git a/client/includes/PageUpdater.php b/client/includes/Changes/PageUpdater.php similarity index 96% rename from client/includes/PageUpdater.php rename to client/includes/Changes/PageUpdater.php index 9e02a72..5246cce 100644 --- a/client/includes/PageUpdater.php +++ b/client/includes/Changes/PageUpdater.php @@ -1,6 +1,6 @@ ?php -namespace Wikibase; +namespace Wikibase\Client\Changes; /** * Service interface for triggering different kinds of page updates diff --git a/client/includes/WikiPageUpdater.php b/client/includes/Changes/WikiPageUpdater.php similarity index 98% rename from client/includes/WikiPageUpdater.php rename to client/includes/Changes/WikiPageUpdater.php index 2f7a02f..17efb69 100644 --- a/client/includes/WikiPageUpdater.php +++ b/client/includes/Changes/WikiPageUpdater.php @@ -1,6 +1,6 @@ ?php -namespace Wikibase; +namespace Wikibase\Client\Changes; use Job; use JobQueueGroup; diff --git a/client/includes/WikibaseClient.php b/client/includes/WikibaseClient.php index 8ca252d..89dfc4d 100644 --- a/client/includes/WikibaseClient.php +++ b/client/includes/WikibaseClient.php @@ -14,7 +14,7 @@ use SiteSQLStore; use SiteStore; use ValueFormatters\FormatterOptions; -use Wikibase\ChangeHandler; +use Wikibase\Client\Changes\ChangeHandler; use Wikibase\Client\Changes\AffectedPagesFinder; use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay; use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator; @@ -52,7 +52,7 @@ use Wikibase\Settings; use Wikibase\SettingsArray; use Wikibase\StringNormalizer; -use Wikibase\WikiPageUpdater; +use Wikibase\Client\Changes\WikiPageUpdater; /** * Top level factory for the WikibaseClient extension. diff --git a/client/tests/phpunit/includes/AffectedPagesFinderTest.php
[MediaWiki-commits] [Gerrit] Bump version after release. - change (mediawiki...bundler)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170970 Change subject: Bump version after release. .. Bump version after release. Change-Id: I3712b74ed965d94a00eb375c52f98eceec0a09ed --- M CHANGELOG.md M package.json 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler refs/changes/70/170970/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 313d5ad..29b7293 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# mw-ocg-bundler x.x.x (not yet released) + # mw-ocg-bundler 1.2.0 (2014-11-04) * Add `--bundle-size-limit` and `--image-size-limit` options to limit bundle and image size (bug 71647). diff --git a/package.json b/package.json index acb698f..306fec1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: mw-ocg-bundler, - version: 1.2.0, + version: 1.2.0-git, description: Generates resource bundles from mediawiki articles, main: lib/index.js, repository: { -- To view, visit https://gerrit.wikimedia.org/r/170970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3712b74ed965d94a00eb375c52f98eceec0a09ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update CHANGELOG. - change (mediawiki...bundler)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170968 Change subject: Update CHANGELOG. .. Update CHANGELOG. Change-Id: I55cb72f1866254dd6456259090b121d983bf9260 --- M CHANGELOG.md 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler refs/changes/68/170968/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 85062e1..10ca847 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ # mw-ocg-bundler x.x.x (not yet released) +* Add `--bundle-size-limit` and `--image-size-limit` options to limit + bundle and image size (bug 71647). +* Properly resolve URLs to decode titles. +* Improve Parsoid prefix guessing. +* Add `--parallel-request-limit` option to limit the number of + simultanous API requests on small wikis (bug 71895). +* Add `-c` option to bundle a collection from the command-line. +* Fix image size too big check (bug 72377). +* Fix hangs caused by console output from `zip`. +* Update package dependencies. # mw-ocg-bundler 1.1.0 (2014-09-30) * Fix the `-d` option (images were being deleted from the directory). -- To view, visit https://gerrit.wikimedia.org/r/170968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I55cb72f1866254dd6456259090b121d983bf9260 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release 1.2.0. - change (mediawiki...bundler)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170969 Change subject: Release 1.2.0. .. Release 1.2.0. Change-Id: I0afcece6b69185014bdd8f501ea06a7919f3c3a4 --- M CHANGELOG.md M package.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler refs/changes/69/170969/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ca847..313d5ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# mw-ocg-bundler x.x.x (not yet released) +# mw-ocg-bundler 1.2.0 (2014-11-04) * Add `--bundle-size-limit` and `--image-size-limit` options to limit bundle and image size (bug 71647). * Properly resolve URLs to decode titles. diff --git a/package.json b/package.json index 646bf55..acb698f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: mw-ocg-bundler, - version: 1.1.0-git, + version: 1.2.0, description: Generates resource bundles from mediawiki articles, main: lib/index.js, repository: { -- To view, visit https://gerrit.wikimedia.org/r/170969 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0afcece6b69185014bdd8f501ea06a7919f3c3a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Kill the overlay template related warnings - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Kill the overlay template related warnings .. Hygiene: Kill the overlay template related warnings Change-Id: I49c8b6e59fb802d97a4d4afe0e4c75b664dbe59b --- M includes/Resources.php M javascripts/LoadingOverlay.js M javascripts/Overlay.js M javascripts/modules/notifications/NotificationsOverlay.js M javascripts/modules/talk/TalkOverlay.js 5 files changed, 8 insertions(+), 9 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, but someone else must approve Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Resources.php b/includes/Resources.php index ae0f5d9..6b8a1f8 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -503,7 +503,6 @@ 'templates' = array( // talk.js 'modules/talk/talk.hogan', - 'OverlayFooterLink.hogan', 'modules/talk/talkSectionAdd.hogan', 'modules/talk/talkSectionAddHeader.hogan', 'modules/talk/talkSection.hogan', @@ -595,7 +594,7 @@ 'position' = 'top', ), - 'mobile.overlays' = $wgMFMobileResourceBoilerplate + array( + 'mobile.overlays' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array( 'mobile.templates', 'mobile.startup', @@ -611,8 +610,9 @@ 'mobile-frontend-overlay-continue', ), 'templates' = array( - 'Overlay.hogan', - 'LoadingOverlay.hogan', + 'Overlay.hogan' = 'templates/Overlay.hogan', + 'LoadingOverlay.hogan' = 'templates/LoadingOverlay.hogan', + 'OverlayFooterLink.hogan' = 'templates/OverlayFooterLink.hogan', ), 'styles' = array( 'less/Overlay.less', @@ -911,7 +911,6 @@ ), 'templates' = array( 'modules/notifications/NotificationsOverlayContent.hogan', - 'OverlayFooterLink.hogan', ), 'messages' = array( // defined in Echo diff --git a/javascripts/LoadingOverlay.js b/javascripts/LoadingOverlay.js index df6e69c..c7bd1fd 100644 --- a/javascripts/LoadingOverlay.js +++ b/javascripts/LoadingOverlay.js @@ -8,7 +8,7 @@ * @extends Overlay */ LoadingOverlay = Overlay.extend( { - template: M.template.get( 'LoadingOverlay.hogan' ) + template: mw.template.get( 'mobile.overlays', 'LoadingOverlay.hogan' ) } ); M.define( 'LoadingOverlay', LoadingOverlay ); diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js index 7af2751..1e12625 100644 --- a/javascripts/Overlay.js +++ b/javascripts/Overlay.js @@ -44,7 +44,7 @@ templatePartials: { spinner: mw.template.get( 'mobile.ajax', 'spinner.hogan' ) }, - template: M.template.get( 'Overlay.hogan' ), + template: mw.template.get( 'mobile.overlays', 'Overlay.hogan' ), defaults: { cancelButton: new Icon( { tagName: 'button', name: 'cancel', additionalClassNames: 'cancel', diff --git a/javascripts/modules/notifications/NotificationsOverlay.js b/javascripts/modules/notifications/NotificationsOverlay.js index e50d795..f209b12 100644 --- a/javascripts/modules/notifications/NotificationsOverlay.js +++ b/javascripts/modules/notifications/NotificationsOverlay.js @@ -13,7 +13,7 @@ className: 'overlay notifications-overlay navigation-drawer', templatePartials: { content: M.template.get( 'modules/notifications/NotificationsOverlayContent.hogan' ), - footer: M.template.get( 'OverlayFooterLink.hogan' ) + footer: mw.template.get( 'mobile.overlays', 'OverlayFooterLink.hogan' ) }, defaults: { heading: mw.msg( 'notifications' ), diff --git a/javascripts/modules/talk/TalkOverlay.js b/javascripts/modules/talk/TalkOverlay.js index dbf2fa0..118a544 100644 --- a/javascripts/modules/talk/TalkOverlay.js +++ b/javascripts/modules/talk/TalkOverlay.js @@ -18,7 +18,7 @@ TalkOverlay = Overlay.extend( { templatePartials: { content: M.template.get( 'modules/talk/talk.hogan' ), - footer: M.template.get( 'OverlayFooterLink.hogan' ) + footer: mw.template.get(
[MediaWiki-commits] [Gerrit] ceph: lint fixes - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: ceph: lint fixes .. ceph: lint fixes Change-Id: I6e2579373a0f3c6b42d8948bcc6781c0cb6d1ba6 --- M modules/ceph/manifests/bootstrap_key.pp M modules/ceph/manifests/key.pp M modules/ceph/manifests/mon.pp M modules/ceph/manifests/nagios.pp M modules/ceph/manifests/radosgw.pp 5 files changed, 28 insertions(+), 28 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/modules/ceph/manifests/bootstrap_key.pp b/modules/ceph/manifests/bootstrap_key.pp index a7fe0ab..22e64a8 100644 --- a/modules/ceph/manifests/bootstrap_key.pp +++ b/modules/ceph/manifests/bootstrap_key.pp @@ -7,10 +7,10 @@ } file { /var/lib/ceph/bootstrap-${type}: -ensure = directory, -mode= '0644', -owner = 'root', -group = 'root', +ensure = directory, +mode = '0644', +owner = 'root', +group = 'root', } ceph::key { bootstrap-${type}: diff --git a/modules/ceph/manifests/key.pp b/modules/ceph/manifests/key.pp index b177d50..a360546 100644 --- a/modules/ceph/manifests/key.pp +++ b/modules/ceph/manifests/key.pp @@ -44,27 +44,27 @@ ) { # ping-pong trickery to securely do permissions, puppet has no umask on exec file { $keyring: -ensure = $ensure, -owner = $owner, -group = $group, -mode= $mode, -backup = false, +ensure = $ensure, +owner = $owner, +group = $group, +mode = $mode, +backup = false, } if $ensure == 'present' { exec { ceph key ${name}: -command = /usr/bin/ceph --cluster=${cluster} \ +command = /usr/bin/ceph --cluster=${cluster} \ auth get-or-create client.${name} \ ${caps} \ ${keyring}, -unless = /usr/bin/test -s ${keyring}, -require = File[$keyring], +unless = /usr/bin/test -s ${keyring}, +require = File[$keyring], } } elsif $ensure == 'absent' { exec { ceph key ${name}: -command = /usr/bin/ceph --cluster=${cluster} \ +command = /usr/bin/ceph --cluster=${cluster} \ auth del client.${name}, -onlyif = /usr/bin/ceph auth print-key client.${name}, +onlyif = /usr/bin/ceph auth print-key client.${name}, } } else { fail('ceph::key ensure parameter must be absent or present') diff --git a/modules/ceph/manifests/mon.pp b/modules/ceph/manifests/mon.pp index 9aea6be..da0f46f 100644 --- a/modules/ceph/manifests/mon.pp +++ b/modules/ceph/manifests/mon.pp @@ -27,11 +27,11 @@ } exec { 'ceph-mon-mkfs': -command = /usr/bin/ceph-mon --mkfs \ +command = /usr/bin/ceph-mon --mkfs \ -i ${::hostname} \ --keyring ${keyring}, -creates = ${mon_data}/keyring, -notify = Exec['ceph-create-keys'], +creates = ${mon_data}/keyring, +notify = Exec['ceph-create-keys'], } exec { 'ceph-create-keys': diff --git a/modules/ceph/manifests/nagios.pp b/modules/ceph/manifests/nagios.pp index 0e7d6c4..e2b4d5e 100644 --- a/modules/ceph/manifests/nagios.pp +++ b/modules/ceph/manifests/nagios.pp @@ -45,12 +45,12 @@ } file { '/var/lib/ceph/nagios': -ensure = $ensure_dir, -owner = 'root', -group = 'root', -mode= '0644', -backup = false, -force = true, +ensure = $ensure_dir, +owner = 'root', +group = 'root', +mode = '0644', +backup = false, +force = true, } ceph::key { $entity: diff --git a/modules/ceph/manifests/radosgw.pp b/modules/ceph/manifests/radosgw.pp index 0629ee0..d707c26 100644 --- a/modules/ceph/manifests/radosgw.pp +++ b/modules/ceph/manifests/radosgw.pp @@ -35,19 +35,19 @@ $id = 'client.radosgw' $keyfname = /etc/ceph/ceph.${id}.keyring exec { ceph auth ${id}: -command = /usr/bin/ceph \ +command = /usr/bin/ceph \ auth get-or-create \ ${id} \ mon 'allow r' osd 'allow rwx' ${keyfname}, -creates = $keyfname, +creates = $keyfname, } # for = bobtail, http://tracker.newdream.net/issues/3813 file { '/etc/logrotate.d/radosgw': ensure = present, source = 'puppet:///modules/ceph/logrotate-radosgw', -owner = 'root', -group = 'root', +owner = 'root', +group = 'root', } # install apache + fastcgi + rewrite. fcgid doesn't stream @@ -57,7 +57,7 @@ serveradmin = $serveradmin, } package {
[MediaWiki-commits] [Gerrit] Removed dependence on SMW in order to run - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/170971 Change subject: Removed dependence on SMW in order to run .. Removed dependence on SMW in order to run Change-Id: I3b90c23f10a1465502c537db9eb91125eba34000 --- M SemanticForms.php M includes/SF_FormLinker.php M includes/SF_HelperFormAction.php M includes/SF_TemplateField.php M includes/SF_Utils.php 5 files changed, 29 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/71/170971/1 diff --git a/SemanticForms.php b/SemanticForms.php index 8f19503..c26b3a4 100644 --- a/SemanticForms.php +++ b/SemanticForms.php @@ -44,7 +44,9 @@ define( 'SF_VERSION', '2.8' ); if ( !defined( 'SMW_VERSION' ) ) { - die( ERROR: a href=\http://semantic-mediawiki.org\;Semantic MediaWiki/a must be installed for Semantic Forms to run! ); + //die( ERROR: a href=\http://semantic-mediawiki.org\;Semantic MediaWiki/a must be installed for Semantic Forms to run! ); + define( 'SF_NS_FORM', 106 ); + define( 'SF_NS_FORM_TALK', 107 ); } $GLOBALS['wgExtensionCredits'][defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array( diff --git a/includes/SF_FormLinker.php b/includes/SF_FormLinker.php index fb2af9a..d170dfb 100644 --- a/includes/SF_FormLinker.php +++ b/includes/SF_FormLinker.php @@ -66,6 +66,10 @@ } $store = SFUtils::getSMWStore(); + if ( $store == null ) { + self::$mLinkedPagesRetrieved = true; + return; + } if ( class_exists( 'SMWDataItem' ) ) { $value = SMWDIWikiPage::newFromTitle( $title ); } else { diff --git a/includes/SF_HelperFormAction.php b/includes/SF_HelperFormAction.php index f41bd4d..5127d4f 100644 --- a/includes/SF_HelperFormAction.php +++ b/includes/SF_HelperFormAction.php @@ -48,8 +48,12 @@ } // Make sure that this page is in one of the relevant // namespaces, and that it doesn't exist yet. + $namespacesWithHelperForms = array( NS_TEMPLATE, SF_NS_FORM, NS_CATEGORY ); + if ( defined( 'SMW_NS_PROPERTY' ) ) { + $namespacesWithHelperForms[] = SMW_NS_PROPERTY; + } if ( !isset( $title ) || - ( !in_array( $title-getNamespace(), array( SMW_NS_PROPERTY, NS_TEMPLATE, SF_NS_FORM, NS_CATEGORY ) ) ) ) { + ( !in_array( $title-getNamespace(), $namespacesWithHelperForms ) ) ) { return true; } if ( $title-exists() ) { diff --git a/includes/SF_TemplateField.php b/includes/SF_TemplateField.php index 07aa000..831a255 100644 --- a/includes/SF_TemplateField.php +++ b/includes/SF_TemplateField.php @@ -64,6 +64,10 @@ } function setTypeAndPossibleValues() { + if ( !defined( 'SMW_NS_PROPERTY' ) ) { + return; + } + // The presence of - at the beginning of a property name // (which happens if SF tries to parse an inverse query) // leads to an error in SMW - just exit if that's the case. diff --git a/includes/SF_Utils.php b/includes/SF_Utils.php index f8775a7..077494e 100644 --- a/includes/SF_Utils.php +++ b/includes/SF_Utils.php @@ -81,8 +81,10 @@ if ( class_exists( '\SMW\StoreFactory' ) ) { // SMW 1.9+ return \SMW\StoreFactory::getStore(); - } else { + } elseif ( function_exists( 'smwfGetStore' ) ) { return smwfGetStore(); + } else { + return null; } } @@ -90,6 +92,10 @@ * Helper function to handle getPropertyValues(). */ public static function getSMWPropertyValues( $store, $subject, $propID, $requestOptions = null ) { + // If SMW is not installed, exit out. + if ( !class_exists( 'SMWDIWikiPage' ) ) { + return array(); + } if ( is_null( $subject ) ) { $page = null; } else { @@ -366,6 +372,9 @@ global $sfgMaxAutocompleteValues; $store = SFUtils::getSMWStore(); + if ( $store == null ) { + return array(); + } $requestoptions = new SMWRequestOptions(); $requestoptions-limit = $sfgMaxAutocompleteValues; $values = self::getSMWPropertyValues( $store, null, $property_name, $requestoptions ); @@ -457,6 +466,9 @@ global $sfgMaxAutocompleteValues, $sfgAutocompleteOnAllChars; $store =
[MediaWiki-commits] [Gerrit] Hygiene: Don't use ResourceLoaderTemplateModule when you don... - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Don't use ResourceLoaderTemplateModule when you don't have to .. Hygiene: Don't use ResourceLoaderTemplateModule when you don't have to For modules which do not use templates switch them back to ResourceLoaderFileModule Change-Id: I5077b5d952589a34397a07c16b622f8c0200183a --- M includes/MobileFrontend.hooks.php M includes/Resources.php 2 files changed, 29 insertions(+), 31 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 4c66342..586e03e 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -898,7 +898,7 @@ $additionalDependencies = array(), $overwrite = false ) { - global $wgResourceModules, $wgMFMobileResourceBoilerplate; + global $wgResourceModules, $wgMFResourceFileModuleBoilerplate; if ( isset( $wgResourceModules['mobile.loggingSchemas'] ) !$overwrite ) { return; @@ -912,7 +912,7 @@ 'javascripts/loggingSchemas/mobileWebWikiGrokError.js', ); - $wgResourceModules['mobile.loggingSchemas'] = $wgMFMobileResourceBoilerplate + array( + $wgResourceModules['mobile.loggingSchemas'] = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array_merge( $additionalDependencies, array( 'mobile.startup', ) ), diff --git a/includes/Resources.php b/includes/Resources.php index 7a6993f..bf627d5 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -25,17 +25,16 @@ } $wgResourceModules = array_merge( $wgResourceModules, array( - 'mobile.templates' = $wgMFMobileResourceBoilerplate + array( + 'mobile.templates' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array( 'ext.mantle.hogan', ), 'scripts' = array( 'javascripts/template.js', ), - 'targets' = array( 'mobile', 'desktop' ), ), - 'mobile.pagelist.styles' = $wgMFMobileResourceBoilerplate + array( + 'mobile.pagelist.styles' = $wgMFResourceFileModuleBoilerplate + array( 'styles' = array( 'less/pagelist.less', ), @@ -54,7 +53,7 @@ ), ), - 'skins.minerva.tablet.styles' = $wgMFMobileResourceBoilerplate + array( + 'skins.minerva.tablet.styles' = $wgMFResourceFileModuleBoilerplate + array( 'styles' = array( 'less/tablet/common.less', 'less/tablet/hacks.less', @@ -84,13 +83,13 @@ ), ), - 'tablet.scripts' = $wgMFMobileResourceBoilerplate + array( + 'tablet.scripts' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array( 'mobile.toc', ), ), - 'skins.minerva.chrome.styles' = $wgMFMobileResourceBoilerplate + array( + 'skins.minerva.chrome.styles' = $wgMFResourceFileModuleBoilerplate + array( 'styles' = array( 'less/reset.less', 'less/ui.less', @@ -103,7 +102,7 @@ 'position' = 'top', ), - 'skins.minerva.content.styles' = $wgMFMobileResourceBoilerplate + array( + 'skins.minerva.content.styles' = $wgMFResourceFileModuleBoilerplate + array( 'styles' = array( 'less/content/main.less', 'less/content/thumbnails.less', @@ -117,17 +116,16 @@ 'less/content/tables.less', 'less/content/hacks.less', ), - 'position' = 'top', ), - 'skins.minerva.drawers.styles' = $wgMFMobileResourceBoilerplate + array( + 'skins.minerva.drawers.styles' = $wgMFResourceFileModuleBoilerplate + array( 'styles' = array( 'less/drawer.less', ), 'position' = 'top', ), - 'skins.minerva.icons.styles' = $wgMFMobileResourceBoilerplate + array( + 'skins.minerva.icons.styles' = $wgMFResourceFileModuleBoilerplate + array( 'styles' = array( 'less/iconsNew.less', ), @@ -135,7 +133,7 @@ ), // Important: This module is loaded on both mobile and desktop skin - 'mobile.head' = $wgMFMobileResourceBoilerplate + array( + 'mobile.head' = $wgMFResourceFileModuleBoilerplate + array( 'dependencies' = array(
[MediaWiki-commits] [Gerrit] Fix bad knockout click binding - change (analytics/wikimetrics)
Milimetric has uploaded a new change for review. https://gerrit.wikimedia.org/r/170972 Change subject: Fix bad knockout click binding .. Fix bad knockout click binding Binding view model methods with knockout can be tricky, in this example bind was being used incorrectly. Chrome somehow magically worked despite the mistake but in Firefox the tagging interface was broken. Bug: 72957 Change-Id: I167e0e6272f02e89b942c3ac0f237a199a30134b --- M wikimetrics/static/js/cohortList.js M wikimetrics/templates/cohorts.html 2 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics refs/changes/72/170972/1 diff --git a/wikimetrics/static/js/cohortList.js b/wikimetrics/static/js/cohortList.js index 9bc3434..e7716ab 100644 --- a/wikimetrics/static/js/cohortList.js +++ b/wikimetrics/static/js/cohortList.js @@ -30,10 +30,11 @@ }, _populateTags: function(cohort, data){ -cohort.tags(data.tags.map(function(t){ +var newTags = data.tags.map(function(t){ t.highlight = ko.observable(false); return t; -})); +}); +cohort.tags(newTags); }, _populateAutocomplete: function(data){ @@ -120,9 +121,10 @@ cohort.tag_name_to_add(''); }, -deleteTag: function(event, cohort, tag){ +deleteTag: function(tag){ +var cohort = this; $.post('/cohorts/' + cohort.id + '/tag/delete/' + tag.id) -.done(site.handleWith(function(data){ +.done(site.handleWith(function(){ cohort.tags.remove(tag); // NOTE: autocomplete doesn't change // because tags are only removed from the cohort diff --git a/wikimetrics/templates/cohorts.html b/wikimetrics/templates/cohorts.html index 4786e5a..9251a50 100644 --- a/wikimetrics/templates/cohorts.html +++ b/wikimetrics/templates/cohorts.html @@ -21,11 +21,11 @@ div class=well well-large style=height:200px h2span data-bind=text: name/span small data-bind=text: description/small - /h2 +/h2 div data-bind=foreach: tags class=tags span class=label span data-bind=text: name, css: {highlight: highlight}/span -a data-bind=click: $root.deleteTag.bind($data, event, $parent)i class=icon-remove/i/a +a data-bind=click: $root.deleteTag.bind($parent)i class=icon-remove/i/a /span /div div -- To view, visit https://gerrit.wikimedia.org/r/170972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I167e0e6272f02e89b942c3ac0f237a199a30134b Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Milimetric dandree...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] extdist: lint fixes - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: extdist: lint fixes .. extdist: lint fixes Change-Id: Ifa26882520ee4bb9b14b252c37592f0dd4367384 --- M modules/extdist/manifests/init.pp 1 file changed, 15 insertions(+), 15 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/modules/extdist/manifests/init.pp b/modules/extdist/manifests/init.pp index 5f4d533..9ba9856 100644 --- a/modules/extdist/manifests/init.pp +++ b/modules/extdist/manifests/init.pp @@ -4,21 +4,21 @@ # extension enabled on mediawiki.org. # class extdist( -$base_dir = /srv, -$log_path = /var/log/extdist) { +$base_dir = '/srv', +$log_path = '/var/log/extdist') { -$dist_dir = $base_dir/dist -$clone_dir = $base_dir/extdist -$src_path = $base_dir/src -$pid_folder = /run/extdist +$dist_dir = ${base_dir}/dist +$clone_dir = ${base_dir}/extdist +$src_path = ${base_dir}/src +$pid_folder = '/run/extdist' $settings = { -'API_URL' = https://www.mediawiki.org/w/api.php;, +'API_URL' = 'https://www.mediawiki.org/w/api.php', 'DIST_PATH' = $dist_dir, -'GIT_URL' = https://gerrit.wikimedia.org/r/mediawiki/extensions/%s;, +'GIT_URL' = 'https://gerrit.wikimedia.org/r/mediawiki/extensions/%s', 'LOG_FILE' = $log_path, 'SRC_PATH' = $src_path, -'PID_FILE' = $pid_folder/pid.lock +'PID_FILE' = ${pid_folder}/pid.lock } user { 'extdist': @@ -40,15 +40,15 @@ } file { [$dist_dir, $clone_dir, $src_path, $pid_folder]: -ensure = directory, -owner = 'extdist', -group = 'www-data', -mode= '0755', +ensure = directory, +owner = 'extdist', +group = 'www-data', +mode = '0755', } git::clone {'labs/tools/extdist': -directory = $clone_dir, ensure= latest, +directory = $clone_dir, branch= 'master', require = [File[$clone_dir], User['extdist']], owner = 'extdist', @@ -63,7 +63,7 @@ } cron { 'extdist-generate-tarballs': -command = /usr/bin/python $clone_dir/nightly.py --all, +command = /usr/bin/python ${clone_dir}/nightly.py --all, user= 'extdist', minute = '0', hour= '*', -- To view, visit https://gerrit.wikimedia.org/r/170497 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa26882520ee4bb9b14b252c37592f0dd4367384 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: John F. Lewis johnflewi...@gmail.com Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed dependence on SMW in order to run - change (mediawiki...SemanticForms)
jenkins-bot has submitted this change and it was merged. Change subject: Removed dependence on SMW in order to run .. Removed dependence on SMW in order to run Change-Id: I3b90c23f10a1465502c537db9eb91125eba34000 --- M SemanticForms.php M includes/SF_FormLinker.php M includes/SF_HelperFormAction.php M includes/SF_TemplateField.php M includes/SF_Utils.php 5 files changed, 29 insertions(+), 3 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/SemanticForms.php b/SemanticForms.php index 8f19503..c26b3a4 100644 --- a/SemanticForms.php +++ b/SemanticForms.php @@ -44,7 +44,9 @@ define( 'SF_VERSION', '2.8' ); if ( !defined( 'SMW_VERSION' ) ) { - die( ERROR: a href=\http://semantic-mediawiki.org\;Semantic MediaWiki/a must be installed for Semantic Forms to run! ); + //die( ERROR: a href=\http://semantic-mediawiki.org\;Semantic MediaWiki/a must be installed for Semantic Forms to run! ); + define( 'SF_NS_FORM', 106 ); + define( 'SF_NS_FORM_TALK', 107 ); } $GLOBALS['wgExtensionCredits'][defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array( diff --git a/includes/SF_FormLinker.php b/includes/SF_FormLinker.php index fb2af9a..d170dfb 100644 --- a/includes/SF_FormLinker.php +++ b/includes/SF_FormLinker.php @@ -66,6 +66,10 @@ } $store = SFUtils::getSMWStore(); + if ( $store == null ) { + self::$mLinkedPagesRetrieved = true; + return; + } if ( class_exists( 'SMWDataItem' ) ) { $value = SMWDIWikiPage::newFromTitle( $title ); } else { diff --git a/includes/SF_HelperFormAction.php b/includes/SF_HelperFormAction.php index f41bd4d..5127d4f 100644 --- a/includes/SF_HelperFormAction.php +++ b/includes/SF_HelperFormAction.php @@ -48,8 +48,12 @@ } // Make sure that this page is in one of the relevant // namespaces, and that it doesn't exist yet. + $namespacesWithHelperForms = array( NS_TEMPLATE, SF_NS_FORM, NS_CATEGORY ); + if ( defined( 'SMW_NS_PROPERTY' ) ) { + $namespacesWithHelperForms[] = SMW_NS_PROPERTY; + } if ( !isset( $title ) || - ( !in_array( $title-getNamespace(), array( SMW_NS_PROPERTY, NS_TEMPLATE, SF_NS_FORM, NS_CATEGORY ) ) ) ) { + ( !in_array( $title-getNamespace(), $namespacesWithHelperForms ) ) ) { return true; } if ( $title-exists() ) { diff --git a/includes/SF_TemplateField.php b/includes/SF_TemplateField.php index 07aa000..831a255 100644 --- a/includes/SF_TemplateField.php +++ b/includes/SF_TemplateField.php @@ -64,6 +64,10 @@ } function setTypeAndPossibleValues() { + if ( !defined( 'SMW_NS_PROPERTY' ) ) { + return; + } + // The presence of - at the beginning of a property name // (which happens if SF tries to parse an inverse query) // leads to an error in SMW - just exit if that's the case. diff --git a/includes/SF_Utils.php b/includes/SF_Utils.php index f8775a7..077494e 100644 --- a/includes/SF_Utils.php +++ b/includes/SF_Utils.php @@ -81,8 +81,10 @@ if ( class_exists( '\SMW\StoreFactory' ) ) { // SMW 1.9+ return \SMW\StoreFactory::getStore(); - } else { + } elseif ( function_exists( 'smwfGetStore' ) ) { return smwfGetStore(); + } else { + return null; } } @@ -90,6 +92,10 @@ * Helper function to handle getPropertyValues(). */ public static function getSMWPropertyValues( $store, $subject, $propID, $requestOptions = null ) { + // If SMW is not installed, exit out. + if ( !class_exists( 'SMWDIWikiPage' ) ) { + return array(); + } if ( is_null( $subject ) ) { $page = null; } else { @@ -366,6 +372,9 @@ global $sfgMaxAutocompleteValues; $store = SFUtils::getSMWStore(); + if ( $store == null ) { + return array(); + } $requestoptions = new SMWRequestOptions(); $requestoptions-limit = $sfgMaxAutocompleteValues; $values = self::getSMWPropertyValues( $store, null, $property_name, $requestoptions ); @@ -457,6 +466,9 @@ global $sfgMaxAutocompleteValues, $sfgAutocompleteOnAllChars; $store = SFUtils::getSMWStore(); + if ( $store ==
[MediaWiki-commits] [Gerrit] QA: delete header test - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: QA: delete header test .. QA: delete header test This test has never worked and is now obsolete Change-Id: Icd51d8c4cf3fae3114a781076b347704adcf4c35 --- D tests/browser/features/header.feature D tests/browser/features/step_definitions/header_steps.rb 2 files changed, 0 insertions(+), 44 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/header.feature b/tests/browser/features/header.feature deleted file mode 100644 index 7f85a78..000 --- a/tests/browser/features/header.feature +++ /dev/null @@ -1,19 +0,0 @@ -@chrome @firefox @internet_explorer_10 @login -Feature: Headers - - Assumes Flow is enabled for the User_talk namespace. - - Background: -Given I am logged in - - Scenario: No header on a new board -Given I am on a new board -Then The header should say - - Scenario: Edit header on a new board -Given I am on a new board -When I click the edit header link - And I see the edit header form - And I type test12345 into the header textbox - And I click Save -Then The header should say test12345 diff --git a/tests/browser/features/step_definitions/header_steps.rb b/tests/browser/features/step_definitions/header_steps.rb deleted file mode 100644 index 1210550..000 --- a/tests/browser/features/step_definitions/header_steps.rb +++ /dev/null @@ -1,25 +0,0 @@ -Then(/^The header should say (.*?)$/) do |content| - on(FlowPage) do |page| -page.header_content_element.when_visible -page.header_content.should match Regexp.escape( content ) - end -end - -When(/^I click the edit header link$/) do - on(FlowPage) do |page| -page.header_content_element.when_present.hover -page.edit_header_link_element.when_present.click - end -end - -Then(/^I see the edit header form$/) do - on(FlowPage).edit_header_form_element.when_visible.should be_visible -end - -When(/^I type (.*?) into the header textbox$/) do |arg1| - on(FlowPage).edit_header_textbox_element.when_present.send_keys( arg1 ) -end - -When(/^I click Save$/) do - on(FlowPage).edit_header_save_element.when_present.click -end -- To view, visit https://gerrit.wikimedia.org/r/170965 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd51d8c4cf3fae3114a781076b347704adcf4c35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: Spage sp...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support toDomElements returning an empty array - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Support toDomElements returning an empty array .. Support toDomElements returning an empty array Change-Id: I7c526a206a5166b601c1e9dff679a195a0029e6a --- M src/dm/ve.dm.Converter.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js index 095dfad..2e12030 100644 --- a/src/dm/ve.dm.Converter.js +++ b/src/dm/ve.dm.Converter.js @@ -1475,7 +1475,11 @@ dataElementOrSlice = getDataElementOrSlice(); childDomElements = this.getDomElementsFromDataElement( dataElementOrSlice, doc ); - if ( childDomElements ) { + if ( childDomElements !childDomElements.length ) { + // Support toDomElements returning an empty array + i = findEndOfNode( i ) - 1; + continue; + } else if ( childDomElements ) { // Add clone of internal data; we use a clone rather than a reference because // we modify .veInternal.whitespace[1] in some cases childDomElements[0].veInternal = ve.extendObject( -- To view, visit https://gerrit.wikimedia.org/r/170958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c526a206a5166b601c1e9dff679a195a0029e6a Gerrit-PatchSet: 1 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders esand...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Limit complexity explosion during determinization - change (search/extra)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/170973 Change subject: Limit complexity explosion during determinization .. Limit complexity explosion during determinization Background: When a regex is compiled to a DFA its actually compiled to an NFA and then determinized. In the worst case the process of determinization produces a DFA that is exponentially (like 2^n not n^2) bigger than the NFA. And the NFA is proportional in size to the complexity of the regex. The fix: Create a new parameter call maxDeterminizedStates and send it to the regex compiler as the maximum number of states to allow the determinized DFA have. If the DFA has more than that many states we throw and error back to the user. The gory details: This isn't supported in the version of Lucene that we use so we had to backport it from trunk. It'll be in 4.10.3 and 5.0. All the XClasses are backports from Lucene. Change-Id: Ieba3c611405f654e8620bf49b03257aea5df1f9d --- A src/main/java/org/apache/lucene/util/XBytesRefBuilder.java A src/main/java/org/apache/lucene/util/XIntsRefBuilder.java A src/main/java/org/apache/lucene/util/XUnicodeUtil.java A src/main/java/org/apache/lucene/util/automaton/XAutomata.java A src/main/java/org/apache/lucene/util/automaton/XAutomaton.java A src/main/java/org/apache/lucene/util/automaton/XAutomatonProvider.java A src/main/java/org/apache/lucene/util/automaton/XByteRunAutomaton.java A src/main/java/org/apache/lucene/util/automaton/XCharacterRunAutomaton.java A src/main/java/org/apache/lucene/util/automaton/XCompiledAutomaton.java A src/main/java/org/apache/lucene/util/automaton/XDaciukMihovAutomatonBuilder.java A src/main/java/org/apache/lucene/util/automaton/XMinimizationOperations.java A src/main/java/org/apache/lucene/util/automaton/XOperations.java A src/main/java/org/apache/lucene/util/automaton/XRegExp.java A src/main/java/org/apache/lucene/util/automaton/XRunAutomaton.java A src/main/java/org/apache/lucene/util/automaton/XSortedIntSet.java A src/main/java/org/apache/lucene/util/automaton/XStatePair.java A src/main/java/org/apache/lucene/util/automaton/XTooComplexToDeterminizeException.java A src/main/java/org/apache/lucene/util/automaton/XTransition.java A src/main/java/org/apache/lucene/util/automaton/XUTF32ToUTF8.java A src/main/java/org/apache/lucene/util/fst/XUtil.java M src/main/java/org/wikimedia/search/extra/regex/SourceRegexFilter.java M src/main/java/org/wikimedia/search/extra/regex/ngram/NGramAutomaton.java M src/main/java/org/wikimedia/search/extra/regex/ngram/NGramExtractor.java M src/main/java/org/wikimedia/search/extra/regex/ngram/package-info.java M src/main/java/org/wikimedia/search/extra/util/package-info.java A src/test/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java A src/test/java/org/apache/lucene/util/automaton/TestAutomaton.java A src/test/java/org/apache/lucene/util/automaton/TestCompiledAutomaton.java A src/test/java/org/apache/lucene/util/automaton/TestDeterminism.java A src/test/java/org/apache/lucene/util/automaton/TestDeterminizeLexicon.java A src/test/java/org/apache/lucene/util/automaton/TestMinimize.java A src/test/java/org/apache/lucene/util/automaton/TestOperations.java A src/test/java/org/apache/lucene/util/automaton/TestRegExp.java M src/test/java/org/wikimedia/search/extra/regex/SourceRegexFilterTest.java M src/test/java/org/wikimedia/search/extra/regex/ngram/NGramAutomatonTest.java M src/test/java/org/wikimedia/search/extra/regex/ngram/NGramExtractorTest.java 36 files changed, 10,195 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/extra refs/changes/73/170973/1 -- To view, visit https://gerrit.wikimedia.org/r/170973 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieba3c611405f654e8620bf49b03257aea5df1f9d Gerrit-PatchSet: 1 Gerrit-Project: search/extra Gerrit-Branch: master Gerrit-Owner: Manybubbles never...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Kill ceph module - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/170974 Change subject: Kill ceph module .. Kill ceph module It hasn't been used in a while, and probably won't be anytime in the near future. Change-Id: Ie4d04f1e6a4a2e069684d6d223f3c6f5c42400bb --- D files/ganglia/plugins/ceph.py M manifests/ganglia.pp D modules/ceph/files/ceph-add-disk D modules/ceph/files/logrotate-radosgw D modules/ceph/manifests/bootstrap_key.pp D modules/ceph/manifests/init.pp D modules/ceph/manifests/key.pp D modules/ceph/manifests/mds.pp D modules/ceph/manifests/mon.pp D modules/ceph/manifests/nagios.pp D modules/ceph/manifests/osd.pp D modules/ceph/manifests/radosgw.pp D modules/ceph/templates/ceph.conf.erb D modules/ceph/templates/check_ceph_health.erb D modules/ceph/templates/radosgw/vhost.erb M modules/ganglia_new/manifests/configuration.pp D modules/install-server/files/autoinstall/partman/ceph-ssd.cfg M modules/install-server/files/reprepro/distributions M modules/install-server/files/reprepro/updates 19 files changed, 3 insertions(+), 803 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/170974/1 diff --git a/files/ganglia/plugins/ceph.py b/files/ganglia/plugins/ceph.py deleted file mode 100644 index f0bbd56..000 --- a/files/ganglia/plugins/ceph.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -ceph.py -Gather ceph OSD data for ganglia. -Written by Mark Bergsma m...@wikimedia.org - - -from subprocess import Popen, PIPE -import json, os, sys - -stats_cache = {} -prev_values = {} -metric_types = {} -ceph_path = /usr/bin/ceph - -instances = [''] - -def metric_init(params): - global ceph_path, instances, stats_cache, metrics, metric_types - - ceph_path = params.get('ceph', ceph_path) - - instances = params.get('instances', ).split(',') - - stats_cache = {} - metrics = [] - metric_types = {} - for instance in instances: - metric_types[instance] = json.load(Popen([ceph_path, --admin-daemon, /var/run/ceph/ceph-osd.%s.asok % instance, perf, schema], stdout=PIPE).stdout) - - for section in metric_types[instance]: - if section not in (osd, filestore): continue - for metric, properties in metric_types[instance][section].iteritems(): - name = instance + . + section.encode('ascii') + . + metric.encode('ascii') - counter = bool(properties['type'] 0b1000) - valtype = (properties['type'] 0b10 == 0b10) and 'uint' or 'float' - metric_properties = { - 'name': name, - 'call_back': get_value, - 'time_max': 15, - 'value_type': valtype, - 'units': ( counter and 'N/s' or 'N' ), - 'slope': ( counter and positive or both ), - 'format': ( valtype == uint and r'%u' or r'%f' ), - 'description': %s %s % (section.encode('ascii'), metric.encode('ascii')), - 'groups': ceph osd + instance - } - metrics.append(metric_properties) - - return metrics - -def get_value(metric): - global stats_cache, prev_values, metric_types - - instance, section, metric_name = metric.split('.', 2) - - t = metric_types[instance][section][metric_name]['type'] - try: - v = stats_cache[instance][section].pop(metric_name) - except KeyError: - get_stats() - v = stats_cache[instance][section].pop(metric_name) - - if t 0b100 0: - # Average - try: - p = prev_values[instance][section][metric_name] - r = (v['sum'] - p['sum']) / (v['avgcount'] - p['avgcount']) - except KeyError: - r = 0 - finally: - prev_values.setdefault(instance, {}).setdefault(section, {})[metric_name] = v - else: - r = v - - if t 1 == 1: - return float(r) - else: - return int(r) - - -def get_stats(): - global stats_cache, instances - - for instance in instances: - stats_cache[instance] = json.load(Popen([ceph_path, --admin-daemon, /var/run/ceph/ceph-osd.%s.asok % instance, perf, dump], stdout=PIPE).stdout) - - return stats_cache - -def metric_cleanup(): - pass - -if __name__ == '__main__': - params = { 'instances': sys.argv[1] } - - metrics =
[MediaWiki-commits] [Gerrit] Fix bug with deleting threads - change (mediawiki...WikiForum)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/170976 Change subject: Fix bug with deleting threads .. Fix bug with deleting threads Reported by Glexi.arxokuna and Hollosch Change-Id: I6541d31efdf496be147f19f88c1fe6762e553e8a --- M Thread.php M WikiForum.php 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum refs/changes/76/170976/1 diff --git a/Thread.php b/Thread.php index 5e9a8cf..4f1bf83 100644 --- a/Thread.php +++ b/Thread.php @@ -349,9 +349,9 @@ array( wff_reply_count = wff_reply_count - $replyCount, 'wff_thread_count = wff_thread_count - 1', - 'wff_last_post_user' = $row['wft_last_post_user'], - 'wff_last_post_user_ip' = $row['wft_last_post_user_ip'], - 'wff_last_post_timestamp' = $row['wft_last_post_timestamp'] + 'wff_last_post_user' = $row-wft_last_post_user, + 'wff_last_post_user_ip' = $row-wft_last_post_user_ip, + 'wff_last_post_timestamp' = $row-wft_last_post_timestamp ), array( 'wff_forum' = $this-getForum()-getId() ), __METHOD__ diff --git a/WikiForum.php b/WikiForum.php index 71aa9a7..a8118f4 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -35,7 +35,7 @@ 'path' = __FILE__, 'name' = 'WikiForum', 'author' = array( 'Michael Chlebek', 'Jack Phoenix', 'Adam Carter (UltrasonicNXT)' ), - 'version' = '2.0.5', + 'version' = '2.0.6', 'url' = 'https://www.mediawiki.org/wiki/Extension:WikiForum', 'descriptionmsg' = 'wikiforum-desc' ); -- To view, visit https://gerrit.wikimedia.org/r/170976 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6541d31efdf496be147f19f88c1fe6762e553e8a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiForum Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: forgot to change a should statement - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/170975 Change subject: QA: forgot to change a should statement .. QA: forgot to change a should statement Change-Id: Ic119f6727c9b160b06c5ff699ae73c7980d82432 --- M tests/browser/features/step_definitions/moderation_steps.rb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/75/170975/1 diff --git a/tests/browser/features/step_definitions/moderation_steps.rb b/tests/browser/features/step_definitions/moderation_steps.rb index 3a93db6..48e6935 100644 --- a/tests/browser/features/step_definitions/moderation_steps.rb +++ b/tests/browser/features/step_definitions/moderation_steps.rb @@ -27,7 +27,7 @@ end When(/^I see a dialog box$/) do - on(FlowPage).dialog_element.when_present.should be_visible + expect(on(FlowPage).dialog_element.when_present).to be_visible end Then(/^I confirm$/) do -- To view, visit https://gerrit.wikimedia.org/r/170975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic119f6727c9b160b06c5ff699ae73c7980d82432 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix bug with deleting threads - change (mediawiki...WikiForum)
UltrasonicNXT has submitted this change and it was merged. Change subject: Fix bug with deleting threads .. Fix bug with deleting threads Reported by Glexi.arxokuna and Hollosch Change-Id: I6541d31efdf496be147f19f88c1fe6762e553e8a --- M Thread.php M WikiForum.php 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: UltrasonicNXT: Verified; Looks good to me, approved diff --git a/Thread.php b/Thread.php index 5e9a8cf..4f1bf83 100644 --- a/Thread.php +++ b/Thread.php @@ -349,9 +349,9 @@ array( wff_reply_count = wff_reply_count - $replyCount, 'wff_thread_count = wff_thread_count - 1', - 'wff_last_post_user' = $row['wft_last_post_user'], - 'wff_last_post_user_ip' = $row['wft_last_post_user_ip'], - 'wff_last_post_timestamp' = $row['wft_last_post_timestamp'] + 'wff_last_post_user' = $row-wft_last_post_user, + 'wff_last_post_user_ip' = $row-wft_last_post_user_ip, + 'wff_last_post_timestamp' = $row-wft_last_post_timestamp ), array( 'wff_forum' = $this-getForum()-getId() ), __METHOD__ diff --git a/WikiForum.php b/WikiForum.php index 71aa9a7..a8118f4 100644 --- a/WikiForum.php +++ b/WikiForum.php @@ -35,7 +35,7 @@ 'path' = __FILE__, 'name' = 'WikiForum', 'author' = array( 'Michael Chlebek', 'Jack Phoenix', 'Adam Carter (UltrasonicNXT)' ), - 'version' = '2.0.5', + 'version' = '2.0.6', 'url' = 'https://www.mediawiki.org/wiki/Extension:WikiForum', 'descriptionmsg' = 'wikiforum-desc' ); -- To view, visit https://gerrit.wikimedia.org/r/170976 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6541d31efdf496be147f19f88c1fe6762e553e8a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiForum Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: forgot to change a should statement - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: QA: forgot to change a should statement .. QA: forgot to change a should statement Change-Id: Ic119f6727c9b160b06c5ff699ae73c7980d82432 --- M tests/browser/features/step_definitions/moderation_steps.rb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/step_definitions/moderation_steps.rb b/tests/browser/features/step_definitions/moderation_steps.rb index 3a93db6..48e6935 100644 --- a/tests/browser/features/step_definitions/moderation_steps.rb +++ b/tests/browser/features/step_definitions/moderation_steps.rb @@ -27,7 +27,7 @@ end When(/^I see a dialog box$/) do - on(FlowPage).dialog_element.when_present.should be_visible + expect(on(FlowPage).dialog_element.when_present).to be_visible end Then(/^I confirm$/) do -- To view, visit https://gerrit.wikimedia.org/r/170975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic119f6727c9b160b06c5ff699ae73c7980d82432 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: SG shah...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move stupid DOM-bound events to OO EE syntax - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Move stupid DOM-bound events to OO EE syntax .. Move stupid DOM-bound events to OO EE syntax Change-Id: I16458c261a52781a6a0c56e62f1065e6517f9b3a --- M resources/mw.UploadWizard.js M resources/mw.UploadWizardUpload.js M resources/mw.UploadWizardUploadInterface.js 3 files changed, 13 insertions(+), 17 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index 35ef830..9d9f4e1 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -419,16 +419,11 @@ // we explicitly move the file input to cover the upload button upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file', 'poll' ); - // we bind to the ui div since unbind doesn't work for non-DOM objects - $( upload.ui.div ).bind( 'filenameAccepted', function (e) { - wizard.updateFileCounts(); - e.stopPropagation(); + upload.connect( this, { + 'filename-accepted': 'updateFileCounts', + 'remove-upload': [ 'removeUpload', upload ] } ); - $( upload.ui.div ).bind( 'removeUploadEvent', function (e) { - wizard.removeUpload( upload ); - e.stopPropagation(); - } ); return upload; }, diff --git a/resources/mw.UploadWizardUpload.js b/resources/mw.UploadWizardUpload.js index d34058b..2b8d5cc 100644 --- a/resources/mw.UploadWizardUpload.js +++ b/resources/mw.UploadWizardUpload.js @@ -70,8 +70,9 @@ // details this.ui = new mw.UploadWizardUploadInterface( this, filesDiv, providedFile ) - .on( 'file-changed', function ( files ) { - upload.emit( 'file-changed', files ); + .connect( this, { + 'file-changed': [ 'emit', 'file-changed' ], + 'filename-accepted': [ 'emit', 'filename-accepted' ] } ) .on( 'upload-filled', function () { @@ -143,11 +144,9 @@ if ( this.thanksDiv ) { this.thanksDiv.remove(); } - // we signal to the wizard to update itself, which has to delete the final vestige of - // this upload (the ui.div). We have to do this silly dance because we - // trigger through the div. Triggering through objects doesn't always work. - // TODO v.1.1 fix, don't need to use the div any more -- this now works in jquery 1.4.2 - $( this.ui.div ).trigger( 'removeUploadEvent' ); + // we signal to the wizard to update itself, which has to delete the + // final vestige of this upload + this.emit( 'remove-upload' ); if ( this.wizard.uploads this.wizard.uploads.length !== 0 mw.UploadWizard.config.startImmediately === true ) { // check all uploads, if they're complete, show the next button diff --git a/resources/mw.UploadWizardUploadInterface.js b/resources/mw.UploadWizardUploadInterface.js index 295640c..01de51d 100644 --- a/resources/mw.UploadWizardUploadInterface.js +++ b/resources/mw.UploadWizardUploadInterface.js @@ -20,7 +20,9 @@ // may need to collaborate with the particular upload type sometimes // for the interface, as well as the uploadwizard. OY. - this.div = $('div class=mwe-upwiz-file/div').get(0); + this.$div = $('div class=mwe-upwiz-file/div'); + this.div = this.$div.get(0); + this.isFilled = false; this.previewLoaded = false; @@ -668,7 +670,7 @@ this.emit( 'upload-filled' ); } else { - $( this.div ).trigger( 'filenameAccepted' ); + this.emit( 'filename-accepted' ); } }; -- To view, visit https://gerrit.wikimedia.org/r/170131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16458c261a52781a6a0c56e62f1065e6517f9b3a Gerrit-PatchSet: 9 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: MarkTraceur mtrac...@member.fsf.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Add i18n for API module help - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Add i18n for API module help .. Add i18n for API module help MediaWiki core change I04b1a384 added support for i18n of API module help. This takes advantage of that while still maintaining backwards compatibility with earlier versions of MediaWiki. Once support for MediaWiki before 1.25 is dropped, the methods marked deprecated in this patch may be removed. Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17 --- M i18n/en.json M i18n/qqq.json M includes/ApiFlickrBlacklist.php M includes/ApiQueryAllCampaigns.php 4 files changed, 64 insertions(+), 3 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index f46e9a9..8a0ec45 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -329,5 +329,14 @@ mwe-upwiz-prefs-maxsimultaneous-upload: Maximum number of concurrent uploads, campaigns: Upload Wizard campaigns, mwe-upload-campaigns-pagination-next: Next page, - mwe-upload-campaigns-list-title: List of upload campaigns + mwe-upload-campaigns-list-title: List of upload campaigns, + apihelp-flickrblacklist-description: Validate a flickr URL by using the user ID (NSID) for blacklisting.\n\nWhen used with the list option, return all blacklisted IDs., + apihelp-flickrblacklist-param-url: The Flickr URL to be tested., + apihelp-flickrblacklist-param-list: When set, the complete blacklist is returned. Cannot be used together with $1url., + apihelp-flickrblacklist-example-1: Check a URL against the blacklist, + apihelp-flickrblacklist-example-2: Return the entire blacklist, + apihelp-query+allcampaigns-description: Enumerate all UploadWizard campaigns., + apihelp-query+allcampaigns-param-enabledonly: Only list campaigns that are enabled., + apihelp-query+allcampaigns-param-limit: Number of campaigns to return., + apihelp-query+allcampaigns-example-1: Enumerate enabled campaigns } diff --git a/i18n/qqq.json b/i18n/qqq.json index eb3233a..8e91f61 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -352,5 +352,14 @@ mwe-upwiz-prefs-maxsimultaneous-upload: Preference which sets the maximum number of concurrent upload requests, campaigns: {{doc-special|Campaigns}}\nThe UploadWizard campaign page provides a list of Upload Wizard campaigns.\nFor more information, see [[:mw:Extension:UploadWizard/Campaigns]]., mwe-upload-campaigns-pagination-next: Link to next page of upload campaigns.\n{{Identical|Next page}}, - mwe-upload-campaigns-list-title: Title of page that has list of upload campaigns + mwe-upload-campaigns-list-title: Title of page that has list of upload campaigns, + apihelp-flickrblacklist-description: {{doc-apihelp-description|flickrblacklist}}, + apihelp-flickrblacklist-param-url: {{doc-apihelp-param|flickrblacklist|url}}, + apihelp-flickrblacklist-param-list: {{doc-apihelp-param|flickrblacklist|list}}, + apihelp-flickrblacklist-example-1: {{doc-apihelp-example|flickrblacklist}}, + apihelp-flickrblacklist-example-2: {{doc-apihelp-example|flickrblacklist}}, + apihelp-query+allcampaigns-description: {{doc-apihelp-description|query+allcampaigns}}, + apihelp-query+allcampaigns-param-enabledonly: {{doc-apihelp-param|query+allcampaigns|enabledonly}}, + apihelp-query+allcampaigns-param-limit: {{doc-apihelp-param|query+allcampaigns|limit}}, + apihelp-query+allcampaigns-example-1: {{doc-apihelp-example|query+allcampaigns}} } diff --git a/includes/ApiFlickrBlacklist.php b/includes/ApiFlickrBlacklist.php index 96e0b32..533d5ed 100644 --- a/includes/ApiFlickrBlacklist.php +++ b/includes/ApiFlickrBlacklist.php @@ -47,6 +47,9 @@ ); } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getParamDescription() { return array( 'url' = 'The flickr url to be tested', @@ -55,15 +58,33 @@ ); } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getDescription() { return 'Validate a flickr URL by using its NSID for blacklisting. When used ' . 'with the list option, return all blacklisted NSIDs.'; } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getExamples() { return array( 'api.php?action=flickrblacklisturl=http%3A//farm1.staticflickr.com/44/147426941_98baf36fd1_o.jpg', 'api.php?action=flickrblacklistlist', ); } + + /** +* @see ApiBase::getExamplesMessages() +*/ + protected function getExamplesMessages() { +
[MediaWiki-commits] [Gerrit] Profiler code cleanup - change (mediawiki/core)
Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/170977 Change subject: Profiler code cleanup .. Profiler code cleanup - Put Profiler and ProfileSection in their own files and rely on Autoloader to use them (maintenance has been using the autoloader here for some time--we don't profile the autoloader manually) - This reduces overhead in WebStart/doMaintenance by only loading three functions at profiler initialization and defers until the first profiling call happens - Inline callback functions in ProfilerSimpleText rather than having public static functions. Change-Id: Idf27677c068c50b847152c523a33e7f0c33fdeeb --- M includes/AutoLoader.php M includes/WebStart.php A includes/profiler/ProfileSection.php M includes/profiler/Profiler.php A includes/profiler/ProfilerFunctions.php M includes/profiler/ProfilerSimpleText.php M maintenance/doMaintenance.php 7 files changed, 152 insertions(+), 106 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/170977/1 diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 36a0fcb..6035f78 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -874,7 +874,7 @@ 'ProfilerSimpleUDP' = 'includes/profiler/ProfilerSimpleUDP.php', 'ProfilerStandard' = 'includes/profiler/ProfilerStandard.php', 'ProfilerStub' = 'includes/profiler/ProfilerStub.php', - 'ProfileSection' = 'includes/profiler/Profiler.php', + 'ProfileSection' = 'includes/profiler/ProfileSection.php', 'TransactionProfiler' = 'includes/profiler/Profiler.php', # includes/rcfeed diff --git a/includes/WebStart.php b/includes/WebStart.php index cb35ee5..dd27f3d 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -58,8 +58,8 @@ $IP = realpath( '.' ) ?: dirname( __DIR__ ); } -# Load the profiler -require_once $IP/includes/profiler/Profiler.php; +# Grab profiling functions +require_once $IP/includes/profiler/ProfilerFunctions.php; $wgRUstart = wfGetRusage() ?: array(); # Start the autoloader, so that extensions can derive classes from core files diff --git a/includes/profiler/ProfileSection.php b/includes/profiler/ProfileSection.php new file mode 100644 index 000..9e0b61e --- /dev/null +++ b/includes/profiler/ProfileSection.php @@ -0,0 +1,60 @@ +?php +/** + * Function scope profiling assistant + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup Profiler + */ + +/** + * Class for handling function-scope profiling + * + * @since 1.22 + */ +class ProfileSection { + protected $name; // string; method name + protected $enabled = false; // boolean; whether profiling is enabled + + /** +* Begin profiling of a function and return an object that ends profiling of +* the function when that object leaves scope. As long as the object is not +* specifically linked to other objects, it will fall out of scope at the same +* moment that the function to be profiled terminates. +* +* This is typically called like: +* code$section = new ProfileSection( __METHOD__ );/code +* +* @param string $name Name of the function to profile +*/ + public function __construct( $name ) { + $this-name = $name; + if ( Profiler::$__instance === null ) { // use this directly to reduce overhead + Profiler::instance(); + } + if ( !( Profiler::$__instance instanceof ProfilerStub ) ) { + $this-enabled = true; + Profiler::$__instance-profileIn( $this-name ); + } + } + + function __destruct() { + if ( $this-enabled ) { + Profiler::$__instance-profileOut( $this-name ); + } + } +} diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index aaf899f..cd19ac8 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -1,6 +1,6 @@ ?php /** - * Base class and functions for profiling. + * Base class for profiling. * * This
[MediaWiki-commits] [Gerrit] contint: Clean up order of statements - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: contint: Clean up order of statements .. contint: Clean up order of statements Easier to understand this way. Change-Id: I337bc19456f69dc6a86439b79603b1e57fd4ffda --- M manifests/role/ci.pp 1 file changed, 12 insertions(+), 9 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index 358a03d..0f535db 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -374,13 +374,6 @@ system::role { 'role::ci::slave::labs': description = 'CI Jenkins slave on labs' } -class { 'role::ci::slave::browsertests': -require = [ -Class['role::ci::slave::labs::common'], # /mnt -Class['contint::packages::labs'], # realize common packages first -] -} - file { '/srv/localhost': ensure = directory, mode = '0755', @@ -400,13 +393,23 @@ require= File['/srv/localhost/mediawiki'], } -include role::ci::slave::labs::common -include role::ci::slave::localbrowser # Trebuchet replacement on labs include contint::slave-scripts + # Include package unsafe for production include contint::packages::labs +include role::ci::slave::labs::common + +include role::ci::slave::localbrowser + +class { 'role::ci::slave::browsertests': +require = [ +Class['role::ci::slave::labs::common'], # /mnt +Class['contint::packages::labs'], # realize common packages first +] +} + } -- To view, visit https://gerrit.wikimedia.org/r/168629 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I337bc19456f69dc6a86439b79603b1e57fd4ffda Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: update user strings, remove unnecessary expect clause - change (mediawiki...Flow)
Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/170978 Change subject: QA: update user strings, remove unnecessary expect clause .. QA: update user strings, remove unnecessary expect clause Change-Id: Id0327cb59c8f6e977c58524c008af5f84521c3e6 --- M tests/browser/features/step_definitions/moderation_steps.rb 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/78/170978/1 diff --git a/tests/browser/features/step_definitions/moderation_steps.rb b/tests/browser/features/step_definitions/moderation_steps.rb index 48e6935..2587661 100644 --- a/tests/browser/features/step_definitions/moderation_steps.rb +++ b/tests/browser/features/step_definitions/moderation_steps.rb @@ -27,7 +27,7 @@ end When(/^I see a dialog box$/) do - expect(on(FlowPage).dialog_element.when_present).to be_visible + on(FlowPage).dialog_element.when_present end Then(/^I confirm$/) do @@ -39,9 +39,9 @@ end Then(/^the top post should be marked as deleted$/) do - expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic was locked by Selenium user) + expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic has been deleted) end Then(/^the top post should be marked as suppressed$/) do - expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic was locked by Selenium user) + expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic has been suppressed) end -- To view, visit https://gerrit.wikimedia.org/r/170978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0327cb59c8f6e977c58524c008af5f84521c3e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove en2.wikipedia.org - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: remove en2.wikipedia.org .. remove en2.wikipedia.org Change-Id: I85104f7156b3edf6af678d968d9425d8cf68a2da --- M templates/wikipedia.org 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: John F. Lewis: Looks good to me, but someone else must approve BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/wikipedia.org b/templates/wikipedia.org index 38e4851..e63d4df 100644 --- a/templates/wikipedia.org +++ b/templates/wikipedia.org @@ -37,7 +37,6 @@ arbcom-fi 600 IN DYNA geoip!text-addrs arbcom-nl 600 IN DYNA geoip!text-addrs commons 600 IN DYNA geoip!text-addrs -en2 600 IN DYNA geoip!text-addrs meta600 IN DYNA geoip!text-addrs nostalgia 600 IN DYNA geoip!text-addrs quote 600 IN DYNA geoip!text-addrs -- To view, visit https://gerrit.wikimedia.org/r/170138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85104f7156b3edf6af678d968d9425d8cf68a2da Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Alex Monk kren...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] QA: update user strings, remove unnecessary expect clause - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: QA: update user strings, remove unnecessary expect clause .. QA: update user strings, remove unnecessary expect clause Change-Id: Id0327cb59c8f6e977c58524c008af5f84521c3e6 --- M tests/browser/features/step_definitions/moderation_steps.rb 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/step_definitions/moderation_steps.rb b/tests/browser/features/step_definitions/moderation_steps.rb index 48e6935..2587661 100644 --- a/tests/browser/features/step_definitions/moderation_steps.rb +++ b/tests/browser/features/step_definitions/moderation_steps.rb @@ -27,7 +27,7 @@ end When(/^I see a dialog box$/) do - expect(on(FlowPage).dialog_element.when_present).to be_visible + on(FlowPage).dialog_element.when_present end Then(/^I confirm$/) do @@ -39,9 +39,9 @@ end Then(/^the top post should be marked as deleted$/) do - expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic was locked by Selenium user) + expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic has been deleted) end Then(/^the top post should be marked as suppressed$/) do - expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic was locked by Selenium user) + expect(on(FlowPage).flow_first_topic_moderation_msg_element.when_present.text).to match(This topic has been suppressed) end -- To view, visit https://gerrit.wikimedia.org/r/170978 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0327cb59c8f6e977c58524c008af5f84521c3e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org 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.Title: Add new static methods `newFromFileName`, `newFrom... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mw.Title: Add new static methods `newFromFileName`, `newFromUserInput` .. mw.Title: Add new static methods `newFromFileName`, `newFromUserInput` This is the replacement for Ia57e4b0e804. Use cases: - UploadWizard: Suggesting valid tiles for files supplied by user whose names are invalid MediaWiki titles. - Upload Form: The same. - Community scripts, VisualEditor upload gadget, [...]: The same. Bug: 64912 Bug: 64922 Change-Id: I260ba883548975263bba03d25f6d11d3d9bbfbd9 --- M resources/src/mediawiki/mediawiki.Title.js M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js 2 files changed, 507 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index 95b18a8..7ced42f 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -58,6 +58,34 @@ NS_SPECIAL = -1, /** +* @private +* @static +* @property NS_MEDIA +*/ + NS_MEDIA = -2, + + /** +* @private +* @static +* @property NS_FILE +*/ + NS_FILE = 6, + + /** +* @private +* @static +* @property FILENAME_MAX_BYTES +*/ + FILENAME_MAX_BYTES = 240, + + /** +* @private +* @static +* @property TITLE_MAX_BYTES +*/ + TITLE_MAX_BYTES = 255, + + /** * Get the namespace id from a namespace name (either from the localized, canonical or alias * name). * @@ -102,6 +130,85 @@ '|#[0-9]+;' + '|#x[0-9A-Fa-f]+;' ), + + // From MediaWikiTitleCodec.php#L225 @26fcab1f18c568a41 + // Clean up whitespace in function MediaWikiTitleCodec::splitTitleString() + rWhitespace = /[ _\u0009\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\s]+/g, + + /** +* Slightly modified from Flinfo. Credit goes to Lupo and Flominator. +* @private +* @static +* @property sanitationRules +*/ + sanitationRules = [ + // signature + { + pattern: /~{3}/g, + replace: '', + generalRule: true + }, + // Space, underscore, tab, NBSP and other unusual spaces + { + pattern: rWhitespace, + replace: ' ', + generalRule: true + }, + // unicode bidi override characters: Implicit, Embeds, Overrides + { + pattern: /[\u200E\u200F\u202A-\u202E]/g, + replace: '', + generalRule: true + }, + // control characters + { + pattern: /[\x00-\x1f\x7f]/g, + replace: '', + generalRule: true + }, + // URL encoding (possibly) + { + pattern: /%([0-9A-Fa-f]{2})/g, + replace: '% $1', + generalRule: true + }, + // HTML-character-entities + { + pattern: /(([A-Za-z0-9\x80-\xff]+|#[0-9]+|#x[0-9A-Fa-f]+);)/g, + replace: ' $1', + generalRule: true + }, + // slash, colon (not supported by file systems like NTFS/Windows, Mac OS 9 [:], ext4 [/]) + { + pattern: /[:\/#]/g, + replace: '-', + fileRule: true + }, + // brackets, greater than + { + pattern: /[\]\}]/g, + replace: ')', + generalRule: true + }, + // brackets, lower than + { + pattern: /[\[\{]/g, + replace: '(', + generalRule: true + }, + // everything that wasn't covered yet + { + pattern: new RegExp( rInvalid.source, 'g' ), + replace: '-', + generalRule: true + }, + // directory structures + { + pattern: /^(\.|\.\.|\.\/.*|\.\.\/.*|.*\/\.\/.*|.*\/\.\.\/.*|.*\/\.|.*\/\.\.)$/g, + replace: '', + generalRule: true + } + ], /** * Internal helper for #constructor and #newFromtext. @@ -204,11 +311,11 @@
[MediaWiki-commits] [Gerrit] Fix bad knockout click binding - change (analytics/wikimetrics)
jenkins-bot has submitted this change and it was merged. Change subject: Fix bad knockout click binding .. Fix bad knockout click binding Binding view model methods with knockout can be tricky, in this example bind was being used incorrectly. Chrome somehow magically worked despite the mistake but in Firefox the tagging interface was broken. Bug: 72957 Change-Id: I167e0e6272f02e89b942c3ac0f237a199a30134b --- M wikimetrics/static/js/cohortList.js M wikimetrics/templates/cohorts.html 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Mforns: Looks good to me, approved jenkins-bot: Verified diff --git a/wikimetrics/static/js/cohortList.js b/wikimetrics/static/js/cohortList.js index 9bc3434..b65cf4b 100644 --- a/wikimetrics/static/js/cohortList.js +++ b/wikimetrics/static/js/cohortList.js @@ -120,9 +120,10 @@ cohort.tag_name_to_add(''); }, -deleteTag: function(event, cohort, tag){ +deleteTag: function(tag){ +var cohort = this; $.post('/cohorts/' + cohort.id + '/tag/delete/' + tag.id) -.done(site.handleWith(function(data){ +.done(site.handleWith(function(){ cohort.tags.remove(tag); // NOTE: autocomplete doesn't change // because tags are only removed from the cohort diff --git a/wikimetrics/templates/cohorts.html b/wikimetrics/templates/cohorts.html index 4786e5a..9251a50 100644 --- a/wikimetrics/templates/cohorts.html +++ b/wikimetrics/templates/cohorts.html @@ -21,11 +21,11 @@ div class=well well-large style=height:200px h2span data-bind=text: name/span small data-bind=text: description/small - /h2 +/h2 div data-bind=foreach: tags class=tags span class=label span data-bind=text: name, css: {highlight: highlight}/span -a data-bind=click: $root.deleteTag.bind($data, event, $parent)i class=icon-remove/i/a +a data-bind=click: $root.deleteTag.bind($parent)i class=icon-remove/i/a /span /div div -- To view, visit https://gerrit.wikimedia.org/r/170972 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I167e0e6272f02e89b942c3ac0f237a199a30134b Gerrit-PatchSet: 2 Gerrit-Project: analytics/wikimetrics Gerrit-Branch: master Gerrit-Owner: Milimetric dandree...@wikimedia.org Gerrit-Reviewer: Mforns mfo...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release 0.3.0. - change (mediawiki...latex_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170980 Change subject: Release 0.3.0. .. Release 0.3.0. Change-Id: I1c36cbe5f879f326da6227ad9d35da8696d66429 --- M CHANGELOG.md M package.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer refs/changes/80/170980/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4082f3c..acfb100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# mw-ocg-latexer x.x.x (not yet released) +# mw-ocg-latexer 0.3.0 (2014-11-04) * Improved language support: Persian, Indic languages (bug 28206, bug 68922), CJK (including Simplified and Traditional Chinese scripts, and additional language aliases for Korean), Macedonian, Aramaic, diff --git a/package.json b/package.json index adb0d01..738ac91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: mw-ocg-latexer, - version: 0.2.2-git, + version: 0.3.0, description: Converts mediawiki collection bundles (as generated by mw-ocg-bundler) to beautiful PDFs (via XeLaTeX), main: lib/index.js, scripts: { -- To view, visit https://gerrit.wikimedia.org/r/170980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c36cbe5f879f326da6227ad9d35da8696d66429 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create CHANGELOG. - change (mediawiki...latex_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170979 Change subject: Create CHANGELOG. .. Create CHANGELOG. Change-Id: I02d82cbe01f44be8885e25128731e02da55e304d --- A CHANGELOG.md 1 file changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer refs/changes/79/170979/1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000..4082f3c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,62 @@ +# mw-ocg-latexer x.x.x (not yet released) +* Improved language support: Persian, Indic languages (bug 28206, bug + 68922), CJK (including Simplified and Traditional Chinese scripts, + and additional language aliases for Korean), Macedonian, Aramaic, + Bosnian, Tibetan, Lao, and Khmer. Ensure we switch to latin font + where necessary. +* Use `texvcjs` package to validate/translate math markup. +* Allow rendering from unzipped bundle. +* Add `-T` option to CLI to specify a temporary directory. +* Render attribution pages. +* New log and status reporting framework; better error reporting. +* Improve metabook option handling (paper size setting, toc auto + mode) (bug 68836). +* Clean up after running the tests (bug 71341). +* Bug fixes: +* Fix super/subscript issue. +* Don't crash if the collection title looks like a URL. +* Properly escape HTML anchors and id attributes (bug 68854). +* Don't crash if chapter has no items. +* Don't crash on `;#`. +* Don't crash if div begins a figure caption. +* Don't crash if we encounter uncontained li. +* Don't crash if section/chapter title contains a URL. +* Don't crash if images are inside DT tags. +* Fix TeX escaping of []. +* Fix There's no line here to end. crasher (br after dd). +* Be careful about square brackets inside \item[...]. +* Don't crash when the page title is RTL. +* Don't hang if unzip produces console output. +* Prevent 100% CPU hang on certain input text. +* Image improvements: +* Use `jpegtran` to purge EXIF data from jpegs. +* Use proper page of any PDF figure. +* Convert TIFF images to PNG (bug 70866). +* Handle animated GIFs; remove `easyimage` dependency (bug 70865). +* Don't crash if PNG has bogus resolution information. +* Support inline images. +* Support djvu images, but disable full extraction by default. +* Disable PDF page splitting by default. +* Rendering improvements: +* Ensure we don't break after the - in a negative number. +* Wrap long DTs. +* Render emphasis nodes +* Always use bidi, even if the wiki is in theory only LTR. +* Equations should be flush left and not indented (bug 68838). +* Allow page breaks between empty sections. +* Use narrower margins. +* Fix non-curly quotes (`extquotedbl` in output). +* Allow lists nested 9 levels deep (bug 71896). +* PDF can't handle UTF-8 URLs (bug 71547). +* Update dependencies. + +# mw-ocg-latexer 0.2.2 (2014-01-21) +* Non-Latin rendering support. Improvements to Arabic, Urdu, Devanagari, + Malayalam, Hebrew, Chinese, Korean, and Japanese. We use the + `node-icu-bidi` package to properly implement the Unicode Bidirectional + Algorithm. +* Also accent position improvements in Vietnamese. +* Add `--syslog` CLI option. + +# mw-ocg-latexer 0.2.0 (2013-12-04) +* First mostly-functional release. -- To view, visit https://gerrit.wikimedia.org/r/170979 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02d82cbe01f44be8885e25128731e02da55e304d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump version after release. - change (mediawiki...latex_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170981 Change subject: Bump version after release. .. Bump version after release. Change-Id: Ie9409077f11e814207ba6e1cc6391fa8ed18f8a2 --- M CHANGELOG.md M package.json 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer refs/changes/81/170981/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index acfb100..c403d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# mw-ocg-latexer x.x.x (not yet released) + # mw-ocg-latexer 0.3.0 (2014-11-04) * Improved language support: Persian, Indic languages (bug 28206, bug 68922), CJK (including Simplified and Traditional Chinese scripts, diff --git a/package.json b/package.json index 738ac91..9777575 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: mw-ocg-latexer, - version: 0.3.0, + version: 0.3.0-git, description: Converts mediawiki collection bundles (as generated by mw-ocg-bundler) to beautiful PDFs (via XeLaTeX), main: lib/index.js, scripts: { -- To view, visit https://gerrit.wikimedia.org/r/170981 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9409077f11e814207ba6e1cc6391fa8ed18f8a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create CHANGELOG.md. - change (mediawiki...text_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170982 Change subject: Create CHANGELOG.md. .. Create CHANGELOG.md. Change-Id: I24cad56a2e5ad5d6656993c22735649181fe71aa --- A CHANGELOG.md 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer refs/changes/82/170982/1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000..9c0347c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# mw-ocg-texter x.x.x (not yet released) +* Use new log and status reporting framework. +* Update dependencies. + +# mw-ocg-texter 0.2.2 (2014-01-21) +* Move to WMF repo. +* Add `--syslog` CLI option. + +# mw-ocg-texter 0.2.0 (2013-12-17) -- To view, visit https://gerrit.wikimedia.org/r/170982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24cad56a2e5ad5d6656993c22735649181fe71aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump version after release. - change (mediawiki...text_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170984 Change subject: Bump version after release. .. Bump version after release. Change-Id: Iadafe7263d94f52a4f04b6274522e04e8b88e075 --- M CHANGELOG.md M package.json 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer refs/changes/84/170984/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d1857e..48a5d14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# mw-ocg-texter x.x.x (not yet released) + # mw-ocg-texter 0.3.0 (2014-11-04) * Use new log and status reporting framework. * Update dependencies. diff --git a/package.json b/package.json index fb66933..696fc88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: mw-ocg-texter, - version: 0.3.0, + version: 0.3.0-git, description: Converts mediawiki collection bundles (as generated by mw-ocg-bundler) to plaintext, main: lib/index.js, scripts: { -- To view, visit https://gerrit.wikimedia.org/r/170984 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadafe7263d94f52a4f04b6274522e04e8b88e075 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release 0.3.0. - change (mediawiki...text_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170983 Change subject: Release 0.3.0. .. Release 0.3.0. Change-Id: I8bfa71b69b3eed926f9dd163e69381b9b7ae510f --- M CHANGELOG.md M package.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer refs/changes/83/170983/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c0347c..2d1857e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# mw-ocg-texter x.x.x (not yet released) +# mw-ocg-texter 0.3.0 (2014-11-04) * Use new log and status reporting framework. * Update dependencies. diff --git a/package.json b/package.json index a4d79c0..fb66933 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { name: mw-ocg-texter, - version: 0.2.2-git, + version: 0.3.0, description: Converts mediawiki collection bundles (as generated by mw-ocg-bundler) to plaintext, main: lib/index.js, scripts: { -- To view, visit https://gerrit.wikimedia.org/r/170983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bfa71b69b3eed926f9dd163e69381b9b7ae510f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create CHANGELOG.md - change (mediawiki...zim_renderer)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170986 Change subject: Create CHANGELOG.md .. Create CHANGELOG.md Change-Id: I3186dbd0b70b49f28c2d444cc0d48cbf37dc9a3b --- A CHANGELOG.md 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/zim_renderer refs/changes/86/170986/1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000..e563e25 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# mw-ocg-zimwriter (not yet released) -- To view, visit https://gerrit.wikimedia.org/r/170986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3186dbd0b70b49f28c2d444cc0d48cbf37dc9a3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/zim_renderer Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Followup 0165a53: fix typo causing undefined to be passed to... - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/170985 Change subject: Followup 0165a53: fix typo causing undefined to be passed to mw.Title .. Followup 0165a53: fix typo causing undefined to be passed to mw.Title Bug: 72948 Change-Id: I1942f153f18c5a182de38a0e067ec5a92abeefd3 --- M modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/85/170985/1 diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js index a8284f6..1e8dbf4 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js @@ -89,7 +89,7 @@ if ( name instanceof mw.Title ) { title = name; } else { - title = mw.Title.newFromText( href, mw.config.get( 'wgNamespaceIds' ).template ); + title = mw.Title.newFromText( name, mw.config.get( 'wgNamespaceIds' ).template ); } if ( title !== null ) { href = title.getPrefixedText(); -- To view, visit https://gerrit.wikimedia.org/r/170985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1942f153f18c5a182de38a0e067ec5a92abeefd3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hhvm: add hhvm_health Ganglia module and hhvmadm script - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/170987 Change subject: hhvm: add hhvm_health Ganglia module and hhvmadm script .. hhvm: add hhvm_health Ganglia module and hhvmadm script * Report the metrics provided by the /check-health endpoint of the HHVM admin server to Ganglia. * Provision a simple shell script, 'hhvmadm', that helps with calling endpoints of the admin server from the shell. Change-Id: I79d247d2702cc131224f2c3433fd784567cf66b4 --- A modules/hhvm/files/debug/hhvmadm A modules/hhvm/files/monitoring/hhvm_health.py A modules/hhvm/files/monitoring/hhvm_health.pyconf M modules/hhvm/manifests/debug.pp M modules/hhvm/manifests/monitoring.pp 5 files changed, 235 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/170987/1 diff --git a/modules/hhvm/files/debug/hhvmadm b/modules/hhvm/files/debug/hhvmadm new file mode 100755 index 000..d26661a --- /dev/null +++ b/modules/hhvm/files/debug/hhvmadm @@ -0,0 +1,21 @@ +#!/bin/bash +# hhvmadm -- Shell helper for the HHVM admin site. +# +# Usage: +# +# hhvmadm [ENDPOINT] [--KEY=VALUE ..] +# +# Example: +# +# hhvmadm jemalloc-dump-prof --file=/tmp/dump.heap +# +case $1 in --help|-h|help) + grep -Po '(?=^# ).*' $0 2 2/dev/null + exit 1 + ;; +esac +url=http://localhost:9002/${1#/}; +shift +params=() +for arg in ${@##--}; do params+=('--data-urlencode' $arg); done +/usr/bin/curl -s -G ${params[@]} $url diff --git a/modules/hhvm/files/monitoring/hhvm_health.py b/modules/hhvm/files/monitoring/hhvm_health.py new file mode 100644 index 000..4612998 --- /dev/null +++ b/modules/hhvm/files/monitoring/hhvm_health.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + Ganglia metric-gathering module for HHVM health stats + + +import json +import re +import sys +import time +import urllib2 + + +def flatten(mapping, prefix=''): +flat = {} +for k, v in mapping.items(): +k = prefix + re.sub('\W', '', k.replace(' ', '_')) +flat.update(flatten(v, k + '.') if isinstance(v, dict) else {k: v}) +return flat + + +class HealthStats(object): +def __init__(self, url, expiry=5): +self.url = url +self.expiry = expiry +self.data = {} +self.update() + +def update(self): +req = urllib2.urlopen(self.url) +res = flatten(json.load(req), 'HHVM.') +self.data.update(res) +self.last_fetched = time.time() + +def expired(self): +return time.time() - self.last_fetched self.expiry + +def get(self, stat): +if self.expired(): +self.update() +return self.data[stat] + + +def guess_unit(metric): +if 'size' in metric or 'capac' in metric or 'byte' in metric: +return 'bytes' +return 'count' + + +def metric_init(params): +url = params.get('url', 'http://localhost:9002/check-health') +stats = HealthStats(url) +return [{ +'name': str(key), +'value_type': 'uint', +'format': '%u', +'units': guess_unit(key), +'slope': 'both', +'groups': 'HHVM', +'call_back': stats.get, +} for key in stats.data] + + +def metric_cleanup(): +pass + + +def self_test(): +params = dict(arg.split('=') for arg in sys.argv[1:]) +metrics = metric_init(params) +while 1: +for metric in metrics: +name = metric['name'] +call_back = metric['call_back'] +print '%s: %s' % (name, call_back(name)) +time.sleep(5) + + +if __name__ == '__main__': +self_test() diff --git a/modules/hhvm/files/monitoring/hhvm_health.pyconf b/modules/hhvm/files/monitoring/hhvm_health.pyconf new file mode 100644 index 000..6c898a3 --- /dev/null +++ b/modules/hhvm/files/monitoring/hhvm_health.pyconf @@ -0,0 +1,96 @@ +# Ganglia metric module for HHVM health statistics. + +modules { +module { +name = hhvm_health +language = python +} +} + +collection_group { +collect_every = 20 +time_threshold = 60 + +metric { +name= HHVM.targetcache +title = Target Cache +value_threshold = 1.0 +} + + +metric { +name= HHVM.tcprofsize +title = Translation Cache - Prof Size +value_threshold = 1.0 +} + + +metric { +name= HHVM.units +title = Units +value_threshold = 1.0 +} + + +metric { +name= HHVM.tcfrozensize +title = Translation Cache - Frozen Size +value_threshold = 1.0 +} + + +metric { +name= HHVM.hhbcroarenacapac +title = HHBC RO Arena Capacity +value_threshold = 1.0 +} + + +metric { +name= HHVM.rds +title = RDS +value_threshold =
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3b53b23..362d0eb - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 3b53b23..362d0eb .. Syncronize VisualEditor: 3b53b23..362d0eb Change-Id: Iff36377916ffa82eb21fe5b8f7cc890a4b72394b --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 3b53b23..362d0eb 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 3b53b23fb18dc6a5f71a940091bdc66ed82f97ad +Subproject commit 362d0ebcdf5857a377c0c1e41883fca9ce321cbe -- To view, visit https://gerrit.wikimedia.org/r/170988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff36377916ffa82eb21fe5b8f7cc890a4b72394b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3b53b23..362d0eb - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/170988 Change subject: Syncronize VisualEditor: 3b53b23..362d0eb .. Syncronize VisualEditor: 3b53b23..362d0eb Change-Id: Iff36377916ffa82eb21fe5b8f7cc890a4b72394b --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/88/170988/1 diff --git a/VisualEditor b/VisualEditor index 3b53b23..362d0eb 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 3b53b23fb18dc6a5f71a940091bdc66ed82f97ad +Subproject commit 362d0ebcdf5857a377c0c1e41883fca9ce321cbe -- To view, visit https://gerrit.wikimedia.org/r/170988 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff36377916ffa82eb21fe5b8f7cc890a4b72394b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump version after release. - change (mediawiki...OfflineContentGenerator)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170990 Change subject: Bump version after release. .. Bump version after release. Change-Id: I9c222eaf095354d2e95445230775d9fb61a0ad8e --- M CHANGELOG.md M package.json 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator refs/changes/90/170990/1 diff --git a/CHANGELOG.md b/CHANGELOG.md index f9fac6e..69ad015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# mw-ocg-service x.x.x (not yet released) + # mw-ocg-service 1.0.0 (2014-11-05) * First release; corresponds to `mw-ocg-bundler` 1.2.0, `mw-ocg-latexer` 0.3.0 and `mw-ocg-texter` 0.3.0. diff --git a/package.json b/package.json index de871ff..18499a0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { name: mw-ocg-service, description: Render service (Offline Content Generator) for the MediaWiki extension Collection, - version: 1.0.0, + version: 1.0.0-git, homepage: https://www.mediawiki.org/wiki/Extension:Collection;, bugs: { url: https://bugzilla.wikimedia.org/enter_bug.cgi?product=OCG; -- To view, visit https://gerrit.wikimedia.org/r/170990 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c222eaf095354d2e95445230775d9fb61a0ad8e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Release 1.0.0. - change (mediawiki...OfflineContentGenerator)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/170989 Change subject: Release 1.0.0. .. Release 1.0.0. Change-Id: I009c9829140c78d554574eb31499adf1bc64aaca --- A CHANGELOG.md M package.json 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator refs/changes/89/170989/1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000..f9fac6e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# mw-ocg-service 1.0.0 (2014-11-05) +* First release; corresponds to `mw-ocg-bundler` 1.2.0, + `mw-ocg-latexer` 0.3.0 and `mw-ocg-texter` 0.3.0. diff --git a/package.json b/package.json index d0b1f08..de871ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { name: mw-ocg-service, description: Render service (Offline Content Generator) for the MediaWiki extension Collection, - version: 0.0.1, + version: 1.0.0, homepage: https://www.mediawiki.org/wiki/Extension:Collection;, bugs: { url: https://bugzilla.wikimedia.org/enter_bug.cgi?product=OCG; -- To view, visit https://gerrit.wikimedia.org/r/170989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I009c9829140c78d554574eb31499adf1bc64aaca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Followup 0165a53: don't store an mw.Title object instead of ... - change (mediawiki...VisualEditor)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/170991 Change subject: Followup 0165a53: don't store an mw.Title object instead of a string in TemplateModel .. Followup 0165a53: don't store an mw.Title object instead of a string in TemplateModel 0165a53 overlooked the fact that 'name' is also passed to the MWTemplateModel constructor, and there it really does always need to be a string, not magically either a string or an mw.Title object. Oops :( Bug: 72961 Change-Id: I0b20f0768aae4d9cc9f7af268abd0a704b6adc3a --- M modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/91/170991/1 diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js index 1e8dbf4..f146104 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js @@ -88,6 +88,7 @@ var href, title; if ( name instanceof mw.Title ) { title = name; + name = title.getPrefixedText(); } else { title = mw.Title.newFromText( name, mw.config.get( 'wgNamespaceIds' ).template ); } -- To view, visit https://gerrit.wikimedia.org/r/170991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b20f0768aae4d9cc9f7af268abd0a704b6adc3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hygiene: Change source to task_type for consistency with Mob... - change (mediawiki...WikiGrok)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/170992 Change subject: hygiene: Change source to task_type for consistency with MobileFrontend .. hygiene: Change source to task_type for consistency with MobileFrontend Dependent on MobileFrontend change TBD Change-Id: I1a5a44606ffd4b3bf83d294a2299e42d09462163 --- M includes/api/ApiResponse.php M tests/phpunit/api/ApiResponseTest.php 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiGrok refs/changes/92/170992/1 diff --git a/includes/api/ApiResponse.php b/includes/api/ApiResponse.php index b939163..0b1920a 100644 --- a/includes/api/ApiResponse.php +++ b/includes/api/ApiResponse.php @@ -37,9 +37,9 @@ 'userToken' = $params['user_token'], 'userEditCount' = $user-getEditCount(), 'taskToken' = $params['task_token'], + 'taskType' = $params['task_type'], 'subjectId' = $params['subject_id'], 'subject' = $params['subject'], - 'taskType' = $params['source'], 'mobileMode' = $params['mobile_mode'], 'testing' = $params['testing'], ); @@ -116,11 +116,11 @@ ApiBase::PARAM_REQUIRED = true, ApiBasE::PARAM_TYPE = 'string', ), - 'claims' = array( + 'task_type' = array( ApiBase::PARAM_REQUIRED = true, ApiBasE::PARAM_TYPE = 'string', ), - 'source' = array( + 'claims' = array( ApiBase::PARAM_REQUIRED = true, ApiBasE::PARAM_TYPE = 'string', ), @@ -150,8 +150,8 @@ 'subject_id' = 'The WikiData ID of the subject of the page', 'subject' = 'The label (in English) of the subject of the page', 'task_token' = 'The unique WikiGrok instance token', + 'task_type' = 'The version of WikiGrok that the user interacted with', 'claims' = 'The JSON encoded claims that the user submitted', - 'source' = 'The version of WikiGrok that the user interacted with', 'mobile_mode' = 'The version of MobileFrontend that the user was using', 'testing' = 'Whether or not the user is testing WikiGrok', ); diff --git a/tests/phpunit/api/ApiResponseTest.php b/tests/phpunit/api/ApiResponseTest.php index 09b472f..ca8d8ae 100644 --- a/tests/phpunit/api/ApiResponseTest.php +++ b/tests/phpunit/api/ApiResponseTest.php @@ -82,8 +82,8 @@ 'subject_id' = 2, 'subject' = 'Vessels', 'task_token' = 'abcdef0123456789', + 'task_type' = 'mobile a', 'claims' = '[]', - 'source' = 'mobile a', 'mobile_mode' = 'beta', ) ); $this-context-setRequest( $request ); @@ -136,8 +136,8 @@ 'subject_id' = 2, 'subject' = 'Vessels', 'task_token' = 'abcdef0123456789', + 'task_type' = 'mobile a', 'claims' = json_encode( $claims ), - 'source' = 'mobile a', 'mobile_mode' = 'beta', 'testing' = true, ), -- To view, visit https://gerrit.wikimedia.org/r/170992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a5a44606ffd4b3bf83d294a2299e42d09462163 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiGrok Gerrit-Branch: master Gerrit-Owner: Robmoen rm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Followup 0165a53: don't store an mw.Title object instead of ... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Followup 0165a53: don't store an mw.Title object instead of a string in TemplateModel .. Followup 0165a53: don't store an mw.Title object instead of a string in TemplateModel 0165a53 overlooked the fact that 'name' is also passed to the MWTemplateModel constructor, and there it really does always need to be a string, not magically either a string or an mw.Title object. Oops :( Bug: 72961 Change-Id: I0b20f0768aae4d9cc9f7af268abd0a704b6adc3a --- M modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js index 1e8dbf4..f146104 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js @@ -88,6 +88,7 @@ var href, title; if ( name instanceof mw.Title ) { title = name; + name = title.getPrefixedText(); } else { title = mw.Title.newFromText( name, mw.config.get( 'wgNamespaceIds' ).template ); } -- To view, visit https://gerrit.wikimedia.org/r/170991 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0b20f0768aae4d9cc9f7af268abd0a704b6adc3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 362d0eb..c232083 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/170993 Change subject: Syncronize VisualEditor: 362d0eb..c232083 .. Syncronize VisualEditor: 362d0eb..c232083 Change-Id: I05f4cf11b4d603683534150cfd2fd612a38ea42e --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/93/170993/1 diff --git a/VisualEditor b/VisualEditor index 362d0eb..c232083 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 362d0ebcdf5857a377c0c1e41883fca9ce321cbe +Subproject commit c23208371aefb6da5994a515e1788bd104e0b140 -- To view, visit https://gerrit.wikimedia.org/r/170993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05f4cf11b4d603683534150cfd2fd612a38ea42e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 362d0eb..c232083 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 362d0eb..c232083 .. Syncronize VisualEditor: 362d0eb..c232083 Change-Id: I05f4cf11b4d603683534150cfd2fd612a38ea42e --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 362d0eb..c232083 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 362d0ebcdf5857a377c0c1e41883fca9ce321cbe +Subproject commit c23208371aefb6da5994a515e1788bd104e0b140 -- To view, visit https://gerrit.wikimedia.org/r/170993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05f4cf11b4d603683534150cfd2fd612a38ea42e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Followup 0165a53: fix typo causing undefined to be passed to... - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Followup 0165a53: fix typo causing undefined to be passed to mw.Title .. Followup 0165a53: fix typo causing undefined to be passed to mw.Title Bug: 72948 Change-Id: I1942f153f18c5a182de38a0e067ec5a92abeefd3 --- M modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js index a8284f6..1e8dbf4 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateModel.js @@ -89,7 +89,7 @@ if ( name instanceof mw.Title ) { title = name; } else { - title = mw.Title.newFromText( href, mw.config.get( 'wgNamespaceIds' ).template ); + title = mw.Title.newFromText( name, mw.config.get( 'wgNamespaceIds' ).template ); } if ( title !== null ) { href = title.getPrefixedText(); -- To view, visit https://gerrit.wikimedia.org/r/170985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1942f153f18c5a182de38a0e067ec5a92abeefd3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: SuchetaG sucheta.ghos...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove reservedIndex - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Remove reservedIndex .. Remove reservedIndex Once upon a time, I embarked on a multiple-day refactoring journey to accomplish this. Now, I apparently can just delete all the instances of it. I tested this and apart from reordering the images a bit, there doesn't appear to be any ill effect, and you know what? I'm OK with people being *slightly* confused by the ordering if it means we can work with this codebase without fearing for our lives every time. Change-Id: Ifc55aac4b8b14e24e59c7a015282cc3dc4e25c6d --- M resources/mw.UploadWizard.js M resources/mw.UploadWizardUpload.js 2 files changed, 5 insertions(+), 20 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index 9d9f4e1..f5a8a0e 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -389,11 +389,10 @@ * we don't yet add it to the list of uploads; that only happens when it gets a real file. * * @param providedFile Existing File object, typically from a multi-select operation -* @param reservedIndex Hold this index for the upload, also typically multi-select related * * @return the new upload */ - newUpload: function ( providedFile, reservedIndex ) { + newUpload: function ( providedFile ) { var upload, wizard = this; @@ -401,7 +400,7 @@ return false; } - upload = new mw.UploadWizardUpload( this, '#mwe-upwiz-filelist', providedFile, reservedIndex ) + upload = new mw.UploadWizardUpload( this, '#mwe-upwiz-filelist', providedFile ) .on( 'file-changed', function ( files ) { uw.eventFlowLogger.logUploadEvent( 'uploads-added', { quantity: files.length } ); } ) @@ -438,16 +437,7 @@ // Create new upload slot for additional upload(s) this.newUpload(); - // When we add uploads from a multi-select operation, the file objects - // may be filled in random order, because filling them depends on - // completion of metadata extraction. We use the reservedIndex to ensure - // they're added in the correct order when they're filled. - // TODO v1.1 consider if we really have to set up details now - if ( upload.reservedIndex !== undefined ) { - this.uploads[upload.reservedIndex] = upload; - } else { - this.uploads.push( upload ); - } + this.uploads.push( upload ); //If upload is through a local file, then we need to show the Deeds step of the wizard if ( !upload.fromURL ) { diff --git a/resources/mw.UploadWizardUpload.js b/resources/mw.UploadWizardUpload.js index 2b8d5cc..788f987 100644 --- a/resources/mw.UploadWizardUpload.js +++ b/resources/mw.UploadWizardUpload.js @@ -28,9 +28,8 @@ * @param {UploadWizard} wizard * @param {HTMLDivElement} filesDiv - where we will dump our the interfaces for uploads * @param {File} providedFile - optional; only used on browsers which support FileAPI. -* @param {int} reservedIndex - optional, what key in the uploads array to hold for this upload */ - function UploadWizardUpload( wizard, filesDiv, providedFile, reservedIndex ) { + function UploadWizardUpload( wizard, filesDiv, providedFile ) { var upload = this; oo.EventEmitter.call( this ); @@ -59,8 +58,6 @@ this.fromURL = true; } } - // reserved index for multi-file selection - this.reservedIndex = reservedIndex; this.fileKey = undefined; @@ -425,8 +422,6 @@ if ( totalSize 1000 ) { this.wizard.makePreviewsFlag = false; } - - this.reservedIndex = this.wizard.uploads.length; } // check to see if the file has already been selected for upload. @@ -560,7 +555,7 @@ if ( files.length 0 ) { $.each( files, function ( i, file ) { // NOTE: By running newUpload
[MediaWiki-commits] [Gerrit] hhvm: add hhvm_health Ganglia module and hhvmadm script - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: hhvm: add hhvm_health Ganglia module and hhvmadm script .. hhvm: add hhvm_health Ganglia module and hhvmadm script * Report the metrics provided by the /check-health endpoint of the HHVM admin server to Ganglia. * Provision a simple shell script, 'hhvmadm', that helps with calling endpoints of the admin server from the shell. Change-Id: I79d247d2702cc131224f2c3433fd784567cf66b4 --- A modules/hhvm/files/debug/hhvmadm A modules/hhvm/files/monitoring/hhvm_health.py A modules/hhvm/files/monitoring/hhvm_health.pyconf M modules/hhvm/manifests/debug.pp M modules/hhvm/manifests/monitoring.pp 5 files changed, 235 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/hhvm/files/debug/hhvmadm b/modules/hhvm/files/debug/hhvmadm new file mode 100755 index 000..d26661a --- /dev/null +++ b/modules/hhvm/files/debug/hhvmadm @@ -0,0 +1,21 @@ +#!/bin/bash +# hhvmadm -- Shell helper for the HHVM admin site. +# +# Usage: +# +# hhvmadm [ENDPOINT] [--KEY=VALUE ..] +# +# Example: +# +# hhvmadm jemalloc-dump-prof --file=/tmp/dump.heap +# +case $1 in --help|-h|help) + grep -Po '(?=^# ).*' $0 2 2/dev/null + exit 1 + ;; +esac +url=http://localhost:9002/${1#/}; +shift +params=() +for arg in ${@##--}; do params+=('--data-urlencode' $arg); done +/usr/bin/curl -s -G ${params[@]} $url diff --git a/modules/hhvm/files/monitoring/hhvm_health.py b/modules/hhvm/files/monitoring/hhvm_health.py new file mode 100644 index 000..4612998 --- /dev/null +++ b/modules/hhvm/files/monitoring/hhvm_health.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + Ganglia metric-gathering module for HHVM health stats + + +import json +import re +import sys +import time +import urllib2 + + +def flatten(mapping, prefix=''): +flat = {} +for k, v in mapping.items(): +k = prefix + re.sub('\W', '', k.replace(' ', '_')) +flat.update(flatten(v, k + '.') if isinstance(v, dict) else {k: v}) +return flat + + +class HealthStats(object): +def __init__(self, url, expiry=5): +self.url = url +self.expiry = expiry +self.data = {} +self.update() + +def update(self): +req = urllib2.urlopen(self.url) +res = flatten(json.load(req), 'HHVM.') +self.data.update(res) +self.last_fetched = time.time() + +def expired(self): +return time.time() - self.last_fetched self.expiry + +def get(self, stat): +if self.expired(): +self.update() +return self.data[stat] + + +def guess_unit(metric): +if 'size' in metric or 'capac' in metric or 'byte' in metric: +return 'bytes' +return 'count' + + +def metric_init(params): +url = params.get('url', 'http://localhost:9002/check-health') +stats = HealthStats(url) +return [{ +'name': str(key), +'value_type': 'uint', +'format': '%u', +'units': guess_unit(key), +'slope': 'both', +'groups': 'HHVM', +'call_back': stats.get, +} for key in stats.data] + + +def metric_cleanup(): +pass + + +def self_test(): +params = dict(arg.split('=') for arg in sys.argv[1:]) +metrics = metric_init(params) +while 1: +for metric in metrics: +name = metric['name'] +call_back = metric['call_back'] +print '%s: %s' % (name, call_back(name)) +time.sleep(5) + + +if __name__ == '__main__': +self_test() diff --git a/modules/hhvm/files/monitoring/hhvm_health.pyconf b/modules/hhvm/files/monitoring/hhvm_health.pyconf new file mode 100644 index 000..6c898a3 --- /dev/null +++ b/modules/hhvm/files/monitoring/hhvm_health.pyconf @@ -0,0 +1,96 @@ +# Ganglia metric module for HHVM health statistics. + +modules { +module { +name = hhvm_health +language = python +} +} + +collection_group { +collect_every = 20 +time_threshold = 60 + +metric { +name= HHVM.targetcache +title = Target Cache +value_threshold = 1.0 +} + + +metric { +name= HHVM.tcprofsize +title = Translation Cache - Prof Size +value_threshold = 1.0 +} + + +metric { +name= HHVM.units +title = Units +value_threshold = 1.0 +} + + +metric { +name= HHVM.tcfrozensize +title = Translation Cache - Frozen Size +value_threshold = 1.0 +} + + +metric { +name= HHVM.hhbcroarenacapac +title = HHBC RO Arena Capacity +value_threshold = 1.0 +} + + +metric { +name= HHVM.rds +title = RDS +value_threshold = 1.0 +} + + +metric { +name
[MediaWiki-commits] [Gerrit] hygiene: Change source to task_type for consistency - change (mediawiki...MobileFrontend)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/170994 Change subject: hygiene: Change source to task_type for consistency .. hygiene: Change source to task_type for consistency Dependent on WikiGrok change I1a5a44606ffd4b3bf83d294a2299e42d09462163 Change-Id: I582365cae34014d67d76593b039b755c3b530dac --- M javascripts/modules/wikigrok/WikiGrokResponseApi.js 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/94/170994/1 diff --git a/javascripts/modules/wikigrok/WikiGrokResponseApi.js b/javascripts/modules/wikigrok/WikiGrokResponseApi.js index 77af849..845f136 100644 --- a/javascripts/modules/wikigrok/WikiGrokResponseApi.js +++ b/javascripts/modules/wikigrok/WikiGrokResponseApi.js @@ -11,8 +11,8 @@ this.subjectId = options.itemId; this.subject = options.subject; this.userToken = options.userToken; - this.taskType = 'mobile ' + options.version; this.taskToken = options.taskToken; + this.taskType = 'mobile ' + options.version; this.testing = false; // FIXME: TBD on what qualifies as a test Api.prototype.initialize.apply( this, arguments ); }, @@ -28,11 +28,9 @@ page_id: mw.config.get( 'wgArticleId' ), user_token: this.userToken, task_token: this.taskToken, + task_type: this.taskType, subject_id: this.subjectId, subject: this.subject, - // TODO: Change 'source' to 'taskType' for consistency - // Change needs to be also made in WikiGrok::ApiResponse - source: this.taskType, mobile_mode: M.getMode(), testing: this.testing, claims: JSON.stringify( claims ) -- To view, visit https://gerrit.wikimedia.org/r/170994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I582365cae34014d67d76593b039b755c3b530dac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Robmoen rm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add i18n for API module help - change (mediawiki...CheckUser)
jenkins-bot has submitted this change and it was merged. Change subject: Add i18n for API module help .. Add i18n for API module help MediaWiki core change I04b1a384 added support for i18n of API module help. This takes advantage of that while still maintaining backwards compatibility with earlier versions of MediaWiki. Once support for MediaWiki before 1.25 is dropped, the methods marked deprecated in this patch may be removed. Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17 --- M api/ApiQueryCheckUser.php M api/ApiQueryCheckUserLog.php M i18n/en.json M i18n/qqq.json 4 files changed, 166 insertions(+), 93 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php index ffd88eb..fa26c1e 100644 --- a/api/ApiQueryCheckUser.php +++ b/api/ApiQueryCheckUser.php @@ -241,6 +241,9 @@ ); } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getParamDescription() { return array( 'request' = array( @@ -257,10 +260,16 @@ ); } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getDescription() { return 'Allows check which IPs are used by a given username and which usernames are used by a given IP'; } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getExamples() { return array( 'api.php?action=querylist=checkusercurequest=useripscutarget=Jimbo_Wales', @@ -268,12 +277,20 @@ ); } - public function getHelpUrls() { - return 'http://www.mediawiki.org/wiki/Extension:CheckUser#API'; + /** +* @see ApiBase::getExamplesMessages() +*/ + protected function getExamplesMessages() { + return array( + 'action=querylist=checkusercurequest=useripscutarget=Jimbo_Wales' + = 'apihelp-query+checkuser-example-1', + 'action=querylist=checkusercurequest=editscutarget=127.0.0.1/16xff=1cureason=Some_check' + = 'apihelp-query+checkuser-example-2', + ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; + public function getHelpUrls() { + return 'http://www.mediawiki.org/wiki/Extension:CheckUser#API'; } public function getTokenSalt() { diff --git a/api/ApiQueryCheckUserLog.php b/api/ApiQueryCheckUserLog.php index b3d49fe..e9cf36b 100644 --- a/api/ApiQueryCheckUserLog.php +++ b/api/ApiQueryCheckUserLog.php @@ -101,7 +101,9 @@ ApiBase::PARAM_TYPE = array( 'newer', 'older' - ) + ), + /** @todo Once support for MediaWiki 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly */ + constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' = 'api-help-param-direction', ), 'from' = array( ApiBase::PARAM_TYPE = 'timestamp', @@ -109,10 +111,16 @@ 'to'= array( ApiBase::PARAM_TYPE = 'timestamp', ), - 'continue' = null, + 'continue' = array( + /** @todo Once support for MediaWiki 1.25 is dropped, just use ApiBase::PARAM_HELP_MSG directly */ + constant( 'ApiBase::PARAM_HELP_MSG' ) ?: '' = 'api-help-param-continue', + ), ); } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getParamDescription() { $p = $this-getModulePrefix(); return array( @@ -128,10 +136,16 @@ ); } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getDescription() { return 'Allows get entries of CheckUser log'; } + /** +* @deprecated since MediaWiki core 1.25 +*/ public function getExamples() { return array( 'api.php?action=querylist=checkuserlogculuser=WikiSysopcullimit=25', @@ -139,11 +153,19 @@ ); } - public function getHelpUrls() { - return 'http://www.mediawiki.org/wiki/Extension:CheckUser#API'; + /** +* @see ApiBase::getExamplesMessages() +*/ + protected function
[MediaWiki-commits] [Gerrit] Initial commit for the HierarchyBuilder extension. - change (mediawiki...HierarchyBuilder)
Kji has submitted this change and it was merged. Change subject: Initial commit for the HierarchyBuilder extension. .. Initial commit for the HierarchyBuilder extension. New extension HierarchyBuilder for building and managing hierarchical representations of wiki pages. Generated a correct HierarchyBuilder.i18n.php file for backwards compatability. Removed legacy .svn directories. Removed unused css themes. Updated the authors credits to include links to the author pages. Added a url to the extension credits to link to the HierarchyBuilder extension page. Corrected the version number to be version 1.0. Renamed the parser functions children, parent, and sectionNumber to be hierarchyChildren, hierarchyParent, and hierarchySectionNumber. Corrected the i18n messages to use full stops and proper capitalization. Refactored all HierarchyBuilder.php so that classes are contained within their own files and are autoloaded by HierarchyBuilder.php Renamed the EditHierarchy class as HierarchyFormInput and renamed SelectFromHierarchy as HierarchySelectFormInput. Updated RTL handling. Updated DOxygen documentation to reflect the correct parser function names. Change-Id: Ib28c03e9d6e0bc65a33dd544809003cbc35c2796 --- A HierarchyBuilder.class.php A HierarchyBuilder.i18n.magic.php A HierarchyBuilder.i18n.php A HierarchyBuilder.php A HierarchyFormInput.php A HierarchySelectFormInput.php A docs/config.json A editHierarchy.css A editHierarchy.js A i18n/en.json A i18n/qqq.json A jquery.jstree.js A renderHierarchy.js A selectFromHierarchy.js A themes/apple/bg.jpg A themes/apple/d.png A themes/apple/dot_for_ie.gif A themes/apple/style.css A themes/apple/throbber.gif 19 files changed, 7,248 insertions(+), 0 deletions(-) Approvals: Kji: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/168192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib28c03e9d6e0bc65a33dd544809003cbc35c2796 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/HierarchyBuilder Gerrit-Branch: master Gerrit-Owner: Kji k...@mitre.org Gerrit-Reviewer: Cicalese cical...@mitre.org Gerrit-Reviewer: Kji k...@mitre.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Extract change coalescing logic from ChangeHandler. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/170995 Change subject: Extract change coalescing logic from ChangeHandler. .. Extract change coalescing logic from ChangeHandler. This introduces the ChangeRunCoalescer class. Change-Id: Ib0085abc4c1cbf8ca162a031a96008840690907b --- M client/includes/Changes/ChangeHandler.php A client/includes/Changes/ChangeListMangler.php A client/includes/Changes/ChangeRunCoalescer.php M client/includes/WikibaseClient.php M client/tests/phpunit/includes/Changes/ChangeHandlerTest.php A client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php 6 files changed, 800 insertions(+), 910 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/95/170995/1 diff --git a/client/includes/Changes/ChangeHandler.php b/client/includes/Changes/ChangeHandler.php index 5ff4576..616a7a7 100644 --- a/client/includes/Changes/ChangeHandler.php +++ b/client/includes/Changes/ChangeHandler.php @@ -6,14 +6,10 @@ use MWException; use Title; use Wikibase\Change; -use Wikibase\Client\Changes\AffectedPagesFinder; -use Wikibase\Client\Changes\PageUpdater; use Wikibase\DataModel\Entity\Diff\EntityDiff; use Wikibase\DataModel\Entity\Diff\ItemDiff; use Wikibase\EntityChange; use Wikibase\ItemChange; -use Wikibase\Lib\Changes\EntityChangeFactory; -use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\SiteLinkCommentCreator; /** @@ -25,9 +21,6 @@ * * @licence GNU GPL v2+ * @author Daniel Kinzler - * - * @fixme: ChangeNotification, ChangeHandler, ClientHooks::onWikibasePollHandle - * and ClientChangeHandler need to be combined and refactored. */ class ChangeHandler { @@ -63,14 +56,9 @@ private $updater; /** -* @var EntityRevisionLookup $entityRevisionLookup +* @var ChangeListMangler|null */ - private $entityRevisionLookup; - - /** -* @var EntityChangeFactory -*/ - private $changeFactory; + private $changeListMangler; /** * @var AffectedPagesFinder @@ -83,18 +71,16 @@ private $localSiteId; public function __construct( - EntityChangeFactory $changeFactory, AffectedPagesFinder $affectedPagesFinder, PageUpdater $updater, - EntityRevisionLookup $entityRevisionLookup, + ChangeListMangler $changeListMangler, $localSiteId, $injectRC, $allowDataTransclusion ) { - $this-changeFactory = $changeFactory; + $this-changeListMangler = $changeListMangler; $this-affectedPagesFinder = $affectedPagesFinder; $this-updater = $updater; - $this-entityRevisionLookup = $entityRevisionLookup; if ( !is_string( $localSiteId ) ) { throw new InvalidArgumentException( '$localSiteId must be a string' ); @@ -111,277 +97,6 @@ $this-localSiteId = $localSiteId; $this-injectRC = (bool)$injectRC; $this-dataTransclusionAllowed = $allowDataTransclusion; - - $this-mirrorUpdater = null; - } - - /** -* Group changes by the entity they were applied to. -* -* @since 0.4 -* -* @param EntityChange[] $changes -* @return EntityChange[][] an associative array using entity IDs for keys. Associated with each -* entity ID is the list of changes performed on that entity. -*/ - public function groupChangesByEntity( array $changes ) { - wfProfileIn( __METHOD__ ); - $groups = array(); - - foreach ( $changes as $change ) { - $id = $change-getEntityId()-getSerialization(); - - if ( !isset( $groups[$id] ) ) { - $groups[$id] = array(); - } - - $groups[$id][] = $change; - } - - wfProfileOut( __METHOD__ ); - return $groups; - } - - /** -* Combines a set of changes into one change. All changes are assume to have been performed -* by the same user on the same entity. They are further assumed to be UPDATE actions -* and sorted in causal (chronological) order. -* -* If $changes is empty, this method returns null. If $changes contains exactly one change, -* that change is returned. Otherwise, a combined change is returned. -* -* @since 0.4 -* -* @param EntityChange[] $changes The changes to combine. -* -* @throws MWException -* @return Change a combined change representing the activity from all the original changes. -*/ - public function