[MediaWiki-commits] [Gerrit] tests: Move npm-test to repo root - change (mediawiki/core)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/184815 Change subject: tests: Move npm-test to repo root .. tests: Move npm-test to repo root (cherry picked from commit 6be355efdd67dd3e129fb55121f3406d87cd769f) Change-Id: Iaf5cf65616f82640145fbb6395c36129428602ca --- R Gruntfile.js R package.json 2 files changed, 3 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/15/184815/1 diff --git a/tests/frontend/Gruntfile.js b/Gruntfile.js similarity index 86% rename from tests/frontend/Gruntfile.js rename to Gruntfile.js index 59c18a8..1330cd3 100644 --- a/tests/frontend/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,3 @@ -/*! - * Grunt file - */ - /*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-contrib-jshint' ); @@ -10,10 +6,8 @@ grunt.loadNpmTasks( 'grunt-jscs' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); - grunt.file.setBase( __dirname + '/../..' ); - grunt.initConfig( { - pkg: grunt.file.readJSON( __dirname + '/package.json' ), + pkg: grunt.file.readJSON( 'package.json' ), jshint: { options: { jshintrc: true @@ -44,8 +38,8 @@ jsonlint: { all: [ '.jscsrc', - '{languages,languages,maintenance,resources}/**/*.json', - 'tests/frontend/package.json' + '{languages,maintenance,resources}/**/*.json', + 'package.json' ] }, banana: { diff --git a/tests/frontend/package.json b/package.json similarity index 100% rename from tests/frontend/package.json rename to package.json -- To view, visit https://gerrit.wikimedia.org/r/184815 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf5cf65616f82640145fbb6395c36129428602ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_24 Gerrit-Owner: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add extra scap proxies for A7, B7 and B8 - change (operations/puppet)
Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/184817 Change subject: Add extra scap proxies for A7, B7 and B8 .. Add extra scap proxies for A7, B7 and B8 Also add ocmments after server to signify which rack it is in Bug: T1342 Change-Id: Idc14b84fb92634821cfdf03226018a29e29fcefa --- M hieradata/common/dsh/config.yaml 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/17/184817/1 diff --git a/hieradata/common/dsh/config.yaml b/hieradata/common/dsh/config.yaml index a42148c..3c4e7dd 100644 --- a/hieradata/common/dsh/config.yaml +++ b/hieradata/common/dsh/config.yaml @@ -1,7 +1,10 @@ # Scap proxy list # scap_proxies: - - mw1010.eqiad.wmnet - - mw1070.eqiad.wmnet - - mw1161.eqiad.wmnet - - mw1201.eqiad.wmnet + - mw1010.eqiad.wmnet # A6 + - mw1033.eqiad.wmnet # A7 + - mw1070.eqiad.wmnet # B6 + - mw1097.eqiad.wmnet # B7 + - mw1216.eqiad.wmnet # B7 + - mw1161.eqiad.wmnet # C6 + - mw1201.eqiad.wmnet # D5 -- To view, visit https://gerrit.wikimedia.org/r/184817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc14b84fb92634821cfdf03226018a29e29fcefa Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Reedy re...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tests: Move npm-test to repo root - change (mediawiki/core)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/184821 Change subject: tests: Move npm-test to repo root .. tests: Move npm-test to repo root This is way overdue as it isn't experimental anymore. Keeping it in a non-standard subdirectory makes it harder to discover for people. And makes it harder to run from Jenkins since this is already being ran on every commit. Related to 70f3919. Change-Id: Iaf5cf65616f82640145fbb6395c36129428602ca (cherry picked from commit 6be355efdd67dd3e129fb55121f3406d87cd769f) --- R Gruntfile.js R package.json 2 files changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/184821/1 diff --git a/tests/frontend/Gruntfile.js b/Gruntfile.js similarity index 90% rename from tests/frontend/Gruntfile.js rename to Gruntfile.js index c011a68..29d5c5f 100644 --- a/tests/frontend/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,3 @@ -/*! - * Grunt file - */ - /*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-contrib-jshint' ); @@ -10,10 +6,8 @@ grunt.loadNpmTasks( 'grunt-jscs' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); - grunt.file.setBase( __dirname + '/../..' ); - grunt.initConfig( { - pkg: grunt.file.readJSON( __dirname + '/package.json' ), + pkg: grunt.file.readJSON( 'package.json' ), jshint: { options: { jshintrc: true @@ -45,7 +39,7 @@ all: [ '.jscsrc', '{languages,maintenance,resources}/**/*.json', - 'tests/frontend/package.json' + 'package.json' ] }, banana: { diff --git a/tests/frontend/package.json b/package.json similarity index 100% rename from tests/frontend/package.json rename to package.json -- To view, visit https://gerrit.wikimedia.org/r/184821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf5cf65616f82640145fbb6395c36129428602ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf13 Gerrit-Owner: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Provide VisualEditor regardless of device size - change (mediawiki...MobileFrontend)
Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/184822 Change subject: WIP: Provide VisualEditor regardless of device size .. WIP: Provide VisualEditor regardless of device size Bug: T85630 Change-Id: Iebeb6fdf4ad695699f29314efc71226f8e1fc3f6 --- M javascripts/modules/editor/EditorOverlay.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/22/184822/1 diff --git a/javascripts/modules/editor/EditorOverlay.js b/javascripts/modules/editor/EditorOverlay.js index a0ef9f7..16babe1 100644 --- a/javascripts/modules/editor/EditorOverlay.js +++ b/javascripts/modules/editor/EditorOverlay.js @@ -47,7 +47,7 @@ * @return {Boolean} */ isVisualEditorEnabled: function () { - return browser.isWideScreen() + return ( browser.isWideScreen() || M.isAlphaGroupMember() ) mw.config.get( 'wgVisualEditorConfig' ) $.inArray( mw.config.get( 'wgNamespaceNumber' ), mw.config.get( 'wgVisualEditorConfig' ).namespaces ) -1 mw.config.get( 'wgTranslatePageTranslation' ) !== 'translation' -- To view, visit https://gerrit.wikimedia.org/r/184822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iebeb6fdf4ad695699f29314efc71226f8e1fc3f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov bmansu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Turning on WikiGrok for anons on test and test2 wikis - change (operations/mediawiki-config)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/184823 Change subject: Revert Turning on WikiGrok for anons on test and test2 wikis .. Revert Turning on WikiGrok for anons on test and test2 wikis This reverts commit ad858b116b952755504c9862b25c68e619cadc06. Change-Id: I2e6b52a33536fe093d901da621a6f70669e02203 --- M wmf-config/InitialiseSettings.php M wmf-config/mobile.php 2 files changed, 0 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/23/184823/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 7f94f8a..eab5925 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12385,18 +12385,6 @@ 'test2wiki' = true, 'enwiki' = false, ), -'wmgMFEnableWikiGrokForAnons' = array( - 'default' = false, - 'testwiki' = true, - 'test2wiki' = true, - 'enwiki' = false, -), -'wmgWikiGrokDebug' = array( - 'default' = false, - 'testwiki' = true, - 'test2wiki' = true, - 'enwiki' = false, -), 'wmgMFUseWikibaseDescription' = array( 'default' = false, 'testwiki' = true, diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php index c7d77b9..7a790c3 100644 --- a/wmf-config/mobile.php +++ b/wmf-config/mobile.php @@ -11,8 +11,6 @@ $wgMFPhotoUploadEndpoint = $wmgMFPhotoUploadEndpoint; $wgMFUseCentralAuthToken = $wmgMFUseCentralAuthToken; $wgMFEnableWikiGrok = $wmgMFEnableWikiGrok; - $wgMFEnableWikiGrokForAnons = $wmgMFEnableWikiGrokForAnons; - $wgWikiGrokDebug = $wmgWikiGrokDebug; $wgMFPhotoUploadWiki = $wmgMFPhotoUploadWiki; $wgMFContentNamespace = $wmgMFContentNamespace; $wgMFPhotoUploadAppendToDesc = $wmgMFPhotoUploadAppendToDesc; -- To view, visit https://gerrit.wikimedia.org/r/184823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e6b52a33536fe093d901da621a6f70669e02203 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: MaxSem maxsem.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] varnish: Route requests with 'X-Wikimedia-Debug=1' to test_w... - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: varnish: Route requests with 'X-Wikimedia-Debug=1' to test_wikipedia backend .. varnish: Route requests with 'X-Wikimedia-Debug=1' to test_wikipedia backend One of the debugging facilities we have available to us is testwiki. Unlike other wikis, //test.wikipedia.org/ is served by a dedicated Varnish backend, which maps requests to a single host, mw1017. This is handy, but limited. It'd be better to be able to have a means of routing requests for any wiki to mw1017 using a special request header. This change configures Varnish to handle requests containing an 'X-Wikimedia-Debug=1' header by skipping the cache and routing the request to mw1017. Change-Id: I2e4a5474615dd161782d011022fa86399e52ebf1 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb M templates/varnish/bits.inc.vcl.erb M templates/varnish/mobile-backend.inc.vcl.erb M templates/varnish/mobile-frontend.inc.vcl.erb M templates/varnish/text-backend.inc.vcl.erb M templates/varnish/text-common.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb 7 files changed, 43 insertions(+), 25 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved BBlack: Looks good to me, but someone else must approve diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 9522dfe..80e3a24 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -378,6 +378,13 @@ /* Function vcl_error in %= @vcl %.inc.vcl will be appended here */ } +sub vcl_hash { + if (req.http.X-Wikimedia-Debug) { + hash_data(req.http.X-Wikimedia-Debug); + } + /* Function vcl_hash in %= @vcl %.inc.vcl will be appended here */ +} + /* Include the VCL file for this role */ include %= @vcl %.inc.vcl; diff --git a/templates/varnish/bits.inc.vcl.erb b/templates/varnish/bits.inc.vcl.erb index 132856b..037a74d 100644 --- a/templates/varnish/bits.inc.vcl.erb +++ b/templates/varnish/bits.inc.vcl.erb @@ -38,6 +38,11 @@ } if (req.http.host == %= @cluster_options.fetch(bits_domain, bits.wikimedia.org) %) { +% if @vcl_config.fetch(cluster_tier, 1) == 1 -% + if (req.http.X-Wikimedia-Debug == 1) { + set req.backend = test_wikipedia; + } +% end -% // For https-only wikis, the redirect from http to https for bits assets should occur // in varnish instead of apache, since the apache redirect and mediawiki doesn't // vary by protocol. This can result in a redirect loop and assets not loading. @@ -68,7 +73,7 @@ sub vcl_fetch { // Do not serialize calls for non-cachable objects. // Removing this would break debug=true in mediawiki. - if (beresp.ttl = 0s) { + if (beresp.ttl = 0s || req.http.X-Wikimedia-Debug == 1) { set beresp.ttl = 120s; return (hit_for_pass); } diff --git a/templates/varnish/mobile-backend.inc.vcl.erb b/templates/varnish/mobile-backend.inc.vcl.erb index 7e72ce6..208dadf 100644 --- a/templates/varnish/mobile-backend.inc.vcl.erb +++ b/templates/varnish/mobile-backend.inc.vcl.erb @@ -7,13 +7,13 @@ // FIXME: restrict access if (req.http.host ~ ^test\.) { -% if @vcl_config.fetch(cluster_tier, 1) == 1 -% - set req.backend = test_wikipedia; -% end -% - return (pass); + set req.http.X-Wikimedia-Debug = 1; } + % if @vcl_config.fetch(cluster_tier, 1) == 1 -% - if (req.url ~ ^/w/api\.php) { + if (req.http.X-Wikimedia-Debug == 1) { + set req.backend = test_wikipedia; + } else if (req.url ~ ^/w/api\.php) { set req.backend = api; } % end -% @@ -35,7 +35,7 @@ set beresp.ttl = 60 s; } - if (beresp.ttl = 0s) { + if (beresp.ttl = 0s || req.http.X-Wikimedia-Debug == 1) { set beresp.ttl = 120s; return (hit_for_pass); } diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index d6502a7..aaca51e 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -93,7 +93,7 @@ } if (req.http.host ~ ^test\.) { - return (pass); + set req.http.X-Wikimedia-Debug = 1; } set req.hash_ignore_busy = true; @@ -129,7 +129,7 @@ set beresp.ttl = 60 s; } - if (beresp.ttl = 0s) { + if (beresp.ttl = 0s || req.http.X-Wikimedia-Debug == 1) { set beresp.ttl = 120s; return (hit_for_pass); } diff --git a/templates/varnish/text-backend.inc.vcl.erb
[MediaWiki-commits] [Gerrit] remove mw1062 from dsh groups - read-only fs - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: remove mw1062 from dsh groups - read-only fs .. remove mw1062 from dsh groups - read-only fs mw1062 has a ro file system, as described in Bug: T86542 remove it from dsh groups to avoid deployers getting errors on rsyncing Change-Id: I1e8fd2857ef82437c61d3d5ce8e3c8504b1d6ec0 --- M modules/dsh/files/group/apache-eqiad M modules/dsh/files/group/apaches M modules/dsh/files/group/mediawiki-installation M modules/dsh/files/group/mw-eqiad 4 files changed, 0 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/dsh/files/group/apache-eqiad b/modules/dsh/files/group/apache-eqiad index f6edafd..384bf1e 100644 --- a/modules/dsh/files/group/apache-eqiad +++ b/modules/dsh/files/group/apache-eqiad @@ -58,7 +58,6 @@ mw1059 mw1060 mw1061 -mw1062 mw1063 mw1064 mw1065 diff --git a/modules/dsh/files/group/apaches b/modules/dsh/files/group/apaches index 6e49372..8b59194 100644 --- a/modules/dsh/files/group/apaches +++ b/modules/dsh/files/group/apaches @@ -59,7 +59,6 @@ mw1059 mw1060 mw1061 -mw1062 mw1063 mw1064 mw1065 diff --git a/modules/dsh/files/group/mediawiki-installation b/modules/dsh/files/group/mediawiki-installation index 716e2f4..a78a39f 100644 --- a/modules/dsh/files/group/mediawiki-installation +++ b/modules/dsh/files/group/mediawiki-installation @@ -68,7 +68,6 @@ mw1059 mw1060 mw1061 -mw1062 mw1063 mw1064 mw1065 diff --git a/modules/dsh/files/group/mw-eqiad b/modules/dsh/files/group/mw-eqiad index 1224ab4..8ee59fe 100644 --- a/modules/dsh/files/group/mw-eqiad +++ b/modules/dsh/files/group/mw-eqiad @@ -59,7 +59,6 @@ mw1059 mw1060 mw1061 -mw1062 mw1063 mw1064 mw1065 -- To view, visit https://gerrit.wikimedia.org/r/184827 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e8fd2857ef82437c61d3d5ce8e3c8504b1d6ec0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@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] [BREAKING CHANGE] LookupInputWidget: Remove the silly 'input... - change (oojs/ui)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/184828 Change subject: [BREAKING CHANGE] LookupInputWidget: Remove the silly 'input' parameter .. [BREAKING CHANGE] LookupInputWidget: Remove the silly 'input' parameter Every usage I've found just passes 'this' there, and this code wouldn't quite work properly if one passed something else than 'this' (the parameters to TextInputMenuSelectWidget were passed incorrectly). The parameter is confusing, making it seem like this class can be used independently, while in fact it can only be used as a mixin to other classes. Bug: T85467 Change-Id: I33c818a2f18c8a3ce9e0d0cb89c2f6f9bf1f74d2 --- M src/widgets/LookupInputWidget.js 1 file changed, 8 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/28/184828/1 diff --git a/src/widgets/LookupInputWidget.js b/src/widgets/LookupInputWidget.js index b2d586c..7ec71ee 100644 --- a/src/widgets/LookupInputWidget.js +++ b/src/widgets/LookupInputWidget.js @@ -1,5 +1,5 @@ /** - * Mixin that adds a menu showing suggested values for a text input. + * Mixin that adds a menu showing suggested values for a OO.ui.TextInputWidget. * * Subclasses must handle `select` and `choose` events on #lookupMenu to make use of selections. * @@ -11,21 +11,18 @@ * @abstract * * @constructor - * @param {OO.ui.TextInputWidget} input Input widget * @param {Object} [config] Configuration options * @cfg {jQuery} [$overlay] Overlay for dropdown; defaults to relative positioning - * @cfg {jQuery} [$container=input.$element] Element to render menu under + * @cfg {jQuery} [$container=this.$element] Element to render menu under */ -OO.ui.LookupInputWidget = function OoUiLookupInputWidget( input, config ) { +OO.ui.LookupInputWidget = function OoUiLookupInputWidget( config ) { // Configuration initialization config = config || {}; // Properties - this.lookupInput = input; this.$overlay = config.$overlay || this.$element; this.lookupMenu = new OO.ui.TextInputMenuSelectWidget( this, { $: OO.ui.Element.static.getJQuery( this.$overlay ), - input: this.lookupInput, $container: config.$container } ); this.lookupCache = {}; @@ -35,12 +32,12 @@ this.lookupInputFocused = false; // Events - this.lookupInput.$input.on( { + this.$input.on( { focus: this.onLookupInputFocus.bind( this ), blur: this.onLookupInputBlur.bind( this ), mousedown: this.onLookupInputMouseDown.bind( this ) } ); - this.lookupInput.connect( this, { change: 'onLookupInputChange' } ); + this.connect( this, { change: 'onLookupInputChange' } ); this.lookupMenu.connect( this, { toggle: 'onLookupMenuToggle' } ); // Initialization @@ -165,7 +162,7 @@ */ OO.ui.LookupInputWidget.prototype.populateLookupMenu = function () { var widget = this, - value = this.lookupInput.getValue(); + value = this.getValue(); if ( this.lookupsDisabled ) { return; @@ -217,7 +214,7 @@ */ OO.ui.LookupInputWidget.prototype.getLookupMenuItems = function () { var widget = this, - value = this.lookupInput.getValue(), + value = this.getValue(), deferred = $.Deferred(), ourRequest; @@ -225,7 +222,7 @@ if ( Object.prototype.hasOwnProperty.call( this.lookupCache, value ) ) { deferred.resolve( this.getLookupMenuItemsFromData( this.lookupCache[value] ) ); } else { - this.lookupInput.pushPending(); + this.pushPending(); this.lookupQuery = value; ourRequest = this.lookupRequest = this.getLookupRequest(); ourRequest -- To view, visit https://gerrit.wikimedia.org/r/184828 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33c818a2f18c8a3ce9e0d0cb89c2f6f9bf1f74d2 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui 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] Replace MWLogger with MWLoggerFactory - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/184830 Change subject: Replace MWLogger with MWLoggerFactory .. Replace MWLogger with MWLoggerFactory Time wounds all heels. During the code review for the PSR-3 logging introduction, several people asked me why we needed a wrapper for Psr\Log\LoggerInterface if the point was to use the standard. At the time I was convinced that it would be better to introduce the dependency via a wrapper class so that we could use the wrapper to patch over any deficiencies that we might find in the PSR-3 API. After going on to work on a project to disentangle other MediaWiki components from internal project dependencies I have suddenly and clearly seen the error of my ways. We still need a logger factory as PSR-3 does not specify a standard mechanism for creating Psr\Log\LoggerInterface instances. My solution is to convert MWLogger into MWLoggerFactory to retain a static factory interface for creating PSR-3 loggers but remove the MWLogger wrapper class itself in favor of direct exposure of Psr\Log\LoggerInterface to the MediaWiki consumer classes. Change-Id: Ie47467657dcf341991ada00827dca5e8eff95438 --- M RELEASE-NOTES-1.25 M autoload.php M docs/mwlogger.txt M includes/DefaultSettings.php M includes/GlobalFunctions.php A includes/debug/logger/Factory.php D includes/debug/logger/Logger.php M includes/debug/logger/NullSpi.php M includes/debug/logger/Spi.php M includes/debug/logger/legacy/Logger.php M includes/debug/logger/legacy/Spi.php M includes/debug/logger/monolog/SamplingHandler.php M includes/debug/logger/monolog/Spi.php 13 files changed, 176 insertions(+), 290 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/30/184830/1 diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 2aa066c..8f094f7 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -93,7 +93,7 @@ * The following libraries are now required: ** psr/log This library provides the interfaces set by the PSR-3 standard (http://www.php-fig.org/psr/psr-3/) - which are used by MediaWiki interally by the MWLogger class. + which are used by MediaWiki internally via the MWLoggerFactory class. See the structured logging RfC (https://www.mediawiki.org/wiki/Requests_for_comment/Structured_logging) for more background information. ** cssjanus/cssjanus diff --git a/autoload.php b/autoload.php index 72345fe..bd15c36 100644 --- a/autoload.php +++ b/autoload.php @@ -689,7 +689,7 @@ 'MWFunction' = __DIR__ . '/includes/utils/MWFunction.php', 'MWHookException' = __DIR__ . '/includes/Hooks.php', 'MWHttpRequest' = __DIR__ . '/includes/HttpFunctions.php', - 'MWLogger' = __DIR__ . '/includes/debug/logger/Logger.php', + 'MWLoggerFactory' = __DIR__ . '/includes/debug/logger/Factory.php', 'MWLoggerLegacyLogger' = __DIR__ . '/includes/debug/logger/legacy/Logger.php', 'MWLoggerLegacySpi' = __DIR__ . '/includes/debug/logger/legacy/Spi.php', 'MWLoggerMonologHandler' = __DIR__ . '/includes/debug/logger/monolog/Handler.php', diff --git a/docs/mwlogger.txt b/docs/mwlogger.txt index aab9599..ecc3626 100644 --- a/docs/mwlogger.txt +++ b/docs/mwlogger.txt @@ -1,28 +1,30 @@ -MWLogger implements a PSR-3 [0] compatible message logging system. +MWLoggerFactory implements a PSR-3 [0] compatible message logging system. -The MWLogger class is actually a thin wrapper around any PSR-3 LoggerInterface -implementation. Named MWLogger instances can be obtained from the -MWLogger::getInstance() static method. MWLogger expects a class implementing -the MWLoggerSpi interface to act as a factory for new MWLogger instances. +Named Psr\Log\LoggerInterface instances can be obtained from the +MWLoggerFactory::getInstance() static method. MWLoggerFactory expects a class +implementing the MWLoggerSpi interface to act as a factory for new +Psr\Log\LoggerInterface instances. -The Spi in MWLoggerSpi stands for service provider interface. An SPI is -a API intended to be implemented or extended by a third party. This software +The Spi in MWLoggerSpi stands for service provider interface. A SPI is +an API intended to be implemented or extended by a third party. This software design pattern is intended to enable framework extension and replaceable -components. It is specifically used in the MWLogger service to allow alternate -PSR-3 logging implementations to be easily integrated with MediaWiki. +components. It is specifically used in the MWLoggerFactory service to allow +alternate PSR-3 logging implementations to be easily integrated with +MediaWiki. -The MWLogger::getInstance() static method is the means by which most code -acquires an MWLogger instance. This in turn delegates creation of MWLogger -instances to a class implementing the MWLoggerSpi service provider interface. +The MWLoggerFactory::getInstance() static method is
[MediaWiki-commits] [Gerrit] Provide a backwards compatibility shim for MWLogger - change (mediawiki/core)
BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/184831 Change subject: Provide a backwards compatibility shim for MWLogger .. Provide a backwards compatibility shim for MWLogger MWLogger was renamed MWLoggerFactory and reduced to a static utility class in Ie474676. Reintroduce an MWLogger that proxies the public static methods of MWLoggerFactory to ease the transition of users who have implemented $wgMWLoggerDefaultSpi configurations that reference MWLogger. As noted in the class, this is a temporary bandaid that should be ripped off before 1.25 becomes an official release. Change-Id: Iaccb78a510c60aab2ff20a9aa7c0869699657388 --- M autoload.php A includes/debug/logger/Logger.php 2 files changed, 73 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/184831/1 diff --git a/autoload.php b/autoload.php index bd15c36..cd2559f 100644 --- a/autoload.php +++ b/autoload.php @@ -689,6 +689,7 @@ 'MWFunction' = __DIR__ . '/includes/utils/MWFunction.php', 'MWHookException' = __DIR__ . '/includes/Hooks.php', 'MWHttpRequest' = __DIR__ . '/includes/HttpFunctions.php', + 'MWLogger' = __DIR__ . '/includes/debug/logger/Logger.php', 'MWLoggerFactory' = __DIR__ . '/includes/debug/logger/Factory.php', 'MWLoggerLegacyLogger' = __DIR__ . '/includes/debug/logger/legacy/Logger.php', 'MWLoggerLegacySpi' = __DIR__ . '/includes/debug/logger/legacy/Spi.php', diff --git a/includes/debug/logger/Logger.php b/includes/debug/logger/Logger.php new file mode 100644 index 000..27cf0cd --- /dev/null +++ b/includes/debug/logger/Logger.php @@ -0,0 +1,72 @@ +?php +/** + * 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 + */ + + +/** + * Backwards compatibility stub for usage from before the introduction of + * MWLoggerFactory. + * + * @deprecated since 1.25 Use MWLoggerFactory + * @todo This class should be removed before the 1.25 final release. + */ +class MWLogger { + + /** +* Register a service provider to create new \Psr\Log\LoggerInterface +* instances. +* +* @param MWLoggerSpi $provider Provider to register +* @deprecated since 1.25 Use MWLoggerFactory::registerProvider() +*/ + public static function registerProvider( MWLoggerSpi $provider ) { + MWLoggerFactory::registerProvider( $provider ); + } + + + /** +* Get the registered service provider. +* +* If called before any service provider has been registered, it will +* attempt to use the $wgMWLoggerDefaultSpi global to bootstrap +* MWLoggerSpi registration. $wgMWLoggerDefaultSpi is expected to be an +* array usable by ObjectFactory::getObjectFromSpec() to create a class. +* +* @return MWLoggerSpi +* @see registerProvider() +* @see ObjectFactory::getObjectFromSpec() +* @deprecated since 1.25 Use MWLoggerFactory::getProvider() +*/ + public static function getProvider() { + return MWLoggerFactory::getProvider(); + } + + + /** +* Get a named logger instance from the currently configured logger factory. +* +* @param string $channel Logger channel (name) +* @return \Psr\Log\LoggerInterface +* @deprecated since 1.25 Use MWLoggerFactory::getInstance() +*/ + public static function getInstance( $channel ) { + return MWLoggerFactory::getInstance( $channel ); + } + +} -- To view, visit https://gerrit.wikimedia.org/r/184831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaccb78a510c60aab2ff20a9aa7c0869699657388 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: BryanDavis bda...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CRUD for boards and widgets - change (wikimedia...dash)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/184833 Change subject: CRUD for boards and widgets .. CRUD for boards and widgets TODO: transactions, proper error handling, RESTful status codes Bug: T86095 Change-Id: I606056bf802aedb422998034b40a0ea242dd90db --- M persistence.js A routes/board.js M routes/user.js A routes/widget.js M server.js 5 files changed, 275 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash refs/changes/33/184833/1 diff --git a/persistence.js b/persistence.js index e0268bc..68bccc8 100644 --- a/persistence.js +++ b/persistence.js @@ -13,6 +13,28 @@ return promiseDb; } +function insertWidgetList( board, connection ) { + var numWidgets = board.widgets.length, + i, + insertWidgets = 'INSERT INTO dash_widget_instance_board ( instance_id, board_id, widget_position ) VALUES ', + placeholders = '', + values = []; + + if ( numWidgets === 0 ) { + return; + } + for ( i = 0; i numWidgets; i++ ) { + if ( i 0 ) { + placeholders += ','; + } + placeholders += ' ( ?, ?, ? )'; + values.push( board.widgets[i] ); + values.push( board.id ); + values.push( i ); + } + return connection.query( insertWidgets + placeholders, values ); +} + module.exports = { /** * Ensures a user exists in the user table and saves the user's local db id @@ -24,7 +46,7 @@ var params = [ user.id, user.provider, user.displayName ], insertUser = 'INSERT IGNORE INTO dash_user ( oauth_id, oauth_provider, display_name ) VALUES ( ?, ?, ? )', getInfo = 'SELECT id, default_board from dash_user where oauth_id = ? and oauth_provider = ?', - insertBoard = 'INSERT INTO dash_board ( display_name, owner_id ) VALUES ( ?, ? ); UPDATE dash_user SET default_board = LAST_INSERT_ID() WHERE id = ?; SELECT LAST_INSERT_ID() AS id', + insertBoard = 'INSERT INTO dash_board ( display_name, description, owner_id ) VALUES ( ?, \'\', ? ); UPDATE dash_user SET default_board = LAST_INSERT_ID() WHERE id = ?; SELECT LAST_INSERT_ID() AS id', connection = getConnection(); return connection.query( insertUser, params ).then( function() { @@ -42,5 +64,156 @@ }); }); }); + }, + /** +* Saves a widget configuration +* @param Object instance should have ownerId, widgetId, displayName, +* isShared, and configuration set. If id is not set, this function creates +* a new instance and sets the id. +* @return Object Promise that fulfills on completion or rejects with error +*/ + saveWidgetInstance: function( instance ) { + var insert = 'INSERT INTO dash_widget_instance ( widget_id, owner_id, display_name, description, is_shared, configuration ) VALUES ( ?, ?, ?, ?, ?, ? )', + update = 'UPDATE dash_widget_instance set display_name = ?, description = ?, is_shared = ?, configuration = ? WHERE id = ? AND owner_id = ?', + insertParams = [ instance.widgetId, instance.ownerId, instance.displayName, instance.description, instance.isShared ? 1 : 0, instance.configuration ], + updateParams = [ instance.displayName, instance.description, instance.isShared ? 1 : 0, instance.configuration, instance.id, instance.ownerId ], + connection = getConnection(); + + if ( instance.id ) { + return connection.query( update, updateParams ).then( function( dbResults ) { + if ( dbResults[0].affectedRows !== 1 ) { + // Either the instance doesn't exist or it's not ours + throw new Error('Instance ' + instance.id + ' with owner ' + instance.ownerId + ' not found' ); + } + }); + } + return connection.query( insert, insertParams ).then( function( dbResults ) { + instance.id = dbResults[0].insertId; + }); + }, + /** +* @param number boardId ID of board to fetch +* @param number userId local ID of user +* @returns Object Promise that resolves with a JSON representation of all +* board widgets or rejects with error +*/ + getWidgetInstance: function( instanceId, userId ) { + var connection = getConnection(), + select = 'SELECT widget_id, owner_id, display_name,
[MediaWiki-commits] [Gerrit] Update ApiResult handling for mediawiki/core change I7b37295e - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: Update ApiResult handling for mediawiki/core change I7b37295e .. Update ApiResult handling for mediawiki/core change I7b37295e Change I7b37295e for mediawiki/core deprecates several methods, and more importantly changes the format of the data returned from ApiResult::getData(). This change should handle these differences in a backwards-compatible manner. Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678e --- M MoreLikePageSuggester.php 1 file changed, 15 insertions(+), 6 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/MoreLikePageSuggester.php b/MoreLikePageSuggester.php index 76688a2..6bbe524 100644 --- a/MoreLikePageSuggester.php +++ b/MoreLikePageSuggester.php @@ -51,14 +51,23 @@ false // Don't enable write ); $searchApiCall-execute(); - $apiResult = $searchApiCall-getResultData(); - $titles = array(); - if ( isset( $apiResult['query']['search'] ) is_array( $apiResult['query']['search'] ) ) { - $searchResults = $apiResult['query']['search']; - foreach ( $searchResults as $searchResult ) { - $titles[] = Title::newFromText( $searchResult['title'] ); + + if ( defined( 'ApiResult::META_CONTENT' ) ) { + $searchResults = \ApiResult::removeMetadataNonRecursive( + (array)$searchApiCall-getResult()-getResultData( array( 'query', 'search' ) ) + ); + } else { + $apiResult = $searchApiCall-getResultData(); + if ( isset( $apiResult['query']['search'] ) is_array( $apiResult['query']['search'] ) ) { + $searchResults = $apiResult['query']['search']; + } else { + $searchResults = array(); } } + $titles = array(); + foreach ( $searchResults as $searchResult ) { + $titles[] = Title::newFromText( $searchResult['title'] ); + } return $titles; } -- To view, visit https://gerrit.wikimedia.org/r/183585 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b37295e8862b188d1f3b0cd07f66ac34629678e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: Swalling steven.wall...@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] Ensure the repository configuration lock is released - change (integration/zuul)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/184838 Change subject: Ensure the repository configuration lock is released .. Ensure the repository configuration lock is released When zuul initializes a fresh clone of a git repository, it attempts to set the user.name and user.email configuration options in .git/config. This job is the responsibility of GitConfigParser, which is currently broken, because GitConfigParser.write() acquires a lock but does not release it. The lock is released in the object's __del__ method, which is invoked when the object is about to be dereferenced. This is not a reliable means of ensuring the lock is released, because it can break if there is a circular reference keeping the object alive, or if another GitConfigParser object for the same repository is initiated while a reference to the existing one is still held. The author of GitPython appears to still be struggling with this as of commit a05e49d2419 of GitPython[0]. [0] https://github.com/gitpython-developers/GitPython/commit/a05e49d2419 Change-Id: Ie869f0b147577d3b2a0b57afba4474ee07753210 --- M zuul/merger/merger.py 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul refs/changes/38/184838/1 diff --git a/zuul/merger/merger.py b/zuul/merger/merger.py index 25955f8..7aa6d6e 100644 --- a/zuul/merger/merger.py +++ b/zuul/merger/merger.py @@ -55,7 +55,18 @@ if self.username: repo.config_writer().set_value('user', 'name', self.username) -repo.config_writer().write() +config_writer = repo.config_writer() +try: +# GitConfigParser.write() acquires a lock but does not release it. +# The lock is released in the object's __del__ method, which is +# invoked when the object is about to be dereferenced. This is not +# a reliable means of ensuring the lock is released, because it can +# break if there is a circular reference keeping the object alive, +# or if another GitConfigParser object for the same repository is +# initiated while a reference to the existing one is still held. +config_writer.write() +finally: +config_writer._lock._release_lock() self._initialized = True def isInitialized(self): -- To view, visit https://gerrit.wikimedia.org/r/184838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie869f0b147577d3b2a0b57afba4474ee07753210 Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul Gerrit-Branch: master 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] Observe the remote IP reported by X_FORWARDED_FOR header fro... - change (operations/puppet)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/184837 Change subject: Observe the remote IP reported by X_FORWARDED_FOR header from proxy server .. Observe the remote IP reported by X_FORWARDED_FOR header from proxy server Change-Id: I1c8a2cfee9e1ceab5fdf0df8527a404a4b17f8fe --- M modules/phabricator/templates/preamble.php.erb 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/184837/1 diff --git a/modules/phabricator/templates/preamble.php.erb b/modules/phabricator/templates/preamble.php.erb index 571ac88..9ccf11a 100644 --- a/modules/phabricator/templates/preamble.php.erb +++ b/modules/phabricator/templates/preamble.php.erb @@ -1,17 +1,15 @@ ?php -/* disabled until after migration because chase is using the - x-forwarded-for header for other purposes during migration. -*/ -/* +// use the real remote address reported to us by the front-end proxy: if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; } +// fake https if proxy reports it with forwarded_proto header: if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { $_SERVER['HTTPS'] = true; } -*/ + class redirector { protected $config; -- To view, visit https://gerrit.wikimedia.org/r/184837 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c8a2cfee9e1ceab5fdf0df8527a404a4b17f8fe Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4 mmod...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ignore EXIF data in FormatMetadata::fetchExtendedMetadata() - change (mediawiki/core)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/184835 Change subject: Ignore EXIF data in FormatMetadata::fetchExtendedMetadata() .. Ignore EXIF data in FormatMetadata::fetchExtendedMetadata() fetchExtendedMetadata() gets extra data such as file templates via the GetExtendedMetadata hook; keys which are absent in the extended data default to their EXIF value. This turned out to be a bad idea as EXIF data is too messy in practice with various devices putting e.g. manufacturer name for author name; completely ignoring EXIF data in the extmetadata API is still the better option. Bug: T73719 Change-Id: I77b1df67d08097504b3b1026c584063488e03b6e --- M includes/media/FormatMetadata.php 1 file changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/35/184835/1 diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index e8e73af..7246072 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -1679,17 +1679,6 @@ ); } - $common = $file-getCommonMetaArray(); - - if ( $common !== false ) { - foreach ( $common as $key = $value ) { - $fileMetadata[$key] = array( - 'value' = $value, - 'source' = 'file-metadata', - ); - } - } - return $fileMetadata; } -- To view, visit https://gerrit.wikimedia.org/r/184835 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77b1df67d08097504b3b1026c584063488e03b6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-add mediawiki.toolbar as a dependency of mediawiki.action... - change (mediawiki/core)
TTO has uploaded a new change for review. https://gerrit.wikimedia.org/r/184836 Change subject: Re-add mediawiki.toolbar as a dependency of mediawiki.action.edit .. Re-add mediawiki.toolbar as a dependency of mediawiki.action.edit 89 gadgets across WMF cluster (see http://fpaste.org/169348/12090731/raw/) depend on mediawiki.action.edit, and almost all of them are pulling in this module in order to use the mw.toolbar object (which is actually in the mediawiki.toolbar module). This has already broken some character insert gadgets on wikisource and other phase1 wikis, and will break on a ton of Wikipedias if this dependency is not re-added. Obviously, the real fix is to update the gadgets, but we cannot update 89 gadgets in less than 1 day. Partial revert of Ib2f4633b328cf8090df43b8d286cfcd77f95c5ea. Bug: T86715 Change-Id: Ia9abb8ffc2aafd462d4e960847c57a97dad05e7d --- M resources/Resources.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/36/184836/1 diff --git a/resources/Resources.php b/resources/Resources.php index ad83e16..b2f9b70 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1021,6 +1021,7 @@ 'styles' = 'resources/src/mediawiki.action/mediawiki.action.edit.css', 'dependencies' = array( 'mediawiki.action.edit.styles', + 'mediawiki.toolbar', 'jquery.textSelection', 'jquery.byteLimit', ), -- To view, visit https://gerrit.wikimedia.org/r/184836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9abb8ffc2aafd462d4e960847c57a97dad05e7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.25wmf14 Gerrit-Owner: TTO at.li...@live.com.au ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update multilingual text string - change (wikimedia/wikimania-scholarships)
jenkins-bot has submitted this change and it was merged. Change subject: Update multilingual text string .. Update multilingual text string Bug: T78606 Change-Id: I1ddc575063d4fcd4507bcca854bd4b5442aa0c66 --- M data/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/data/i18n/en.json b/data/i18n/en.json index 617010d..74da41f 100644 --- a/data/i18n/en.json +++ b/data/i18n/en.json @@ -92,7 +92,7 @@ form-participation: Participation in the Wikimedia projects, form-username: Username on your primary Wikimedia project (Please omit the 'User:' prefix before your username):, form-other-usernames: (If applicable) Other Wikimedia usernames used for editing:, - form-multilingual-community: I primarily/only contribute to Commons, Species, Data, Mediawiki, Tool Labs or Incubator, and therefore cannot pick a language community, + form-multilingual-community: I selected as my \Most active Wikimedia project\ Commons, Species, Data, Incubator, MediaWiki, or Tool Labs. Therefore I cannot pick a language community., form-engagement: Please select all of the following that describe how you have engaged in the Wikimedia movement., form-engagement-option1: Active contributor to a Wikimedia project (e.g. Wikipedia, Commons, Wikisource), with at least 50 contributions (edits), form-engagement-option2: Mediawiki code contributor, gadget or other tool-builder for Wikimedia projects, -- To view, visit https://gerrit.wikimedia.org/r/184566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ddc575063d4fcd4507bcca854bd4b5442aa0c66 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/wikimania-scholarships Gerrit-Branch: master Gerrit-Owner: Niharika29 niharikakohl...@gmail.com Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl 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 text for call for submissions - change (wikimedia/wikimania-scholarships)
jenkins-bot has submitted this change and it was merged. Change subject: Update text for call for submissions .. Update text for call for submissions Bug: T86368 Change-Id: I97e4220f38217960d8b343a3d0bcf2d07087b229 --- M data/i18n/en.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/data/i18n/en.json b/data/i18n/en.json index 74da41f..91e007f 100644 --- a/data/i18n/en.json +++ b/data/i18n/en.json @@ -116,8 +116,8 @@ form-attended: Have you attended Wikimania before? If so, in what year or years?, form-prev-scholar: Have you previously attended Wikimania on a WMF scholarship?, form-attending-goals: If so, please use the space below to tell us about something great that happened as a result of attending Wikimania previously? What are your goals for attending Wikimania again?, - form-presenter: I have or will submit a presentation for Wikimania 2015 (a href=\https://wikimania2015.wikimedia.org/wiki/Submissions\; target=\_blank\Call for Participation/a), - form-presentation-topic: If you have or will submit a presentation, please provide a link to your presentation or proposal title:, + form-presenter: Will you submit or have you submitted a presentation for Wikimania 2015? (a href=\https://wikimania2015.wikimedia.org/wiki/Submissions\; target=\_blank\Call for Participation/a), + form-presentation-topic: If you have submitted or will submit a presentation, please provide a link to your presentation or proposal title:, form-howheard: How did you hear about this opportunity?, form-howheard1: Mailing list / e-mail, form-howheard2: Wikimedia project web site (incl. Wikipedia), -- To view, visit https://gerrit.wikimedia.org/r/184564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97e4220f38217960d8b343a3d0bcf2d07087b229 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/wikimania-scholarships Gerrit-Branch: master Gerrit-Owner: Niharika29 niharikakohl...@gmail.com Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl 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 progress bar handling to upload step - change (mediawiki...UploadWizard)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/184688 Change subject: Move progress bar handling to upload step .. Move progress bar handling to upload step Bug: T86679 Change-Id: Id0f0f62a69bb693f454975813c28a5349ff203be --- M resources/controller/uw.controller.Upload.js M resources/mw.UploadWizard.js 2 files changed, 49 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/88/184688/1 diff --git a/resources/controller/uw.controller.Upload.js b/resources/controller/uw.controller.Upload.js index 0153dfa..26fefd9 100644 --- a/resources/controller/uw.controller.Upload.js +++ b/resources/controller/uw.controller.Upload.js @@ -71,5 +71,50 @@ this.ui.empty(); }; + UP.moveTo = function () { + uw.controller.Step.prototype.moveTo.call( this ); + this.progressBar = undefined; + }; + + /** +* Starts the upload progress bar. +*/ + UP.startProgressBar = function () { + $( '#mwe-upwiz-progress' ).show(); + this.progressBar = new mw.GroupProgressBar( '#mwe-upwiz-progress', + mw.message( 'mwe-upwiz-uploading' ).escaped(), + this.uploads, + [ 'stashed' ], + [ 'error' ], + 'transportProgress', + 'transportWeight' ); + this.progressBar.start(); + }; + + /** +* Starts progress bar if there's not an existing one. +*/ + UP.maybeStartProgressBar = function () { + if ( this.progressBarEmptyOrFinished() ) { + this.startProgressBar(); + } + }; + + /** +* Check if there is a vacancy for a new progress bar. +*/ + UP.progressBarEmptyOrFinished = function () { + return !this.progressBar || this.progressBar.finished === true; + }; + + /** +* Update success count on the progress bar. +*/ + UP.updateProgressBarCount = function ( okCount ) { + if ( this.progressBar ) { + this.progressBar.showCount( okCount ); + } + }; + uw.controller.Upload = Upload; }( mediaWiki.uploadWizard, jQuery, OO ) ); diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js index fbe673f..b35c04b 100644 --- a/resources/mw.UploadWizard.js +++ b/resources/mw.UploadWizard.js @@ -332,9 +332,7 @@ } ) .on( 'starting', function () { - if ( !wizard.progressBar || wizard.progressBar.finished === true ) { - wizard.startProgressBar(); - } + wizard.steps.file.maybeStartProgressBar(); wizard.allowCloseWindow = mw.confirmCloseWindow( { message: function () { return mw.message( 'mwe-upwiz-prevent-close', wizard.uploads.length ).escaped(); }, @@ -538,18 +536,6 @@ transitionerDelay: 200, // milliseconds - startProgressBar: function () { - $( '#mwe-upwiz-progress' ).show(); - this.progressBar = new mw.GroupProgressBar( '#mwe-upwiz-progress', - mw.message( 'mwe-upwiz-uploading' ).escaped(), - this.uploads, - [ 'stashed' ], - [ 'error' ], - 'transportProgress', - 'transportWeight' ); - this.progressBar.start(); - }, - /** * Helper function to check whether the upload process is totally * complete and we can safely leave the window. @@ -595,15 +581,7 @@ test: function () { return !wizard.isComplete() wizard.uploads.length 0; } } ); - $( '#mwe-upwiz-progress' ).show(); - this.progressBar = new mw.GroupProgressBar( '#mwe-upwiz-progress', - mw.message( 'mwe-upwiz-uploading' ).escaped(), - this.uploads, - [ 'stashed' ], - [ 'error' ], - 'transportProgress', - 'transportWeight' ); - this.progressBar.start(); + this.steps.file.startProgressBar(); // remove ability to change files
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I5ecdeb5905a852ff09f6b7721ef79556f19a94fd --- M client/includes/api/ApiClientInfo.php M repo/includes/api/ApiWikibase.php M repo/includes/api/ParseValue.php M repo/includes/api/SearchEntities.php 4 files changed, 0 insertions(+), 40 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/api/ApiClientInfo.php b/client/includes/api/ApiClientInfo.php index 7f46cea..1b4ce5b 100644 --- a/client/includes/api/ApiClientInfo.php +++ b/client/includes/api/ApiClientInfo.php @@ -142,17 +142,6 @@ } /** -* @see ApiBase::getVersion -* -* @since 0.4 -* -* @return string -*/ - public function getVersion() { - return __CLASS__ . '-' . WBC_VERSION; - } - - /** * @see ApiBase::getDescription * * @since 0.4 diff --git a/repo/includes/api/ApiWikibase.php b/repo/includes/api/ApiWikibase.php index 86f6b89..8e3ea91 100644 --- a/repo/includes/api/ApiWikibase.php +++ b/repo/includes/api/ApiWikibase.php @@ -209,17 +209,6 @@ } /** -* @see ApiBase::getVersion -* -* @since 0.4 -* -* @return string -*/ - public function getVersion() { - return get_class( $this ) . '-' . WB_VERSION; - } - - /** * Returns the permissions that are required to perform the operation specified by * the parameters. * diff --git a/repo/includes/api/ParseValue.php b/repo/includes/api/ParseValue.php index e236406..b2cebe2 100644 --- a/repo/includes/api/ParseValue.php +++ b/repo/includes/api/ParseValue.php @@ -184,15 +184,4 @@ ); } - /** -* @see ApiBase::getVersion -* -* @since 0.1 -* -* @return string -*/ - public function getVersion() { - return __CLASS__ . '-0.2'; - } - } \ No newline at end of file diff --git a/repo/includes/api/SearchEntities.php b/repo/includes/api/SearchEntities.php index 904126e..6f89ae1 100644 --- a/repo/includes/api/SearchEntities.php +++ b/repo/includes/api/SearchEntities.php @@ -366,11 +366,4 @@ ); } - /** -* @see ApiBase::getVersion -*/ - public function getVersion() { - return __CLASS__ . '-' . WB_VERSION; - } - } -- To view, visit https://gerrit.wikimedia.org/r/184680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5ecdeb5905a852ff09f6b7721ef79556f19a94fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...WikiObjectModel)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ibcc5cb656add3bc0610fd2b91d5a4411679b13fb --- M includes/apis/WOM_GetObjectModel.php M includes/apis/WOM_GetWikiResult.php M includes/apis/WOM_OutputObjectModel.php M includes/apis/WOM_Query.php M includes/apis/WOM_SetObjectModel.php M includes/apis/WOM_WikiObjectApi.php 6 files changed, 0 insertions(+), 24 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/apis/WOM_GetObjectModel.php b/includes/apis/WOM_GetObjectModel.php index 3bc90b8..9111d7b 100644 --- a/includes/apis/WOM_GetObjectModel.php +++ b/includes/apis/WOM_GetObjectModel.php @@ -131,8 +131,4 @@ 'api.php?action=womgettitle=Somepagexpath=//template[@name=SomeTempate]/template_field[@key=templateparam]' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/includes/apis/WOM_GetWikiResult.php b/includes/apis/WOM_GetWikiResult.php index b409a65..17cdef9 100644 --- a/includes/apis/WOM_GetWikiResult.php +++ b/includes/apis/WOM_GetWikiResult.php @@ -127,8 +127,4 @@ // public function mustBePosted() { // return true; // } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/includes/apis/WOM_OutputObjectModel.php b/includes/apis/WOM_OutputObjectModel.php index 51af662..ead1c3a 100644 --- a/includes/apis/WOM_OutputObjectModel.php +++ b/includes/apis/WOM_OutputObjectModel.php @@ -136,8 +136,4 @@ 'api.php?action=womoutputtitle=Somepagexpath=//template[@name=SomeTempate]/template_field[@key=templateparam]' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/includes/apis/WOM_Query.php b/includes/apis/WOM_Query.php index 5db276f..84d8ca2 100644 --- a/includes/apis/WOM_Query.php +++ b/includes/apis/WOM_Query.php @@ -147,8 +147,4 @@ 'api.php?action=womquerytitle=Somepagekey=hello,world' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/includes/apis/WOM_SetObjectModel.php b/includes/apis/WOM_SetObjectModel.php index 8c2bd84..7534179 100644 --- a/includes/apis/WOM_SetObjectModel.php +++ b/includes/apis/WOM_SetObjectModel.php @@ -410,8 +410,4 @@ 'api.php?action=womsettitle=Somepagexpath=//template[@name=SomeTempate]/template_field[@key=templateparam]text=It+works!token=%2B\\' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/includes/apis/WOM_WikiObjectApi.php b/includes/apis/WOM_WikiObjectApi.php index 65526e0..091620f 100644 --- a/includes/apis/WOM_WikiObjectApi.php +++ b/includes/apis/WOM_WikiObjectApi.php @@ -198,8 +198,4 @@ 'api.php?action=womapititle=Somepagexpath=//templatewommap=@name=titles,m||,ptemplate:api=queryprop=info' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibcc5cb656add3bc0610fd2b91d5a4411679b13fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiObjectModel Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] TOC: Replace code for inserting topics to live page - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: TOC: Replace code for inserting topics to live page .. TOC: Replace code for inserting topics to live page The current code has many different ways to choose the position that a topic gets inserted in the page, its very hard to follow and complex. Additionally I have been able to get the current code to insert topics in the wrong order on multiple occasions when the board is set to the 'updated' sorting order. This patch aims to replace that with a solution that maintains a list of topic ids in the order they will be displayed on screen. This order is maintained via Array#sort and callbacks that match the current sort order. Using the decided order this will then walk through that list and insert topics that are not currently in the DOM. This attempts to be smart about where the loadmore links go, using the information in the toc to know if there are unrendered topics. Bug: T85559 Change-Id: I8b46fa69006e5f4ca61e1cad33324e232f68b3f3 --- M includes/Block/TopicList.php M includes/Formatter/TocTopicListFormatter.php M modules/engine/components/board/features/flow-board-loadmore.js M modules/engine/components/board/features/flow-board-navigation.js M tests/phpunit/api/ApiFlowViewTopicListTest.php 5 files changed, 219 insertions(+), 283 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php index 69e846e..e5f7c6d 100644 --- a/includes/Block/TopicList.php +++ b/includes/Block/TopicList.php @@ -201,19 +201,22 @@ $workflowIds[] = $topicListEntry-getId(); } + $workflows = $this-storage-getMulti( 'Workflow', $workflowIds ); + if ( $isTocOnly ) { // We don't need any further data, so we skip the TopicListQuery. - $mapping = array(); - foreach ( $workflowIds as $workflowId ) { - $alphaWorkflowId = $workflowId-getAlphadecimal(); - $mapping[$alphaWorkflowId] = $this-topicRootRevisionCache[$alphaWorkflowId]; + $topicRootRevisionsByWorkflowId = array(); + $workflowsByWorkflowId = array(); + + foreach ( $workflows as $workflow ) { + $alphaWorkflowId = $workflow-getId()-getAlphadecimal(); + $topicRootRevisionsByWorkflowId[$alphaWorkflowId] = $this-topicRootRevisionCache[$alphaWorkflowId]; + $workflowsByWorkflowId[$alphaWorkflowId] = $workflow; } - return $response + $serializer-formatApi( $this-workflow, $mapping, $page ); + return $response + $serializer-formatApi( $this-workflow, $topicRootRevisionsByWorkflowId, $workflowsByWorkflowId, $page ); } - - $workflows = $this-storage-getMulti( 'Workflow', $workflowIds ); /** @var TopicListQuery $query */ $query = Container::get( 'query.topiclist' ); @@ -300,6 +303,8 @@ if ( $sortByOption === 'updated' ) { $findOptions = array( + // TODO: Why is this only set for 'updated' order? Is it redundant + // to storage.topic_list.indexes? 'sort' = 'workflow_last_update_timestamp', 'order' = 'desc', // keep sortby so it can be used later for building links diff --git a/includes/Formatter/TocTopicListFormatter.php b/includes/Formatter/TocTopicListFormatter.php index 6b4467d..65aa0ce 100644 --- a/includes/Formatter/TocTopicListFormatter.php +++ b/includes/Formatter/TocTopicListFormatter.php @@ -23,21 +23,26 @@ * Formats the response * * @param Workflow $listWorkflow Workflow corresponding to board/list of topics -* @param array $mapping Associative array mapping topic ID (in alphadecimal form) +* @param array $topicRootRevisionsByWorkflowId Associative array mapping topic ID (in alphadecimal form) * to PostRevision for the topic root. +* @param array $workflowsByWorkflowId Associative array mapping topic ID (in alphadecimal form) to +* workflow * @param PagerPage $page page from query, to support pagination * * @return array Array formatted for response */ - public function formatApi( Workflow $listWorkflow, $mapping, PagerPage $page ) { + public function formatApi( Workflow $listWorkflow, $topicRootRevisionsByWorkflowId, $workflowsByWorkflowId, PagerPage $page ) { $result = $this-buildEmptyResult(
[MediaWiki-commits] [Gerrit] Special Page Select bug fix and db refactoring - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Special Page Select bug fix and db refactoring .. Special Page Select bug fix and db refactoring The join query works fine with English but breaks with Min Nan, this causes the area option selection to be blank. corrected this. I also refactored the code so that all database calls is outside the special page. Change-Id: Ie4d7cc453fa4a87a4775666b74c9cae0f1c243a7 --- M OmegaWiki/Attribute.php M OmegaWiki/DefinedMeaning.php M OmegaWiki/OmegaWikiDatabaseAPI.php M OmegaWiki/SpecialSelect.php M OmegaWiki/WikiDataAPI.php M OmegaWiki/languages.php 6 files changed, 324 insertions(+), 155 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/OmegaWiki/Attribute.php b/OmegaWiki/Attribute.php index 10365b3..4c1a4b0 100644 --- a/OmegaWiki/Attribute.php +++ b/OmegaWiki/Attribute.php @@ -165,6 +165,10 @@ */ class Attributes { + public function __construct() { + require_once( 'OmegaWikiDatabaseAPI.php' ); + } + /** * @param objectId req'd int the object id * @param option opt'l arr optional array @@ -314,6 +318,68 @@ return array(); } + /** @brief getOptionsAttributeOption Template +* @param attributeId req'd int +* @param optionMeaningId opt'l int/nul +* @param languageId req'd str/arr +* @param option opt'l str +* - multiple multiple lines +* - exists returns boolean, depending whether the queried values exists or not. +* @see use OwDatabaseAPI::getOptionAttributeOptions instead. + */ + public static function getOptionAttributeOptions( $attributeId, $optionMeaningId = null, $languageId, $option = null ) { + $dc = wdGetDataSetContext(); + $dbr = wfGetDB( DB_SLAVE ); + + $conds = array( + 'attribute_id' = $attributeId, + 'language_id' = $languageId, + 'remove_transaction_id' = null + ); + + $vars = 'option_id'; + if ( $optionMeaningId ) { + $conds['option_mid'] = $optionMeaningId; + } else { + $vars = array( $vars, 'option_mid' ); + } + + if ( is_array( $vars ) ) { + if ( $option == 'multiple' ) { + $optionId = $dbr-select( + {$dc}_option_attribute_options, + $vars, + $conds, __METHOD__ + ); + } else { + $optionId = $dbr-selectRow( + {$dc}_option_attribute_options, + $vars, + $conds, __METHOD__ + ); + } + } else { + $optionId = $dbr-selectField( + {$dc}_option_attribute_options, + $vars, + $conds, __METHOD__ + ); + } + + if ( $option == 'exists' ) { + $returnTrue = true; + $returnFalse = false; + } else { + $returnTrue = $optionId; + $returnFalse = null; + } + + if ( $optionId ) { + return $returnTrue; + } + return $returnFalse; + } + /** * @param attributeId req'd int the attribute id * @param languageId opt'l int optional array diff --git a/OmegaWiki/DefinedMeaning.php b/OmegaWiki/DefinedMeaning.php index 2e5b492..b642f06 100644 --- a/OmegaWiki/DefinedMeaning.php +++ b/OmegaWiki/DefinedMeaning.php @@ -331,6 +331,58 @@ require_once( 'OmegaWikiDatabaseAPI.php' ); } + /** @brief spelling via the defined meaning and/or language id +* @return spelling. empty string if not exists +* @see use OwDatabaseAPI::getDefinedMeaningSpelling instead +*/ + public static function getSpelling( $definedMeaning, $languageId = null, $dc = null ) { + if ( is_null( $dc ) ) { + $dc = wdGetDataSetContext(); + } + $dbr = wfGetDB( DB_SLAVE ); + + $tables = array( + 'exp' ={$dc}_expression, + 'synt' = {$dc}_syntrans + ); + $vars = 'spelling'; + $conds = array( + synt.defined_meaning_id =
[MediaWiki-commits] [Gerrit] Recompile handlebars templates - change (mediawiki...Flow)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/184687 Change subject: Recompile handlebars templates .. Recompile handlebars templates It seems the compiled files have gotten out of sync with the templates, although the changes are pretty minor. Just a basic re-compile. Change-Id: I7234cc7b21f250e77484622d38b3432a751e3e66 --- M handlebars/compiled/flow_block_header_edit.handlebars.php M handlebars/compiled/flow_block_topic.handlebars.php M handlebars/compiled/flow_block_topic_lock.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_post.handlebars.php 6 files changed, 91 insertions(+), 83 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/87/184687/1 diff --git a/handlebars/compiled/flow_block_header_edit.handlebars.php b/handlebars/compiled/flow_block_header_edit.handlebars.php index c3995a6..acefa9b 100644 --- a/handlebars/compiled/flow_block_header_edit.handlebars.php +++ b/handlebars/compiled/flow_block_header_edit.handlebars.php @@ -32,12 +32,17 @@ name=preview data-role=action class=mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right flow-js + + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 'encq').'/button button data-flow-interactive-handler=cancelForm data-role=cancel type=reset class=mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right flow-js + + + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 'encq').'/button ';},), 'scopes' = Array($in), diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index dc97df6..0528f77 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -104,85 +104,83 @@ data-flow-api-target= .flow-topic-watchlist data-flow-api-method=POST'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph wikiglyph-star/span'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').''.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph wikiglyph-unstar/span'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'/a /div -';},'flow_moderation_actions_list' = function ($cx, $in) {return 'section'.LCRun3::hbch($cx, 'ifCond', Array(Array(((isset($in['moderationType']) is_array($in)) ? $in['moderationType'] : null),'===','topic'),Array()), $in, function($cx, $in) {return ' - '.((LCRun3::ifvar($cx, ((isset($in['actions']['edit']) is_array($in['actions'])) ? $in['actions']['edit'] : null))) ? 'li class=flow-js'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'a class='.htmlentities((string)((isset($in['moderationMwUiClass']) is_array($in)) ? $in['moderationMwUiClass'] : null), ENT_QUOTES, 'UTF-8').' mw-ui-quiet - href='.htmlentities((string)((isset($in['actions']['edit']['url']) is_array($in['actions']['edit'])) ? $in['actions']['edit']['url'] : null), ENT_QUOTES, 'UTF-8').' - title='.htmlentities((string)((isset($in['actions']['edit']['title']) is_array($in['actions']['edit'])) ? $in['actions']['edit']['title'] : null), ENT_QUOTES, 'UTF-8').' - data-flow-interactive-handler=apiRequest - data-flow-api-handler=activateEditTitle - data-flow-api-target= .flow-topic-titlebar - '.((LCRun3::ifvar($cx, ((isset($in['moderationIcons']) is_array($in)) ? $in['moderationIcons'] : null))) ? 'span class=wikiglyph wikiglyph-pencil/span ' : '').''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((isset($in['moderationType']) is_array($in)) ? $in['moderationType'] : null),'-action-edit-title'),Array()), 'raw')),Array()), 'encq').'/a'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'/li' : '').''.((LCRun3::ifvar($cx, ((isset($in['links']['topic-history']) is_array($in['links'])) ? $in['links']['topic-history'] : null))) ? 'li'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'a class='.htmlentities((string)((isset($in['moderationMwUiClass']) is_array($in)) ? $in['moderationMwUiClass'] : null), ENT_QUOTES, 'UTF-8').' mw-ui-quiet -
[MediaWiki-commits] [Gerrit] Add dependency to texlive-generic-extra - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Add dependency to texlive-generic-extra .. Add dependency to texlive-generic-extra Without iftex some commands from teubner like for instance $\\varstigma$ do not work Bug: T86309 Change-Id: I84f649b55a50b033ae3737e8b93ec96bb058b69c --- M puppet/modules/role/manifests/math.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/manifests/math.pp b/puppet/modules/role/manifests/math.pp index 0b89dec..67b4b73 100644 --- a/puppet/modules/role/manifests/math.pp +++ b/puppet/modules/role/manifests/math.pp @@ -44,6 +44,7 @@ 'texlive-pictures', 'texlive-pstricks', 'texlive-publishers', +'texlive-generic-extra' ]: } -- To view, visit https://gerrit.wikimedia.org/r/184123 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I84f649b55a50b033ae3737e8b93ec96bb058b69c Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@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] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...OnlineStatusBar)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ib327a72d74d395c4a133555223e0cba1564920f0 --- M OnlineStatusBar.api.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/OnlineStatusBar.api.php b/OnlineStatusBar.api.php index 0d2a52c..5caed2b 100644 --- a/OnlineStatusBar.api.php +++ b/OnlineStatusBar.api.php @@ -60,8 +60,4 @@ 'api.php?action=queryprop=onlinestatusonlinestatususer=Petrb', ); } - - public function getVersion() { - return __CLASS__ . ': $Id: OnlineStatusBar.api.php petrb $'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib327a72d74d395c4a133555223e0cba1564920f0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OnlineStatusBar Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...EtherEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I5f8660836082d7c6cb763ef6469a8fb88b35a5ea --- M api/CreateNewPadFromPage.php M api/DeleteEtherPad.php M api/EtherPadAuth.php M api/ForkEtherPad.php M api/GetContribs.php M api/GetCurrentUsers.php M api/GetEtherPadText.php M api/GetOtherEtherpads.php M api/KickFromPad.php 9 files changed, 0 insertions(+), 36 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/CreateNewPadFromPage.php b/api/CreateNewPadFromPage.php index 8cca5cd..bf5c12e 100644 --- a/api/CreateNewPadFromPage.php +++ b/api/CreateNewPadFromPage.php @@ -67,9 +67,5 @@ 'api.php?action=CreateNewPadFromPagepageTitle=Main_Page', ); } - - public function getVersion() { - return __CLASS__ . ': 0.3.0'; - } // @codeCoverageIgnoreEnd } diff --git a/api/DeleteEtherPad.php b/api/DeleteEtherPad.php index b172a33..9433c0e 100644 --- a/api/DeleteEtherPad.php +++ b/api/DeleteEtherPad.php @@ -62,9 +62,5 @@ 'api.php?action=ApiEtherEditorpadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.2.1'; - } // @codeCoverageIgnoreEnd } diff --git a/api/EtherPadAuth.php b/api/EtherPadAuth.php index 460c264..c56626d 100644 --- a/api/EtherPadAuth.php +++ b/api/EtherPadAuth.php @@ -55,10 +55,6 @@ 'api.php?action=EtherPadAuthpadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.2.0'; - } // @codeCoverageIgnoreEnd } diff --git a/api/ForkEtherPad.php b/api/ForkEtherPad.php index e456633..77170f3 100644 --- a/api/ForkEtherPad.php +++ b/api/ForkEtherPad.php @@ -67,9 +67,5 @@ 'api.php?action=ApiEtherEditorpadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.3.0'; - } // @codeCoverageIgnoreEnd } diff --git a/api/GetContribs.php b/api/GetContribs.php index 9c2c066..dc3539b 100644 --- a/api/GetContribs.php +++ b/api/GetContribs.php @@ -54,10 +54,6 @@ 'api.php?action=GetContribspadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.3.0'; - } // @codeCoverageIgnoreEnd } diff --git a/api/GetCurrentUsers.php b/api/GetCurrentUsers.php index 16f4fb7..61bc413 100644 --- a/api/GetCurrentUsers.php +++ b/api/GetCurrentUsers.php @@ -54,10 +54,6 @@ 'api.php?action=GetCurrentUserspadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.4.0'; - } // @codeCoverageIgnoreEnd } diff --git a/api/GetEtherPadText.php b/api/GetEtherPadText.php index e7a9b9b..46697fc 100644 --- a/api/GetEtherPadText.php +++ b/api/GetEtherPadText.php @@ -54,10 +54,6 @@ 'api.php?action=GetEtherPadTextpadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.2.1'; - } // @codeCoverageIgnoreEnd } diff --git a/api/GetOtherEtherpads.php b/api/GetOtherEtherpads.php index 4546173..5c39c89 100644 --- a/api/GetOtherEtherpads.php +++ b/api/GetOtherEtherpads.php @@ -54,9 +54,5 @@ 'api.php?action=GetOtherEtherpadspadId=7', ); } - - public function getVersion() { - return __CLASS__ . ': 0.3.0'; - } // @codeCoverageIgnoreEnd } diff --git a/api/KickFromPad.php b/api/KickFromPad.php index 55a6269..58afd8e 100644 --- a/api/KickFromPad.php +++ b/api/KickFromPad.php @@ -62,9 +62,5 @@ 'api.php?action=KickFromPadpadId=7user=Trollolol657', ); } - - public function getVersion() { - return __CLASS__ . ': 0.2.2'; - } // @codeCoverageIgnoreEnd } -- To view, visit https://gerrit.wikimedia.org/r/184661 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f8660836082d7c6cb763ef6469a8fb88b35a5ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EtherEditor Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...Maps)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Iee694902a550563fa60c8d2fc27fdc89cb6132ab --- M includes/api/ApiGeocode.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiGeocode.php b/includes/api/ApiGeocode.php index 5ddd376..bb43cd6 100644 --- a/includes/api/ApiGeocode.php +++ b/includes/api/ApiGeocode.php @@ -92,8 +92,4 @@ ); } - public function getVersion() { - return __CLASS__ . '-' . Maps_VERSION; - } - } -- To view, visit https://gerrit.wikimedia.org/r/184665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee694902a550563fa60c8d2fc27fdc89cb6132ab Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Maps Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...Push)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I6efad28fdb31943521ca5767417e7d46db619c3b --- M api/ApiPush.php M api/ApiPushImages.php 2 files changed, 0 insertions(+), 8 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiPush.php b/api/ApiPush.php index 4783b85..8230b7c 100644 --- a/api/ApiPush.php +++ b/api/ApiPush.php @@ -404,8 +404,4 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - } diff --git a/api/ApiPushImages.php b/api/ApiPushImages.php index 0cfddef..6f7a6ad 100644 --- a/api/ApiPushImages.php +++ b/api/ApiPushImages.php @@ -363,8 +363,4 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - } -- To view, visit https://gerrit.wikimedia.org/r/184669 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6efad28fdb31943521ca5767417e7d46db619c3b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Push Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...Persona)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I372cbbd7dcb2496229196cc3380ec46a52504ea5 --- M ApiPersona.php 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiPersona.php b/ApiPersona.php index 21c5c70..a062006 100644 --- a/ApiPersona.php +++ b/ApiPersona.php @@ -19,9 +19,6 @@ */ class ApiPersona extends ApiBase { - function getVersion() { - return __CLASS__ . ': $Id$'; - } function getDescription() { return 'Process Persona login requests and login user if valid.'; -- To view, visit https://gerrit.wikimedia.org/r/184668 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I372cbbd7dcb2496229196cc3380ec46a52504ea5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Persona Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...RPED)
Legoktm has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I2e6424040af7e136041ee51a27b5878e223edfca --- M ApiRPED.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Verified; Looks good to me, approved diff --git a/ApiRPED.php b/ApiRPED.php index 46aa6f3..dfbf7cb 100644 --- a/ApiRPED.php +++ b/ApiRPED.php @@ -97,10 +97,6 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - public function displayRestrictionError(){ echo(Access denied.); } -- To view, visit https://gerrit.wikimedia.org/r/184671 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2e6424040af7e136041ee51a27b5878e223edfca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RPED Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Recompile handlebars templates - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Recompile handlebars templates .. Recompile handlebars templates It seems the compiled files have gotten out of sync with the templates, although the changes are pretty minor. Just a basic re-compile. Change-Id: I7234cc7b21f250e77484622d38b3432a751e3e66 --- M handlebars/compiled/flow_block_header_edit.handlebars.php M handlebars/compiled/flow_block_topic.handlebars.php M handlebars/compiled/flow_block_topic_lock.handlebars.php M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php M handlebars/compiled/flow_post.handlebars.php 6 files changed, 91 insertions(+), 83 deletions(-) Approvals: Mattflaschen: Looks good to me, approved jenkins-bot: Verified diff --git a/handlebars/compiled/flow_block_header_edit.handlebars.php b/handlebars/compiled/flow_block_header_edit.handlebars.php index c3995a6..acefa9b 100644 --- a/handlebars/compiled/flow_block_header_edit.handlebars.php +++ b/handlebars/compiled/flow_block_header_edit.handlebars.php @@ -32,12 +32,17 @@ name=preview data-role=action class=mw-ui-button mw-ui-progressive mw-ui-quiet mw-ui-flush-right flow-js + + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-preview'),Array()), 'encq').'/button button data-flow-interactive-handler=cancelForm data-role=cancel type=reset class=mw-ui-button mw-ui-destructive mw-ui-quiet mw-ui-flush-right flow-js + + + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-cancel'),Array()), 'encq').'/button ';},), 'scopes' = Array($in), diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index dc97df6..0528f77 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -104,85 +104,83 @@ data-flow-api-target= .flow-topic-watchlist data-flow-api-method=POST'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph wikiglyph-star/span'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').''.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph wikiglyph-unstar/span'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'/a /div -';},'flow_moderation_actions_list' = function ($cx, $in) {return 'section'.LCRun3::hbch($cx, 'ifCond', Array(Array(((isset($in['moderationType']) is_array($in)) ? $in['moderationType'] : null),'===','topic'),Array()), $in, function($cx, $in) {return ' - '.((LCRun3::ifvar($cx, ((isset($in['actions']['edit']) is_array($in['actions'])) ? $in['actions']['edit'] : null))) ? 'li class=flow-js'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'a class='.htmlentities((string)((isset($in['moderationMwUiClass']) is_array($in)) ? $in['moderationMwUiClass'] : null), ENT_QUOTES, 'UTF-8').' mw-ui-quiet - href='.htmlentities((string)((isset($in['actions']['edit']['url']) is_array($in['actions']['edit'])) ? $in['actions']['edit']['url'] : null), ENT_QUOTES, 'UTF-8').' - title='.htmlentities((string)((isset($in['actions']['edit']['title']) is_array($in['actions']['edit'])) ? $in['actions']['edit']['title'] : null), ENT_QUOTES, 'UTF-8').' - data-flow-interactive-handler=apiRequest - data-flow-api-handler=activateEditTitle - data-flow-api-target= .flow-topic-titlebar - '.((LCRun3::ifvar($cx, ((isset($in['moderationIcons']) is_array($in)) ? $in['moderationIcons'] : null))) ? 'span class=wikiglyph wikiglyph-pencil/span ' : '').''.LCRun3::ch($cx, 'l10n', Array(Array(LCRun3::ch($cx, 'concat', Array(Array('flow-',((isset($in['moderationType']) is_array($in)) ? $in['moderationType'] : null),'-action-edit-title'),Array()), 'raw')),Array()), 'encq').'/a'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'/li' : '').''.((LCRun3::ifvar($cx, ((isset($in['links']['topic-history']) is_array($in['links'])) ? $in['links']['topic-history'] : null))) ? 'li'.htmlentities((string)((isset($in['null']) is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'a class='.htmlentities((string)((isset($in['moderationMwUiClass']) is_array($in)) ? $in['moderationMwUiClass'] : null), ENT_QUOTES, 'UTF-8').' mw-ui-quiet -
[MediaWiki-commits] [Gerrit] Cleared out some icon cruft. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Cleared out some icon cruft. .. Cleared out some icon cruft. Images.xcassets was referencing some icon resolutions which it said were unused. Removed them and updated the icon generation script to no longer make them. Change-Id: I9db18a0b1bf385b89fca142d190ec96134c343be --- M scripts/icon-svgs-to-pngs.sh M wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json D wikipedia/Images.xcassets/AppIcon.appiconset/icon180-1.png D wikipedia/Images.xcassets/AppIcon.appiconset/icon87-1.png D wikipedia/Images.xcassets/AppIcon.appiconset/icon90.png 5 files changed, 4 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved Bgerstle: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/scripts/icon-svgs-to-pngs.sh b/scripts/icon-svgs-to-pngs.sh index e4bf258..6c6fca9 100755 --- a/scripts/icon-svgs-to-pngs.sh +++ b/scripts/icon-svgs-to-pngs.sh @@ -1,8 +1,8 @@ #!/bin/sh -ruby -e '[29,40,50,57,58,72,76,80,87,90,100,114,120,144,152,180].each { |x| `/Applications/Inkscape.app/Contents/Resources/bin/inkscape --export-png wikipedia/Images.xcassets/AppIcon.appiconset/icon#{x}.png -w #{x} '$SCRIPT_INPUT_FILE_0'` }' +ruby -e '[29,40,50,57,58,72,76,80,87,100,114,120,144,152,180].each { |x| `/Applications/Inkscape.app/Contents/Resources/bin/inkscape --export-png wikipedia/Images.xcassets/AppIcon.appiconset/icon#{x}.png -w #{x} '$SCRIPT_INPUT_FILE_0'` }' -ruby -e '[87,120,180].each { |x| `/Applications/Inkscape.app/Contents/Resources/bin/inkscape --export-png wikipedia/Images.xcassets/AppIcon.appiconset/icon#{x}-1.png -w #{x} '$SCRIPT_INPUT_FILE_0'` }' +ruby -e '[120].each { |x| `/Applications/Inkscape.app/Contents/Resources/bin/inkscape --export-png wikipedia/Images.xcassets/AppIcon.appiconset/icon#{x}-1.png -w #{x} '$SCRIPT_INPUT_FILE_0'` }' ruby -e '[120,240,360].each { |x| `/Applications/Inkscape.app/Contents/Resources/bin/inkscape --export-png wikipedia/Images.xcassets/RecentPagesEmpty.imageset/recent#{x}.png -w #{x} '$SCRIPT_INPUT_FILE_1'` }' diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json b/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json index ce7c064..c6ce380 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json @@ -15,7 +15,7 @@ { size : 29x29, idiom : iphone, - filename : icon87-1.png, + filename : icon87.png, scale : 3x }, { @@ -51,7 +51,7 @@ { size : 60x60, idiom : iphone, - filename : icon180-1.png, + filename : icon180.png, scale : 3x }, { diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon180-1.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon180-1.png deleted file mode 100644 index 907203d..000 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon180-1.png +++ /dev/null Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon87-1.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon87-1.png deleted file mode 100644 index 42a94b5..000 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon87-1.png +++ /dev/null Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon90.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon90.png deleted file mode 100644 index 5aab3f4..000 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon90.png +++ /dev/null Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/184555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9db18a0b1bf385b89fca142d190ec96134c343be Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@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] Routine simplification - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Routine simplification .. Routine simplification Change-Id: I1252ef8261ac20d69dfd4e4b380ff2d3c79a63ce --- M OmegaWiki/SpecialSuggest.php M OmegaWiki/WikiDataAPI.php 2 files changed, 5 insertions(+), 19 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/OmegaWiki/SpecialSuggest.php b/OmegaWiki/SpecialSuggest.php index 39402f4..b92a1d3 100644 --- a/OmegaWiki/SpecialSuggest.php +++ b/OmegaWiki/SpecialSuggest.php @@ -283,21 +283,10 @@ $classMids = $wgDefaultClassMids ; if ( ( !is_null($syntransId) ) ( !is_null($wgIso639_3CollectionId)) ) { - // find the language of the syntrans and add attributes of that language by adding the language DM to the list of default classes + // find the language of the syntrans and add attributes of that language + // by adding the language DM to the list of default classes // this first query returns the language_id - $expressionId = $this-dbr-selectField( - $this-dc . '_syntrans', - 'expression_id', - array( 'syntrans_sid' = $syntransId ), - __METHOD__ - ); - - $language_id = $this-dbr-selectField( - $this-dc . '_expression', - 'language_id', - array( 'expression_id' = $expressionId ), - __METHOD__ - ); + $language_id = OwDatabaseAPI::getLanguageId( array( 'sid' = $syntransId ) ); // this second query finds the DM number for a given language_id $language_dm_id = $this-dbr-selectField( diff --git a/OmegaWiki/WikiDataAPI.php b/OmegaWiki/WikiDataAPI.php index 30c6443..638ea99 100644 --- a/OmegaWiki/WikiDataAPI.php +++ b/OmegaWiki/WikiDataAPI.php @@ -2530,9 +2530,7 @@ // we can get rid of using the syntrans table $cond = array( 'spelling' = $spelling, - 'exp.expression_id = synt.expression_id', - 'exp.remove_transaction_id' = null, - 'synt.remove_transaction_id' = null + 'exp.remove_transaction_id' = null ); if ( ! empty( $langsubset ) ) { $cond['language_id'] = $langsubset; @@ -2540,8 +2538,7 @@ $queryResult = $dbr-select( array( - 'exp' = {$dc}_expression, - 'synt' = {$dc}_syntrans + 'exp' = {$dc}_expression ), array( 'exp.expression_id', 'spelling', 'language_id' ), $cond, -- To view, visit https://gerrit.wikimedia.org/r/139571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1252ef8261ac20d69dfd4e4b380ff2d3c79a63ce Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikiLexicalData Gerrit-Branch: master Gerrit-Owner: Hiong3-eng5 hiong3.e...@gmail.com Gerrit-Reviewer: Kipcool kipmas...@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] Fix flake8 issues - change (operations...labsdb-auditor)
Yuvipanda has submitted this change and it was merged. Change subject: Fix flake8 issues .. Fix flake8 issues Change-Id: Ie6556e88a98e9fae9c2bfbfb1df68ad8ec97fe79 --- M labsdb/auditor/reports/viewdiffs.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/labsdb/auditor/reports/viewdiffs.py b/labsdb/auditor/reports/viewdiffs.py index d3f5460..cd56bba 100644 --- a/labsdb/auditor/reports/viewdiffs.py +++ b/labsdb/auditor/reports/viewdiffs.py @@ -100,6 +100,7 @@ # Since a lot of definers are the same, this memoization should speed things up cache = {} + def _table_from_definer(sql, viewname): Build a Table object given a cleaned up SQL statement that defines the view -- To view, visit https://gerrit.wikimedia.org/r/184691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6556e88a98e9fae9c2bfbfb1df68ad8ec97fe79 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/labsdb-auditor Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Special Page Add From External API - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Special Page Add From External API .. Special Page Add From External API This is a special page to add data to OmegaWiki via external APIs. Currently supports the Wordnik API. Since the Wordnik API is not part of the MediaWiki software, each developer who wish to use Wordnik needs to install it themselves. Kindly read the file README.md from extensions/WikiLexicalData/external folder how to activate the Wordnik API. Patch 2. i18n lowercased some words. Change-Id: I36b6e537d8ee518a7bb2146bf09327bc2161ccf0 --- M OmegaWiki/Expression.php M OmegaWiki/OmegaWikiDatabaseAPI.php M OmegaWiki/WikiDataAPI.php M OmegaWiki/forms.php M Wikidata.hooks.php A external/README.md M i18n/lexicaldata/en.json M i18n/lexicaldata/qqq.json M includes/setup/OWSpecials.php A includes/specials/ExternalWordnik.php A includes/specials/SpecialOWAddFromExternalAPI.php A resources/omegawiki-addExtAPI.js 12 files changed, 1,464 insertions(+), 127 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/OmegaWiki/Expression.php b/OmegaWiki/Expression.php index 7037823..1b11c03 100644 --- a/OmegaWiki/Expression.php +++ b/OmegaWiki/Expression.php @@ -73,10 +73,15 @@ $expressionId = newObjectId( {$dc}_expression ); if ( isset( $options['updateId'] ) ) { - $updateId = $options['updateId']; + if ( $options['updateId'] === -1 ) { + $updateId = getUpdateTransactionId(); + } else { + $updateId = $options['updateId']; + } } else { $updateId = getUpdateTransactionId(); } + $dbw-insert( {$dc}_expression, array( 'expression_id' = $expressionId, @@ -88,6 +93,129 @@ return $expressionId; } + /** @ core getId function +* +* @param spelling req'd str +* @param languageId opt'l int +* @param option opt'l arr +* +* @return str expression id for the languageId indicated. +* @return arr The first expressionId/languageId [array( expessionId, languageId )] when languageId is skipped. +* options: +* dc str The data set +* +* @note Though you can access this function, it is highly recommended that you +* use the static function OwDatabaseAPI::getTheExpressionId instead. +*/ + public static function getId( $spelling, $languageId = null, $options = array() ) { + if ( isset( $options['dc'] ) ) { + $dc = $options['dc']; + } else { + $dc = wdGetDataSetContext(); + } + $dbr = wfGetDB( DB_SLAVE ); + + $opt = array( + 'spelling' = $spelling, + 'remove_transaction_id' = null + ); + + // assumes that languageId does not exists + $var = array( 'expression_id', 'language_id' ); + // then checks if the languageId does exists + if ( $languageId ) { + $opt['language_id'] = $languageId; + $var = 'expression_id'; + // selectField returns only one field. false if not exists. + $expression = $dbr-selectField( + $dc . '_expression', $var, $opt, __METHOD__ + ); + } else { + // selectRow returns only one array. false if not exists. + $expression = $dbr-selectRow( + $dc . '_expression', $var, $opt, __METHOD__ + ); + } + + // if expression exists, returns either an array or a string + if ( $expression ) { + return $expression; + } + return null; + + } + + /** @ core getMeaningIds function +* +* @param spelling req'd str +* @param languageId opt'l arr +* @param option opt'l arr +* +* @return arr list of defined meaning ids. +* @return arr if empty, an empty array. +* options: +* dc str The data set +* +* @note Though you can access this function, it is highly recommended that you +* use the static function OwDatabaseAPI::getTheExpressionMeaningIds instead. +*/ + public static function getMeaningIds( $spelling, $languageIds = array(), $options = array() ) { +
[MediaWiki-commits] [Gerrit] Add missing m.{project}.org entries - change (operations/dns)
Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/184690 Change subject: Add missing m.{project}.org entries .. Add missing m.{project}.org entries Bug: T78421 Change-Id: Icaa35631c56c429f8e04ed4df007c69e03c61016 --- M templates/wikibooks.org M templates/wikinews.org M templates/wikiquote.org M templates/wikiversity.org M templates/wikivoyage.org M templates/wiktionary.org 6 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/90/184690/1 diff --git a/templates/wikibooks.org b/templates/wikibooks.org index 3dcbdfb..1f52256 100644 --- a/templates/wikibooks.org +++ b/templates/wikibooks.org @@ -45,3 +45,5 @@ shop600 IN DYNA geoip!text-addrs store 600 IN DYNA geoip!text-addrs +; Mobile +m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikinews.org b/templates/wikinews.org index ee6cf05..785f606 100644 --- a/templates/wikinews.org +++ b/templates/wikinews.org @@ -44,3 +44,6 @@ donate 600 IN DYNA geoip!text-addrs shop600 IN DYNA geoip!text-addrs store 600 IN DYNA geoip!text-addrs + +; Mobile +m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikiquote.org b/templates/wikiquote.org index 33408a6..132d5a4 100644 --- a/templates/wikiquote.org +++ b/templates/wikiquote.org @@ -44,3 +44,6 @@ donate 600 IN DYNA geoip!text-addrs shop600 IN DYNA geoip!text-addrs store 600 IN DYNA geoip!text-addrs + +; Mobile +m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikiversity.org b/templates/wikiversity.org index e61bf93..c388f1f 100644 --- a/templates/wikiversity.org +++ b/templates/wikiversity.org @@ -46,3 +46,6 @@ www.donate 600 IN DYNA geoip!text-addrs shop600 IN DYNA geoip!text-addrs store 600 IN DYNA geoip!text-addrs + +; Mobile +m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wikivoyage.org b/templates/wikivoyage.org index 934e627..0ac51ee 100644 --- a/templates/wikivoyage.org +++ b/templates/wikivoyage.org @@ -39,3 +39,5 @@ ; All languages will automatically be included here {{ geolanglist('text-addrs') }} +; Mobile +m 600 IN DYNA geoip!mobile-addrs diff --git a/templates/wiktionary.org b/templates/wiktionary.org index ffa6721..9205be4 100644 --- a/templates/wiktionary.org +++ b/templates/wiktionary.org @@ -44,3 +44,6 @@ donate 600 IN DYNA geoip!text-addrs shop600 IN DYNA geoip!text-addrs store 600 IN DYNA geoip!text-addrs + +; Mobile +m 600 IN DYNA geoip!mobile-addrs -- To view, visit https://gerrit.wikimedia.org/r/184690 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaa35631c56c429f8e04ed4df007c69e03c61016 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Glaisher glaisher.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...WebPlatformAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I54a552f413ea42264620092c177cca0039898a31 --- M includes/api/ApiWebPlatformAuth.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiWebPlatformAuth.php b/includes/api/ApiWebPlatformAuth.php index f67ae33..dd7ceb7 100644 --- a/includes/api/ApiWebPlatformAuth.php +++ b/includes/api/ApiWebPlatformAuth.php @@ -135,8 +135,4 @@ public function getHelpUrls() { return 'https://www.webplatform.org'; } - - public function getVersion() { - return __CLASS__ . ': $Id: ApiWebPlatformAuth.php 6651 2012-09-30 22:33:29Z mglaser $'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184678 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54a552f413ea42264620092c177cca0039898a31 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WebPlatformAuth Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Promote lead images to Production. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Promote lead images to Production. .. Promote lead images to Production. Change-Id: Ife65242a2bc0851547c2eaaebe70f79889044c61 --- M wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java index c4b4cfb..fd3ef28 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java @@ -287,8 +287,7 @@ public void beginLayout(OnLeadImageLayoutListener listener) { String thumbUrl = parentFragment.getPage().getPageProperties().getLeadImageUrl(); -if (!WikipediaApp.getInstance().showImages() || displayHeight MIN_SCREEN_HEIGHT_DP -|| WikipediaApp.getInstance().getReleaseType() == WikipediaApp.RELEASE_PROD) { +if (!WikipediaApp.getInstance().showImages() || displayHeight MIN_SCREEN_HEIGHT_DP) { // disable the lead image completely leadImagesEnabled = false; } else { -- To view, visit https://gerrit.wikimedia.org/r/184682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ife65242a2bc0851547c2eaaebe70f79889044c61 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@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] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...Ratings)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ic36a9a70662cca4b067409d027395af08b15c95c --- M api/ApiDoRating.php M api/ApiQueryRatings.php 2 files changed, 1 insertion(+), 9 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiDoRating.php b/api/ApiDoRating.php index 0c919db..913dd1b 100644 --- a/api/ApiDoRating.php +++ b/api/ApiDoRating.php @@ -232,10 +232,6 @@ public function needsToken() { return 'csrf'; - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } + } } diff --git a/api/ApiQueryRatings.php b/api/ApiQueryRatings.php index 9bc5267..83ac99d 100644 --- a/api/ApiQueryRatings.php +++ b/api/ApiQueryRatings.php @@ -145,9 +145,5 @@ 'api.php?action=querylist=ratingsqrpage=Main_pageqruser=0:0:0:0:0:0:0:1', ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184670 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic36a9a70662cca4b067409d027395af08b15c95c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Ratings Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Promote new search features to Production. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Promote new search features to Production. .. Promote new search features to Production. Change-Id: Ie039b4c31f034fabcf2634da45009d3a05bdbf18 --- M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 1 file changed, 14 insertions(+), 31 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index db4e4a4..4334659 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -250,16 +250,11 @@ openSearch(); } -// TODO: remove this when ready for production -if (app.getReleaseType() == WikipediaApp.RELEASE_PROD) { +if (TextUtils.isEmpty(term)) { +showPanel(PANEL_RECENT_SEARCHES); +} else if (getActivePanel() == PANEL_RECENT_SEARCHES) { +//start with title search... showPanel(PANEL_TITLE_SEARCH); -} else { -if (TextUtils.isEmpty(term)) { -showPanel(PANEL_RECENT_SEARCHES); -} else if (getActivePanel() == PANEL_RECENT_SEARCHES) { -//start with title search... -showPanel(PANEL_TITLE_SEARCH); -} } if (!TextUtils.isEmpty(lastSearchedText) !TextUtils.isEmpty(term)) { @@ -296,24 +291,16 @@ // show ourselves searchContainerView.setVisibility(View.VISIBLE); -// TODO: remove this when ready for production -if (app.getReleaseType() == WikipediaApp.RELEASE_PROD) { -fullSearchDisabled = true; -//show title search by default... -showPanel(PANEL_TITLE_SEARCH); +// find out whether full-text search has been disabled remotely, and +// hide the title/full switcher buttons accordingly. +fullSearchDisabled = app.getRemoteConfig().getConfig() +.optBoolean(disableFullTextSearch, false); -} else { -// find out whether full-text search has been disabled remotely, and -// hide the title/full switcher buttons accordingly. -fullSearchDisabled = app.getRemoteConfig().getConfig() -.optBoolean(disableFullTextSearch, false); - -// if the current search string is empty, then it's a fresh start, so we'll show -// recent searches by default. Otherwise, the currently-selected panel should already -// be visible, so we don't need to do anything. -if (TextUtils.isEmpty(lastSearchedText)) { -showPanel(PANEL_RECENT_SEARCHES); -} +// if the current search string is empty, then it's a fresh start, so we'll show +// recent searches by default. Otherwise, the currently-selected panel should already +// be visible, so we don't need to do anything. +if (TextUtils.isEmpty(lastSearchedText)) { +showPanel(PANEL_RECENT_SEARCHES); } } @@ -326,11 +313,7 @@ // hide ourselves searchContainerView.setVisibility(View.GONE); Utils.hideSoftKeyboard(getActivity()); - -// TODO: remove this when ready for production -if (app.getReleaseType() != WikipediaApp.RELEASE_PROD) { -addRecentSearch(lastSearchedText); -} +addRecentSearch(lastSearchedText); } /** -- To view, visit https://gerrit.wikimedia.org/r/184683 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie039b4c31f034fabcf2634da45009d3a05bdbf18 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@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] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...Contest)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I79840a6093afbfc97e668aa3200ade72a15b784d --- M api/ApiDeleteContest.php M api/ApiMailContestants.php M api/ApiQueryChallenges.php M api/ApiQueryContestComments.php M api/ApiQueryContestants.php M api/ApiQueryContests.php 6 files changed, 0 insertions(+), 40 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiDeleteContest.php b/api/ApiDeleteContest.php index cf85e38..3e85308 100644 --- a/api/ApiDeleteContest.php +++ b/api/ApiDeleteContest.php @@ -98,8 +98,4 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - } diff --git a/api/ApiMailContestants.php b/api/ApiMailContestants.php index d782319..6df6346 100644 --- a/api/ApiMailContestants.php +++ b/api/ApiMailContestants.php @@ -189,8 +189,4 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - } diff --git a/api/ApiQueryChallenges.php b/api/ApiQueryChallenges.php index 7ae6e82..d016a65 100644 --- a/api/ApiQueryChallenges.php +++ b/api/ApiQueryChallenges.php @@ -63,12 +63,4 @@ 'api.php?action=querylist=challengeschcontestid=42chprops=id|contest_id|title', ); } - - /** -* (non-PHPdoc) -* @see includes/api/ApiBase#getVersion() -*/ - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/api/ApiQueryContestComments.php b/api/ApiQueryContestComments.php index a3b7075..52f6760 100644 --- a/api/ApiQueryContestComments.php +++ b/api/ApiQueryContestComments.php @@ -63,12 +63,4 @@ 'api.php?action=querylist=contestcommentscocoprops=id|textcocouser_id=42', ); } - - /** -* (non-PHPdoc) -* @see includes/api/ApiBase#getVersion() -*/ - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/api/ApiQueryContestants.php b/api/ApiQueryContestants.php index c8a9bdd..d632faa 100644 --- a/api/ApiQueryContestants.php +++ b/api/ApiQueryContestants.php @@ -63,12 +63,4 @@ 'api.php?action=querylist=contestantsctprops=id|ratingctcontest_id=42', ); } - - /** -* (non-PHPdoc) -* @see includes/api/ApiBase#getVersion() -*/ - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/api/ApiQueryContests.php b/api/ApiQueryContests.php index 246d2bb..10136b4 100644 --- a/api/ApiQueryContests.php +++ b/api/ApiQueryContests.php @@ -63,12 +63,4 @@ 'api.php?action=querylist=contestscostatus=1', ); } - - /** -* (non-PHPdoc) -* @see includes/api/ApiBase#getVersion() -*/ - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184657 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79840a6093afbfc97e668aa3200ade72a15b784d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Contest Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Fix flake8 issues - change (operations...labsdb-auditor)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/184691 Change subject: Fix flake8 issues .. Fix flake8 issues Change-Id: Ie6556e88a98e9fae9c2bfbfb1df68ad8ec97fe79 --- M labsdb/auditor/reports/viewdiffs.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/labsdb-auditor refs/changes/91/184691/1 diff --git a/labsdb/auditor/reports/viewdiffs.py b/labsdb/auditor/reports/viewdiffs.py index d3f5460..cd56bba 100644 --- a/labsdb/auditor/reports/viewdiffs.py +++ b/labsdb/auditor/reports/viewdiffs.py @@ -100,6 +100,7 @@ # Since a lot of definers are the same, this memoization should speed things up cache = {} + def _table_from_definer(sql, viewname): Build a Table object given a cleaned up SQL statement that defines the view -- To view, visit https://gerrit.wikimedia.org/r/184691 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6556e88a98e9fae9c2bfbfb1df68ad8ec97fe79 Gerrit-PatchSet: 1 Gerrit-Project: operations/software/labsdb-auditor Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...Configure)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Iec1e98d23fa499e80a8b056bba87fd649c4a8558 --- M Configure.api.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Configure.api.php b/Configure.api.php index 036086d..5a29e25 100644 --- a/Configure.api.php +++ b/Configure.api.php @@ -439,8 +439,4 @@ 'api.php?action=configure', ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec1e98d23fa499e80a8b056bba87fd649c4a8558 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Configure Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Waldir wal...@email.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 long-deprecated ApiBase::getVersion() - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ie526a57509bbbc1a5a3cdda147ff9c44fd6c94f6 --- M api/ApiAddFlagNoteArticleFeedbackv5.php M api/ApiArticleFeedbackv5.php M api/ApiFlagFeedbackArticleFeedbackv5.php M api/ApiGetCountArticleFeedbackv5.php M api/ApiSetStatusArticleFeedbackv5.php M api/ApiViewActivityArticleFeedbackv5.php M api/ApiViewFeedbackArticleFeedbackv5.php 7 files changed, 0 insertions(+), 63 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiAddFlagNoteArticleFeedbackv5.php b/api/ApiAddFlagNoteArticleFeedbackv5.php index 1ac85a5..d83e558 100644 --- a/api/ApiAddFlagNoteArticleFeedbackv5.php +++ b/api/ApiAddFlagNoteArticleFeedbackv5.php @@ -186,15 +186,6 @@ ); } - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { - return __CLASS__ . ': version 1.5'; - } - public function isWriteMode() { return true; } public function mustBePosted() { return true; } diff --git a/api/ApiArticleFeedbackv5.php b/api/ApiArticleFeedbackv5.php index 29a2a63..3c1adfb 100644 --- a/api/ApiArticleFeedbackv5.php +++ b/api/ApiArticleFeedbackv5.php @@ -335,13 +335,4 @@ 'api.php?action=articlefeedbackv5' ); } - - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { - return __CLASS__ . ': version 1.5'; - } } diff --git a/api/ApiFlagFeedbackArticleFeedbackv5.php b/api/ApiFlagFeedbackArticleFeedbackv5.php index 9a6bfc8..4d1dbfd 100644 --- a/api/ApiFlagFeedbackArticleFeedbackv5.php +++ b/api/ApiFlagFeedbackArticleFeedbackv5.php @@ -166,15 +166,6 @@ ); } - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { - return __CLASS__ . ': version 1.5'; - } - public function isWriteMode() { return true; } public function mustBePosted() { return true; } diff --git a/api/ApiGetCountArticleFeedbackv5.php b/api/ApiGetCountArticleFeedbackv5.php index 962a7bf..6f55fbe 100644 --- a/api/ApiGetCountArticleFeedbackv5.php +++ b/api/ApiGetCountArticleFeedbackv5.php @@ -107,13 +107,4 @@ 'api.php?action=articlefeedbackv5-get-countafpageid=1filter=featured', ); } - - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { - return __CLASS__ . ': version 1.5'; - } } diff --git a/api/ApiSetStatusArticleFeedbackv5.php b/api/ApiSetStatusArticleFeedbackv5.php index fe57052..fe28848 100644 --- a/api/ApiSetStatusArticleFeedbackv5.php +++ b/api/ApiSetStatusArticleFeedbackv5.php @@ -147,15 +147,6 @@ ); } - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { - return __CLASS__ . ': version 1.5'; - } - public function isWriteMode() { return true; } public function mustBePosted() { return true; } diff --git a/api/ApiViewActivityArticleFeedbackv5.php b/api/ApiViewActivityArticleFeedbackv5.php index dd8cee4..6e629c2 100644 --- a/api/ApiViewActivityArticleFeedbackv5.php +++ b/api/ApiViewActivityArticleFeedbackv5.php @@ -280,13 +280,4 @@ 'api.php?action=querylist=articlefeedbackv5-view-activityaafeedbackid=429384108662e9d4e41ab6e275d0392eaapageid=1', ); } - - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { - return __CLASS__ . ': version 1.5'; - } } diff --git a/api/ApiViewFeedbackArticleFeedbackv5.php b/api/ApiViewFeedbackArticleFeedbackv5.php index e8eed48..d6d2c2c 100644 --- a/api/ApiViewFeedbackArticleFeedbackv5.php +++ b/api/ApiViewFeedbackArticleFeedbackv5.php @@ -226,13 +226,4 @@ 'api.php?action=querylist=articlefeedbackv5-view-feedbackafvfpageid=1afvfsort=relevanceafvfsortdirection=ASCafvffilter=visible-relevant', ); } - - /** -* Gets the version info -* -* @return string the SVN version info -*/ - public function getVersion() { -
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...CongressLookup)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I88af8330b028e3796f18b2e49792ee8b00c0d4cd --- M ApiCongressLookup.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiCongressLookup.php b/ApiCongressLookup.php index c5f068a..51683a5 100644 --- a/ApiCongressLookup.php +++ b/ApiCongressLookup.php @@ -68,10 +68,6 @@ return ''; } - public function getVersion() { - return __CLASS__ . ': $Id: $'; - } - private function checkPermission( $user ) { if ( $user-isBlocked( false ) ) { $this-dieUsageMsg( array( 'blockedtext' ) ); -- To view, visit https://gerrit.wikimedia.org/r/184656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88af8330b028e3796f18b2e49792ee8b00c0d4cd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CongressLookup Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...ArticleFeedback)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ia17de20a4805fd48e4780b097498892e0c51effa --- M api/ApiArticleFeedback.php M api/ApiQueryArticleFeedback.php 2 files changed, 0 insertions(+), 8 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiArticleFeedback.php b/api/ApiArticleFeedback.php index e105f2c..bcf9872 100644 --- a/api/ApiArticleFeedback.php +++ b/api/ApiArticleFeedback.php @@ -407,8 +407,4 @@ 'api.php?action=articlefeedback' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } diff --git a/api/ApiQueryArticleFeedback.php b/api/ApiQueryArticleFeedback.php index 7761b61..50f0d0b 100644 --- a/api/ApiQueryArticleFeedback.php +++ b/api/ApiQueryArticleFeedback.php @@ -272,8 +272,4 @@ 'api.php?action=querylist=articlefeedbackafpageid=1afuserrating=1', ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/184649 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia17de20a4805fd48e4780b097498892e0c51effa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedback Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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 long-deprecated ApiBase::getVersion() - change (mediawiki...AjaxLogin)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ia2e5c789d0436bcce07755a419d4657d8ef32b02 --- M ApiAjaxLogin.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiAjaxLogin.php b/ApiAjaxLogin.php index 96e80d8..eada585 100644 --- a/ApiAjaxLogin.php +++ b/ApiAjaxLogin.php @@ -166,8 +166,4 @@ 'Token' = null ); } - - public function getVersion() { - return __CLASS__ . ': $Id: ApiAjaxLogin.php 83671 2011-03-10 21:09:49Z ialex $'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184648 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2e5c789d0436bcce07755a419d4657d8ef32b02 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AjaxLogin Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Make sure there are no datatype mismatches when doing updates - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Make sure there are no datatype mismatches when doing updates .. Make sure there are no datatype mismatches when doing updates Change-Id: Ibef4229dc8949d1b7eae0c4f3c906990c0a18663 --- M includes/Data/Mapper/BasicObjectMapper.php M includes/Data/Mapper/CachingObjectMapper.php M includes/Data/ObjectManager.php M includes/Data/ObjectMapper.php 4 files changed, 24 insertions(+), 1 deletion(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/Mapper/BasicObjectMapper.php b/includes/Data/Mapper/BasicObjectMapper.php index 7d2bc21..3d08b03 100644 --- a/includes/Data/Mapper/BasicObjectMapper.php +++ b/includes/Data/Mapper/BasicObjectMapper.php @@ -41,4 +41,9 @@ public function get( array $pk ) { return null; } + + public function normalizeRow( array $row ) { + $object = $this-fromStorageRow( $row ); + return $this-toStorageRow( $object ); + } } diff --git a/includes/Data/Mapper/CachingObjectMapper.php b/includes/Data/Mapper/CachingObjectMapper.php index 7abac0c..87a42a9 100644 --- a/includes/Data/Mapper/CachingObjectMapper.php +++ b/includes/Data/Mapper/CachingObjectMapper.php @@ -120,6 +120,11 @@ } } + public function normalizeRow( array $row ) { + $object = call_user_func( $this-fromStorageRow, $row ); + return call_user_func( $this-toStorageRow, $object ); + } + public function clear() { $this-loaded = new MultiDimArray; } diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php index a564bc8..bf47222 100644 --- a/includes/Data/ObjectManager.php +++ b/includes/Data/ObjectManager.php @@ -180,6 +180,7 @@ throw new FlowException( 'Object was not loaded through this object manager, use ObjectManager::merge if necessary' ); } $old = $this-loaded[$object]; + $old = $this-mapper-normalizeRow( $old ); $this-storage-remove( $old ); foreach ( $this-lifecycleHandlers as $handler ) { $handler-onAfterRemove( $object, $old, $metadata ); @@ -283,6 +284,7 @@ */ protected function updateSingle( $object, array $metadata ) { $old = $this-loaded[$object]; + $old = $this-mapper-normalizeRow( $old ); $new = $this-mapper-toStorageRow( $object ); if ( self::arrayEquals( $old, $new ) ) { return; diff --git a/includes/Data/ObjectMapper.php b/includes/Data/ObjectMapper.php index 809619d..c7469bf 100644 --- a/includes/Data/ObjectMapper.php +++ b/includes/Data/ObjectMapper.php @@ -19,7 +19,7 @@ * Convert a db row to its domain model. Object passing is intended for * updating the object to match a changed storage representation. * -* @param array $row assoc array representing the domain model +* @param array $row Assoc array representing the domain model * @param object|null $object The domain model to populate, creates when null * @return object The domain model populated with $row * @throws \Exception When object is the wrong class for the mapper @@ -33,4 +33,15 @@ * @return object|null */ function get( array $primaryKey ); + + /** +* Accepts a row representing domain model returns that same row, +* normalized. It'll roundtrip the row from- toStorageRow to cleanup data. +* We want to make sure that data type differences cause no false positives, +* like $row containing strings, new row has integers with the same value. +* +* @param array $row Assoc array representing the domain model +* @return array Normalized row +*/ + function normalizeRow( array $row ); } -- To view, visit https://gerrit.wikimedia.org/r/175694 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibef4229dc8949d1b7eae0c4f3c906990c0a18663 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org 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] Fix undefined EntityId in BufferingTermLookup - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix undefined EntityId in BufferingTermLookup .. Fix undefined EntityId in BufferingTermLookup BufferingTermLookup needs the Term objects to contain the entity id. To do that, we need to fetch both entity id (numeric) and the entity type. This patch adds those fields to the selection, and since this is now identical to getTermsOfEntities, then the code is changed to have getTermOfEntity to delegate to the getTermsOfEntities method and fixed the overly long lines. Also added tests for TermSqlIndex::getEntityTerms. Bug: T86522 Change-Id: I3092fc5f1eaba4beb9d5db1aa8c1c1aa6ccbb6cc --- M lib/includes/store/sql/TermSqlIndex.php M lib/tests/phpunit/store/TermIndexTest.php M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php 3 files changed, 88 insertions(+), 28 deletions(-) Approvals: Daniel Kinzler: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/store/sql/TermSqlIndex.php b/lib/includes/store/sql/TermSqlIndex.php index 462aeb8..32236aa 100644 --- a/lib/includes/store/sql/TermSqlIndex.php +++ b/lib/includes/store/sql/TermSqlIndex.php @@ -193,17 +193,27 @@ // FIXME: OCP violation. No support for new types of entities can be registered if ( $entity instanceof FingerprintProvider ) { - return $this-getFingerprintTerms( $entity-getFingerprint() ); + $extraFields = array( + 'entityType' = $entity-getType(), + ); + + $entityId = $entity-getId(); + + if ( $entityId !== null ) { + $extraFields['entityId'] = $entityId-getNumericId(); + } + + return $this-getFingerprintTerms( $entity-getFingerprint(), $extraFields ); } return array(); } - private function getFingerprintTerms( Fingerprint $fingerprint ) { + private function getFingerprintTerms( Fingerprint $fingerprint, array $extraFields = array() ) { $terms = array(); foreach ( $fingerprint-getDescriptions()-toTextArray() as $languageCode = $description ) { - $term = new Term(); + $term = new Term( $extraFields ); $term-setLanguage( $languageCode ); $term-setType( Term::TYPE_DESCRIPTION ); @@ -213,7 +223,7 @@ } foreach ( $fingerprint-getLabels()-toTextArray() as $languageCode = $label ) { - $term = new Term(); + $term = new Term( $extraFields ); $term-setLanguage( $languageCode ); $term-setType( Term::TYPE_LABEL ); @@ -224,7 +234,7 @@ foreach ( $fingerprint-getAliasGroups() as $aliasGroup ) { foreach ( $aliasGroup-getAliases() as $alias ) { - $term = new Term(); + $term = new Term( $extraFields ); $term-setLanguage( $aliasGroup-getLanguageCode() ); $term-setType( Term::TYPE_ALIAS ); @@ -236,7 +246,6 @@ return $terms; } - /** * Internal callback for deleting a list of terms. @@ -383,14 +392,17 @@ * * @return Term[] */ - public function getTermsOfEntity( EntityId $entityId, array $termTypes = null, array $languageCodes = null ) { - $fields = array( - 'term_language', - 'term_type', - 'term_text', + public function getTermsOfEntity( + EntityId $entityId, + array $termTypes = null, + array $languageCodes = null + ) { + return $this-getTermsOfEntities( + array( $entityId ), + $entityId-getEntityType(), + $termTypes, + $languageCodes ); - - return $this-fetchTerms( array( $entityId ), $entityId-getEntityType(), $fields, $termTypes, $languageCodes ); } /** @@ -406,29 +418,24 @@ * @throws \MWException * @return Term[] */ - public function getTermsOfEntities( array $entityIds, $entityType = null, array $termTypes = null, array $languageCodes = null ) { - $fields = array( - 'term_entity_id', - 'term_entity_type', - 'term_language', - 'term_type', - 'term_text', - ); - - return $this-fetchTerms( $entityIds, $entityType, $fields,
[MediaWiki-commits] [Gerrit] Manual import of iOS string translations from TWN - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Manual import of iOS string translations from TWN .. Manual import of iOS string translations from TWN Change-Id: Id6c4d3e9c6f61b3cdebea5acd3aedb36242d415c --- M wikipedia/ka.lproj/Localizable.strings M wikipedia/ka.lproj/Main_iPhone.strings M wikipedia/nl.lproj/Localizable.strings M wikipedia/pt-br.lproj/Localizable.strings M wikipedia/pt-br.lproj/Main_iPhone.strings M wikipedia/pt.lproj/Localizable.strings M wikipedia/pt.lproj/Main_iPhone.strings M wikipedia/sk.lproj/Localizable.strings 8 files changed, 55 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/wikipedia/ka.lproj/Localizable.strings b/wikipedia/ka.lproj/Localizable.strings index 860f3f1..029547e 100644 --- a/wikipedia/ka.lproj/Localizable.strings +++ b/wikipedia/ka.lproj/Localizable.strings @@ -56,6 +56,7 @@ open-link-cancel = გაუქმება; search-searching = იძებნება...; search-field-placeholder-text = ძიება ვიკიპედიაში; +search-loading-section-remaining = იტვირთება სტატიის დარჩენილი ნაწილი...; search-loading-article-loaded = სტატია ჩაიტვირთა.; search-cancel = გაუქმება; search-titles = სათაურები; @@ -67,6 +68,7 @@ search-recent-clear-cancel = გაუქმება; search-recent-clear-delete-all = ყველას წაშლა; main-menu-title = მეტი; +main-menu-language-title = მოძებნე $1 ვიკიპედიაში; main-menu-language-toggle-show = ენების ჩვენება; main-menu-language-toggle-hide = ენების დამალვა; main-menu-language-selection-saved = ენის არჩევა დამახსოვრებულია; @@ -114,6 +116,7 @@ edit-summary-choice-added-category = კატეგორიის დამატება; edit-summary-choice-added-missing-info = გამოტოვებული ინფორმაციის დამატება; edit-summary-choice-other = სხვა; +article-pull-to-refresh-is-refreshing = სტატიის განახლება; about-title = შესახებ; about-wikipedia = ვიკიპედია; about-contributors = ავტორები; @@ -141,6 +144,8 @@ onboarding-wikipedia = ვიკიპედია; onboarding-free-encyclopedia = თავისუფალი ენციკლოპედია; preference_title_eventlogging_opt_in = გამოყენების ანგარიშის გაგზავნა; +page_protected_sysop = ეს გვერდი სრულად დაცულია.; +page_protected_can_not_edit = თქვენ არ გაქვთ ამ გვერდის რედაქტირების უფლება; page_protected_can_not_edit_title = ეს გვერდი დაცულია; license-footer-text = კონტენტი ხელმისაწვდომია $1-ით; license-footer-name = CC BY-SA 3.0; @@ -158,9 +163,16 @@ menu-more-accessibility-label = მეტი პარამეტრები; menu-trash-accessibility-label = წაშლა; nearby-title = სიახლოვეს; +nearby-distance-label-meters = $1 მ; +nearby-distance-label-km = $1 კმ; +nearby-distance-label-feet = $1 ფუტი; +nearby-distance-label-miles = $1 მილი; +nearby-pull-to-refresh-prompt = აწიეთ, რათა განახლდეს; nearby-pull-to-refresh-is-refreshing = გადატვირთვა; nearby-loading = ახლომდებარე სტატიები იტვირთება...; nearby-loaded = ახლომდებარე სტატიები ჩამოიტვირთა; nearby-open-in-maps = რუკაზე გახსნა; nearby-cancel = გაუქმება; nearby-location-updates-denied = აპლიკაციას არ აქვს ადგილმდებარეობის განახლებაზე წვდომის უფლება.; +nearby-location-updates-enable = ლოკაციის განახლებებისათვის გახსენით პარამეტრების აპლიკაცია და აირჩიეთ შემდეგი:; +nearby-location-updates-settings-menu = კონფიდენსიალურობა ლოკაციის სერვისი ვიკიპედია; diff --git a/wikipedia/ka.lproj/Main_iPhone.strings b/wikipedia/ka.lproj/Main_iPhone.strings index 5b69b30..cd56eed 100644 --- a/wikipedia/ka.lproj/Main_iPhone.strings +++ b/wikipedia/ka.lproj/Main_iPhone.strings @@ -11,6 +11,7 @@ Wff-o9-AdH.text = შესვლა; aUp-0e-F6i.text = ბოლო გვერდები ვერ მოიძებნა!; c3c-PU-Exz.text = გახსენი ანგარიში; +heA-3K-nhS.text = უკვე გაქვთ ანგარიში? გაიარეთ ავტორიზაცია; jiW-Cg-oL3.text = გახსენი ანგარიში; kVb-lx-d6C.placeholder = პაროლი; mAk-1N-jPC.placeholder = მომხმარებლის სახელი; diff --git a/wikipedia/nl.lproj/Localizable.strings b/wikipedia/nl.lproj/Localizable.strings index 333aa71..30f3420 100644 --- a/wikipedia/nl.lproj/Localizable.strings +++ b/wikipedia/nl.lproj/Localizable.strings @@ -72,7 +72,7 @@ wikitext-upload-save-terms-name = Gebruiksvoorwaarden; wikitext-upload-save-license-name = CC BY-SA 3.0; open-link-title = Koppeling openen; -open-link-cancel = Annuleren; +open-link-cancel = Annuleer; search-searching = Bezig met zoeken...; search-no-matches = Geen overeenkomsten gevonden voor de zoekterm.; search-field-placeholder-text = Zoeken in Wikipedia; diff --git a/wikipedia/pt-br.lproj/Localizable.strings b/wikipedia/pt-br.lproj/Localizable.strings index 843de84..bf96883 100644 --- a/wikipedia/pt-br.lproj/Localizable.strings +++ b/wikipedia/pt-br.lproj/Localizable.strings @@ -7,6 +7,7 @@ // Author: Mordecool // Author: Rodrigo codignoli // Author: Tooguether +// Author: Webysther article-languages-label = Escolha um idioma; article-languages-cancel = Cancelar; @@ -147,6 +148,13 @@ edit-summary-choice-other = Outros; credits-wikimedia-repos = Wikimedia; credits-external-libraries = Externo; +about-title =
[MediaWiki-commits] [Gerrit] Hygiene: get rid of some statics duplicate code - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: get rid of some statics duplicate code .. Hygiene: get rid of some statics duplicate code * Made $allowedUpdateColumns and $obsoleteUpdateColumns properties instead of statics * Moved code to deal with $allowedUpdateColumns and $obsoleteUpdateColumns to shared DbStorage * Dropped code to deal with $allowedUpdateColumns and $obsoleteUpdateColumns from updateRelated - that is already done before updateRelated is called anyway Change-Id: I5723f007293a99ba1071847e906cdb6ca5f7a92a --- M includes/Data/Storage/BasicDbStorage.php M includes/Data/Storage/DbStorage.php M includes/Data/Storage/PostRevisionStorage.php M includes/Data/Storage/RevisionStorage.php 4 files changed, 64 insertions(+), 36 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/Storage/BasicDbStorage.php b/includes/Data/Storage/BasicDbStorage.php index 6d9c16a..380fb8a 100644 --- a/includes/Data/Storage/BasicDbStorage.php +++ b/includes/Data/Storage/BasicDbStorage.php @@ -87,7 +87,7 @@ $missing = array_diff( $this-primaryKey, array_keys( $old ) ); throw new DataPersistenceException( 'Row has null primary key: ' . implode( ', ', $missing ), 'process-data' ); } - $updates = ObjectManager::calcUpdates( $old, $new ); + $updates = $this-calcUpdates( $old, $new ); if ( !$updates ) { return true; // nothing to change, success } diff --git a/includes/Data/Storage/DbStorage.php b/includes/Data/Storage/DbStorage.php index 23f199e..7e5af3a 100644 --- a/includes/Data/Storage/DbStorage.php +++ b/includes/Data/Storage/DbStorage.php @@ -2,6 +2,7 @@ namespace Flow\Data\Storage; +use Flow\Data\ObjectManager; use Flow\Data\ObjectStorage; use Flow\Data\Utils\RawSql; use Flow\Model\UUID; @@ -16,8 +17,31 @@ * SQL security. */ abstract class DbStorage implements ObjectStorage { + /** +* @var DbFactory +*/ protected $dbFactory; + /** +* The revision columns allowed to be updated +* +* @var string[]|true Allow of selective columns to allow, or true to allow +* everything +*/ + protected $allowedUpdateColumns = true; + + /** +* This is to prevent 'Update not allowed on xxx' error during moderation when +* * old cache is not purged and still holds obsolete deleted column +* * old cache is not purged and doesn't have the newly added column +* +* @var string[] Array of columns to ignore +*/ + protected $obsoleteUpdateColumns = array(); + + /** +* @param DbFactory $dbFactory +*/ public function __construct( DbFactory $dbFactory ) { $this-dbFactory = $dbFactory; } @@ -173,4 +197,33 @@ public function validate( array $row ) { return true; } + + /** +* Calculates the DB updates to be performed to update data from $old to +* $new. +* +* @param array $old +* @param array $new +* @return array +* @throws DataModelException +*/ + public function calcUpdates( array $old, array $new ) { + $changeSet = ObjectManager::calcUpdates( $old, $new ); + + foreach ( $this-obsoleteUpdateColumns as $val ) { + // Need to use array_key_exists to check null value + if ( array_key_exists( $val, $changeSet ) ) { + unset( $changeSet[$val] ); + } + } + + if ( is_array( $this-allowedUpdateColumns ) ) { + $extra = array_diff( array_keys( $changeSet ), $this-allowedUpdateColumns ); + if ( $extra ) { + throw new DataModelException( 'Update not allowed on: ' . implode( ', ', $extra ), 'process-data' ); + } + } + + return $changeSet; + } } diff --git a/includes/Data/Storage/PostRevisionStorage.php b/includes/Data/Storage/PostRevisionStorage.php index 5d12b2c..c49dfa5 100644 --- a/includes/Data/Storage/PostRevisionStorage.php +++ b/includes/Data/Storage/PostRevisionStorage.php @@ -87,18 +87,6 @@ return $changes; } - foreach( static::$obsoleteUpdateColumns as $val ) { - // Need to use array_key_exists to check null value - if ( array_key_exists( $val, $treeChanges ) ) { - unset( $treeChanges[$val] ); - } - } - - $extra = array_diff( array_keys(
[MediaWiki-commits] [Gerrit] Remove now unused iptables.pp - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/184694 Change subject: Remove now unused iptables.pp .. Remove now unused iptables.pp Finally! Change-Id: Iaa583f23349b1a3174c92629696f94417b50ed14 --- D manifests/iptables.pp 1 file changed, 0 insertions(+), 268 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/94/184694/1 diff --git a/manifests/iptables.pp b/manifests/iptables.pp deleted file mode 100644 index 6f0fd76..000 --- a/manifests/iptables.pp +++ /dev/null @@ -1,268 +0,0 @@ -# NOTE: This is being replaced by ferm - -$iptables_ports = { -all = '', -beam1= '33416', -beam2= '5672', -beam3= '56918', -epmd = '4369', -gearman = '4370', -git_daemon = '9418', -glance_api = '9292', -glance_registry = '9191', -gmond_tcp= '8649', -gmond_udp= '8649', -http = '80', -http-alt = '8080', -https= '443', -icmp = '', -igmp = '', -ldap = '389', -ldap_admin_connector = '', -ldap_replication = '8989', -ldap_backend = '1389', -ldaps= '636', -ldaps_backend= '1636', -memcached= '11000', -memcached-standard = '11211', -mysql= '3306', -nova_ajax_proxy = '8000', -nova_ec2_api = '8773', -nova_openstack_api = '8774', -nrpe = '5666', -nsca = '5667', -ntp_tcp = '123', -ntp_udp = '123', -puppetmaster = '8140', -redis= '6379', -rsyncd_tcp = '873', -rsyncd_udp = '873', -snmptrap = '162', -smtp = '25', -ssh = '22', -swift_account= '6002', -swift_container = '6001', -swift_object = '6000', -udp = '', -keystone_service = '5000', -keystone_admin = '35357', -salt_publish = '4505', -salt_ret = '4506', -inetd= '10080', -zuul_webservice = '8001', -} - -$iptables_protocols = { -all = 'all', -beam1= 'tcp', -beam2= 'tcp', -beam3= 'tcp', -epmd = 'tcp', -gearman = 'tcp', -git_daemon = 'tcp', -glance_api = 'tcp', -glance_registry = 'tcp', -gmond_tcp= 'tcp', -gmond_udp= 'udp', -http-alt = 'tcp', -https= 'tcp', -http = 'tcp', -icmp = 'icmp', -igmp = 'igmp', -ldap_admin_connector = 'tcp', -ldap_replication = 'tcp', -ldap_backend = 'tcp', -ldaps_backend= 'tcp', -ldaps= 'tcp', -ldap = 'tcp', -memcached-standard = 'tcp', -memcached= 'tcp', -mysql= 'tcp', -nova_ajax_proxy = 'tcp', -nova_ec2_api = 'tcp', -nova_openstack_api = 'tcp', -nrpe = 'tcp', -nsca = 'tcp', -ntp_tcp = 'tcp', -ntp_udp = 'udp', -puppetmaster = 'tcp', -rsyncd_tcp = 'tcp', -rsyncd_udp = 'udp', -smtp = 'tcp', -snmptrap = 'udp', -ssh = 'tcp', -swift_account= 'tcp', -swift_container = 'tcp', -swift_object = 'tcp', -udp = 'udp', -keystone_service = 'tcp', -keystone_admin = 'tcp', -salt_publish = 'tcp', -salt_ret = 'tcp', -redis= 'tcp', -inetd= 'tcp', -zuul_webservice = 'tcp', -} - -class iptables::tables { - -augeas { ${hostname} iptables tables: -context = '/files/etc/iptables-save', -changes = [ set table[1] nat, set table[2] filter ]; -} - -augeas { ${hostname} iptables nat chains: -context = '/files/etc/iptables-save', -changes = [ -set table[. = 'nat']/chain[1] PREROUTING, -set table[. = 'nat']/chain[1]/policy ACCEPT, -set table[. = 'nat']/chain[2] POSTROUTING, -set table[. = 'nat']/chain[2]/policy ACCEPT, -set table[. = 'nat']/chain[3] OUTPUT, -set table[. = 'nat']/chain[3]/policy ACCEPT ], -require = Augeas[${hostname} iptables tables]; -} - -if $iptables_default_deny { -augeas { ${hostname} iptables filter chains: -
[MediaWiki-commits] [Gerrit] udp2log: tighten up firewall rules - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/184695 Change subject: udp2log: tighten up firewall rules .. udp2log: tighten up firewall rules Previously, udp2log was using iptables.pp which had no default DROP policy but only firewalled UDP access. The switch to ferm kept that laxed policy by adding a proto !udp ACCEPT rule to make the switch more safe and thus easier to merge. However, this should really be tightened now. ferm rules have been placed for all of the rest of the services that these machines run, so it should be okay to merge after a thorough review. Change-Id: Ia91a6816b6d40e96e801e06981be1638621fb597 --- M manifests/misc/udp2log.pp 1 file changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/95/184695/1 diff --git a/manifests/misc/udp2log.pp b/manifests/misc/udp2log.pp index 1f76f05..17cd4cf 100644 --- a/manifests/misc/udp2log.pp +++ b/manifests/misc/udp2log.pp @@ -382,17 +382,5 @@ ferm::rule { 'udp2log_accept_all_wikimedia': rule = 'saddr ($ALL_NETWORKS) proto udp ACCEPT;', -prio = 10, -} - -# FIXME: this is purely for compatibility with pre-ferm rules -# and the difference in default policies -ferm::rule { 'udp2log_drop_rest': -rule = 'proto udp DROP;', -prio = 11, -} -ferm::rule { 'udp2log_accept_all_nonudp': -rule = 'proto !udp ACCEPT;', -prio = 12, } } -- To view, visit https://gerrit.wikimedia.org/r/184695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia91a6816b6d40e96e801e06981be1638621fb597 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Also scroll the TOC when it is toggled - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Also scroll the TOC when it is toggled .. Also scroll the TOC when it is toggled Broke scrollTocToActiveItem into its own method, so it can be called multiple times and be easily tested. Boost number of TOC titles fetched per batch to 50 Also, add a class name for the TOC ul Bug: T78572 Bug: T85944 Change-Id: Ica03a7b07cf8d63a9f73b208aa474b5b6354e219 --- M handlebars/compiled/flow_block_topiclist.handlebars.php M handlebars/flow_board_navigation.handlebars M modules/engine/components/board/features/flow-board-navigation.js M modules/engine/components/board/features/flow-board-toc.js 4 files changed, 66 insertions(+), 38 deletions(-) Approvals: Mattflaschen: Looks good to me, approved EBernhardson: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php b/handlebars/compiled/flow_block_topiclist.handlebars.php index 331631b..4e6a365 100644 --- a/handlebars/compiled/flow_block_topiclist.handlebars.php +++ b/handlebars/compiled/flow_block_topiclist.handlebars.php @@ -65,7 +65,7 @@ data-flow-load-handler=menu data-flow-toc-target=.flow-list div class=flow-menu-js-drop flow-menu-js-drop-hiddena href=javascript:void(0); class=flow-board-header-menu-activator/a/div - ul class=mw-ui-button-container flow-list flow-load-interactive + ul class=mw-ui-button-container flow-board-toc-list flow-list flow-load-interactive data-flow-load-handler=tocMenu data-flow-toc-target=li:not(.flow-load-more):last data-flow-template=flow_board_toc_loop @@ -468,4 +468,4 @@ /div '; } -? \ No newline at end of file +? diff --git a/handlebars/flow_board_navigation.handlebars b/handlebars/flow_board_navigation.handlebars index b6d0e29..94b4c66 100644 --- a/handlebars/flow_board_navigation.handlebars +++ b/handlebars/flow_board_navigation.handlebars @@ -42,7 +42,7 @@ data-flow-load-handler=menu data-flow-toc-target=.flow-list div class=flow-menu-js-drop flow-menu-js-drop-hiddena href=javascript:void(0); class=flow-board-header-menu-activator/a/div - ul class=mw-ui-button-container flow-list flow-load-interactive + ul class=mw-ui-button-container flow-board-toc-list flow-list flow-load-interactive data-flow-load-handler=tocMenu data-flow-toc-target=li:not(.flow-load-more):last data-flow-template=flow_board_toc_loop diff --git a/modules/engine/components/board/features/flow-board-navigation.js b/modules/engine/components/board/features/flow-board-navigation.js index 577f9db..793e380 100644 --- a/modules/engine/components/board/features/flow-board-navigation.js +++ b/modules/engine/components/board/features/flow-board-navigation.js @@ -151,15 +151,20 @@ }; } + // TODO: Let's look at decoupling the event handler part from the parts that actually do the + // work. (Already, event is not used.) /** * On window.scroll, we clone the nav header bar and fix the original to the window top. * We clone so that we have one which always remains in the same place for calculation purposes, * as it can vary depending on whether or not new content is rendered or the window is resized. -* @param {jQuery} $boardNavigation -* @param {Event} event +* @param {jQuery} $boardNavigation board navigation element +* @param {Event} event Event passed to windowScroll (unused) +* @param {Object} extraParameters +* @param {boolean} extraParameters.forceNavigationUpdate True to force a change to the +* active item and TOC scroll. */ function _flowBoardAdjustTopicNavigationHeader( $boardNavigation, event, extraParameters ) { - var bottomScrollPosition, topicText, newReadingTopicId, $tocContainer, $scrollTarget, + var bottomScrollPosition, topicText, newReadingTopicId, self = this, boardNavigationPosition = ( this.$boardNavigationClone || $boardNavigation ).offset(); @@ -266,37 +271,7 @@ return; } - // Set TOC active item - $tocContainer = this.$boardNavigationTitle.parent() - .findWithParent( this.$boardNavigationTitle.parent().data( 'flow-api-target' ) ); - - $scrollTarget = $tocContainer.find( 'a[data-flow-id]' ) - .removeClass( 'active' ) - .filter(
[MediaWiki-commits] [Gerrit] Fix for assets file attribute sanity checker typo. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for assets file attribute sanity checker typo. .. Fix for assets file attribute sanity checker typo. Change-Id: I6a7e2c1590f78f4bbc765a8ecaed0ab859fe --- M wikipedia/mw-utils/WikipediaAppUtils.m 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/wikipedia/mw-utils/WikipediaAppUtils.m b/wikipedia/mw-utils/WikipediaAppUtils.m index 388a5b0..abebe4d 100644 --- a/wikipedia/mw-utils/WikipediaAppUtils.m +++ b/wikipedia/mw-utils/WikipediaAppUtils.m @@ -184,16 +184,16 @@ copy(bundledFilePath, documentsFilePath); }else{ // File exists in AppData/Documents/assets/ so copy it if bundled file is newer -NSError *error1 = nil, *error2 = nil; -NSDictionary *fileInDocumentsAttr = [[NSFileManager defaultManager] attributesOfItemAtPath:documentsFilePath error:error1]; -NSDictionary *fileInBundleAttr = [[NSFileManager defaultManager] attributesOfItemAtPath:bundledFilePath error:error2]; +NSError *docFilePathErr = nil, *bundledFilePathErr = nil; +NSDictionary *fileInDocumentsAttr = [[NSFileManager defaultManager] attributesOfItemAtPath:documentsFilePath error:docFilePathErr]; +NSDictionary *fileInBundleAttr = [[NSFileManager defaultManager] attributesOfItemAtPath:bundledFilePath error:bundledFilePathErr]; -if (!error1 !error1) { +if (!docFilePathErr !bundledFilePathErr) { -NSDate *date1 = (NSDate*)fileInBundleAttr[NSFileModificationDate]; -NSDate *date2 = (NSDate*)fileInDocumentsAttr[NSFileModificationDate]; +NSDate *bundledFileDate = (NSDate*)fileInBundleAttr[NSFileModificationDate]; +NSDate *documentsFileDate = (NSDate*)fileInDocumentsAttr[NSFileModificationDate]; -if ([date1 timeIntervalSinceDate:date2] 0) { +if ([bundledFileDate timeIntervalSinceDate:documentsFileDate] 0) { // Bundled file is newer. // Remove existing AppData/Documents/assets/ file - otherwise the copy will fail. -- To view, visit https://gerrit.wikimedia.org/r/184549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a7e2c1590f78f4bbc765a8ecaed0ab859fe Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@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] Kill udpprofile::collector, unused - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/184698 Change subject: Kill udpprofile::collector, unused .. Kill udpprofile::collector, unused Change-Id: I22041c493b850cf389dc87964494ec0326a88e80 --- D manifests/misc/udpprofile.pp 1 file changed, 0 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/184698/1 diff --git a/manifests/misc/udpprofile.pp b/manifests/misc/udpprofile.pp deleted file mode 100644 index 8ae3bf4..000 --- a/manifests/misc/udpprofile.pp +++ /dev/null @@ -1,28 +0,0 @@ - -class udpprofile::collector { -system::role { 'udpprofile::collector': description = 'MediaWiki UDP profile collector' } - -package { 'udpprofile': -ensure = latest; -} - -service { 'udpprofile': -require = Package[ 'udpprofile' ], -enable = true, -ensure = running; -} - -# Nagios monitoring (RT-2367) -nrpe::monitor_service { 'carbon-cache': -description = 'carbon-cache.py', -nrpe_command = '/usr/lib/nagios/plugins/check_procs -c 1:2 -a carbon-cache.py', -} -nrpe::monitor_service { 'profiler-to-carbon': -description = 'profiler-to-carbon', -nrpe_command = /usr/lib/nagios/plugins/check_procs -c 1:1 --ereg-argument-array='^/usr/bin/python /usr/udpprofile/sbin/profiler-to-carbon, -} -nrpe::monitor_service { 'profiling collector': -description = 'profiling collector', -nrpe_command = '/usr/lib/nagios/plugins/check_procs -c 1:20 -C collector', -} -} -- To view, visit https://gerrit.wikimedia.org/r/184698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22041c493b850cf389dc87964494ec0326a88e80 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add SkinCredits - change (mediawiki/core)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/184689 Change subject: Add SkinCredits .. Add SkinCredits * This adds SkinCredits for skins. It replaces ExtensionCredits for skins. * There is backword compatibility so that authors have time to change there extension to use the new SkinCredits. With SkinCredits it deprecates skin in ExtensionTypes and Deprecates the use of ExtensionCredits for skins. SkinCredits also gets more information in skin simler to what the extension shows just that it is for skins. Note this has been tested. Change-Id: Ica0a9eccad7644460a3c63b184c09126303f25d2 --- M includes/DefaultSettings.php M includes/api/ApiQuerySiteinfo.php M includes/specials/SpecialVersion.php 3 files changed, 447 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/184689/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ee462d8..de92165 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6355,6 +6355,60 @@ $wgExtensionCredits = array(); /** + * An array of information about installed skins keyed by their type. + * + * All but 'name', 'path' and 'author' can be omitted. + * + * @code + * $wgSkinCredits[$type][] = array( + * 'path' = __FILE__, + * 'name' = 'Example skin', + * 'namemsg' = 'exampleskin-name', + * 'author' = array( + * 'Foo Barstein', + * ), + * 'version' = '1.9.0', + * 'url' = 'http://example.org/example-skin/', + * 'descriptionmsg' = 'exampleskin-desc', + * 'license-name' = 'GPL-2.0', + * ); + * @endcode + * + * The extensions are listed on Special:Version. This page also looks for a file + * named COPYING or LICENSE (optional .txt extension) and provides a link to + * view said file. When the 'license-name' key is specified, this file is + * interpreted as wikitext. + * + * - $type: One of 'skin', + *or any additional types as specified through the + *SkinTypes hook as used in SpecialVersion::getSkinTypes(). + * + * - name: Name of skin as an inline string instead of localizable message. + *Do not omit this even if 'namemsg' is provided, as it is used to override + *the path Special:Version uses to find skin's license info, and is + *required for backwards-compatibility with MediaWiki 1.23 and older. + * + * - namemsg (since MW 1.24): A message key for a message containing the + *skin's name, if the name is localizable. (For example, skin names + *usually are.) + * + * - author: A string or an array of strings. Authors can be linked using + *the regular wikitext link syntax. To have an internationalized version of + *and others show, add an element This element can also be linked, + *for instance [http://example ...]. + * + * - descriptionmsg: A message key or an an array with message key and parameters: + *`'descriptionmsg' = 'exampleskin-desc',` + * + * - description: Description of skin as an inline string instead of + *localizable message (omit in favour of 'descriptionmsg'). + * + * - license-name: Short name of the license (used as label for the link), such + * as GPL-2.0 or MIT (https://spdx.org/licenses/ for a list of identifiers). + */ +$wgSkinCredits = array(); + +/** * Authentication plugin. * @var $wgAuth AuthPlugin */ diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index f373021..138dd68 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -690,11 +690,107 @@ return $this-getResult()-addValue( 'query', $property, $data ); } + + public function appendSkins( $property ) { $data = array(); $allowed = Skin::getAllowedSkins(); $default = Skin::normalizeKey( 'default' ); + foreach ( $this-getConfig()-get( 'SkinCredits' ) as $type = $skins ) { + foreach ( $skins as $skin ) { + $ret = array(); + $ret['type'] = $type; + if ( isset( $skin['name'] ) ) { + $ret['name'] = $skin['name']; + } + if ( isset( $skin['namemsg'] ) ) { + $ret['namemsg'] = $skin['namemsg']; + } + if ( isset( $skin['description'] ) ) { + $ret['description'] = $skin['description']; + } + if ( isset( $skin['descriptionmsg'] ) ) { + // Can be a string or array( key, param1, param2, ... ) + if ( is_array( $skin['descriptionmsg'] ) ) { +
[MediaWiki-commits] [Gerrit] Bug: Update the number of expected items when increasing pag... - change (mediawiki...Flow)
jenkins-bot has submitted this change and it was merged. Change subject: Bug: Update the number of expected items when increasing page size .. Bug: Update the number of expected items when increasing page size When repeating queries to get enough items when doing application level filtering the pager was trying to increase the page size of the third query to ensure we get enough items. Unfortunately we didn't update the number of items we expected back, so it stopped repeating. This patch updates so the pager checks the options to see how many items it should have received, rather than maintaining an independent variable. It also increases the third query multiplier from 3 to 5, which allows this to work as intended on flow-tests.eqiad.wmflabs. T86383 has been created to fix this properly instead of just delaying the inevitable. Change-Id: I0cd2b51f46dd2f2175688a3a2171c7b196503887 --- M includes/Data/Pager/Pager.php 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Mattflaschen: Looks good to me, approved Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Data/Pager/Pager.php b/includes/Data/Pager/Pager.php index 746a34b..994b4c0 100644 --- a/includes/Data/Pager/Pager.php +++ b/includes/Data/Pager/Pager.php @@ -96,10 +96,10 @@ * @return PagerPage */ public function getPage( $filter = null ) { - $numRequested = $this-options['pager-limit'] + 1; + $numNeeded = $this-options['pager-limit'] + 1; $options = $this-options + array( // We need one item of leeway to determine if there are more items - 'limit' = $numRequested, + 'limit' = $numNeeded, 'offset-dir' = $this-options['pager-dir'], 'offset-id' = $this-options['pager-offset'], 'include-offset' = $this-options['pager-include-offset'], @@ -112,7 +112,7 @@ do { if ( $queries === 2 ) { // if we hit a third query ask for more items - $options['limit'] = min( self::MAX_LIMIT, $options['limit'] * 3 ); + $options['limit'] = min( self::MAX_LIMIT, $this-options['pager-limit'] * 5 ); } // Retrieve results @@ -134,7 +134,7 @@ $results = array_merge( $results, $filtered ); } - if ( count( $found ) !== $numRequested ) { + if ( count( $found ) !== $options['limit'] ) { // last page break; } @@ -147,7 +147,7 @@ } $offset = $this-storage-serializeOffset( $last, $this-sort ); - } while ( count( $results ) $numRequested ++$queries self::MAX_QUERIES ); + } while ( count( $results ) $numNeeded ++$queries self::MAX_QUERIES ); if ( $queries = self::MAX_QUERIES ) { $count = count( $results ); -- To view, visit https://gerrit.wikimedia.org/r/183750 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0cd2b51f46dd2f2175688a3a2171c7b196503887 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson ebernhard...@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] Add .jshintrc and reduce check errors - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Add .jshintrc and reduce check errors .. Add .jshintrc and reduce check errors Change-Id: I8196aeb8137ed20259c8b47eea454e6a18a36ee7 --- A .jshintignore A .jshintrc M resources/omegawiki-ajax.js M resources/omegawiki-edit.js M resources/suggest.js 5 files changed, 134 insertions(+), 117 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..793b08d --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +# upstream libs +resources/wforms.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..0967ef4 --- /dev/null +++ b/.jshintrc @@ -0,0 +1 @@ +{} diff --git a/resources/omegawiki-ajax.js b/resources/omegawiki-ajax.js index e54a636..339d757 100644 --- a/resources/omegawiki-ajax.js +++ b/resources/omegawiki-ajax.js @@ -14,11 +14,11 @@ // sticky explang var explangUrl = document.URL.match( /explang=\d+/gi ); - if ( explangUrl!=null ) { + if ( explangUrl !== null ) { var explangNb = explangUrl[0].replace('explang=',''); $('#ca-edit, #ca-history, #ca-view').find('a').attr( 'href', function(i, val) { var bigoudi = '' ; - if ( val.match( /\?/gi ) == null ) {bigoudi = '?';} + if ( val.match( /\?/gi ) === null ) {bigoudi = '?';} return val + bigoudi + 'explang=' + explangNb ; }); } @@ -46,7 +46,7 @@ // if no corresponding popupToggleable (in edit mode): create it // and get the values - if ( $(this).next('.popupToggleable').length == 0 ) { + if ( $(this).next('.popupToggleable').length === 0 ) { var popupOpenHideLink = this; var myAction = $(this).attr('action'); @@ -62,7 +62,7 @@ }; if ( myAction === 'history' ) { - postdata['action'] = 'history'; + postdata.action = 'history'; } $.post( URL, postdata, function(data) { // insert the data and show it @@ -230,7 +230,7 @@ $('.wd-tablist .visibleTab:last').next() .addClass('visibleTab').removeClass('hiddenTab') .show(); - + // show previous arrow $('.wd-previousArrow').show(); @@ -257,13 +257,13 @@ .addClass('hiddenTab').removeClass('visibleTab') .hide(); } - + // remove next arrow if last tab is visible if ( $('.wd-tablist .wd-tabitem:last').hasClass('visibleTab') ) { $('.wd-nextArrow').hide(); } - - + + }); // nextArrow click // previous arrow click @@ -275,7 +275,7 @@ // show next arrow $('.wd-nextArrow').show(); - + // remove previous arrow if first tab is visible if ( $('.wd-tablist .wd-tabitem:first').hasClass('visibleTab') ) { $('.wd-previousArrow').hide(); @@ -385,22 +385,22 @@ function FF(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); - }; + } function GG(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); - }; + } function HH(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); - }; + } function II(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); - }; + } function ConvertToWordArray(string) { var lWordCount; @@ -423,7 +423,7 @@ lWordArray[lNumberOfWords-2] = lMessageLength3; lWordArray[lNumberOfWords-1] = lMessageLength29; return lWordArray; - }; + } function WordToHex(lValue) { var WordToHexValue='',WordToHexValue_temp='',lByte,lCount; @@ -433,7 +433,7 @@ WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2); } return
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...WikiLexicalData)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ia714bd8929f15dd92956086cb415789ad22fd35c --- M includes/api/ApiWikiData.php M includes/api/ApiWikiDataFormatXml.php M includes/api/owAddAnnotation.php M includes/api/owAddDefinition.php M includes/api/owAddSyntrans.php M includes/api/owAddToCollection.php M includes/api/owDefine.php M includes/api/owExpress.php M includes/api/owSyntrans.php 9 files changed, 0 insertions(+), 43 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiWikiData.php b/includes/api/ApiWikiData.php index e7b09ed..e10bcfe 100644 --- a/includes/api/ApiWikiData.php +++ b/includes/api/ApiWikiData.php @@ -435,10 +435,6 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id: $'; - } - public function collection( $collection_id, $languages ) { $id_safe = mysql_real_escape_string( $collection_id ); diff --git a/includes/api/ApiWikiDataFormatXml.php b/includes/api/ApiWikiDataFormatXml.php index 7264648..876909d 100644 --- a/includes/api/ApiWikiDataFormatXml.php +++ b/includes/api/ApiWikiDataFormatXml.php @@ -208,9 +208,5 @@ return 'Output WikiData defined meaning in XML format' . parent :: getDescription(); } - public function getVersion() { - return __CLASS__ . ': $Id: $'; - } - } ? diff --git a/includes/api/owAddAnnotation.php b/includes/api/owAddAnnotation.php index 3da0531..c354e1b 100644 --- a/includes/api/owAddAnnotation.php +++ b/includes/api/owAddAnnotation.php @@ -303,11 +303,6 @@ return true; } - // Version - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - // Description public function getDescription() { return 'Add annotations to Omegawiki.' ; diff --git a/includes/api/owAddDefinition.php b/includes/api/owAddDefinition.php index 3ab8770..90979b4 100644 --- a/includes/api/owAddDefinition.php +++ b/includes/api/owAddDefinition.php @@ -78,11 +78,6 @@ return true; } - // Version - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - // Description public function getDescription() { return 'Add definitions to Omegawiki.' ; diff --git a/includes/api/owAddSyntrans.php b/includes/api/owAddSyntrans.php index ecc9c26..8deae41 100644 --- a/includes/api/owAddSyntrans.php +++ b/includes/api/owAddSyntrans.php @@ -107,11 +107,6 @@ return true; } - // Version - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - // Description public function getDescription() { return 'Add expressions, synonyms/translations to Omegawiki.' ; diff --git a/includes/api/owAddToCollection.php b/includes/api/owAddToCollection.php index 6a79589..477de84 100644 --- a/includes/api/owAddToCollection.php +++ b/includes/api/owAddToCollection.php @@ -87,11 +87,6 @@ return true; } - // Version - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - // Description public function getDescription() { return 'Add annotations to Omegawiki.' ; diff --git a/includes/api/owDefine.php b/includes/api/owDefine.php index 94cfff9..20284cf 100644 --- a/includes/api/owDefine.php +++ b/includes/api/owDefine.php @@ -153,11 +153,6 @@ return $define; } - // Version - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - // Description public function getDescription() { return 'Get the definition of a defined meaning.' ; diff --git a/includes/api/owExpress.php b/includes/api/owExpress.php index 0dce710..b87674c 100644 --- a/includes/api/owExpress.php +++ b/includes/api/owExpress.php @@ -107,11 +107,6 @@ return $express; } - // Version - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - // Description public function getDescription() { return 'Returns information about the concepts ( DefinedMeaning ) and definitions of a given expression.' ; diff --git a/includes/api/owSyntrans.php b/includes/api/owSyntrans.php index 31ac334..8807a65 100644 --- a/includes/api/owSyntrans.php +++ b/includes/api/owSyntrans.php @@ -138,11 +138,6 @@
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...WebPlatformSearchAutocomplete)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ie5e780885e3530507cb8127e363a7b9772bb874f --- M includes/api/ApiWebplatformSearch.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiWebplatformSearch.php b/includes/api/ApiWebplatformSearch.php index 2db15ad..1214e91 100644 --- a/includes/api/ApiWebplatformSearch.php +++ b/includes/api/ApiWebplatformSearch.php @@ -107,8 +107,4 @@ public function getHelpUrls() { return 'https://www.webplatform.org'; } - - public function getVersion() { - return __CLASS__ . ': $Id: ApiWebplatformSearch.php 8232 2013-01-18 13:14:32Z rvogel $'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5e780885e3530507cb8127e363a7b9772bb874f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WebPlatformSearchAutocomplete Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] VCL: Get rid of hhvm.inc.vcl.erb - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: VCL: Get rid of hhvm.inc.vcl.erb .. VCL: Get rid of hhvm.inc.vcl.erb We no longer have any web application servers running on Zend, so the header is pointless. Change-Id: I75b30bef2c146b9241d2bc2f4ad6c1415a04e5d5 --- M modules/varnish/manifests/common/vcl.pp M templates/varnish/bits.inc.vcl.erb D templates/varnish/hhvm.inc.vcl.erb M templates/varnish/mobile-backend.inc.vcl.erb M templates/varnish/mobile-frontend.inc.vcl.erb M templates/varnish/text-backend.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb 7 files changed, 1 insertion(+), 34 deletions(-) Approvals: Faidon Liambotis: Verified; Looks good to me, approved diff --git a/modules/varnish/manifests/common/vcl.pp b/modules/varnish/manifests/common/vcl.pp index 78209b8..aeb5229 100644 --- a/modules/varnish/manifests/common/vcl.pp +++ b/modules/varnish/manifests/common/vcl.pp @@ -26,10 +26,10 @@ } file { '/etc/varnish/hhvm.inc.vcl': +ensure = absent, owner = 'root', group = 'root', mode= '0444', -content = template('varnish/hhvm.inc.vcl.erb'), } # VCL unit tests diff --git a/templates/varnish/bits.inc.vcl.erb b/templates/varnish/bits.inc.vcl.erb index 07cdebb..36fce49 100644 --- a/templates/varnish/bits.inc.vcl.erb +++ b/templates/varnish/bits.inc.vcl.erb @@ -1,7 +1,6 @@ # Varnish VCL include file for bits include errorpage.inc.vcl; -include hhvm.inc.vcl; % if @vcl_config.fetch(cluster_tier, 1) == 1 -% sub mangle_request { @@ -124,9 +123,3 @@ call errorpage; return (deliver); } - -% if @vcl_config.fetch(cluster_tier, 1) == 1 -% -sub vcl_deliver { - call php_mark_engine; -} -% end -% diff --git a/templates/varnish/hhvm.inc.vcl.erb b/templates/varnish/hhvm.inc.vcl.erb deleted file mode 100644 index 1712b5f..000 --- a/templates/varnish/hhvm.inc.vcl.erb +++ /dev/null @@ -1,18 +0,0 @@ -# Common functions for HHVM handling - -/* Manage X-Analytics token for HHVM/Zend tracking */ -sub php_mark_engine { - if (resp.http.X-Analytics) { - if (resp.http.X-Powered-By ~ ^HHVM) { - set resp.http.X-Analytics = resp.http.X-Analytics + ;php=hhvm; - } else { - set resp.http.X-Analytics = resp.http.X-Analytics + ;php=zend; - } - } else { - if (resp.http.X-Powered-By ~ ^HHVM) { - set resp.http.X-Analytics = php=hhvm; - } else { - set resp.http.X-Analytics = php=zend; - } - } -} diff --git a/templates/varnish/mobile-backend.inc.vcl.erb b/templates/varnish/mobile-backend.inc.vcl.erb index d214144..0b9d0f2 100644 --- a/templates/varnish/mobile-backend.inc.vcl.erb +++ b/templates/varnish/mobile-backend.inc.vcl.erb @@ -1,7 +1,6 @@ # Varnish VCL include file for mobile backends include errorpage.inc.vcl; -include hhvm.inc.vcl; sub vcl_recv { call vcl_recv_purge; diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb b/templates/varnish/mobile-frontend.inc.vcl.erb index 5623497..d2062f8 100644 --- a/templates/varnish/mobile-frontend.inc.vcl.erb +++ b/templates/varnish/mobile-frontend.inc.vcl.erb @@ -16,8 +16,6 @@ // address) in X-Forwarded-For, even if it's the only value, as in // the example of traffic sourced directly by satellite or something. -include hhvm.inc.vcl; - sub filter_noise { if (req.request == POST req.url ~ index\.php\?option=com_jcetask=pluginplugin=imgmanagerfile=imgmanagermethod=formcid=) { @@ -188,7 +186,6 @@ set resp.http.Cache-Control = s-maxage=3600, max-age=3600; } - call php_mark_engine; /* TODO: this block of VCL code is copypasta from text-frontend. Some consolidation is in order. */ % if @cluster_options.fetch( enable_geoiplookup, false ) -% /* Perform GeoIP look-up and send the result as a session cookie */ diff --git a/templates/varnish/text-backend.inc.vcl.erb b/templates/varnish/text-backend.inc.vcl.erb index b86bb77..da68497 100644 --- a/templates/varnish/text-backend.inc.vcl.erb +++ b/templates/varnish/text-backend.inc.vcl.erb @@ -2,7 +2,6 @@ include errorpage.inc.vcl; include text-common.inc.vcl; -include hhvm.inc.vcl; % if @vcl_config.fetch(cluster_tier, 1) != 1 -% # A random director with the same backends as the default 'backend' (chash) director diff --git a/templates/varnish/text-frontend.inc.vcl.erb b/templates/varnish/text-frontend.inc.vcl.erb index 7ba27fd..3ee39be 100644 --- a/templates/varnish/text-frontend.inc.vcl.erb +++ b/templates/varnish/text-frontend.inc.vcl.erb @@ -21,8 +21,6 @@ // mobile-frontend.inc.vcl.erb for (m|zero).wikipedia.org and its // subdomains. -include hhvm.inc.vcl; - # A random director with the same backends as the default
[MediaWiki-commits] [Gerrit] VCL: Standardize whitespace in parens - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: VCL: Standardize whitespace in parens .. VCL: Standardize whitespace in parens 'if (foo)' rather than 'if ( foo )'. I picked the former because (a) it was more common in the VCL code than the more whitespace-y alternative and (b) because that is the style of the built-in VCL. Change-Id: I11156f065037fb67db499892baf781ecc7a90b64 --- M templates/varnish/bits.inc.vcl.erb M templates/varnish/mobile-backend.inc.vcl.erb M templates/varnish/mobile-frontend.inc.vcl.erb M templates/varnish/parsoid-frontend.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb M templates/varnish/upload-backend.inc.vcl.erb M templates/varnish/upload-frontend.inc.vcl.erb 7 files changed, 27 insertions(+), 29 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/bits.inc.vcl.erb b/templates/varnish/bits.inc.vcl.erb index 36fce49..5bd23e5 100644 --- a/templates/varnish/bits.inc.vcl.erb +++ b/templates/varnish/bits.inc.vcl.erb @@ -7,13 +7,13 @@ /* transform backend url: /sitename/load.php - /w/load.php set host header for backend to sitename */ - if ( req.url ~ ^/([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+)\.%= Regexp.escape( @cluster_options.fetch( top_domain, org ) ) %/load\.php ) { - set bereq.http.host = regsub( req.url, ^/([^/]+)/(.*)$, \1 ); - set bereq.url = regsub( req.url, ^/([^/]+)/load\.php(.*)?, /w/load.php\2 ); -% if @cluster_options.fetch( test_hostname, false ) -% + if (req.url ~ ^/([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+)\.%= Regexp.escape(@cluster_options.fetch(top_domain, org)) %/load\.php) { + set bereq.http.host = regsub(req.url, ^/([^/]+)/(.*)$, \1); + set bereq.url = regsub(req.url, ^/([^/]+)/load\.php(.*)?, /w/load.php\2); +% if @cluster_options.fetch(test_hostname, false) -% # Send test.wikipedia.org to the right backend server - if ( req.url ~ ^/%= Regexp.escape( @cluster_options.fetch( test_hostname ) ) %/load\.php ) { + if (req.url ~ ^/%= Regexp.escape(@cluster_options.fetch(test_hostname)) %/load\.php) { set req.backend = test_wikipedia; } % end -% @@ -38,15 +38,15 @@ error 403 HTTP method not allowed.; } - if (req.http.host == %= @cluster_options.fetch( bits_domain, bits.wikimedia.org )%) { + if (req.http.host == %= @cluster_options.fetch(bits_domain, bits.wikimedia.org) %) { /* For https-only wikis, the redirect from http to https for bits assets should occur in varnish instead of apache, since the apache redirect and mediawiki doesn't vary by protocol. This can result in a redirect loop and assets not loading. */ - if ( req.url ~ ^/(auditcom|boardgovcom|board|chair|chapcom|checkuser|collab|donate|exec|fdc|grants|internal|movementroles|nomcom|office|otrs-wiki|searchcom|spcom|steward|wikimaniateam)\.wikimedia\.org/ req.http.X-Forwarded-Proto != https ) { - error 301 https://%= @cluster_options.fetch( bits_domain, bits.wikimedia.org )% + req.url; + if (req.url ~ ^/(auditcom|boardgovcom|board|chair|chapcom|checkuser|collab|donate|exec|fdc|grants|internal|movementroles|nomcom|office|otrs-wiki|searchcom|spcom|steward|wikimaniateam)\.wikimedia\.org/ req.http.X-Forwarded-Proto != https) { + error 301 https://%= @cluster_options.fetch(bits_domain, bits.wikimedia.org) % + req.url; } -% if @cluster_options.fetch( enable_geoiplookup, false ) -% +% if @cluster_options.fetch(enable_geoiplookup, false) -% if (req.url == /geoiplookup) { error 666 geoiplookup; } else { @@ -56,7 +56,7 @@ return (lookup); % end -% } -% if @cluster_options.fetch( enable_geoiplookup, false ) -% +% if @cluster_options.fetch(enable_geoiplookup, false) -% else if (req.http.host == geoiplookup.wikimedia.org ) { error 666 geoiplookup; } @@ -98,7 +98,7 @@ % end -% sub vcl_error { -% if @cluster_options.fetch( enable_geoiplookup, false ) -% +% if @cluster_options.fetch(enable_geoiplookup, false) -% /* Support geoiplookup */ if (obj.status == 666) { call geoip_lookup; diff --git a/templates/varnish/mobile-backend.inc.vcl.erb b/templates/varnish/mobile-backend.inc.vcl.erb index 0b9d0f2..d56d101 100644 --- a/templates/varnish/mobile-backend.inc.vcl.erb +++ b/templates/varnish/mobile-backend.inc.vcl.erb @@ -6,7 +6,7 @@ call vcl_recv_purge; /* FIXME: restrict access */ - if ( req.http.host ~ ^test\. ) { + if (req.http.host ~ ^test\.) { % if
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...DeviceMapLogCapture)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I7fcd80010f66ed22b2c67ca5b72df97b7e1e0baa --- M ApiDeviceMapLogCapture.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiDeviceMapLogCapture.php b/ApiDeviceMapLogCapture.php index 362847f..b96404c 100644 --- a/ApiDeviceMapLogCapture.php +++ b/ApiDeviceMapLogCapture.php @@ -74,8 +74,4 @@ ), ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7fcd80010f66ed22b2c67ca5b72df97b7e1e0baa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DeviceMapLogCapture Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Combine title and full text search - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/184692 Change subject: Combine title and full text search .. Combine title and full text search No need to explicitly do an auto switch based on a minimum number of title search results since it automatically does so when the end of the list is reached, either by not having enough results to fill the screen or by the user scrolling to the end. Also increased the batch size to 15 since that's what MF is using. Probably should go even higher to avoid immediate full text searches on large devices. Don't merge yet/TODO: There are some timing issues to be ironed out. When typing the search term in a certain tempo it doesn't remove old results. Change-Id: Ida613bd18716eef09149b41b0483127e77de07e2 --- M wikipedia/res/layout/fragment_search.xml R wikipedia/res/layout/fragment_search_results.xml D wikipedia/res/layout/fragment_search_title.xml D wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java A wikipedia/src/main/java/org/wikipedia/search/SearchResultsFragment.java D wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java M wikipedia/src/main/java/org/wikipedia/search/TitleSearchTask.java 8 files changed, 467 insertions(+), 812 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/92/184692/1 diff --git a/wikipedia/res/layout/fragment_search.xml b/wikipedia/res/layout/fragment_search.xml index 248c5f4..e82de67 100644 --- a/wikipedia/res/layout/fragment_search.xml +++ b/wikipedia/res/layout/fragment_search.xml @@ -9,31 +9,12 @@ android:background=?attr/search_background_color android:paddingTop=?attr/actionBarSize -LinearLayout -android:id=@+id/search_panel_types +fragment +android:id=@+id/fragment_search_results +android:name=org.wikipedia.search.SearchResultsFragment android:layout_width=match_parent android:layout_height=match_parent -android:orientation=vertical - -View android:layout_width=match_parent android:layout_height=0.5dp android:background=?attr/list_separator_color / - -FrameLayout -android:id=@+id/search_types_container -android:layout_width=match_parent -android:layout_height=match_parent - -fragment android:layout_width=match_parent android:layout_height=match_parent -android:id=@+id/fragment_search_title -android:name=org.wikipedia.search.TitleSearchFragment -tools:layout=@layout/fragment_search_title/ - -fragment android:layout_width=match_parent android:layout_height=match_parent -android:id=@+id/fragment_search_full -android:name=org.wikipedia.search.FullSearchFragment -tools:layout=@layout/fragment_search_full/ -/FrameLayout - -/LinearLayout +tools:layout=@layout/fragment_search_results / fragment android:layout_width=match_parent android:layout_height=match_parent android:id=@+id/search_panel_recent diff --git a/wikipedia/res/layout/fragment_search_full.xml b/wikipedia/res/layout/fragment_search_results.xml similarity index 94% rename from wikipedia/res/layout/fragment_search_full.xml rename to wikipedia/res/layout/fragment_search_results.xml index 1f9ddf9..fa41da9 100644 --- a/wikipedia/res/layout/fragment_search_full.xml +++ b/wikipedia/res/layout/fragment_search_results.xml @@ -3,7 +3,7 @@ FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=match_parent - android:id=@+id/search_full_container + android:id=@+id/search_results_display Button android:id=@+id/search_network_error android:layout_width=match_parent @@ -33,7 +33,7 @@ android:layout_marginLeft=16dp android:layout_marginRight=16dp/ ListView -android:id=@+id/full_search_results_list +android:id=@+id/search_results_list android:layout_width=match_parent android:layout_height=match_parent android:layout_marginRight=8dp diff --git a/wikipedia/res/layout/fragment_search_title.xml b/wikipedia/res/layout/fragment_search_title.xml deleted file mode 100644 index 6acad5a..000 --- a/wikipedia/res/layout/fragment_search_title.xml +++ /dev/null @@ -1,35 +0,0 @@ -?xml version=1.0 encoding=utf-8? - -LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; - android:orientation=vertical - android:layout_width=match_parent - android:layout_height=match_parent - android:id=@+id/search_title_container -TextView -
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...EmailCapture)
jenkins-bot has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: I4086b5b50cf914da0080b415d7cefc09d60c659c --- M api/ApiEmailCapture.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiEmailCapture.php b/api/ApiEmailCapture.php index 415f115..b501b05 100644 --- a/api/ApiEmailCapture.php +++ b/api/ApiEmailCapture.php @@ -93,8 +93,4 @@ 'api.php?action=emailcapture' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- To view, visit https://gerrit.wikimedia.org/r/184660 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4086b5b50cf914da0080b415d7cefc09d60c659c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EmailCapture Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@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] Install via MediaWiki's update.php - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Install via MediaWiki's update.php .. Install via MediaWiki's update.php patch 2: The message to add globals on LocalSettings.php was not noticable. So I created our own update.php that installs the base schema, then calls MediaWiki's update.php class, and then display the message if it is a new install. So we use update.php from WikiLexicalData's maintenance folder. Updated documentation. Change-Id: I2fddb4f8fcb1131559139ede8b3ec7f84951ba1c --- M App.php M OmegaWiki/WikiDataGlobals.php M README.md M Wikidata.hooks.php A includes/Installer.php A includes/WikiLexicalDataInstaller.php A includes/updateScripts/baseWld.sql A maintenance/update.php 8 files changed, 928 insertions(+), 3 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/App.php b/App.php index 183d2b1..ba54d85 100644 --- a/App.php +++ b/App.php @@ -10,6 +10,8 @@ if ( !defined( 'MEDIAWIKI' ) ) die( 'Invalid entry point.' ); +if ( !isset( $wgDBprefix ) ) { global $wgDBprefix; $wgDBprefix = null; } + $dir = dirname( __FILE__ ) . '/'; $dir = str_replace( '\\', '/', $dir ); @@ -164,6 +166,7 @@ $wgHooks['SearchGetNearMatchBefore'][] = 'WikiLexicalDataHooks::onGoClicked'; $wgHooks['PageContentLanguage'][] = 'WikiLexicalDataHooks::onPageContentLanguage'; $wgHooks['SkinTemplateNavigation'][] = 'WikiLexicalDataHooks::onSkinTemplateNavigation'; +$wgHooks['LoadExtensionSchemaUpdates'][] = 'WikiLexicalDataHooks::loadSchema'; // Jobs require_once( $wgWldSetupScriptPath . OWJobs.php ); diff --git a/OmegaWiki/WikiDataGlobals.php b/OmegaWiki/WikiDataGlobals.php index 1b7e991..fae1c78 100644 --- a/OmegaWiki/WikiDataGlobals.php +++ b/OmegaWiki/WikiDataGlobals.php @@ -61,6 +61,7 @@ $wgWldAPIScriptPath = $wgWldIncludesScriptPath . api/; $wgWldSetupScriptPath= $wgWldIncludesScriptPath . setup/; $wgWldJobsScriptPath = $wgWldIncludesScriptPath . jobs/; +$wgWldDbScripts = $wgWldIncludesScriptPath . 'updateScripts/'; /** * the DM of an annotation to use for sorting expression @@ -132,10 +133,12 @@ $wdCurrentContext; # overrides - if ( !is_null( $dc ) ) + if ( !is_null( $dc ) ) { return $dc; # local override - if ( !is_null( $wdCurrentContext ) ) + } + if ( !is_null( $wdCurrentContext ) ) { return $wdCurrentContext; # global override + } $datasets = wdGetDataSets(); $groups = $wgUser-getGroups(); diff --git a/README.md b/README.md index 6417437..020f0fe 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ - /Incremental - necessary update scripts to keep your extension installation in sync with the trunk - Images/ - images used in the Wikidata UI - OmegaWiki/ - the current main (only) application of the Wikidata framework -- /includes - contains WikiLexicalData's WikiMedia extensions of Special Pages, Tags and API +- includes/ - contains WikiLexicalData's WikiMedia extensions of Special Pages, Tags and API +- maintenance/ - currently contains our own update.php - perl-tools/ - import/export tools written in Perl ( outdated ) - php-tools/ - import/export tools written in PHP ( outdated ) - util/ - ( outdated ) @@ -48,3 +49,14 @@ - [OmegaWiki]: md__omega_wiki.html @see [OmegaWiki][OmegaWiki] + +Updating the database +- +Go to the maintenance folder of WikiLexicalData extension. + +run: php update.php + +This will install the base schema, if it wasn't installed yet. Call +MediaWiki's update.php, which will update both MediaWiki and WikiLexical's updates, +then give instruction on globals one needs to add so that the WikiLexicalData's +software runs smoothly (again, if freshly installed ). diff --git a/Wikidata.hooks.php b/Wikidata.hooks.php index 36cee70..4579937 100644 --- a/Wikidata.hooks.php +++ b/Wikidata.hooks.php @@ -208,4 +208,16 @@ return true; } + + /** @brief load update schema +* @note The base installation of WikiLexicalData's schema is performed +* by update.php's UpdateWikiLexicalData class on WikiLexical's maintenance folder. +* this will be used in the future for new tables/index etal. +* +* @see Preferably, use MediaWiki's https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates +*/ + public static function loadSchema() { + return true; + } + } diff --git a/includes/Installer.php b/includes/Installer.php new file mode 100644 index 000..ed9121f --- /dev/null +++ b/includes/Installer.php @@ -0,0 +1,239 @@ +?php +/** @file + */ + +/** @brief a different take on creating tables and index for update.php. + */ +class ExtensionDatabaseUpdater { + + /** @brief constructor +*/ + public function __construct() { + } +
[MediaWiki-commits] [Gerrit] Move filters from modal add save/preview - change (wikimedia...dash)
Ejegg has submitted this change and it was merged. Change subject: Move filters from modal add save/preview .. Move filters from modal add save/preview edit # 230982: grouping is now it's own thing. edit: I accidentally cut a line I didn't mean to. it was confusing. I fixed it. my heart can go on. edit: fixed string to not truncate edit: fixed title edit: fix groupby for 'by' facet edit: the querystring was incorrect and still might be edit: updated from feedback, minus querystring issue edit: add the dang semicolon Change-Id: Ibcf015a12af1325d4facb78d3c8b3d5a3ccd78ab --- M src/components/widgets/x-by-y-chart/x-by-y-chart.html M src/components/widgets/x-by-y-chart/x-by-y-chart.js M src/css/style.css 3 files changed, 112 insertions(+), 99 deletions(-) Approvals: Ejegg: Looks good to me, approved diff --git a/src/components/widgets/x-by-y-chart/x-by-y-chart.html b/src/components/widgets/x-by-y-chart/x-by-y-chart.html index 36527d5..0289139 100644 --- a/src/components/widgets/x-by-y-chart/x-by-y-chart.html +++ b/src/components/widgets/x-by-y-chart/x-by-y-chart.html @@ -13,36 +13,67 @@ div class=panel-body -div class=row - div class=col-md-2 +div class=row-fluid + div class=col-md-3 col-sm-12 - div class=row-fluid - div class=well - h4Show:/h4 - select data-bind=options: ySlices, value: showSlice/select + div class=row + div class=well lightWell col-md-12 + form id=XYform data-bind=event: {change: logStateChange(true)} + div class=row-fluid + h4Show:/h4 + select data-bind=options: ySlices, value: showSlice/select + hr + /div + div class=row-fluid + h4By:/h4 + select data-bind=options: xSlices, value: bySlice/select + hr + /div + + div class=row-fluid + h4Starting time range:/h4br + select id=startingTimeRange placeholder=Range... data-bind=options: timeChoices/select + hr + /div + + div class=row-fluid + label for=selectXYFiltersAdditional filters:/labelbr + span data-bind=foreach: groupChoices + div class=panel panel-default xyGroupOption + div class=panel-heading + span data-bind=text: $data.name class=pull-left/span + span class=pull-right data-bind=if: $data.choicesi class=fa fa-caret-down data-bind=click: $parent.showPanelBody($data.name)/i/span + /div + div class=panel-body hide data-bind=visible: $data.choices, attr: { id: $data.name + 'body' } + ul data-bind=foreach: $data.choices class=filterPickerList list-inline + li class=subFilterPickerList + span class=label label-info + input type=checkbox data-bind=value: $parent.name + ' eq \'' + $data + '\'', checked: $parents[1].chosenFiltersspan data-bind=text: $data/span + /span
[MediaWiki-commits] [Gerrit] Remove tabs in UI strings - change (mediawiki...WikiLexicalData)
Kipcool has submitted this change and it was merged. Change subject: Remove tabs in UI strings .. Remove tabs in UI strings Replaced with a space where needed. Reported by Liuxinyu970226 at https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Ow_conceptmapping_uitext/en Change-Id: I422a3be7625e5063e7859c5e1df3a0fc13399c95 --- M i18n/lexicaldata/en.json 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Kipcool: Verified; Looks good to me, approved diff --git a/i18n/lexicaldata/en.json b/i18n/lexicaldata/en.json index 3ae0901..d08f858 100644 --- a/i18n/lexicaldata/en.json +++ b/i18n/lexicaldata/en.json @@ -53,7 +53,7 @@ ow_impexptsv_unknown_lang: pUnknown or incorrect language: $1.br /\nLanguages must be ISO 639-3 language codes./p, exporttsv: Export TSV, ow_exporttsv_title: Export a collection to TSV, -ow_exporttsv_header: pExport a collection to a tab separated text format that you can import in OpenOffice.org, Excel or other spreadsheet software.br /\n\tSelect a collection to export. In the languages text box, enter a comma separated list of ISO 639-3 languages codes. Start with the languages that you will be translating from (pick as many as you like) and finish with the ones you'll be translating to. Then click 'Create' to create the file./p, +ow_exporttsv_header: pExport a collection to a tab separated text format that you can import in OpenOffice.org, Excel or other spreadsheet software.br /\nSelect a collection to export. In the languages text box, enter a comma separated list of ISO 639-3 languages codes. Start with the languages that you will be translating from (pick as many as you like) and finish with the ones you'll be translating to. Then click 'Create' to create the file./p, ow_exporttsv_languages: Languages:, ow_exporttsv_not_allowed: You do not have permission to do a TSV export., ow_exporttsv_export_failed: Export failed, @@ -89,7 +89,7 @@ conceptmapping: Concept mapping, ow_conceptmapping_title: Concept Mapping, ow_conceptmapping_help: ppossible actions: ul\nliaction=insertdata_context_prefix=defined_id... insert a mapping/li\nliaction=getconcept=concept_id read a mapping back/li\nliaction=list_sets return a list of possible data context prefixes and what they refer to./li\nliaction=get_associateddm=defined_meaning_iddc=dataset_context_prefix for one defined meaning in a concept, return all others/li\nliaction=help Show helpful help./li\n/ul/p, -ow_conceptmapping_uitext: pConcept Mapping allows you to identify which defined meaning in one dataset is identical\tto defined meanings in other datasets./p, +ow_conceptmapping_uitext: pConcept Mapping allows you to identify which defined meaning in one dataset is identical to defined meanings in other datasets./p, ow_conceptmapping_no_action_specified: Action \$1\ is not supported., ow_dm_OK: OK, ow_dm_not_present: not entered, -- To view, visit https://gerrit.wikimedia.org/r/182046 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I422a3be7625e5063e7859c5e1df3a0fc13399c95 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/WikiLexicalData Gerrit-Branch: master Gerrit-Owner: Siebrand siebr...@kitano.nl Gerrit-Reviewer: Kipcool kipmas...@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] xenon: Skip frames that don't have a 'phpStack' key - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/184697 Change subject: xenon: Skip frames that don't have a 'phpStack' key .. xenon: Skip frames that don't have a 'phpStack' key Change-Id: I067df3762f0b9d9c65c2a8c383a2f08bc31bc86d --- M wmf-config/StartProfiler.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/97/184697/1 diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php index 0a8f446..2f4bc22 100644 --- a/wmf-config/StartProfiler.php +++ b/wmf-config/StartProfiler.php @@ -71,6 +71,10 @@ foreach ( $data as $sample ) { $stack = array(); + if ( empty( $sample['phpStack'] ) ) { + continue; + } + foreach( $sample['phpStack'] as $frame ) { $func = $frame['function']; if ( $func !== end( $stack ) !in_array( $func, $omit ) ) { -- To view, visit https://gerrit.wikimedia.org/r/184697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I067df3762f0b9d9c65c2a8c383a2f08bc31bc86d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master 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] Configure flake8 job for operations/software/labsdb-auditor - change (integration/config)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/184693 Change subject: Configure flake8 job for operations/software/labsdb-auditor .. Configure flake8 job for operations/software/labsdb-auditor Depends on Ie6556e88a98 which makes it pass flake8. Bug: T86622 Change-Id: I71911b5aef53d10f88d28e70169ff5892efd67ed --- M jjb/operations-misc.yaml M zuul/layout.yaml 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/93/184693/1 diff --git a/jjb/operations-misc.yaml b/jjb/operations-misc.yaml index d593e41..528afc9 100644 --- a/jjb/operations-misc.yaml +++ b/jjb/operations-misc.yaml @@ -11,6 +11,13 @@ - '{name}-tox-{toxenv}-trusty' - project: +name: 'operations-software-labsdb-auditor' +toxenv: + - flake8 +jobs: + - '{name}-tox-{toxenv}-trusty' + +- project: name: 'operations-software-redactatron' jobs: - python-jobs diff --git a/zuul/layout.yaml b/zuul/layout.yaml index c35ca7f..21adf11 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -2614,6 +2614,12 @@ gate-and-submit: - operations-software-ircyall-tox-flake8-trusty + - name: operations/software/labsdb-auditor +check: + - operations-software-labsdb-auditor-tox-flake8-trusty +gate-and-submit: + - operations-software-labsdb-auditor-tox-flake8-trusty + - name: operations/software/redactatron template: - name: 'python-lint' -- To view, visit https://gerrit.wikimedia.org/r/184693 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71911b5aef53d10f88d28e70169ff5892efd67ed Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove long-deprecated ApiBase::getVersion() - change (mediawiki...Cargo)
Legoktm has submitted this change and it was merged. Change subject: Remove long-deprecated ApiBase::getVersion() .. Remove long-deprecated ApiBase::getVersion() This method has been deprecated and uncalled since MediaWiki 1.21. Once earlier versions of MediaWiki are no longer supported, this should be merged to remove the method. Bug: T35287 Change-Id: Ia84fe6921617f056699a74f8d656acea030135b8 --- M CargoQueryAPI.php 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Legoktm: Verified; Looks good to me, approved diff --git a/CargoQueryAPI.php b/CargoQueryAPI.php index fe02f55..90628d1 100644 --- a/CargoQueryAPI.php +++ b/CargoQueryAPI.php @@ -88,8 +88,4 @@ ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; - } - } -- To view, visit https://gerrit.wikimedia.org/r/184653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia84fe6921617f056699a74f8d656acea030135b8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add missing @covers tag - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/184696 Change subject: Add missing @covers tag .. Add missing @covers tag Change-Id: I491929e3d77688bf07640db4218ef99d6b888a82 --- M tests/phpunit/includes/UserTest.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/96/184696/1 diff --git a/tests/phpunit/includes/UserTest.php b/tests/phpunit/includes/UserTest.php index f5cd1fc..c3cb193 100644 --- a/tests/phpunit/includes/UserTest.php +++ b/tests/phpunit/includes/UserTest.php @@ -356,6 +356,9 @@ ); } + /** +* @covers User::equals +*/ public function testEquals() { $first = User::newFromName( 'EqualUser' ); $second = User::newFromName( 'EqualUser' ); -- To view, visit https://gerrit.wikimedia.org/r/184696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I491929e3d77688bf07640db4218ef99d6b888a82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] xenon: Skip frames that don't have a 'phpStack' key - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: xenon: Skip frames that don't have a 'phpStack' key .. xenon: Skip frames that don't have a 'phpStack' key Change-Id: I067df3762f0b9d9c65c2a8c383a2f08bc31bc86d --- M wmf-config/StartProfiler.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: BryanDavis: Looks good to me, but someone else must approve Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php index 0a8f446..2f4bc22 100644 --- a/wmf-config/StartProfiler.php +++ b/wmf-config/StartProfiler.php @@ -71,6 +71,10 @@ foreach ( $data as $sample ) { $stack = array(); + if ( empty( $sample['phpStack'] ) ) { + continue; + } + foreach( $sample['phpStack'] as $frame ) { $func = $frame['function']; if ( $func !== end( $stack ) !in_array( $func, $omit ) ) { -- To view, visit https://gerrit.wikimedia.org/r/184697 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I067df3762f0b9d9c65c2a8c383a2f08bc31bc86d Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@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] Kill role::labsnfs, deprecated empty - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/184699 Change subject: Kill role::labsnfs, deprecated empty .. Kill role::labsnfs, deprecated empty role::labsnfs::client is empty with only one warning() statement referring to the long-gone pmtpa. Keeping those classes around doesn't make sense anyway as Labs configuration can be easily edited via LDAP directly and it make even less sense to keep them after 3 months have passed. Kill the file. Change-Id: I69c0fd6f0d3c2a56b750dd09178134f5fd4d6fa1 --- D manifests/role/labsnfs.pp 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/184699/1 diff --git a/manifests/role/labsnfs.pp b/manifests/role/labsnfs.pp deleted file mode 100644 index 233ef80..000 --- a/manifests/role/labsnfs.pp +++ /dev/null @@ -1,8 +0,0 @@ -# This is a transition role - Eventually this will end up -# in LDAP once transition is over. - -class role::labsnfs::client { - -warning('Outside of pmtpa the role::labsnfs::client class is deprecated and does nothing.') -} - -- To view, visit https://gerrit.wikimedia.org/r/184699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69c0fd6f0d3c2a56b750dd09178134f5fd4d6fa1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T86331: implementation for sitelinks badges - change (wikidata/gremlin)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/184839 Change subject: T86331: implementation for sitelinks badges .. T86331: implementation for sitelinks badges Change-Id: Ibfc36e3e7afb9a93ae4afc3f44b373a239aa1507 --- M src/main/groovy/org/wikidata/gremlin/ConsoleInit.groovy M src/main/groovy/org/wikidata/gremlin/DataLoader.groovy M src/main/groovy/org/wikidata/gremlin/Loader.groovy M src/main/groovy/org/wikidata/gremlin/Schema.groovy M src/test/java/org/wikidata/gremlin/ImportTest.groovy A src/test/resources/json/Q76.json A src/test/resources/json/Q84.json A src/test/resources/json/ubadges/Q84.json A src/test/resources/json/udroplink/Q1.json 9 files changed, 14,789 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/gremlin refs/changes/39/184839/1 -- To view, visit https://gerrit.wikimedia.org/r/184839 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfc36e3e7afb9a93ae4afc3f44b373a239aa1507 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/gremlin Gerrit-Branch: master Gerrit-Owner: Smalyshev smalys...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/184844 Change subject: Cleanup .. Cleanup TODO: static adapter things are really edge-casey and should be either factored out so we have gateway description and live, data-having gateway object classes, or should become instance fields. Change-Id: I1c9a9753a5d6b91c6b0ac4e812389dde1280fe89 --- M gateway_common/DonationData.php M gateway_forms/Form.php M gateway_forms/RapidHtml.php 3 files changed, 7 insertions(+), 47 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/44/184844/1 diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php index 3fc1dc8..d140757 100644 --- a/gateway_common/DonationData.php +++ b/gateway_common/DonationData.php @@ -28,7 +28,7 @@ */ function __construct( $gateway, $data = false ) { $this-gateway = $gateway; - $this-gatewayID = $this-getGatewayIdentifier(); + $this-gatewayID = $this-gateway-getIdentifier(); $this-populateData( $data ); } @@ -173,8 +173,7 @@ * if it is: assume that the session data was meant to be replaced * with better data. * ...unless it's an explicit $overwrite * */ - $c = $this-getAdapterClass(); - if ( $c::session_exists() array_key_exists( 'Donor', $_SESSION ) ) { + if ( $this-gateway-session_exists() array_key_exists( 'Donor', $_SESSION ) ) { //fields that should always overwrite with their original values $overwrite = array ( 'referrer' ); foreach ( $_SESSION['Donor'] as $key = $val ) { @@ -650,42 +649,6 @@ protected function log( $message, $log_level = LOG_INFO ) { $message = $this-getLogMessagePrefix() . $message; $this-gateway-_log( $message, $log_level ); - } - - /** -* getGatewayIdentifier -* This grabs the adapter class that instantiated DonationData, and returns -* the result of its 'getIdentifier' function. Used for normalizing the -* 'gateway' value, and stashing and retrieving the edit token (and other -* things, where needed) in the session. -* @return type -*/ - protected function getGatewayIdentifier() { - $c = $this-getAdapterClass(); - if ( $c is_callable( array( $c, 'getIdentifier' ) ) ){ - return $c::getIdentifier(); - } else { - return 'DonationData'; - } - } - - /** -* getGatewayGlobal -* This grabs the adapter class that instantiated DonationData, and returns -* the result of its 'getGlobal' function for the $varname passed in. Used -* to determine gateway-specific configuration settings. -* @param string $varname the global variable (minus prefix) that we want to -* check. -* @return mixed The value of the gateway global if it exists. Else, the -* value of the Donation Interface global if it exists. Else, null. -*/ - protected function getGatewayGlobal( $varname ) { - $c = $this-getAdapterClass(); - if ( $c is_callable( array( $c, 'getGlobal' ) ) ){ - return $c::getGlobal( $varname ); - } else { - return false; - } } /** diff --git a/gateway_forms/Form.php b/gateway_forms/Form.php index 4701050..3212723 100644 --- a/gateway_forms/Form.php +++ b/gateway_forms/Form.php @@ -507,8 +507,7 @@ */ protected function generateBannerHeader() { global $wgOut, $wgRequest; - $g = $this-gateway; - $header = $g::getGlobal( 'Header' ); + $header = $this-gateway-getGlobal( 'Header' ); $template = ''; @@ -811,8 +810,7 @@ * For displaying when a user does not have Javascript enabled in their browser. */ protected function getNoScript() { - $g = $this-gateway; - $noScriptRedirect = $g::getGlobal( 'NoScriptRedirect' ); + $noScriptRedirect = $this-gateway-getGlobal( 'NoScriptRedirect' ); $form = 'noscript'; $form .= 'div id=noscript'; diff --git a/gateway_forms/RapidHtml.php b/gateway_forms/RapidHtml.php index 1f5f808..598d3da 100644 --- a/gateway_forms/RapidHtml.php +++ b/gateway_forms/RapidHtml.php @@ -439,8 +439,7 @@ * @throws MWException */ public function set_html_file_path( $form_key, $fatal = true ) { - $g = $this-gateway; - $allowedForms = $g::getGlobal( 'AllowedHtmlForms' ); +
[MediaWiki-commits] [Gerrit] Publishing options: Update version to highest version automa... - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Publishing options: Update version to highest version automatically .. Publishing options: Update version to highest version automatically * If title for published article exists, shows dialog. * If publish as draft is chosen, creates new draft in User space. * If User space draft exists, increments version to highest version + 1 * If publish anyway is chosen, overwrites existing translation Bug: T86665 Change-Id: I5210aa7119164acd79b7336651918dd5602569f4 --- M modules/publish/ext.cx.publish.dialog.js M modules/publish/ext.cx.publish.js 2 files changed, 37 insertions(+), 31 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/publish/ext.cx.publish.dialog.js b/modules/publish/ext.cx.publish.dialog.js index c873da0..fe273ef 100644 --- a/modules/publish/ext.cx.publish.dialog.js +++ b/modules/publish/ext.cx.publish.dialog.js @@ -42,23 +42,6 @@ }; /** -* Increase the version number of a title starting with 1. -* @param {string} title The title to increase the version on. -*/ - function increaseVersion( title ) { - var match, version; - - match = title.match( /^.*\((\d)\)$/ ); - if ( match ) { - version = parseInt( match[ 1 ], 10 ) + 1; - - return title.replace( /\(\d+\)$/, '(' + version + ')' ); - } - - return title + ' (1)'; - } - - /** * Renders the publishing options dialog. * @param {string} title The title of the existing article */ @@ -97,17 +80,8 @@ } $keepButton.on( 'click', function () { - var text = $( '.cx-column--translation h2' ).text(); - if ( /^User:/.test( text ) || - namespace === 'User' - ) { - text = increaseVersion( text ); - } else { - text = 'User:' + username + '/' + text; - } - $( '.cx-column--translation h2' ).text( text ); cxPublishingDialog.$dialog.hide(); - mw.hook( 'mw.cx.publish' ).fire(); + mw.hook( 'mw.cx.publish' ).fire( false ); } ); $publishAnywayButton = $( 'button' ) diff --git a/modules/publish/ext.cx.publish.js b/modules/publish/ext.cx.publish.js index 55fc8fd..0d53c03 100644 --- a/modules/publish/ext.cx.publish.js +++ b/modules/publish/ext.cx.publish.js @@ -128,9 +128,28 @@ } /** -* Publish the translation +* Increase the version number of a title starting with 1. +* @param {string} title The title to increase the version on. */ - function publish( publishAnyway ) { + function increaseVersion( title ) { + var match, version; + + match = title.match( /^.*\((\d+)\)$/ ); + if ( match ) { + version = parseInt( match[ 1 ], 10 ) + 1; + + return title.replace( /\(\d+\)$/, '(' + version + ')' ); + } + + return title + ' (1)'; + } + + /** +* Publish the translation +* @param {boolean} publishAnyway Flag to overwrite translation +* @param {string} title [optional], Optional title for the translation +*/ + function publish( publishAnyway, title ) { var $publishArea, $publishButton, publisher, translatedTitle, translatedContent, targetCategories, $draftButton, targetTitle, sortedKeys, i, categoryTitles, categories, publishedTitle; @@ -138,7 +157,7 @@ $publishArea = $( '.cx-header__publish' ); $publishButton = $publishArea.find( '.cx-header__publish-button' ); $draftButton = $publishArea.find( '.cx-header__draft-button' ); - targetTitle = $( '.cx-column--translation h2' ).text(); + targetTitle = title || $( '.cx-column--translation h2' ).text(); translatedContent = prepareTranslationForPublish( $( '.cx-column--translation .cx-column__content' ).clone() ); @@ -147,6 +166,10 @@ checkTargetTitle( publishedTitle ) .done( function ( titleExists ) { + var username; + + username = mw.user.getName(); + if ( titleExists === false || publishAnyway === true ) {
[MediaWiki-commits] [Gerrit] Fix whitespaces in JavaScript - change (mediawiki...WikiEditor)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/184840 Change subject: Fix whitespaces in JavaScript .. Fix whitespaces in JavaScript * Use a singe space as whitespace. * Remove space before colon when not used as ternary operator Change-Id: I6391bbcf10d26fadf82686d7ff226b773868415c --- M modules/jquery.wikiEditor.js M modules/jquery.wikiEditor.toolbar.config.js M modules/jquery.wikiEditor.toolbar.js 3 files changed, 203 insertions(+), 203 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/40/184840/1 diff --git a/modules/jquery.wikiEditor.js b/modules/jquery.wikiEditor.js index 55a55a8..c9979ff 100644 --- a/modules/jquery.wikiEditor.js +++ b/modules/jquery.wikiEditor.js @@ -80,7 +80,7 @@ * Path to images - this is a bit messy, and it would need to change if this code (and images) gets moved into the * core - or anywhere for that matter... */ - imgPath : mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiEditor/modules/images/', + imgPath: mw.config.get( 'wgExtensionAssetsPath' ) + '/WikiEditor/modules/images/', /** * Checks the current browser against the browsers object to determine if the browser has been black-listed or not. @@ -429,7 +429,7 @@ saveCursorAndScrollTop: function () { if ( $.client.profile().name === 'msie' ) { var IHateIE = { - 'scrollTop' : context.$textarea.scrollTop(), + 'scrollTop': context.$textarea.scrollTop(), 'pos': context.$textarea.textSelection( 'getCaretPosition', { startAndEnd: true } ) }; context.$textarea.data( 'IHateIE', IHateIE ); diff --git a/modules/jquery.wikiEditor.toolbar.config.js b/modules/jquery.wikiEditor.toolbar.config.js index d858975..e195f42 100644 --- a/modules/jquery.wikiEditor.toolbar.config.js +++ b/modules/jquery.wikiEditor.toolbar.config.js @@ -209,7 +209,7 @@ 'labelMsg': 'wikieditor-toolbar-tool-heading', 'type': 'select', 'list': { - 'heading-2' : { + 'heading-2': { 'labelMsg': 'wikieditor-toolbar-tool-heading-2', 'action': { 'type': 'encapsulate', @@ -223,7 +223,7 @@ } } }, - 'heading-3' : { + 'heading-3': { 'labelMsg': 'wikieditor-toolbar-tool-heading-3', 'action': { 'type': 'encapsulate', @@ -237,7 +237,7 @@ } } }, - 'heading-4' : { + 'heading-4': { 'labelMsg': 'wikieditor-toolbar-tool-heading-4', 'action': { 'type': 'encapsulate', @@ -251,7 +251,7 @@ } } }, - 'heading-5' : { + 'heading-5': { 'labelMsg': 'wikieditor-toolbar-tool-heading-5', 'action': {
[MediaWiki-commits] [Gerrit] Use member field instead of passing value - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/184842 Change subject: Use member field instead of passing value .. Use member field instead of passing value minor cleanup Change-Id: I0b540074bb5e8deb1af25df07197cd8b6f432c82 --- M extras/session_velocity/session_velocity.body.php 1 file changed, 9 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/42/184842/1 diff --git a/extras/session_velocity/session_velocity.body.php b/extras/session_velocity/session_velocity.body.php index c1dd701..3e271ca 100644 --- a/extras/session_velocity/session_velocity.body.php +++ b/extras/session_velocity/session_velocity.body.php @@ -61,24 +61,22 @@ return true; } $gateway_adapter-debugarray[] = 'Session Velocity onFilter hook!'; - return self::singleton( $gateway_adapter )-filter( $gateway_adapter ); + return self::singleton( $gateway_adapter )-filter(); } /** * Although this function actually does the filtering, as this is a singleton pattern * we only want one instance actually using it. * -* @param $gateway_adapter A reference to the current gateway adapter -* * @return bool Hook return, false stops processing of the hook chain */ - private function filter( $gateway_adapter ) { + private function filter() { $user_ip = $this-gateway_adapter-getData_Unstaged_Escaped( 'user_ip' ); // Determine IP status before doing anything complex - $wl = DataValidator::ip_is_listed( $user_ip, 'IPWhitelist', $gateway_adapter-getIdentifier() ); - $bl = DataValidator::ip_is_listed( $user_ip, 'IPBlacklist', $gateway_adapter-getIdentifier() ); + $wl = DataValidator::ip_is_listed( $user_ip, $this-gateway_adapter-getGlobal( 'IPWhitelist' ) ); + $bl = DataValidator::ip_is_listed( $user_ip, $this-gateway_adapter-getGlobal( 'IPBlacklist' ) ); if ( $wl ) { $this-gateway_adapter-debugarray[] = SessionVelocity: IP present in whitelist.; @@ -95,12 +93,12 @@ } // Obtain some useful information - $gateway = $gateway_adapter-getIdentifier(); - $transaction = $gateway_adapter-getCurrentTransaction(); + $gateway = $this-gateway_adapter-getIdentifier(); + $transaction = $this-gateway_adapter-getCurrentTransaction(); $cRequestTime = $_SERVER['REQUEST_TIME']; - $decayRate = $this-getVar( 'DecayRate', $transaction, $gateway_adapter ); - $threshold = $this-getVar( 'Threshold', $transaction, $gateway_adapter ); + $decayRate = $this-getVar( 'DecayRate', $transaction, $this-gateway_adapter ); + $threshold = $this-getVar( 'Threshold', $transaction, $this-gateway_adapter ); // Initialize the filter if ( !array_key_exists( self::SESS_ROOT, $_SESSION ) ) { @@ -122,7 +120,7 @@ // Update the filter if it's stale if ( $cRequestTime != $lastTime ) { $score = max( 0, $score - ( ( $cRequestTime - $lastTime ) * $decayRate ) ); - $score += $this-getVar( 'HitScore', $transaction, $gateway_adapter ); + $score += $this-getVar( 'HitScore', $transaction, $this-gateway_adapter ); // Store the results $_SESSION[self::SESS_ROOT][$gateway][$transaction][$this::SESS_SCORE] = $score; -- To view, visit https://gerrit.wikimedia.org/r/184842 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b540074bb5e8deb1af25df07197cd8b6f432c82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] assign credit and blame - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/184841 Change subject: assign credit and blame .. assign credit and blame Change-Id: I3a7cb4881a8b12e431183f2c2fa2d6fe4b9db9d4 --- M DonationInterface.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/41/184841/1 diff --git a/DonationInterface.php b/DonationInterface.php index 5ca251e..5e3bd9e 100644 --- a/DonationInterface.php +++ b/DonationInterface.php @@ -21,7 +21,7 @@ // Extension credits that will show up on Special:Version $wgExtensionCredits['specialpage'][] = array( 'name' = 'Donation Interface', - 'author' = array( 'Katie Horn', 'Ryan Kaldari' , 'Arthur Richards', 'Matt Walker', 'Adam Wight', 'Peter Gehres', 'Jeremy Postlethwaite' ), + 'author' = array( 'Elliott Eggleston', 'Katie Horn', 'Ryan Kaldari' , 'Arthur Richards', 'Sherah Smith', 'Matt Walker', 'Adam Wight', 'Peter Gehres', 'Jeremy Postlethwaite' ), 'version' = '2.1.0', 'descriptionmsg' = 'donationinterface-desc', 'url' = 'https://www.mediawiki.org/wiki/Extension:DonationInterface', -- To view, visit https://gerrit.wikimedia.org/r/184841 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a7cb4881a8b12e431183f2c2fa2d6fe4b9db9d4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Awight awi...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Blog: Thumb float direction (backport) - change (mediawiki...BlueSpiceExtensions)
Robert Vogel has submitted this change and it was merged. Change subject: Blog: Thumb float direction (backport) .. Blog: Thumb float direction (backport) * Added option Tumb float direction to admin settings an blog tag * 170019 Change-Id: Ie7f73bdaa8e318a6cc640a53fd59605d92975efd --- M Blog/Blog.class.php M Blog/languages/Blog.i18n.php 2 files changed, 22 insertions(+), 1 deletion(-) Approvals: Robert Vogel: Verified; Looks good to me, approved Tweichart: Checked; Looks good to me, but someone else must approve diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php index fc89264..4a25acd 100644 --- a/Blog/Blog.class.php +++ b/Blog/Blog.class.php @@ -132,6 +132,9 @@ // Defines how images should be rendered. Possible values: full|thumb|none //BsConfig::registerVar('MW::Blog::ImageRenderMode', 'thumb', BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_STRING, $this-mI18N); BsConfig::registerVar( 'MW::Blog::ImageRenderMode', 'thumb', BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_STRING|BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-blog-pref-ImageRenderMode', 'select' ); + // Defines float direction of images when ImageRenderMode is thumb. Possible values: left|right|none + BsConfig::registerVar( 'MW::Blog::ThumbFloatDirection', 'right', BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_STRING|BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-blog-pref-imagefloatdirection', 'select' ); + BsConfig::registerVar( 'MW::Blog::ShowTagFormWhenNotLoggedIn', false, BsConfig::LEVEL_PRIVATE|BsConfig::TYPE_BOOL, 'bs-blog-pref-ShowTagFormWhenNotLoggedIn', 'toggle'); global $wgServer, $wgScriptPath; @@ -174,6 +177,15 @@ 'thumb' = 'thumb', 'full' = 'full', 'none' = 'none' + ) + ); + break; + case 'ThumbFloatDirection': + $aPrefs = array( + 'options' = array( + 'left' = 'left', + 'right' = 'right', + 'none' = 'none' ) ); break; @@ -333,6 +345,7 @@ $bShowNewEntryField = BsConfig::get( 'MW::Blog::ShowNewEntryField' ); $bNewEntryFieldPosition = BsConfig::get( 'MW::Blog::NewEntryFieldPosition' ); $sImageRenderMode = BsConfig::get( 'MW::Blog::ImageRenderMode' ); + $sImageFloatDirection = BsConfig::get( 'MW::Blog::ThumbFloatDirection' ); $iMaxEntryCharacters= BsConfig::get( 'MW::Blog::MaxEntryCharacters' ); // Trackbacks are not supported the way we intend it to be. From http://www.mediawiki.org/wiki/Manual:$wgUseTrackbacks @@ -347,6 +360,7 @@ $argsBNewEntryField = BsCore::sanitizeArrayEntry( $args, 'newentryfield', $bShowNewEntryField, BsPARAMTYPE::BOOL ); $argsSNewEntryFieldPosition = BsCore::sanitizeArrayEntry( $args, 'newentryfieldposition', $bNewEntryFieldPosition, BsPARAMTYPE::STRING ); $argsSImageRenderMode= BsCore::sanitizeArrayEntry( $args, 'imagerendermode', $sImageRenderMode, BsPARAMTYPE::STRING ); + $argsSImageFloatDirection= BsCore::sanitizeArrayEntry( $args, 'imagefloatdirection', $sImageFloatDirection, BsPARAMTYPE::STRING ); $argsIMaxEntryCharacters = BsCore::sanitizeArrayEntry( $args, 'maxchars', $iMaxEntryCharacters,BsPARAMTYPE::INT ); $argsSSortBy = BsCore::sanitizeArrayEntry( $args, 'sort',$sSortBy, BsPARAMTYPE::STRING ); $argsBShowInfo = BsCore::sanitizeArrayEntry( $args, 'showinfo',$bShowInfo,BsPARAMTYPE::BOOL ); @@ -372,6 +386,11 @@ } $oValidationResult = BsValidator::isValid( 'SetItem', $argsSImageRenderMode, array( 'fullResponse' = true, 'setname' = 'imagerendermode', 'set' = array( 'full', 'thumb', 'none' ) ) ); + if ( $oValidationResult-getErrorCode() ) { + $oErrorListView-addItem( new ViewTagError( $oValidationResult-getI18N() ) ); + } + + $oValidationResult = BsValidator::isValid( 'SetItem', $argsSImageFloatDirection, array( 'fullResponse' = true, 'setname' = 'imagefloatdirection', 'set' = array( 'left', 'right', 'none' ) ) ); if ( $oValidationResult-getErrorCode() ) {
[MediaWiki-commits] [Gerrit] Memcached: used UNIX domain socket on mw12* app servers - change (operations/mediawiki-config)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/184843 Change subject: Memcached: used UNIX domain socket on mw12* app servers .. Memcached: used UNIX domain socket on mw12* app servers Expand deployment gradually to encompass all servers with hostnames starting with 'mw12'. Change-Id: Ibac7c3007c32b15963aac912a3bef01dea7084f3 --- M wmf-config/mc.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/43/184843/1 diff --git a/wmf-config/mc.php b/wmf-config/mc.php index 4dd365e..1f393ef 100644 --- a/wmf-config/mc.php +++ b/wmf-config/mc.php @@ -9,7 +9,7 @@ 'class' = 'MemcachedPeclBagOStuff', 'serializer' = 'php', 'persistent' = false, - 'servers'= in_array( gethostname(), array( 'mw1230', 'mw1231' ) ) + 'servers'= ( substr( gethostname(), 0, 4 ) === mw12 ) ? array( '/var/run/nutcracker/nutcracker.sock:0' ) : array( '127.0.0.1:11212' ), 'server_failure_limit' = 1e9, -- To view, visit https://gerrit.wikimedia.org/r/184843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibac7c3007c32b15963aac912a3bef01dea7084f3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master 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] Make user links on SpecialGlobalRenameQueue plainlinks - change (mediawiki...CentralAuth)
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/184845 Change subject: Make user links on SpecialGlobalRenameQueue plainlinks .. Make user links on SpecialGlobalRenameQueue plainlinks Change-Id: I5c04a0a757b8c4149d702c18dd4f9648e0781d21 --- M includes/specials/SpecialGlobalRenameQueue.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/45/184845/1 diff --git a/includes/specials/SpecialGlobalRenameQueue.php b/includes/specials/SpecialGlobalRenameQueue.php index 6f57c8c..2539568 100644 --- a/includes/specials/SpecialGlobalRenameQueue.php +++ b/includes/specials/SpecialGlobalRenameQueue.php @@ -214,7 +214,7 @@ $req-getComments() )-parseAsBlock(); - $this-getOutput()-addHtml( $viewMsg ); + $this-getOutput()-addHtml( 'span class=plainlinks' . $viewMsg . '/span' ); } /** @@ -570,11 +570,12 @@ break; case 'rq_performer': $steward = CentralAuthUser::newFromId( $value ); - $formatted = WikiMap::foreignUserLink( + $formatted = 'span class=plainlinks' . + WikiMap::foreignUserLink( $steward-getHomeWiki(), $steward-getName(), $steward-getName() - ); + ) . '/span'; break; case 'row_actions': $formatted = $this-formatActionValue( $this-mCurrentRow ); -- To view, visit https://gerrit.wikimedia.org/r/184845 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c04a0a757b8c4149d702c18dd4f9648e0781d21 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Memcached: used UNIX domain socket on mw12* app servers - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Memcached: used UNIX domain socket on mw12* app servers .. Memcached: used UNIX domain socket on mw12* app servers Expand deployment gradually to encompass all servers with hostnames starting with 'mw12'. Change-Id: Ibac7c3007c32b15963aac912a3bef01dea7084f3 --- M wmf-config/mc.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/mc.php b/wmf-config/mc.php index 4dd365e..1f393ef 100644 --- a/wmf-config/mc.php +++ b/wmf-config/mc.php @@ -9,7 +9,7 @@ 'class' = 'MemcachedPeclBagOStuff', 'serializer' = 'php', 'persistent' = false, - 'servers'= in_array( gethostname(), array( 'mw1230', 'mw1231' ) ) + 'servers'= ( substr( gethostname(), 0, 4 ) === mw12 ) ? array( '/var/run/nutcracker/nutcracker.sock:0' ) : array( '127.0.0.1:11212' ), 'server_failure_limit' = 1e9, -- To view, visit https://gerrit.wikimedia.org/r/184843 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibac7c3007c32b15963aac912a3bef01dea7084f3 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@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 style from JavaScript to CSS - change (mediawiki...WikiEditor)
Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/184846 Change subject: Move style from JavaScript to CSS .. Move style from JavaScript to CSS Change-Id: I1bf4b886e3b9b789df377dbdd2df94eb80dd61d1 --- M modules/jquery.wikiEditor.dialogs.config.css M modules/jquery.wikiEditor.dialogs.config.js M modules/jquery.wikiEditor.dialogs.css M modules/jquery.wikiEditor.toolbar.css M modules/jquery.wikiEditor.toolbar.js 5 files changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/46/184846/1 diff --git a/modules/jquery.wikiEditor.dialogs.config.css b/modules/jquery.wikiEditor.dialogs.config.css index 6b3edce..f34e7f0 100644 --- a/modules/jquery.wikiEditor.dialogs.config.css +++ b/modules/jquery.wikiEditor.dialogs.config.css @@ -2,6 +2,12 @@ * CSS for WikiEditor Dialogs */ +/* Replace Dialog */ +#wikieditor-toolbar-replace-search, +#wikieditor-toolbar-replace-replace { + width: 100%; +} + /* Table Dialog */ #wikieditor-toolbar-table-dialog fieldset { width: 218px; diff --git a/modules/jquery.wikiEditor.dialogs.config.js b/modules/jquery.wikiEditor.dialogs.config.js index f5d8af3..e593baf 100644 --- a/modules/jquery.wikiEditor.dialogs.config.js +++ b/modules/jquery.wikiEditor.dialogs.config.js @@ -1125,11 +1125,11 @@ fieldset\ div class=wikieditor-toolbar-field-wrapper\ label for=wikieditor-toolbar-replace-search rel=wikieditor-toolbar-tool-replace-search/label\ - input type=text id=wikieditor-toolbar-replace-search style=width: 100%;/\ + input type=text id=wikieditor-toolbar-replace-search/\ /div\ div class=wikieditor-toolbar-field-wrapper\ label for=wikieditor-toolbar-replace-replace rel=wikieditor-toolbar-tool-replace-replace/label\ - input type=text id=wikieditor-toolbar-replace-replace style=width: 100%;/\ + input type=text id=wikieditor-toolbar-replace-replace/\ /div\ div class=wikieditor-toolbar-field-wrapper\ input type=checkbox id=wikieditor-toolbar-replace-case/\ diff --git a/modules/jquery.wikiEditor.dialogs.css b/modules/jquery.wikiEditor.dialogs.css index 6d15f6a..942c66f 100644 --- a/modules/jquery.wikiEditor.dialogs.css +++ b/modules/jquery.wikiEditor.dialogs.css @@ -36,6 +36,7 @@ -ms-box-sizing: border-box; -webkit-box-sizing: border-box; -khtml-box-sizing: border-box; + box-sizing: border-box; } .wikiEditor-toolbar-dialog .ui-dialog-content input[type=radio], diff --git a/modules/jquery.wikiEditor.toolbar.css b/modules/jquery.wikiEditor.toolbar.css index 3148952..913ecc2 100644 --- a/modules/jquery.wikiEditor.toolbar.css +++ b/modules/jquery.wikiEditor.toolbar.css @@ -231,10 +231,14 @@ background-color: #FAFAFA; } /* Help Pages */ -.wikiEditor-ui-toolbar .page-table table { +.wikiEditor-ui-toolbar .page-table { padding-left: 5px; padding-right: 5px; +} +.wikiEditor-ui-toolbar .page-table table { background: none; + border-collapse: collapse; + width: 100%; } .wikiEditor-ui-toolbar .page-table th { color: #99; diff --git a/modules/jquery.wikiEditor.toolbar.js b/modules/jquery.wikiEditor.toolbar.js index 53eb8a8..09f9e76 100644 --- a/modules/jquery.wikiEditor.toolbar.js +++ b/modules/jquery.wikiEditor.toolbar.js @@ -455,7 +455,7 @@ case 'table': $page.addClass( 'page-table' ); html = - 'table cellpadding=0 cellspacing=0 ' + 'border=0 width=100% class=table table-' + id + ''; + 'table class=table-' + id + ''; if ( 'headings' in page ) { html += $.wikiEditor.modules.toolbar.fn.buildHeading( context, page.headings ); } -- To view, visit https://gerrit.wikimedia.org/r/184846 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bf4b886e3b9b789df377dbdd2df94eb80dd61d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader
[MediaWiki-commits] [Gerrit] Add missing @covers tag - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add missing @covers tag .. Add missing @covers tag Change-Id: I491929e3d77688bf07640db4218ef99d6b888a82 --- M tests/phpunit/includes/UserTest.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/UserTest.php b/tests/phpunit/includes/UserTest.php index f5cd1fc..c3cb193 100644 --- a/tests/phpunit/includes/UserTest.php +++ b/tests/phpunit/includes/UserTest.php @@ -356,6 +356,9 @@ ); } + /** +* @covers User::equals +*/ public function testEquals() { $first = User::newFromName( 'EqualUser' ); $second = User::newFromName( 'EqualUser' ); -- To view, visit https://gerrit.wikimedia.org/r/184696 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I491929e3d77688bf07640db4218ef99d6b888a82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@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] Fix case of SpecialAllPages/SpecialAllMessages in SpecialPag... - change (mediawiki/core)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/184701 Change subject: Fix case of SpecialAllPages/SpecialAllMessages in SpecialPageFactory .. Fix case of SpecialAllPages/SpecialAllMessages in SpecialPageFactory [autoloader] Class SpecialAllpages was loaded using incorrect case [autoloader] Class SpecialAllmessages was loaded using incorrect case Follow-Up: Ic137bc7adbc4a9ed96448ba0fee4807b67b3112d Follow-Up: I21a164af0b6ec123bf654cd1e4e7085b1192f067 Change-Id: Idae65141de0de41bf4244408218a91c4b87d5b7d (cherry picked from commit 911fd76521d9a3ade214079f3b6b8dbd82a43726) --- M includes/specialpage/SpecialPageFactory.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/01/184701/1 diff --git a/includes/specialpage/SpecialPageFactory.php b/includes/specialpage/SpecialPageFactory.php index 679492ae..23fdc71 100644 --- a/includes/specialpage/SpecialPageFactory.php +++ b/includes/specialpage/SpecialPageFactory.php @@ -74,7 +74,7 @@ 'Wantedtemplates' = 'WantedTemplatesPage', // List of pages - 'Allpages' = 'SpecialAllpages', + 'Allpages' = 'SpecialAllPages', 'Prefixindex' = 'SpecialPrefixindex', 'Categories' = 'SpecialCategories', 'Listredirects' = 'ListredirectsPage', @@ -123,7 +123,7 @@ // Data and tools 'Statistics' = 'SpecialStatistics', - 'Allmessages' = 'SpecialAllmessages', + 'Allmessages' = 'SpecialAllMessages', 'Version' = 'SpecialVersion', 'Lockdb' = 'SpecialLockdb', 'Unlockdb' = 'SpecialUnlockdb', -- To view, visit https://gerrit.wikimedia.org/r/184701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idae65141de0de41bf4244408218a91c4b87d5b7d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_24 Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: 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] Don't rely on 'user' and 'site' modules working correctly - change (mediawiki...VisualEditor)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/184708 Change subject: Don't rely on 'user' and 'site' modules working correctly .. Don't rely on 'user' and 'site' modules working correctly I think somebody somewhere pointed to this as the reason why VE wouldn't load when user's common.js has syntax errors, but I actually can't reproduce that. Not sure if this is needed, but looks like a good idea anyway. (One more, with feeling. Reverted broken attempt: I3abecacf.) Change-Id: I252c5c20f75b3bbea51200560408dc4cfc7174f6 --- M modules/ve-mw/init/ve.init.mw.Target.js 1 file changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/08/184708/1 diff --git a/modules/ve-mw/init/ve.init.mw.Target.js b/modules/ve-mw/init/ve.init.mw.Target.js index 2c2b6f4..68c0cb0 100644 --- a/modules/ve-mw/init/ve.init.mw.Target.js +++ b/modules/ve-mw/init/ve.init.mw.Target.js @@ -991,7 +991,7 @@ * @returns {boolean} Loading has been started */ ve.init.mw.Target.prototype.load = function ( additionalModules ) { - var data, start, xhr, target = this; + var data, start, xhr, modulesPromise, additionalModulesPromise, target = this; // Prevent duplicate requests if ( this.loading ) { @@ -999,11 +999,16 @@ } this.events.timings.activationStart = ve.now(); // Start loading the module immediately - mw.loader.using( - // Wait for site and user JS before running plugins - this.modules.concat( additionalModules || [] ), - ve.init.mw.Target.onModulesReady.bind( this ) - ); + modulesPromise = mw.loader.using( this.modules ); + additionalModulesPromise = mw.loader.using( additionalModules || [] ); + + modulesPromise.done( function () { + // Wait for site and user JS before running plugins. + // These modules could fail to load, proceed even if they do. + additionalModulesPromise.always( function () { + ve.init.mw.Target.onModulesReady.call( target ); + } ); + } ); data = { action: 'visualeditor', -- To view, visit https://gerrit.wikimedia.org/r/184708 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I252c5c20f75b3bbea51200560408dc4cfc7174f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor 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] Add Renameuser debug log group - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Add Renameuser debug log group .. Add Renameuser debug log group Bug: T85042 Change-Id: I5237e5b7df166b1868ac5fdee47ac42fffb4cf08 --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 81162b6..982b4d8 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -4179,6 +4179,7 @@ 'CentralAuth-Bug39996' = udp://$wmfUdp2logDest/centralauth-bug39996, // -legoktm 2014-07-14 for bug 39996 'CentralAuthRename' = udp://$wmfUdp2logDest/centralauthrename, // -legoktm 2014-07-14 for bug 67875 'CentralAuthUserMerge' = udp://$wmfUdp2logDest/centralauthusermerge, + 'Renameuser' = udp://$wmfUdp2logDest/renameuser, 'GettingStarted' = udp://$wmfUdp2logDest/gettingstarted, 'zero' = udp://$wmfUdp2logDest/zero, // zero-rated debug log 'DBPerformance' = udp://$wmfUdp2logDest/dbperformance, -- To view, visit https://gerrit.wikimedia.org/r/183087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5237e5b7df166b1868ac5fdee47ac42fffb4cf08 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Reedy re...@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.Map: Check presence of value argument in set() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mw.Map: Check presence of value argument in set() .. mw.Map: Check presence of value argument in set() Add back the `arguments.length 1` check (accidentally removed in 24f84b0). Otherwise it inadvertently uses the `value` parameter, causing it to set undefined as the value. There was already a test ensuring undefined can be set as value, but a test to ensure it doesn't default to undefined was missing. Change-Id: I4c69f0c11f165640a9b387a72c77c48eb6aa9e72 --- M resources/src/mediawiki/mediawiki.js M tests/qunit/suites/resources/mediawiki/mediawiki.test.js 2 files changed, 7 insertions(+), 5 deletions(-) Approvals: Fomafix: Looks good to me, but someone else must approve Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index ff7012f..e0e2963 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -191,7 +191,7 @@ } return true; } - if ( typeof selection === 'string' arguments.length ) { + if ( typeof selection === 'string' arguments.length 1 ) { this.values[selection] = value; return true; } diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js index 6c8c62f..c948274 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js @@ -55,7 +55,7 @@ this.restoreWarnings(); } ); - QUnit.test( 'mw.Map', 34, function ( assert ) { + QUnit.test( 'mw.Map', 35, function ( assert ) { var arry, conf, funky, globalConf, nummy, someValues; conf = new mw.Map(); @@ -86,8 +86,10 @@ assert.strictEqual( conf.set( 'constructor', 42 ), true, 'Map.set for key constructor' ); assert.strictEqual( conf.get( 'constructor' ), 42, 'Map.get for key constructor' ); - assert.strictEqual( conf.set( 'ImUndefined', undefined ), true, 'Map.set allows setting value to `undefined`' ); - assert.equal( conf.get( 'ImUndefined', 'fallback' ), undefined, 'Map.get supports retreiving value of `undefined`' ); + assert.strictEqual( conf.set( 'undef' ), false, 'Map.set requires explicit value (no undefined default)' ); + + assert.strictEqual( conf.set( 'undef', undefined ), true, 'Map.set allows setting value to `undefined`' ); + assert.equal( conf.get( 'undef', 'fallback' ), undefined, 'Map.get supports retreiving value of `undefined`' ); assert.strictEqual( conf.set( funky, 'Funky' ), false, 'Map.set returns boolean false if key was invalid (Function)' ); assert.strictEqual( conf.set( arry, 'Arry' ), false, 'Map.set returns boolean false if key was invalid (Array)' ); @@ -99,7 +101,7 @@ conf.set( String( nummy ), 'I used to be a number' ); assert.strictEqual( conf.exists( 'doesNotExist' ), false, 'Map.exists where property does not exist' ); - assert.strictEqual( conf.exists( 'ImUndefined' ), true, 'Map.exists where value is `undefined`' ); + assert.strictEqual( conf.exists( 'undef' ), true, 'Map.exists where value is `undefined`' ); assert.strictEqual( conf.exists( nummy ), false, 'Map.exists where key is invalid but looks like an existing key' ); // Multiple values at once -- To view, visit https://gerrit.wikimedia.org/r/184560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c69f0c11f165640a9b387a72c77c48eb6aa9e72 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net 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] jsduck: Update references to renamed resources/ directories - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: jsduck: Update references to renamed resources/ directories .. jsduck: Update references to renamed resources/ directories The inline examples in the generated documentation due to a 404 Not Found for the javascript files. 1. Run $ ./maintenance/mwjsduck-gen 2. View http://localhost/w/docs/js/#!/api/mw.Map 3. Try Live Preview Change-Id: Ic44f029c789042d82ec14e35d385f9ccc59959aa --- M includes/specials/SpecialJavaScriptTest.php M maintenance/jsduck/eg-iframe.html 2 files changed, 4 insertions(+), 5 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index fa719eb..492105d 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -192,7 +192,6 @@ */ private function exportQUnit() { $out = $this-getOutput(); - $out-disable(); $rl = $out-getResourceLoader(); diff --git a/maintenance/jsduck/eg-iframe.html b/maintenance/jsduck/eg-iframe.html index 7dc4afa..0792c24 100644 --- a/maintenance/jsduck/eg-iframe.html +++ b/maintenance/jsduck/eg-iframe.html @@ -3,14 +3,14 @@ head meta charset=utf-8 titleMediaWiki Code Example/title - script src=modules/startup.js/script + script src=modules/src/startup.js/script script function startUp() { mw.config = new mw.Map(); } /script - script src=modules/jquery/jquery.js/script - script src=modules/mediawiki/mediawiki.js/script + script src=modules/lib/jquery/jquery.js/script + script src=modules/src/mediawiki/mediawiki.js/script style .mw-jsduck-log { position: relative; @@ -78,7 +78,7 @@ eval( code ); callback callback( true ); } catch ( e ) { - mw.log( 'Uncaught exception: ' + e ); + mw.log( 'Uncaught ' + e ); callback callback( false, e ); throw e; } -- To view, visit https://gerrit.wikimedia.org/r/184558 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic44f029c789042d82ec14e35d385f9ccc59959aa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Parent5446 tylerro...@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] mediawiki.js: Move mw.format definition to where it's exposed - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: mediawiki.js: Move mw.format definition to where it's exposed .. mediawiki.js: Move mw.format definition to where it's exposed No need for it to be a local and public method at the same time. The Message#parser can just use the public one. Change-Id: I57e040cda6da57cda447ea83f5b9b6b28b538158 --- M resources/src/mediawiki/mediawiki.js 1 file changed, 10 insertions(+), 13 deletions(-) Approvals: Fomafix: Looks good to me, but someone else must approve Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index 1763c8e..ff7012f 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -43,16 +43,6 @@ } } - // String format helper. Replaces $1, $2 .. $N placeholders with positional - // args. Used by Message.prototype.parser() and exported as mw.format(). - function format( formatString ) { - var parameters = slice.call( arguments, 1 ); - return formatString.replace( /\$(\d+)/g, function ( str, match ) { - var index = parseInt( match, 10 ) - 1; - return parameters[index] !== undefined ? parameters[index] : '$' + match; - } ); - } - /* Object constructors */ /** @@ -307,7 +297,7 @@ * This function will not be called for nonexistent messages. */ parser: function () { - return format.apply( null, [ this.map.get( this.key ) ].concat( this.parameters ) ); + return mw.format.apply( null, [ this.map.get( this.key ) ].concat( this.parameters ) ); }, /** @@ -444,13 +434,20 @@ /** * Format a string. Replace $1, $2 ... $N with positional arguments. * -* @method +* Used by Message#parser(). +* * @since 1.25 * @param {string} fmt Format string * @param {Mixed...} parameters Substitutions for $N placeholders. * @return {string} Formatted string */ - format: format, + format: function ( formatString ) { + var parameters = slice.call( arguments, 1 ); + return formatString.replace( /\$(\d+)/g, function ( str, match ) { + var index = parseInt( match, 10 ) - 1; + return parameters[index] !== undefined ? parameters[index] : '$' + match; + } ); + }, /** * Track an analytic event. -- To view, visit https://gerrit.wikimedia.org/r/184559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57e040cda6da57cda447ea83f5b9b6b28b538158 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Fomafix Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Ori.livneh o...@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] VCL: Standardize on '//'-style comments - change (operations/puppet)
Ori.livneh has submitted this change and it was merged. Change subject: VCL: Standardize on '//'-style comments .. VCL: Standardize on '//'-style comments VCL supports /* */, #, and //. I consider multi-line comments problematic because in the absence of reliable syntax highlighting they can conceal the fact that code is commented out, and because you cannot safely move lines around. Most modern editing environments allow you to comment/uncomment a whole block of code using '//' with a few keystrokes (e.g., 'gc' in VIM). '#' comments are not safe for inline C code. Change-Id: I12f4495dbad33c4b30611df27830d1033f6d441a --- M templates/varnish/bits.inc.vcl.erb M templates/varnish/geoip.inc.vcl.erb M templates/varnish/misc.inc.vcl.erb M templates/varnish/mobile-backend.inc.vcl.erb M templates/varnish/mobile-frontend.inc.vcl.erb M templates/varnish/parsoid-backend.inc.vcl.erb M templates/varnish/parsoid-common.inc.vcl.erb M templates/varnish/parsoid-frontend.inc.vcl.erb M templates/varnish/text-backend.inc.vcl.erb M templates/varnish/text-common.inc.vcl.erb M templates/varnish/text-frontend.inc.vcl.erb M templates/varnish/upload-backend.inc.vcl.erb M templates/varnish/upload-frontend.inc.vcl.erb M templates/varnish/zero.inc.vcl.erb 14 files changed, 148 insertions(+), 162 deletions(-) Approvals: Ori.livneh: Verified; Looks good to me, approved diff --git a/templates/varnish/bits.inc.vcl.erb b/templates/varnish/bits.inc.vcl.erb index 5bd23e5..132856b 100644 --- a/templates/varnish/bits.inc.vcl.erb +++ b/templates/varnish/bits.inc.vcl.erb @@ -1,18 +1,17 @@ -# Varnish VCL include file for bits +// Varnish VCL include file for bits include errorpage.inc.vcl; % if @vcl_config.fetch(cluster_tier, 1) == 1 -% sub mangle_request { - /* transform backend url: /sitename/load.php - /w/load.php - set host header for backend to sitename - */ + // Transform backend url: /sitename/load.php - /w/load.php + // Set host header for backend to sitename if (req.url ~ ^/([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+\.)?([a-zA-Z0-9-]+)\.%= Regexp.escape(@cluster_options.fetch(top_domain, org)) %/load\.php) { set bereq.http.host = regsub(req.url, ^/([^/]+)/(.*)$, \1); set bereq.url = regsub(req.url, ^/([^/]+)/load\.php(.*)?, /w/load.php\2); % if @cluster_options.fetch(test_hostname, false) -% - # Send test.wikipedia.org to the right backend server + // Send test.wikipedia.org to the right backend server if (req.url ~ ^/%= Regexp.escape(@cluster_options.fetch(test_hostname)) %/load\.php) { set req.backend = test_wikipedia; } @@ -39,9 +38,9 @@ } if (req.http.host == %= @cluster_options.fetch(bits_domain, bits.wikimedia.org) %) { - /* For https-only wikis, the redirect from http to https for bits assets should occur - in varnish instead of apache, since the apache redirect and mediawiki doesn't - vary by protocol. This can result in a redirect loop and assets not loading. */ + // For https-only wikis, the redirect from http to https for bits assets should occur + // in varnish instead of apache, since the apache redirect and mediawiki doesn't + // vary by protocol. This can result in a redirect loop and assets not loading. if (req.url ~ ^/(auditcom|boardgovcom|board|chair|chapcom|checkuser|collab|donate|exec|fdc|grants|internal|movementroles|nomcom|office|otrs-wiki|searchcom|spcom|steward|wikimaniateam)\.wikimedia\.org/ req.http.X-Forwarded-Proto != https) { error 301 https://%= @cluster_options.fetch(bits_domain, bits.wikimedia.org) % + req.url; } @@ -67,16 +66,14 @@ } sub vcl_fetch { - /* - Do not serialize calls for non-cachable objects. - Removing this would break debug=true in mediawiki. - */ + // Do not serialize calls for non-cachable objects. + // Removing this would break debug=true in mediawiki. if (beresp.ttl = 0s) { set beresp.ttl = 120s; return (hit_for_pass); } - /* Don't run the default vcl_fetch function */ + // Don't run the default vcl_fetch function return (deliver); } @@ -87,11 +84,9 @@ % end -% % if @vcl_config.fetch(cluster_tier, 1) == 1 -% -/* - vcl_pass gets called by hit_for_pass objects in place of vcl_miss, so - we need to mangle the request object here as well. Actually, vcl_miss - and vcl_pass should probably be identical for the time being. -*/ +// vcl_pass gets called by hit_for_pass objects in place of vcl_miss, so +// we need to mangle the request object here as well. Actually, vcl_miss +// and vcl_pass should probably be identical for the time being. sub vcl_pass { call mangle_request; }
[MediaWiki-commits] [Gerrit] Dependency fixes for new ::aggregator class - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Dependency fixes for new ::aggregator class .. Dependency fixes for new ::aggregator class Change-Id: I265361969751f54a10d7ecd92aaf1e4b0293753f --- M manifests/misc/statistics.pp 1 file changed, 24 insertions(+), 7 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index b8bdb8c..9559c3f 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -1108,13 +1108,21 @@ $user = $misc::statistics::user::username $group= $misc::statistics::user::username +file { $working_path: +ensure = 'directory', +owner = $user, +group = $group, +mode = '0755' +} + git::clone { 'aggregator_code': ensure= 'latest', directory = $script_path, origin= 'https://gerrit.wikimedia.org/r/p/analytics/aggregator.git', owner = $user, group = $group, -mode = '0750', +mode = '0755', +require = File[$working_path], } git::clone { 'aggregator_data': @@ -1123,23 +1131,31 @@ origin= 'https://gerrit.wikimedia.org/r/p/analytics/aggregator/data.git', owner = $user, group = $group, -mode = '0750', +mode = '0755', +require = File[$working_path], } file { $log_path: -ensure = directory, -owner = $user, -group = $group, -mode = '0750', +ensure = 'directory', +owner = $user, +group = $group, +mode= '0755', +require = File[$working_path], + } # Cron for doing the basic aggregation step itself cron { 'aggregator projectcounts aggregate': command = ${script_path}/bin/aggregate_projectcounts --source ${hdfs_source_path} --target ${data_path} --first-date=`date --date='-8 day' +\\%Y-\\%m-\\%d` --last-date=`date --date='-1 day' +\\%Y-\\%m-\\%d` --push-target --log ${log_path}/`date +\\%Y-\\%m-\\%d--\\%H-\\%M-\\%S`.log, -require = File[$log_path], user= $user, hour= '13', minute = '0', +require = [ +Git::Clone['aggregator_code'], +Git::Clone['aggregator_data'], +File[$data_path], +File[$log_path], +], } # Cron for basing monitoring of the aggregated data @@ -1148,5 +1164,6 @@ user= $user, hour= '13', minute = '45', +require = Cron['aggregator projectcounts aggregate'], } } -- To view, visit https://gerrit.wikimedia.org/r/184728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I265361969751f54a10d7ecd92aaf1e4b0293753f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Ottomata o...@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] Enable VisualEditor for the 'Article incubator' namespace on... - change (operations/mediawiki-config)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/184731 Change subject: Enable VisualEditor for the 'Article incubator' namespace on ruwiki .. Enable VisualEditor for the 'Article incubator' namespace on ruwiki Bug: T86688 Change-Id: I4664d52040d45b80bb7d00698ccb345395c325df --- M wmf-config/InitialiseSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/31/184731/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 982b4d8..fa5e4a9 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11869,6 +11869,7 @@ // Wikipedias '+cawiki' = array( 100 /* Portal */, 102 /* Viquiprojecte */ ), // Bug 56000 '+enwiki' = array( 100 /* Portal */, 108 /* Book */, 118 /* Draft */ ), // Bug 56001 + '+ruwiki' = array( 102 /* Draft / Incubator */ ), // Bug T86688 // Wiktionaries 'svwiktionary' = array( NS_USER ), // Bug 57356 // Wikiversities -- To view, visit https://gerrit.wikimedia.org/r/184731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4664d52040d45b80bb7d00698ccb345395c325df Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jforrester jforres...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump cache epoch for wikidata - change (operations/mediawiki-config)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/184706 Change subject: Bump cache epoch for wikidata .. Bump cache epoch for wikidata we have more substantial UI changes this time... Change-Id: Iaff2749ec9f2d228f163fe4963f01e381dd064e6 --- M wmf-config/Wikibase.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/06/184706/1 diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php index f0d3e42..94e6c53 100644 --- a/wmf-config/Wikibase.php +++ b/wmf-config/Wikibase.php @@ -96,7 +96,7 @@ // Bug 51637 and 46953 $wgGroupPermissions['*']['property-create'] = ( $wgDBname === 'testwikidatawiki' ); - $wgCacheEpoch = $wgDBname === 'testwikidatawiki' ? '20150108144008' : '20141216194200'; + $wgCacheEpoch = '20150113190718'; $wgWBRepoSettings['dataSquidMaxage'] = 1 * 60 * 60; $wgWBRepoSettings['sharedCacheDuration'] = 60 * 60 * 24; -- To view, visit https://gerrit.wikimedia.org/r/184706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaff2749ec9f2d228f163fe4963f01e381dd064e6 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: 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] update vendor - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/184705 Change subject: update vendor .. update vendor Change-Id: I4a44076e42166e163d62387a681568dbb0015c00 --- M composer.lock M vendor 2 files changed, 26 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/05/184705/1 diff --git a/composer.lock b/composer.lock index 8abfb36..6c7ec5c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;, This file is @generated automatically ], -hash: 118d4f47ff407c79a3a6d54fe95442cd, +hash: f0a45207cc65e5928119a19da467a5bc, packages: [ { name: cogpowered/finediff, @@ -261,24 +261,24 @@ }, { name: symfony/event-dispatcher, -version: v2.3.23, +version: v2.3.24, target-dir: Symfony/Component/EventDispatcher, source: { type: git, url: https://github.com/symfony/EventDispatcher.git;, -reference: 36a40695d94e948d7a85347db0b12ba446c400fa +reference: 49d3432269d092b8d325b58615815fdbe93f49cb }, dist: { type: zip, -url: https://api.github.com/repos/symfony/EventDispatcher/zipball/36a40695d94e948d7a85347db0b12ba446c400fa;, -reference: 36a40695d94e948d7a85347db0b12ba446c400fa, +url: https://api.github.com/repos/symfony/EventDispatcher/zipball/49d3432269d092b8d325b58615815fdbe93f49cb;, +reference: 49d3432269d092b8d325b58615815fdbe93f49cb, shasum: }, require: { php: =5.3.3 }, require-dev: { -symfony/dependency-injection: ~2.0 +symfony/dependency-injection: ~2.0,=2.0.5 }, suggest: { symfony/dependency-injection: , @@ -311,21 +311,21 @@ ], description: Symfony EventDispatcher Component, homepage: http://symfony.com;, -time: 2014-11-30 13:33:44 +time: 2015-01-03 13:14:51 }, { name: symfony/http-foundation, -version: v2.3.23, +version: v2.3.24, target-dir: Symfony/Component/HttpFoundation, source: { type: git, url: https://github.com/symfony/HttpFoundation.git;, -reference: 94935ec4f9ad28d554e82c6e1fa11615a031108d +reference: 657e243df02c147649de50c45752cfdaacbf033a }, dist: { type: zip, -url: https://api.github.com/repos/symfony/HttpFoundation/zipball/94935ec4f9ad28d554e82c6e1fa11615a031108d;, -reference: 94935ec4f9ad28d554e82c6e1fa11615a031108d, +url: https://api.github.com/repos/symfony/HttpFoundation/zipball/657e243df02c147649de50c45752cfdaacbf033a;, +reference: 657e243df02c147649de50c45752cfdaacbf033a, shasum: }, require: { @@ -361,20 +361,20 @@ ], description: Symfony HttpFoundation Component, homepage: http://symfony.com;, -time: 2014-12-02 19:42:47 +time: 2015-01-03 11:11:27 }, { name: twig/twig, -version: v1.16.2, +version: v1.16.3, source: { type: git, url: https://github.com/twigphp/Twig.git;, -reference: 42f758d9fe2146d1f0470604fc05ee43580873fc +reference: 6dc11a1e8ecfc30e2c68aaeb218148409d8e68af }, dist: { type: zip, -url: https://api.github.com/repos/twigphp/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc;, -reference: 42f758d9fe2146d1f0470604fc05ee43580873fc, +url: https://api.github.com/repos/twigphp/Twig/zipball/6dc11a1e8ecfc30e2c68aaeb218148409d8e68af;, +reference: 6dc11a1e8ecfc30e2c68aaeb218148409d8e68af, shasum: }, require: { @@ -409,7 +409,7 @@ }, { name: Twig Team, -homepage: https://github.com/fabpot/Twig/graphs/contributors;, +homepage: http://twig.sensiolabs.org/contributors;, role: Contributors } ], @@ -418,7 +418,7 @@ keywords: [ templating ], -time: 2014-10-17 12:53:44 +time: 2014-12-25 19:58:19 }, { name:
[MediaWiki-commits] [Gerrit] monolog: enable for group0 + group1 wikis - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: monolog: enable for group0 + group1 wikis .. monolog: enable for group0 + group1 wikis Configure monolog logging to be active for all wikis except the wikipedia family. Bug: T76759 Change-Id: I1b9afff3cd173b04d9c2e66da3e21ea9c606d4d6 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 6 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 734c1d7..81162b6 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -14478,12 +14478,8 @@ ), 'wmgUseMonologLogger' = array( - 'default' = false, - 'mediawikiwiki' = true, - 'test2wiki' = true, - 'testwiki' = true, - 'testwikidatawiki' = true, - 'zerowiki' = true, + 'default' = true, + 'wiki' = false, ), ); -- To view, visit https://gerrit.wikimedia.org/r/181130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b9afff3cd173b04d9c2e66da3e21ea9c606d4d6 Gerrit-PatchSet: 5 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits