[MediaWiki-commits] [Gerrit] Fix trailing spaces - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Fix trailing spaces .. Fix trailing spaces Change-Id: I878ab1238dd9e391aa02f287039155c3a6a61ca6 --- M manifests/realm.pp M modules/eventlogging/manifests/monitoring.pp M modules/mysql_multi_instance/manifests/init.pp M modules/toollabs/manifests/node/web/uwsgi.pp M modules/wdq-mm/manifests/init.pp 5 files changed, 5 insertions(+), 6 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/realm.pp b/manifests/realm.pp index 4c61af8..417d7ad 100644 --- a/manifests/realm.pp +++ b/manifests/realm.pp @@ -66,7 +66,7 @@ ## puppet-accessible list of private wikis ## please keep alphabetized -$private_wikis = [ +$private_wikis = [ 'arbcom_dewiki', 'arbcom_enwiki', 'arbcom_fiwiki', diff --git a/modules/eventlogging/manifests/monitoring.pp b/modules/eventlogging/manifests/monitoring.pp index ede297b..97c064b 100644 --- a/modules/eventlogging/manifests/monitoring.pp +++ b/modules/eventlogging/manifests/monitoring.pp @@ -55,10 +55,9 @@ # Alarms if 1% of Navigation Timing event throughput goes under 2 req/sec # in a 15 min period # https://meta.wikimedia.org/wiki/Schema:NavigationTiming - # Note: # you can test this via doing: -# ./files/icinga/check_graphite +# ./files/icinga/check_graphite # --url http://graphite.wikimedia.org check_threshold # eventlogging.schema.NavigationTiming.rate --from 15min -C 1 -W 2 --under # it will report the following: diff --git a/modules/mysql_multi_instance/manifests/init.pp b/modules/mysql_multi_instance/manifests/init.pp index d2a278b..27c2807 100644 --- a/modules/mysql_multi_instance/manifests/init.pp +++ b/modules/mysql_multi_instance/manifests/init.pp @@ -19,7 +19,7 @@ require = File['/etc/apt/sources.list.d/wikimedia-mariadb.list'], } -package { ['percona-xtrabackup', +package { ['percona-xtrabackup', 'percona-toolkit', 'libaio1', 'lvm2' ]: diff --git a/modules/toollabs/manifests/node/web/uwsgi.pp b/modules/toollabs/manifests/node/web/uwsgi.pp index ac3b692..abc5ec3 100644 --- a/modules/toollabs/manifests/node/web/uwsgi.pp +++ b/modules/toollabs/manifests/node/web/uwsgi.pp @@ -12,7 +12,7 @@ # class toollabs::node::web::uwsgi inherits toollabs::node::web { -package { [ +package {[ 'uwsgi', 'uwsgi-plugin-python', 'uwsgi-plugin-python3', diff --git a/modules/wdq-mm/manifests/init.pp b/modules/wdq-mm/manifests/init.pp index 6bdc504..9368291 100644 --- a/modules/wdq-mm/manifests/init.pp +++ b/modules/wdq-mm/manifests/init.pp @@ -1,5 +1,5 @@ # == Class: wdq-mm -# +# # Class for setting up an instance of Magnus' WDQ class wdq-mm { package { 'wdq-mm': -- To view, visit https://gerrit.wikimedia.org/r/181549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I878ab1238dd9e391aa02f287039155c3a6a61ca6 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: coren mpellet...@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] Fixed spacing and alignment - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Fixed spacing and alignment .. Fixed spacing and alignment This fixes lint 'two-space soft tabs not used'. Change-Id: I78aae2a826ba663711964faaea9040247cd0022e --- M manifests/role/coredb.pp M manifests/role/elasticsearch.pp M manifests/role/grafana.pp M manifests/role/logstash.pp M manifests/role/phabricator.pp M manifests/role/pybal_config.pp M manifests/role/wikimetrics.pp M manifests/site.pp M modules/bacula/manifests/client/job.pp M modules/diamond/manifests/init.pp M modules/install-server/manifests/dhcp-server.pp M modules/labs_lvm/manifests/volume.pp M modules/postgresql/manifests/spatialdb.pp M modules/postgresql/manifests/user.pp M modules/puppet_compiler/manifests/packages.pp 15 files changed, 65 insertions(+), 63 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index 33b8a13..d6b148d 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -58,7 +58,7 @@ }, 'x1' = { 'hosts' = { - 'eqiad' = [ 'db1029', 'db1031' ] }, +'eqiad' = [ 'db1029', 'db1031' ] }, 'primary_site' = $::mw_primary, 'masters' = { 'eqiad' = 'db1029' }, 'snapshot' = [ 'db1031' ], @@ -66,7 +66,7 @@ }, 'm1' = { 'hosts' = { - 'eqiad' = ['db1001', 'db1016'] }, +'eqiad' = ['db1001', 'db1016'] }, 'primary_site' = $::mw_primary, 'masters' = { 'eqiad' = 'db1001' }, 'snapshot' = ['db1016' ], diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp index 92e1f86..41b4c0a 100644 --- a/manifests/role/elasticsearch.pp +++ b/manifests/role/elasticsearch.pp @@ -91,7 +91,7 @@ } if ($rack == 'Unknown') { - fail(Don't know rack for $::host) +fail(Don't know rack for $::host) } $row = regsubst($rack, '^(.).$', '\1' ) diff --git a/manifests/role/grafana.pp b/manifests/role/grafana.pp index 32f758e..6a51a5f 100644 --- a/manifests/role/grafana.pp +++ b/manifests/role/grafana.pp @@ -18,10 +18,10 @@ render_method = 'GET', }, elasticsearch = { - type = 'elasticsearch', - url= //grafana.${domain_suffix}, - index = 'grafana-dashboards', - grafanaDB = true, +type = 'elasticsearch', +url = //grafana.${domain_suffix}, +index = 'grafana-dashboards', +grafanaDB = true, }, }, }, diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp index 0539da2..d467244 100644 --- a/manifests/role/logstash.pp +++ b/manifests/role/logstash.pp @@ -49,11 +49,11 @@ include ::redis::ganglia class { '::logstash': - heap_memory_mb = 128, - # TODO: the multiline filter that is used in several places in the - # current configuration isn't thread safe and can cause crashes or - # garbled output when used with more than one thread worker. - filter_workers = 1, +heap_memory_mb = 128, +# TODO: the multiline filter that is used in several places in the +# current configuration isn't thread safe and can cause crashes or +# garbled output when used with more than one thread worker. +filter_workers = 1, } logstash::input::udp2log { 'mediawiki': diff --git a/manifests/role/phabricator.pp b/manifests/role/phabricator.pp index 3994505..026172f 100644 --- a/manifests/role/phabricator.pp +++ b/manifests/role/phabricator.pp @@ -32,9 +32,9 @@ 'mysql.host'= 'm3-master.eqiad.wmnet', 'storage.default-namespace' = 'phlegal', 'phpmailer.smtp-host' = - inline_template('%= @mail_smarthost.join(;) %'), +inline_template('%= @mail_smarthost.join(;) %'), 'metamta.default-address' = - 'no-re...@legalpad.wikimedia.org', +'no-re...@legalpad.wikimedia.org', 'metamta.domain'= 'legalpad.wikimedia.org', }, } diff --git a/manifests/role/pybal_config.pp b/manifests/role/pybal_config.pp index f1a5247..19c715e 100644 --- a/manifests/role/pybal_config.pp +++ b/manifests/role/pybal_config.pp @@ -3,11 +3,11 @@ class { '::pybal::web': vhostnames = [ - 'config-master.eqiad.wmnet', - 'config-master.codfw.wmnet', - 'config-master.esams.wmnet', -
[MediaWiki-commits] [Gerrit] Tools: Fix typo in static nginx configuration - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: Tools: Fix typo in static nginx configuration .. Tools: Fix typo in static nginx configuration Change-Id: Ia515adcff12a5b22984402d7ab666cc7d739f0fc --- M modules/toollabs/templates/static-server.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/templates/static-server.conf.erb b/modules/toollabs/templates/static-server.conf.erb index de4d7b9..8aa1489 100644 --- a/modules/toollabs/templates/static-server.conf.erb +++ b/modules/toollabs/templates/static-server.conf.erb @@ -41,7 +41,7 @@ } # We primarily serve from NFS, so let's turn off sendfile -senfile off; +sendfile off; # GZIP ALL THE THINGS! gzip on; -- To view, visit https://gerrit.wikimedia.org/r/181989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia515adcff12a5b22984402d7ab666cc7d739f0fc Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@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] Change postgresql dir to have version and cluster - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Change postgresql dir to have version and cluster .. Change postgresql dir to have version and cluster Using straight /srv/postgres is not so kind on the various postgresql tools which expect version and cluster name. Plus if /srv/postgres is a mount point, like in our case, postgres complains about lost+found existence Change-Id: Iebce74d7101299e7dea25c2cb798d674e2343108 --- M manifests/role/osm.pp M manifests/role/postgres.pp M modules/postgresql/spec/classes/postgresql_slave_spec.rb 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/osm.pp b/manifests/role/osm.pp index f219aec..1d1aa40 100644 --- a/manifests/role/osm.pp +++ b/manifests/role/osm.pp @@ -3,7 +3,7 @@ class role::osm::common { include standard -$datadir = '/srv/postgres' +$datadir = '/srv/postgres/9.1/main' file { '/etc/postgresql/9.1/main/tuning.conf': ensure = 'present', diff --git a/manifests/role/postgres.pp b/manifests/role/postgres.pp index 43fdf01..62e1280 100644 --- a/manifests/role/postgres.pp +++ b/manifests/role/postgres.pp @@ -3,7 +3,7 @@ class role::postgres::common { include standard -$datadir = '/srv/postgres' +$datadir = '/srv/postgres/9.1/main' file { '/etc/postgresql/9.1/main/tuning.conf': ensure = 'present', diff --git a/modules/postgresql/spec/classes/postgresql_slave_spec.rb b/modules/postgresql/spec/classes/postgresql_slave_spec.rb index 3920af1..283143c 100644 --- a/modules/postgresql/spec/classes/postgresql_slave_spec.rb +++ b/modules/postgresql/spec/classes/postgresql_slave_spec.rb @@ -32,7 +32,7 @@ :ensure = 'present', :master_server= 'test', :replication_pass = 'pass', -:datadir = '/srv/postgres', +:datadir = '/srv/postgres/9.1/main', } } context 'ensure present' do @@ -44,7 +44,7 @@ end it { should contain_file('/etc/postgresql/9.1/main/slave.conf').with_ensure('present') } it do -should contain_file('/srv/postgres/recovery.conf'). +should contain_file('/srv/postgres/9.1/main/recovery.conf'). with_ensure('present'). with_content(/host=test user=replication password=pass/) end -- To view, visit https://gerrit.wikimedia.org/r/172659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iebce74d7101299e7dea25c2cb798d674e2343108 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@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] Ignore events with modifier keys - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Ignore events with modifier keys .. Ignore events with modifier keys I've combed through the entire codebase for keydown, keyup, keypress and .which and I've only found one case where modifier keys are not ignored for keyboard shortcuts. Bug: T68329 Change-Id: I10ca2b89b9eb5addd7c706cf796331b5206d6bef --- M resources/mmv/ui/mmv.ui.metadataPanelScroller.js 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js index 7cd9a8e..fa539ce 100644 --- a/resources/mmv/ui/mmv.ui.metadataPanelScroller.js +++ b/resources/mmv/ui/mmv.ui.metadataPanelScroller.js @@ -194,6 +194,9 @@ * Handles keydown events for this element. */ MPSP.keydown = function ( e ) { + if ( e.altKey || e.shiftKey || e.ctrlKey || e.metaKey ) { + return; + } switch ( e.which ) { case 40: // Down arrow // fall through -- To view, visit https://gerrit.wikimedia.org/r/182052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I10ca2b89b9eb5addd7c706cf796331b5206d6bef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc Gerrit-Reviewer: Gergő Tisza gti...@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] Vastly simplify Shingen - change (operations...shinkengen)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/182055 Change subject: Vastly simplify Shingen .. Vastly simplify Shingen - hostgroups don't need to be explicitly declared, apparently :) Are implicitly picked up if they exist in a host definition. - Collaps shingen script into one file. Originally shingen was supposed to be much more featurefull, similar to naggen2. However, that is no longer the case - it simply generates hosts definitions with appropriate hostgroups. So simplify architecture to fit purpose Change-Id: Ied6ac68384c26443c067851517b65ef72f83cbde --- M scripts/shingen D shingen/generators/__init__.py D shingen/generators/generator.py D shingen/generators/hostgroups.py D shingen/generators/hosts.py D shingen/generators/run.py 6 files changed, 27 insertions(+), 78 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/shinkengen refs/changes/55/182055/1 diff --git a/scripts/shingen b/scripts/shingen index 032d055..b8cd586 100755 --- a/scripts/shingen +++ b/scripts/shingen @@ -1,17 +1,31 @@ #!/usr/bin/python3 import os import yaml -from shingen.generators.generator import GeneratorRunner -from shingen.generators.hostgroups import generate_hostgroups_config -from shingen.generators.hosts import generate_host_config -default_config = { -'projects': ['tools'], -'base_path': '.' -} -if os.path.exists('/etc/shinkengen.yaml'): -config = yaml.load(open('/etc/shinkengen.yaml')) -else: -config = default_config -gr = GeneratorRunner(config, generate_host_config, generate_hostgroups_config) -gr.generate() +from shingen.ldapsource import LDAPSource +from shingen.shinkenconfig import ConfigObject + +config = yaml.load(open('/etc/shinkengen.yaml')) + +ldapsource = LDAPSource(self.config['ldap']['server'], +self.config['ldap']['bindas'], +self.config['ldap']['password']) + +for project in self.config['projects']: +instances = ldapsource.get_hostsinfo(project) +host_configs = [] +for instance in instances: +co = ConfigObject('host') +co.properties['use'] = 'generic-host' +co.properties['host_name'] = instance['name'] +co.properties['address'] = instance['ip'] +hostgroups = [project_name] + instance['puppetClasses'] +co.properties['hostgroups'] = ','.join(hostgroups) +co.properties['contact_groups'] = project_name +co.properties['notes'] = project_name # Used for auto deriving graphite path +host_configs.append(co) +hosts_config_path = '%s/%s.cfg' % ( +self.config['base_path'], project +) +with open(hosts_config_path, 'w') as hostsfile: +hostsfile.write('\n'.join([str(co) for co in host_configs])) diff --git a/shingen/generators/__init__.py b/shingen/generators/__init__.py deleted file mode 100644 index e69de29..000 --- a/shingen/generators/__init__.py +++ /dev/null diff --git a/shingen/generators/generator.py b/shingen/generators/generator.py deleted file mode 100644 index 3890b3a..000 --- a/shingen/generators/generator.py +++ /dev/null @@ -1,38 +0,0 @@ - -Generator script that generates hosts and service configuration. - -1. Checks config to figure out which projects to monitor -2. Fetches instance information from ldap -3. Generates hosts info and hostgroups info for the instances - -from ..ldapsource import LDAPSource - - -class GeneratorRunner(): -def __init__(self, config, instances_generator=None, hostgroups_generator=None): -self.config = config -self.instance_generator = instances_generator -self.hostgroups_generator = hostgroups_generator - -def generate(self): -ldapsource = LDAPSource(self.config['ldap']['server'], -self.config['ldap']['bindas'], -self.config['ldap']['password']) -all_host_configs = [] -for project in self.config['projects']: -instances = ldapsource.get_hostsinfo(project) -host_configs = [] -for instance in instances: -hostconfig = self.instance_generator(self.config, project, instance) -host_configs.append(hostconfig) -hosts_config_path = '%s/%s.cfg' % ( -self.config['base_path'], project -) -with open(hosts_config_path, 'w') as hostsfile: -hostsfile.write('\n'.join([str(co) for co in host_configs])) -all_host_configs += host_configs - -hostgroup_configs = self.hostgroups_generator(all_host_configs) -hostgroups_config_path = '%s/hostgroups.cfg' % self.config['base_path'] -with open(hostgroups_config_path, 'w') as hostgroupsfile: -hostgroupsfile.write('\n'.join([str(co) for co in hostgroup_configs])) diff --git a/shingen/generators/hostgroups.py
[MediaWiki-commits] [Gerrit] Update version before MLEB release - change (mediawiki...Translate)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/182056 Change subject: Update version before MLEB release .. Update version before MLEB release Change-Id: I8bd70465847567605a7e4a756f8a40a8a1afc55e --- M Translate.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/56/182056/1 diff --git a/Translate.php b/Translate.php index 224e18f..a3524be 100644 --- a/Translate.php +++ b/Translate.php @@ -17,7 +17,7 @@ /** * Version number used in extension credits and in other places where needed. */ -define( 'TRANSLATE_VERSION', '2014-11-28' ); +define( 'TRANSLATE_VERSION', '2015-12-29' ); /** * Extension credits properties. -- To view, visit https://gerrit.wikimedia.org/r/182056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8bd70465847567605a7e4a756f8a40a8a1afc55e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update version before MLEB release - change (mediawiki...UniversalLanguageSelector)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/182057 Change subject: Update version before MLEB release .. Update version before MLEB release Change-Id: Ide75319f6caaad5e48cafbb24daff457b150a573 --- M UniversalLanguageSelector.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/57/182057/1 diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php index cc00903..094dfb1 100644 --- a/UniversalLanguageSelector.php +++ b/UniversalLanguageSelector.php @@ -25,7 +25,7 @@ /** * Version number used in extension credits and in other placed where needed. */ -define( 'ULS_VERSION', '2014-11-28' ); +define( 'ULS_VERSION', '2014-12-29' ); $GLOBALS['wgExtensionCredits']['other'][] = array( 'path' = __FILE__, -- To view, visit https://gerrit.wikimedia.org/r/182057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide75319f6caaad5e48cafbb24daff457b150a573 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update version before MLEB release - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update version before MLEB release .. Update version before MLEB release Change-Id: Ide75319f6caaad5e48cafbb24daff457b150a573 --- M UniversalLanguageSelector.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/UniversalLanguageSelector.php b/UniversalLanguageSelector.php index cc00903..094dfb1 100644 --- a/UniversalLanguageSelector.php +++ b/UniversalLanguageSelector.php @@ -25,7 +25,7 @@ /** * Version number used in extension credits and in other placed where needed. */ -define( 'ULS_VERSION', '2014-11-28' ); +define( 'ULS_VERSION', '2014-12-29' ); $GLOBALS['wgExtensionCredits']['other'][] = array( 'path' = __FILE__, -- To view, visit https://gerrit.wikimedia.org/r/182057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide75319f6caaad5e48cafbb24daff457b150a573 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Vastly simplify Shingen - change (operations...shinkengen)
Yuvipanda has submitted this change and it was merged. Change subject: Vastly simplify Shingen .. Vastly simplify Shingen - hostgroups don't need to be explicitly declared, apparently :) Are implicitly picked up if they exist in a host definition. - Collaps shingen script into one file. Originally shingen was supposed to be much more featurefull, similar to naggen2. However, that is no longer the case - it simply generates hosts definitions with appropriate hostgroups. So simplify architecture to fit purpose Change-Id: Ied6ac68384c26443c067851517b65ef72f83cbde --- M scripts/shingen M setup.py D shingen/generators/__init__.py D shingen/generators/generator.py D shingen/generators/hostgroups.py D shingen/generators/hosts.py D shingen/generators/run.py 7 files changed, 27 insertions(+), 79 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/scripts/shingen b/scripts/shingen index 032d055..9538110 100755 --- a/scripts/shingen +++ b/scripts/shingen @@ -1,17 +1,30 @@ #!/usr/bin/python3 import os import yaml -from shingen.generators.generator import GeneratorRunner -from shingen.generators.hostgroups import generate_hostgroups_config -from shingen.generators.hosts import generate_host_config -default_config = { -'projects': ['tools'], -'base_path': '.' -} -if os.path.exists('/etc/shinkengen.yaml'): -config = yaml.load(open('/etc/shinkengen.yaml')) -else: -config = default_config -gr = GeneratorRunner(config, generate_host_config, generate_hostgroups_config) -gr.generate() +from shingen.ldapsource import LDAPSource +from shingen.shinkenconfig import ConfigObject + +config = yaml.load(open('/etc/shinkengen.yaml')) + +ldapsource = LDAPSource(config['ldap']['server'], +config['ldap']['bindas'], +config['ldap']['password']) + +for project in config['projects']: +instances = ldapsource.get_hostsinfo(project) +host_configs = [] +for instance in instances: +co = ConfigObject('host') +co.properties['use'] = 'generic-host' +co.properties['host_name'] = instance['name'] +co.properties['address'] = instance['ip'] +co.properties['hostgroups'] = ','.join([project] + instance['puppetClasses']) +co.properties['contact_groups'] = project +co.properties['notes'] = project # Used for auto deriving graphite path +host_configs.append(co) +hosts_config_path = '%s/%s.cfg' % ( +config['base_path'], project +) +with open(hosts_config_path, 'w') as hostsfile: +hostsfile.write('\n'.join([str(co) for co in host_configs])) diff --git a/setup.py b/setup.py index f38b2d5..a0950c4 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name=shinkengen, -version='0.2', +version='0.3', author=Yuvi Panda, author_email=yuvipa...@gmail.com, description=(A shinken config generator for Wikimedia Labs), diff --git a/shingen/generators/__init__.py b/shingen/generators/__init__.py deleted file mode 100644 index e69de29..000 --- a/shingen/generators/__init__.py +++ /dev/null diff --git a/shingen/generators/generator.py b/shingen/generators/generator.py deleted file mode 100644 index 3890b3a..000 --- a/shingen/generators/generator.py +++ /dev/null @@ -1,38 +0,0 @@ - -Generator script that generates hosts and service configuration. - -1. Checks config to figure out which projects to monitor -2. Fetches instance information from ldap -3. Generates hosts info and hostgroups info for the instances - -from ..ldapsource import LDAPSource - - -class GeneratorRunner(): -def __init__(self, config, instances_generator=None, hostgroups_generator=None): -self.config = config -self.instance_generator = instances_generator -self.hostgroups_generator = hostgroups_generator - -def generate(self): -ldapsource = LDAPSource(self.config['ldap']['server'], -self.config['ldap']['bindas'], -self.config['ldap']['password']) -all_host_configs = [] -for project in self.config['projects']: -instances = ldapsource.get_hostsinfo(project) -host_configs = [] -for instance in instances: -hostconfig = self.instance_generator(self.config, project, instance) -host_configs.append(hostconfig) -hosts_config_path = '%s/%s.cfg' % ( -self.config['base_path'], project -) -with open(hosts_config_path, 'w') as hostsfile: -hostsfile.write('\n'.join([str(co) for co in host_configs])) -all_host_configs += host_configs - -hostgroup_configs = self.hostgroups_generator(all_host_configs) -hostgroups_config_path = '%s/hostgroups.cfg' % self.config['base_path'] -with
[MediaWiki-commits] [Gerrit] Re-position #mwe-popups-svg out of the view port - change (mediawiki...Popups)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/182058 Change subject: Re-position #mwe-popups-svg out of the view port .. Re-position #mwe-popups-svg out of the view port This div had been sitting visible at the bottom of the page and went unnoticed till it caused problems with the ContentTranslation extension. Hiding it using 'display: none;' causes issues with the masking of the images, thus putting the div out of the view port. Bug: T76718 Change-Id: I731128c827aa093e0ffab52dc378aea386b0bb3c --- M resources/ext.popups.core.less 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/58/182058/1 diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less index a8de706..bb625f4 100644 --- a/resources/ext.popups.core.less +++ b/resources/ext.popups.core.less @@ -4,6 +4,11 @@ * https://en.wikipedia.org/wiki/User:Yair_rand/NavPopupsRestyled.js */ +#mwe-popups-svg { + position: absolute; + top: -1000px; +} + .mwe-popups-border-triangle-top(@size, @left, @color, @extra) { content: ''; position: absolute; -- To view, visit https://gerrit.wikimedia.org/r/182058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I731128c827aa093e0ffab52dc378aea386b0bb3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] shinken: Move shinkengen into ops/puppet - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/182059 Change subject: shinken: Move shinkengen into ops/puppet .. shinken: Move shinkengen into ops/puppet Has been simplified to a point where I do not think it requires its own debian package. Abandoning operations/software/shinkengen for now. Change-Id: I60ca09fefd3b664ea4a189e96611ad1a6cf82d0f --- A modules/shinken/files/shinkengen M modules/shinken/manifests/shinkengen.pp 2 files changed, 131 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/59/182059/1 diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen new file mode 100755 index 000..b304387 --- /dev/null +++ b/modules/shinken/files/shinkengen @@ -0,0 +1,112 @@ +#!/usr/bin/python3 +import os +import yaml +import ldap3 +import jinja2 +from collections import OrderedDict + +from shingen.ldapsource import LDAPSource +from shingen.shinkenconfig import ConfigObject + + +class ConfigObject(): + +A Shinken configuration object. + +Has a type (Host, Hostgroup, Service, etc) and a bunch of key +value pairs that it can output in a format that shinken understands. + +TEMPLATE = jinja2.Template('''define {{ o.type }} { +{% for key, value in o.properties.items() -%} +{{ key }}{{ value }} +{% endfor -%} +}''') + +def __init__(self, type): +self.type = type # Host, HostGroup, Service, whatever +self.properties = OrderedDict() + +def __str__(self): +return ConfigObject.TEMPLATE.render(o=self) + + +class LDAPSource(object): + +A source of information about labs instances, querying LDAP + +def __init__(self, server, bindas, passwd): +server = ldap3.Server(server) +self.conn = ldap3.Connection(server, read_only=True, + user=bindas, password=passwd, + auto_bind=ldap3.AUTO_BIND_TLS_AFTER_BIND) + +def get_hosts(self, project): + +Get info about all instances in the given project. + +Returns the following information for each instance in given project: +- ec2id: Permanent id for this particular instance +- ip: Internal IP of this instance +- region: Which OpenStack Region this Instance is in +- puppetClasses: List of puppet classes applied to this instance via + configure page in wikitech. Also contains default + roles `role::labs::instance` and `base` +- project: Name of project the instance is contained in +- name: Name of the instance +- puppetVars: Dictionary containing any custom puppet variables that + have been set in the configure page in wikitech. Also + contains default keys of `instanceproject` `instancename` + +self.conn.search('ou=hosts,dc=wikimedia,dc=org', + '(puppetVar=instanceproject=%s)' % project, + ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, + attributes=ldap3.ALL_ATTRIBUTES) +hosts = [] +for responseitem in self.conn.response: +hostinfo = responseitem['attributes'] +ip = [a for a in hostinfo['aRecord'] if a.startswith('10.')][0] +puppetvars = {var[0]: var[1] for var in [pv.split(=) for pv in hostinfo['puppetVar']]} +hosts.append({ +'ec2id': hostinfo['dc'][0], +'ip': ip, +'region': hostinfo['l'][0], +'puppetClasses': hostinfo['puppetClass'], +'project': project, +'name': puppetvars['instancename'], +'puppetVars': puppetvars +}) + +return hosts + +if __name__ == '__main__': +with open('/etc/shinkengen.yaml') as f: +config = yaml.load(f) + +ldapsource = LDAPSource(config['ldap']['server'], +config['ldap']['bindas'], +config['ldap']['password']) + +for project in config['projects']: +instances = ldapsource.get_hostsinfo(project) +host_configs = [] +for instance in instances: +co = ConfigObject('host') +co.properties['use'] = 'generic-host' +co.properties['host_name'] = instance['name'] +co.properties['address'] = instance['ip'] +# Each role applied to this instance explicitly, via wikitech, +# is added as a hostgroup, so we can target particular roles wich checks. +co.properties['hostgroups'] = ','.join([project] + instance['puppetClasses']) +# For each project added to monitoring we expect a contactgroup with the same +# name added. +#
[MediaWiki-commits] [Gerrit] tox: Add flake83 environment to run flake8 under Python 3 - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: tox: Add flake83 environment to run flake8 under Python 3 .. tox: Add flake83 environment to run flake8 under Python 3 The flake8 env is now explicitly for Python 2. This will allow us to run flake8 on both 2 and 3 together. Change-Id: I3502b8266d735577089a3782d7e3f2c08c8c526e --- M tox.ini 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/tox.ini b/tox.ini index 35281f6..c040f75 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 1.6 skipsdist = True -envlist = flake8,flake8-docstrings,py26,py27,py34 +envlist = flake8,flake83,flake8-docstrings,py26,py27,py34 [testenv] setenv = VIRTUAL_ENV={envdir} @@ -11,9 +11,17 @@ [testenv:flake8] commands = flake8 --ignore=D102,D103,E122,E127,E241 {posargs} +basepython = python2.7 deps = flake8 flake8-docstrings +[testenv:flake83] +commands = flake8 --ignore=D102,D103,E122,E127,E241 {posargs} +basepython = python3 +deps = flake8 + flake8-docstrings + + [testenv:flake8-docstrings] commands = flake8 {posargs} deps = flake8=2.2.5 -- To view, visit https://gerrit.wikimedia.org/r/182042 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3502b8266d735577089a3782d7e3f2c08c8c526e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: Xqt i...@gno.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix: ImportCsv::execute did not commit changes - change (mediawiki...MathSearch)
Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/182060 Change subject: Fix: ImportCsv::execute did not commit changes .. Fix: ImportCsv::execute did not commit changes Change-Id: I88222aab296b0f5ce8d19e4380675265ed57a9f5 --- M includes/ImportCsv.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/60/182060/1 diff --git a/includes/ImportCsv.php b/includes/ImportCsv.php index 33b8ead..f4c3870 100644 --- a/includes/ImportCsv.php +++ b/includes/ImportCsv.php @@ -54,7 +54,10 @@ $this-overwrite = $overwrite; $runId = $this-validateRunId( $runId ); if ( $runId !== false ) { - return $this-importFromFile( $csvFile ); + $success = $this-importFromFile( $csvFile ); + if ( $success == true ){ + return $this-processInput(); + } } else { return Error: Invalid runId.; } -- To view, visit https://gerrit.wikimedia.org/r/182060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88222aab296b0f5ce8d19e4380675265ed57a9f5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix: ImportCsv::execute did not commit changes - change (mediawiki...MathSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix: ImportCsv::execute did not commit changes .. Fix: ImportCsv::execute did not commit changes Change-Id: I88222aab296b0f5ce8d19e4380675265ed57a9f5 --- M includes/ImportCsv.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Physikerwelt: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ImportCsv.php b/includes/ImportCsv.php index 33b8ead..f4c3870 100644 --- a/includes/ImportCsv.php +++ b/includes/ImportCsv.php @@ -54,7 +54,10 @@ $this-overwrite = $overwrite; $runId = $this-validateRunId( $runId ); if ( $runId !== false ) { - return $this-importFromFile( $csvFile ); + $success = $this-importFromFile( $csvFile ); + if ( $success == true ){ + return $this-processInput(); + } } else { return Error: Invalid runId.; } -- To view, visit https://gerrit.wikimedia.org/r/182060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88222aab296b0f5ce8d19e4380675265ed57a9f5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tweaks to login and sign up form in alpha - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Tweaks to login and sign up form in alpha .. Tweaks to login and sign up form in alpha * Make corners rounded for inputs * Center links underneath form * Hide specific content to focus on primary purpose of form See also: I175e9f515d962f9078845f25f9b96079819444c6 Change-Id: I16ac04f467d4f16977546ec276f89b1ac871114e --- M less/specials/userlogin.less 1 file changed, 24 insertions(+), 5 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/less/specials/userlogin.less b/less/specials/userlogin.less index 55c2c37..87caec8 100644 --- a/less/specials/userlogin.less +++ b/less/specials/userlogin.less @@ -87,21 +87,29 @@ @margin: 12px; .alpha { + // reason for account creation is not so important on mobile - it should be obvious through the workflows + .mw-createacct-benefits-container { + display: none; + } + #userloginForm { + // tips are not useful + .prefsectiontip, + // hide help link + #mw-userlogin-help, + // benefits are obvious through the workflows + #wpReason, + // real name in account creation is not so important on mobile + #wpRealName, // Hide keep me logged in checkbox on mobile. // FIXME: this should be checked by default on mobile. Use JavaScript to check this? .mw-ui-checkbox { display: none; } - - .loginText { - border-bottom: 0; - } } // account creation #userlogin2 { - #wpEmail, .loginPassword { border-bottom: 0; } @@ -109,6 +117,10 @@ .mw-ui-checkbox { margin: @margin 0; } + } + + .mw-ui-vform-field { + text-align: center; } .mw-ui-vform { @@ -143,6 +155,13 @@ // Make the inputs look connected in mobile mode .mw-ui-input { border: solid 1px @colorGrayLight; + + #wpEmail, + .loginPassword { + border-top-left-radius: 0; + border-top-right-radius: 0; + margin-top: -1px; + } } } } -- To view, visit https://gerrit.wikimedia.org/r/181531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16ac04f467d4f16977546ec276f89b1ac871114e Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@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] Don't conditionally register hooks - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: Don't conditionally register hooks .. Don't conditionally register hooks ExtensionFunctions are called whenever MediaWiki is initialized, but the hooks will only be called whenever neccessary, so move the conditionals (whether CentralAuth exists) into the hook function itself. Change-Id: Id61b9f57a71a4a7c7d06d6967826eaafabd31b40 --- M GettingStarted.php M Hooks.php 2 files changed, 6 insertions(+), 16 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/GettingStarted.php b/GettingStarted.php index 392926a..f940d42 100644 --- a/GettingStarted.php +++ b/GettingStarted.php @@ -368,11 +368,12 @@ $wgHooks[ 'ArticleDeleteComplete' ][] = 'GettingStarted\RedisCategorySync::onArticleDeleteComplete'; $wgHooks[ 'MakeGlobalVariablesScript' ][] = 'GettingStarted\Hooks::onMakeGlobalVariablesScript'; $wgHooks[ 'ResourceLoaderGetConfigVars' ][] = 'GettingStarted\Hooks::onResourceLoaderGetConfigVars'; +$wgHooks[ 'CentralAuthPostLoginRedirect' ][] = 'GettingStarted\Hooks::onCentralAuthPostLoginRedirect'; +$wgHooks[ 'PostLoginRedirect' ][] = 'GettingStarted\Hooks::onPostLoginRedirect'; $wgHooks[ 'GetPreferences' ][] = 'GettingStarted\Hooks::onGetPreferences'; $wgHooks[ 'UserLogoutComplete'][] = 'GettingStarted\Hooks::onUserLogoutComplete'; $wgHooks[ 'PersonalUrls' ][] = 'GettingStarted\Hooks::onPersonalUrls'; $wgHooks[ 'UnitTestsList' ][] = 'GettingStarted\Hooks::onUnitTestsList'; -$wgExtensionFunctions[] = 'GettingStarted\Hooks::onSetup'; list( $site, $lang ) = $wgConf-siteFromDB( $wgDBname ); diff --git a/Hooks.php b/Hooks.php index b096e51..7ce0ea2 100644 --- a/Hooks.php +++ b/Hooks.php @@ -13,21 +13,6 @@ class Hooks { /** -* Determine which post login hook to register and register it -* This allows GettingStarted to work with or without CentralAuth -* See Bug: 65619 -*/ - public static function onSetup() { - global $wgHooks; - $isCentralAuthAvailable = class_exists( 'SpecialCentralLogin' ); - if( $isCentralAuthAvailable ) { - $wgHooks[ 'CentralAuthPostLoginRedirect' ][] = 'GettingStarted\Hooks::onCentralAuthPostLoginRedirect'; - } else { - $wgHooks[ 'PostLoginRedirect' ][] = 'GettingStarted\Hooks::onPostLoginRedirect'; - } - } - - /** * Deserialized vesion of the openTask data structure. * Initialized as needed. * @@ -355,6 +340,10 @@ * @param string $type login redirect condition */ public static function onPostLoginRedirect( $returnTo, $returnToQuery, $type ) { + if ( class_exists( 'SpecialCentralLogin' ) ) { + // Will be handled by the CentralAuthPostLoginRedirect hook + return true; + } // Abort if we should not show getting started if ( !self::shouldShowGettingStarted( $returnToQuery, $type ) ) { return true; -- To view, visit https://gerrit.wikimedia.org/r/179961 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id61b9f57a71a4a7c7d06d6967826eaafabd31b40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr 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] Use interwiki links for qqq messages - change (pywikibot/i18n)
jenkins-bot has submitted this change and it was merged. Change subject: Use interwiki links for qqq messages .. Use interwiki links for qqq messages qqq messages used http external links which could be replaced with interwiki links to WMF projects. Change-Id: I7319053be018cb597801959d39cc571f67549294 --- M category.py M category/qqq.json M isbn.py M isbn/qqq.json M thirdparty.py M thirdparty/qqq.json 6 files changed, 6 insertions(+), 6 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/category.py b/category.py index 1277b68..503a0fe 100644 --- a/category.py +++ b/category.py @@ -31,7 +31,7 @@ 'category-removing': u'Edit summary. Parameters:\n* %(oldcat)s - old category name', 'category-was-moved': u'{{doc-important|Do not translate [[:Category:%(newcat)s|%(title)s]]}}', 'category-section-title': u'Section title for keeping page history', -'category-listifying': u'Definition of [http://meta.wikimedia.org/wiki/Pywikipediabot/category.py#Syntax listify] - make a list of all of the articles that are in a category.\n\n*Variable %(fromcat)s = the category to make a list of in the listify option.\n*Variable %(num)d is probably a number.\n*You may use PLURAL tag like (codenowiki{{PLURAL:%(num)d|1 entry|%(num)d entries}}/nowiki/code)\nDo not translate the variables.', +'category-listifying': u'Definition of [[mw:Manual:Pywikibot/category.py#Syntax listify] - make a list of all of the articles that are in a category.\n\n*Variable %(fromcat)s = the category to make a list of in the listify option.\n*Variable %(num)d is probably a number.\n*You may use PLURAL tag like (codenowiki{{PLURAL:%(num)d|1 entry|%(num)d entries}}/nowiki/code)\nDo not translate the variables.', }, # Author: Csisc 'aeb': { diff --git a/category/qqq.json b/category/qqq.json index 3a723ae..88f1880 100644 --- a/category/qqq.json +++ b/category/qqq.json @@ -16,5 +16,5 @@ category-removing: Edit summary. Parameters:\n* %(oldcat)s - old category name, category-was-moved: {{doc-important|Do not translate \[[:Category:%(newcat)s|%(title)s]]\}}, category-section-title: Section title for keeping page history, - category-listifying: Definition of [http://meta.wikimedia.org/wiki/Pywikipediabot/category.py#Syntax listify] - make a list of all of the articles that are in a category.\n\n*Variable \%(fromcat)s\ = the category to make a list of in the listify option.\n*Variable \%(num)d\ is probably a number.\n*You may use PLURAL tag like (codenowiki{{PLURAL:%(num)d|1 entry|%(num)d entries}}/nowiki/code)\nDo not translate the variables. + category-listifying: Definition of [[mw:Manual:Pywikibot/category.py#Syntax listify] - make a list of all of the articles that are in a category.\n\n*Variable \%(fromcat)s\ = the category to make a list of in the listify option.\n*Variable \%(num)d\ is probably a number.\n*You may use PLURAL tag like (codenowiki{{PLURAL:%(num)d|1 entry|%(num)d entries}}/nowiki/code)\nDo not translate the variables. } diff --git a/isbn.py b/isbn.py index b56aa93..3aab3d8 100644 --- a/isbn.py +++ b/isbn.py @@ -7,7 +7,7 @@ # Author: Lloffiwr # Author: Xqt 'qqq': { -'isbn-formatting': u'Edit summary when the bot fixes [http://en.wikipedia.org/wiki/International_Standard_Book_Number ISBN] number formatting.', +'isbn-formatting': u'Edit summary when the bot fixes [[w:International Standard Book Number|ISBN]] number formatting.', }, # Author: Csisc 'aeb': { diff --git a/isbn/qqq.json b/isbn/qqq.json index b0cef69..c7952d4 100644 --- a/isbn/qqq.json +++ b/isbn/qqq.json @@ -4,5 +4,5 @@ Lloffiwr ] }, - isbn-formatting: Edit summary when the bot fixes [http://en.wikipedia.org/wiki/International_Standard_Book_Number ISBN] number formatting. + isbn-formatting: Edit summary when the bot fixes [[w:International Standard Book Number|ISBN]] number formatting. } diff --git a/thirdparty.py b/thirdparty.py index 338fb28..f857e38 100644 --- a/thirdparty.py +++ b/thirdparty.py @@ -30,7 +30,7 @@ 'qqq': { 'thirdparty-drtrigonbot-sum_disc-summary-head': u'Summary line first part.\n{{Identical|Bot}}', 'thirdparty-drtrigonbot-sum_disc-parse-nonhuman': u'Message part indicating the fact that no human editor is given for a page.', -'thirdparty-drtrigonbot-sum_disc-parse-start': u'Message header for bot report output. Is just a timestamp format and language independent.\n\nTimestamp format markers are as in the strftime C function. See man 3 strftime on any Linux/Unix system, or http://www.manpagez.com/man/3/strftime/', +'thirdparty-drtrigonbot-sum_disc-parse-start': u'Message header for bot report output. Is just a timestamp format and language independent.\n\nTimestamp
[MediaWiki-commits] [Gerrit] Parse standard date formats with wfTimestamp() - change (mediawiki...CommonsMetadata)
Unicodesnowman has uploaded a new change for review. https://gerrit.wikimedia.org/r/182061 Change subject: Parse standard date formats with wfTimestamp() .. Parse standard date formats with wfTimestamp() Attempt to use wfTimestamp() to parse the datetime attribute. Also update a test that was slightly out of date. Bug: T66014 Change-Id: I1bf9581a527c6033213c095a667e92d13c673c6e --- M TemplateParser.php M tests/data/File_Dala_Kyrka.JPG.php M tests/html/File_Dala_Kyrka.JPG.html 3 files changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CommonsMetadata refs/changes/61/182061/1 diff --git a/TemplateParser.php b/TemplateParser.php index 82cee16..de1f1a1 100644 --- a/TemplateParser.php +++ b/TemplateParser.php @@ -272,7 +272,8 @@ } /** -* Parses the DateTimeOriginal - finds time tag and returns the value of datetime attribute +* Parses the DateTimeOriginal - finds time tag and returns the parsed value of the +* datetime attribute, or the raw value if parsing failed. * @param DomNavigator $domNavigator * @param DOMNode $node * @return string @@ -280,7 +281,13 @@ protected function parseFieldDateTimeOriginal( DomNavigator $domNavigator, DOMNode $node ) { $nodes = $domNavigator-findElementsWithAttribute( 'time', 'datetime', $node ); foreach ( $nodes as $time ) { - return $time-getAttribute( 'datetime' ); + $rawTs = $time-getAttribute( 'datetime' ); + $parsedTs = wfTimestamp( TS_DB, $rawTs ); + if ( $parsedTs ) { + return $parsedTs; + } else { + return $rawTs; + } } return $this-parseContents( $domNavigator, $node ); diff --git a/tests/data/File_Dala_Kyrka.JPG.php b/tests/data/File_Dala_Kyrka.JPG.php index a69dac2..5dcd704 100644 --- a/tests/data/File_Dala_Kyrka.JPG.php +++ b/tests/data/File_Dala_Kyrka.JPG.php @@ -7,7 +7,7 @@ return array ( 'DateTimeOriginal' = array ( - 'value' = '2013-10-27', + 'value' = '2013-10-27 10:27:44', 'source' = 'commons-desc-page', ), 'License' = diff --git a/tests/html/File_Dala_Kyrka.JPG.html b/tests/html/File_Dala_Kyrka.JPG.html index 706476d..db3bb8d 100644 --- a/tests/html/File_Dala_Kyrka.JPG.html +++ b/tests/html/File_Dala_Kyrka.JPG.html @@ -9,7 +9,7 @@ /tr tr style=vertical-align: top td id=fileinfotpl_date class=fileinfo-paramfieldDate/td -tdtime class=dtstart datetime=2013-10-2727 October 2013/time, 10:27:44/td +tdtime class=dtstart datetime=2013-10-27 10:27:4427 October 2013, 10:27:44/time/td /tr tr style=vertical-align: top td id=fileinfotpl_src class=fileinfo-paramfieldSource/td -- To view, visit https://gerrit.wikimedia.org/r/182061 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bf9581a527c6033213c095a667e92d13c673c6e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CommonsMetadata Gerrit-Branch: master Gerrit-Owner: Unicodesnowman ad...@glados.cc ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow querying for multiple MIME types in the allimages API - change (mediawiki/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/182062 Change subject: Allow querying for multiple MIME types in the allimages API .. Allow querying for multiple MIME types in the allimages API The 'aimime' parameter can now be a pipe-separated list of MIME types. Also tweaked the English apihelp and added an example for the new functionality. Bug: T78690 Change-Id: I775ecae53c81eccb0a898081715d48589b53af15 --- M RELEASE-NOTES-1.25 M includes/api/ApiQueryAllImages.php M includes/api/i18n/en.json M includes/api/i18n/qqq.json 4 files changed, 18 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/182062/1 diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 77dc55b..065a5d7 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -161,6 +161,8 @@ * (T76052) list=tags can now indicate whether a tag is defined. * (T75522) list=prefixsearch now supports continuation * (T78737) action=expandtemplates can now return page properties. +* (T78690) list=allimages now accepts multiple pipe-separated values + for the 'aimime' parameter. === Action API internal changes in 1.25 === * ApiHelp has been rewritten to support i18n and paginated HTML output. diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index 20e9f5e..1565bfa 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -232,10 +232,16 @@ $this-dieUsage( 'MIME search disabled in Miser Mode', 'mimesearchdisabled' ); } - list( $major, $minor ) = File::splitMime( $params['mime'] ); - - $this-addWhereFld( 'img_major_mime', $major ); - $this-addWhereFld( 'img_minor_mime', $minor ); + $mimeConds = array(); + foreach ( $params['mime'] as $mime ) { + list( $major, $minor ) = File::splitMime( $mime ); + $conds = array( + 'img_major_mime = ' . $db-addQuotes( $major ), + 'img_minor_mime = ' . $db-addQuotes( $minor ) + ); + $mimeConds[] = '(' . implode( ' AND ', $conds ) . ')'; + } + $this-addWhere( implode( ' OR ', $mimeConds ) ); } $limit = $params['limit']; @@ -359,6 +365,7 @@ ), 'mime' = array( ApiBase::PARAM_DFLT = null, + ApiBase::PARAM_ISMULTI = true, ), 'limit' = array( ApiBase::PARAM_DFLT = 10, @@ -385,6 +392,8 @@ 'action=querylist=allimagesaiprop=user|timestamp|url' . 'aisort=timestampaidir=older' = 'apihelp-query+allimages-example-recent', + 'action=querylist=allimagesaimime=image/png|image/gif' + = 'apihelp-query+allimages-example-mimetypes', 'action=querygenerator=allimagesgailimit=4' . 'gaifrom=Tprop=imageinfo' = 'apihelp-query+allimages-example-generator', diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index 61de86c..85ca389 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -365,10 +365,11 @@ apihelp-query+allimages-param-sha1base36: SHA1 hash of image in base 36 (used in MediaWiki)., apihelp-query+allimages-param-user: Only return files uploaded by this user. Can only be used with $1sort=timestamp. Cannot be used together with $1filterbots., apihelp-query+allimages-param-filterbots: How to filter files uploaded by bots. Can only be used with $1sort=timestamp. Cannot be used together with $1user., - apihelp-query+allimages-param-mime: What MIME type to search for. e.g. image/jpeg., + apihelp-query+allimages-param-mime: What MIME type(s) to search for. e.g. image/jpeg., apihelp-query+allimages-param-limit: How many images in total to return., apihelp-query+allimages-example-B: Show a list of files starting at the letter \B\, apihelp-query+allimages-example-recent: Show a list of recently uploaded files similar to [[Special:NewFiles]], + apihelp-query+allimages-example-mimetypes: Show a list of files with MIME type \image/png\ or \image/gif\, apihelp-query+allimages-example-generator: Show info about 4 files starting at the letter \T\, apihelp-query+alllinks-description: Enumerate all links that point to a given
[MediaWiki-commits] [Gerrit] Hygiene: Move Return to $1 page to footer - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Move Return to $1 page to footer .. Hygiene: Move Return to $1 page to footer Until we have a much better design for it. Bug: T73919 Change-Id: I06b19c27cecbb822891845cef0450151f03fef9b --- M includes/skins/MinervaTemplate.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/skins/MinervaTemplate.php b/includes/skins/MinervaTemplate.php index 81d5010..c1fce55 100644 --- a/includes/skins/MinervaTemplate.php +++ b/includes/skins/MinervaTemplate.php @@ -257,10 +257,10 @@ ) ); ? ?php + echo $data[ 'bodytext' ]; if ( isset( $data['subject-page'] ) ) { echo $data['subject-page']; } - echo $data[ 'bodytext' ]; $this-renderSecondaryActions(); $this-renderHistoryLinkBottom( $data ); ? -- To view, visit https://gerrit.wikimedia.org/r/181802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I06b19c27cecbb822891845cef0450151f03fef9b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: Fix add of no-position-fixed - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Fix add of no-position-fixed .. Hygiene: Fix add of no-position-fixed Don't add no-position-fixed for browsers _supports_ fixed positions. Follow up: I9d1ff1725ba43956d1b7f1f9c2732ce9b2e80392 Bug: T85258 Change-Id: Iab58999e43f1654d76589e8fb53a2e0e927e1ac8 --- M javascripts/application.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/application.js b/javascripts/application.js index fd38622..825faa3 100644 --- a/javascripts/application.js +++ b/javascripts/application.js @@ -70,7 +70,7 @@ if ( browser.supportsAnimations() ) { $viewport.addClass( 'animations' ); } - if ( browser.supportsPositionFixed() ) { + if ( !browser.supportsPositionFixed() ) { $viewport.addClass( 'no-position-fixed' ); } if ( browser.supportsTouchEvents() ) { -- To view, visit https://gerrit.wikimedia.org/r/181874 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab58999e43f1654d76589e8fb53a2e0e927e1ac8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de Gerrit-Reviewer: Phuedx g...@samsmith.io Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update jquery.i18n to b9906c0 - change (mediawiki...UniversalLanguageSelector)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/182063 Change subject: Update jquery.i18n to b9906c0 .. Update jquery.i18n to b9906c0 Changes: * Add ability to rely on default configuration when loading messages. Change-Id: Ic2c00526c0d5b1a60cac81925e2bc24228d8767c --- M lib/jquery.i18n/jquery.i18n.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/63/182063/1 diff --git a/lib/jquery.i18n/jquery.i18n.js b/lib/jquery.i18n/jquery.i18n.js index 461ec94..ccd36b4 100644 --- a/lib/jquery.i18n/jquery.i18n.js +++ b/lib/jquery.i18n/jquery.i18n.js @@ -138,10 +138,15 @@ */ load: function ( source, locale ) { var fallbackLocales, locIndex, fallbackLocale, sourceMap = {}; - + if (!source !locale) { + source = 'i18n/' + $.i18n().locale + '.json'; + locale = $.i18n().locale; + } if ( typeof source === 'string' source.split('.').pop() !== 'json' ) { + // Load specified locale then check for fallbacks when directory is specified in load() + sourceMap[locale] = source + '/' + locale + '.json'; fallbackLocales = ( $.i18n.fallbacks[locale] || [] ) .concat( this.options.fallbackLocale ); for ( locIndex in fallbackLocales ) { -- To view, visit https://gerrit.wikimedia.org/r/182063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2c00526c0d5b1a60cac81925e2bc24228d8767c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update jquery.ime to 806deb2 - change (mediawiki...UniversalLanguageSelector)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/182064 Change subject: Update jquery.ime to 806deb2 .. Update jquery.ime to 806deb2 Changes: * README update to point about writing tests for IMEs. * Take scrollTop/scrollLeft into account when positioning. Change-Id: Ie39fb3f7f9f944e0186b74a51812e4d424174051 --- M lib/jquery.ime/jquery.ime.js M lib/jquery.ime/rules/README.md 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/64/182064/1 diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index a191683..65cad41 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0+20141028 +/*! jquery.ime - v0.1.0+20141229 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2014 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { @@ -1026,7 +1026,7 @@ */ position: function () { var menuWidth, menuTop, menuLeft, elementPosition, - top, left, verticalRoom, overflowsOnRight, + top, left, cssTop, cssLeft, verticalRoom, overflowsOnRight, imeSelector = this, rtlElement = this.$element.css( 'direction' ) === 'rtl', $window = $( window ); @@ -1062,21 +1062,24 @@ } } + cssTop = top; + cssLeft = left; this.$element.parents().each( function() { if ( $( this ).css( 'position' ) === 'fixed' ) { imeSelector.$imeSetting.css( 'position', 'fixed' ); - + cssTop -= $( document ).scrollTop(); + cssLeft -= $( document ).scrollLeft(); return false; } } ); this.$imeSetting.css( { - top: top, - left: left + top: cssTop, + left: cssLeft } ); menuWidth = this.$menu.width(); - overflowsOnRight = ( left + menuWidth ) $window.width(); + overflowsOnRight = ( left - $( document ).scrollLeft() + menuWidth ) $window.width(); // Adjust horizontal position if there's // not enough space on any side diff --git a/lib/jquery.ime/rules/README.md b/lib/jquery.ime/rules/README.md index 6197920..b178934 100644 --- a/lib/jquery.ime/rules/README.md +++ b/lib/jquery.ime/rules/README.md @@ -105,3 +105,4 @@ For complete examples, please refer the existing input method definitions. +Documentation of input methods are available at https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods -- To view, visit https://gerrit.wikimedia.org/r/182064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie39fb3f7f9f944e0186b74a51812e4d424174051 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update jquery.i18n to b9906c0 - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update jquery.i18n to b9906c0 .. Update jquery.i18n to b9906c0 Changes: * Add ability to rely on default configuration when loading messages. Change-Id: Ic2c00526c0d5b1a60cac81925e2bc24228d8767c --- M lib/jquery.i18n/jquery.i18n.js 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.i18n/jquery.i18n.js b/lib/jquery.i18n/jquery.i18n.js index 461ec94..ccd36b4 100644 --- a/lib/jquery.i18n/jquery.i18n.js +++ b/lib/jquery.i18n/jquery.i18n.js @@ -138,10 +138,15 @@ */ load: function ( source, locale ) { var fallbackLocales, locIndex, fallbackLocale, sourceMap = {}; - + if (!source !locale) { + source = 'i18n/' + $.i18n().locale + '.json'; + locale = $.i18n().locale; + } if ( typeof source === 'string' source.split('.').pop() !== 'json' ) { + // Load specified locale then check for fallbacks when directory is specified in load() + sourceMap[locale] = source + '/' + locale + '.json'; fallbackLocales = ( $.i18n.fallbacks[locale] || [] ) .concat( this.options.fallbackLocale ); for ( locIndex in fallbackLocales ) { -- To view, visit https://gerrit.wikimedia.org/r/182063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic2c00526c0d5b1a60cac81925e2bc24228d8767c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com 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] Specify media type for interface messages - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Specify media type for interface messages .. Specify media type for interface messages Certain interface messages always refers to 'video', even when the media is an audio file. Create share_this_audio, rename download_full to download_full_video and create download_full_audio. Bug: T46267 Change-Id: I5826fce0d8b2d17cabaa3f0ce33543e3ffeb94fc --- M MwEmbedModules/EmbedPlayer/i18n/en.json M MwEmbedModules/EmbedPlayer/i18n/qqq.json M MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js 3 files changed, 14 insertions(+), 4 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/MwEmbedModules/EmbedPlayer/i18n/en.json b/MwEmbedModules/EmbedPlayer/i18n/en.json index d3221a2..15b0061 100644 --- a/MwEmbedModules/EmbedPlayer/i18n/en.json +++ b/MwEmbedModules/EmbedPlayer/i18n/en.json @@ -24,7 +24,8 @@ mwe-embedplayer-seek_to: Seek $1, mwe-embedplayer-paused: paused, mwe-embedplayer-download_segment: Download selection:, -mwe-embedplayer-download_full: Download full video file:, +mwe-embedplayer-download_full_video: Download full video file:, +mwe-embedplayer-download_full_audio: Download full audio file:, mwe-embedplayer-download_right_click: To download, right click and select iSave link as.../i, mwe-embedplayer-download_clip: Download video, mwe-embedplayer-download_text: Download text, @@ -37,6 +38,7 @@ mwe-embedplayer-choose_player: Choose video player, mwe-embedplayer-no-player: No player available for $1, mwe-embedplayer-share_this_video: Share this video, +mwe-embedplayer-share_this_audio: Share this audio file, mwe-embedplayer-video_credits: Video credits, mwe-embedplayer-no-video_credits: No credits available, mwe-embedplayer-kaltura-platform-title: Kaltura open source video platform, diff --git a/MwEmbedModules/EmbedPlayer/i18n/qqq.json b/MwEmbedModules/EmbedPlayer/i18n/qqq.json index 0b17710..a96b0e1 100644 --- a/MwEmbedModules/EmbedPlayer/i18n/qqq.json +++ b/MwEmbedModules/EmbedPlayer/i18n/qqq.json @@ -35,5 +35,9 @@ mwe-embedplayer-vlcapp-downloadapp: First bullet point after the mwe-embedplayer-vlcapp-intro. Links to the download page for installing the vlc app ( https://itunes.apple.com/us/app/vlc-for-ios/id650377962?mt=8 )., mwe-embedplayer-vlcapp-openvideo: Second bullet point after the mwe-embedplayer-vlcapp-intro. Link will open the video in the VLC app, if the app is installed, mwe-embedplayer-vlcapp-downloadvideo: Third bullet point after the mwe-embedplayer-vlcapp-intro. Linked directly to the video file, - mwe-embedplayer-vlcapp-vlcapppopup: Popup dialog box shown to user if they do not have the VLC app installed when trying to play a video on iPhone/iPad. Box will be presented with this message and two buttons (OK and cancel. Actual text of buttons may vary.) If user presses ok, they are redirected to https://itunes.apple.com/us/app/vlc-for-ios/id650377962?mt=8.; + mwe-embedplayer-vlcapp-vlcapppopup: Popup dialog box shown to user if they do not have the VLC app installed when trying to play a video on iPhone/iPad. Box will be presented with this message and two buttons (OK and cancel. Actual text of buttons may vary.) If user presses ok, they are redirected to https://itunes.apple.com/us/app/vlc-for-ios/id650377962?mt=8.;, + mwe-embedplayer-share_this_video: Header for the Share tab in the menu, when it's a video file., + mwe-embedplayer-share_this_audio: Header for the Share tab in the menu, when it's an audio file., + mwe-embedplayer-download_full_video: Header for the Download tab in the menu, when it's a video file., + mwe-embedplayer-download_full_audio: Header for the Download tab in the menu, when it's an audio file. } diff --git a/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js b/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js index 98602da..0fa24bc 100644 --- a/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js +++ b/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js @@ -1939,7 +1939,9 @@ $shareInterface.append( $( 'h2 /' ) - .text( mw.msg( 'mwe-embedplayer-share_this_video' ) ) + .text( embedPlayer.isAudio() ? + mw.msg( 'mwe-embedplayer-share_this_audio' ) : + mw.msg( 'mwe-embedplayer-share_this_video' ) ) ); if ( embed_wiki_code ) { @@ -2161,7 +2163,9 @@ if( $mediaList.find('li').length != 0 ) { $target.append( $('h2 /') - .text( mw.msg(
[MediaWiki-commits] [Gerrit] Hygiene: Organise our long list of globals - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Organise our long list of globals .. Hygiene: Organise our long list of globals Help make them more discoverable. * Kill the now reundant upload progress bar global. Change-Id: Ie57c1737b2afe742d5b63d36e9e70eabb84ce699 --- M MobileFrontend.php A includes/Config.php A includes/config/Analytics.php A includes/config/Apps.php A includes/config/Editing.php A includes/config/Experimental.php A includes/config/Legacy.php A includes/config/Nearby.php A includes/config/Site.php A includes/config/Skin.php A includes/config/Uploads.php M includes/config/Wikidata.php M includes/skins/SkinMinerva.php M javascripts/api.js 14 files changed, 426 insertions(+), 382 deletions(-) Approvals: Jhernandez: Looks good to me, but someone else must approve Florianschmidtwelzow: Looks good to me, but someone else must approve Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/MobileFrontend.php b/MobileFrontend.php index 69f2693..3c4543d 100644 --- a/MobileFrontend.php +++ b/MobileFrontend.php @@ -236,383 +236,4 @@ /** * Begin configuration variables */ - -/** - * The default skin for MobileFrontend - * Defaults to SkinMinerva - */ -$wgMFDefaultSkinClass = 'SkinMinerva'; - -/* - * Allow editing (uploading) to external CentralAuth-enabled wikis where - * the user might not be logged in. - */ -$wgMFUseCentralAuthToken = false; - -/** - * An api to which any photos should be uploaded - * e.g. $wgMFPhotoUploadEndpoint = 'https://commons.wikimedia.org/w/api.php'; - * Defaults to the current wiki - */ -$wgMFPhotoUploadEndpoint = ''; - -/** - * An optional alternative api to query for nearby pages - * e.g. https://en.m.wikipedia.org/w/api.php - * - * If set forces nearby to operate in JSONP mode - * @var String - */ -$wgMFNearbyEndpoint = ''; - -/** - * API for querying Wikidata instance. - * e.g. https://en.m.wikipedia.org/w/api.php - * - * @var String - */ -$wgMFWikiDataEndpoint = 'https://m.wikidata.org/w/api.php'; - -/** - * The content namespace(s) that Special:Nearby and Special:Random should use. - * Should be one or more of NS_* constants, pipe-separated. - * @var int|string - */ -$wgMFContentNamespace = NS_MAIN; - -/** - * The wiki id/dbname for where photos are uploaded, if photos are uploaded to - * a wiki other than the local wiki (eg commonswiki). - * @var string - */ -$wgMFPhotoUploadWiki = null; - -/** - * Path to the logo used in the login/signup form - * The standard height is 72px - */ -$wgMobileFrontendLogo = false; - -/** - * Template for mobile URLs. - * - * This will be used to transcode regular URLs into mobile URLs for the - * mobile view. - * - * It's possible to specify the 'mobileness' of the URL in the host portion of - * the URL. - * - * You can either statically or dynamically create the host-portion of your - * mobile URL. To statically create it, just set $wgMobileUrlTemplate to - * the static hostname. For example: - * $wgMobileUrlTemplate = mobile.mydomain.com; - * - * Alternatively, the host definition can include placeholders for different - * parts of the 'host' section of a URL. The placeholders are denoted by '%h' - * and followed with a digit that maps to the position of a host-part of the - * original, non-mobile URL. Take the host 'en.wikipedia.org' for example. - * '%h0' maps to 'en', '%h1' maps to 'wikipedia', and '%h2' maps to 'org'. - * So, if you wanted a mobile URL scheme that turned en.wikipedia.org into - * en.m.wikipedia.org, your URL template would look like: - * %h0.m.%h1.%h2 - */ -$wgMobileUrlTemplate = ''; - -/** - * The number of seconds the 'useformat' cookie should be valid - * - * The useformat cookie gets set when a user manually elects to view - * either the mobile or desktop view of the site. - * - * If this value is not set, it will default to $wgCookieExpiration - */ -$wgMobileFrontendFormatCookieExpiry = null; - -/** - * Make the classes, tags and ids stripped from page content configurable. - * Each item will be stripped from the page. - */ -$wgMFRemovableClasses = array( - // These rules will be used for all transformations - 'base' = array(), - // HTML view - 'HTML' = array(), -); - -/** - * Make the logos configurable. - * - * Currently, 'copyright', 'copyright-width', and 'copyright-height' elements are supported. - * 'copyright' is the URL of the logo for your content license. - * 'copyright-width' (optional) is the width in pixels of the copyright image you want to display - * 'copyright-height' (optional) is the height in pixels of the copyright image you want to display - * If the actual 'copyright' dimensions are 200x30, then you may want to set the width and height - * to 100 and 15 respectively (in order to support retina screens). - * - * Example: array( - * 'copyright' = '/images/mysite_copyright_logo.png', - *
[MediaWiki-commits] [Gerrit] Update jquery.ime to 806deb2 - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update jquery.ime to 806deb2 .. Update jquery.ime to 806deb2 Changes: * README update to point about writing tests for IMEs. * Take scrollTop/scrollLeft into account when positioning. Change-Id: Ie39fb3f7f9f944e0186b74a51812e4d424174051 --- M lib/jquery.ime/jquery.ime.js M lib/jquery.ime/rules/README.md 2 files changed, 10 insertions(+), 6 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index a191683..65cad41 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0+20141028 +/*! jquery.ime - v0.1.0+20141229 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2014 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { @@ -1026,7 +1026,7 @@ */ position: function () { var menuWidth, menuTop, menuLeft, elementPosition, - top, left, verticalRoom, overflowsOnRight, + top, left, cssTop, cssLeft, verticalRoom, overflowsOnRight, imeSelector = this, rtlElement = this.$element.css( 'direction' ) === 'rtl', $window = $( window ); @@ -1062,21 +1062,24 @@ } } + cssTop = top; + cssLeft = left; this.$element.parents().each( function() { if ( $( this ).css( 'position' ) === 'fixed' ) { imeSelector.$imeSetting.css( 'position', 'fixed' ); - + cssTop -= $( document ).scrollTop(); + cssLeft -= $( document ).scrollLeft(); return false; } } ); this.$imeSetting.css( { - top: top, - left: left + top: cssTop, + left: cssLeft } ); menuWidth = this.$menu.width(); - overflowsOnRight = ( left + menuWidth ) $window.width(); + overflowsOnRight = ( left - $( document ).scrollLeft() + menuWidth ) $window.width(); // Adjust horizontal position if there's // not enough space on any side diff --git a/lib/jquery.ime/rules/README.md b/lib/jquery.ime/rules/README.md index 6197920..b178934 100644 --- a/lib/jquery.ime/rules/README.md +++ b/lib/jquery.ime/rules/README.md @@ -105,3 +105,4 @@ For complete examples, please refer the existing input method definitions. +Documentation of input methods are available at https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods -- To view, visit https://gerrit.wikimedia.org/r/182064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie39fb3f7f9f944e0186b74a51812e4d424174051 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Use 'In progress translations' in translations filter instea... - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Use 'In progress translations' in translations filter instead of 'Draft translations' .. Use 'In progress translations' in translations filter instead of 'Draft translations' Bug: T78261 Change-Id: I484971ff8fb4f2a26717237bb6ed46b7e93da71e --- M i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved Siebrand: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index e257b51..16bd64b 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -96,7 +96,7 @@ cx-publish-captcha-title: Security question, cx-translation-filter-all-translations: All translations, cx-translation-filter-published-translations: Published translations, - cx-translation-filter-draft-translations: Draft translations, + cx-translation-filter-draft-translations: In progress translations, cx-translation-filter-from-any-language: From any language, cx-translation-filter-to-any-language: To any language, cx-create-new-translation: Create new translation, -- To view, visit https://gerrit.wikimedia.org/r/182049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I484971ff8fb4f2a26717237bb6ed46b7e93da71e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com 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] WIP: Discard translations - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/182065 Change subject: WIP: Discard translations .. WIP: Discard translations Bug: T75979 Change-Id: Ia8f9e27cb5cc14c7b1e93a48d6b7eb9f75886b9f --- M Autoload.php M ContentTranslation.php M Resources.php D api/ApiContentTranslationPublish.php M i18n/en.json M i18n/qqq.json M includes/Translation.php M includes/Translator.php M modules/dashboard/ext.cx.translationlist.js A modules/dashboard/images/trash_lightgray.png A modules/dashboard/images/trash_lightgray.svg A modules/dashboard/images/trash_orange.png A modules/dashboard/images/trash_orange.svg M modules/dashboard/styles/ext.cx.translationlist.less M modules/publish/ext.cx.publish.js 15 files changed, 105 insertions(+), 297 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/65/182065/1 diff --git a/Autoload.php b/Autoload.php index b2c8bd6..2adc9a2 100644 --- a/Autoload.php +++ b/Autoload.php @@ -11,7 +11,7 @@ $dir = __DIR__; $wgAutoloadClasses += array( - 'ApiContentTranslationPublish' = $dir/api/ApiContentTranslationPublish.php, + 'ApiContentTranslation' = $dir/api/ApiContentTranslation.php, 'ApiQueryContentTranslation' = $dir/api/ApiQueryContentTranslation.php, 'ContentTranslationHooks' = $dir/ContentTranslation.hooks.php, 'ContentTranslation\Database' = $dir/includes/Database.php, diff --git a/ContentTranslation.php b/ContentTranslation.php index 20dd765..77fa72d 100644 --- a/ContentTranslation.php +++ b/ContentTranslation.php @@ -53,7 +53,7 @@ $GLOBALS['wgSpecialPages']['ContentTranslationStats'] = 'SpecialContentTranslationStats'; // API modules -$GLOBALS['wgAPIModules']['cxpublish'] = 'ApiContentTranslationPublish'; +$GLOBALS['wgAPIModules']['cxtranslation'] = 'ApiContentTranslation'; $GLOBALS['wgAPIListModules']['contenttranslation'] = 'ApiQueryContentTranslation'; // Hooks diff --git a/Resources.php b/Resources.php index 9b317d6..bda7916 100644 --- a/Resources.php +++ b/Resources.php @@ -79,6 +79,7 @@ 'messages' = array( 'cx-create-new-translation', 'cx-create-new-translation-desc', + 'cx-discard-translation', ), ) + $resourcePaths; diff --git a/api/ApiContentTranslationPublish.php b/api/ApiContentTranslationPublish.php deleted file mode 100644 index 2fab165..000 --- a/api/ApiContentTranslationPublish.php +++ /dev/null @@ -1,290 +0,0 @@ -?php -/** - * Saving a page created in ContentTranslation. - * The main change from usual saving is that a tag is added. - * Borrows heavily from ApiVisualEditorEdit. - * - * @file - * @copyright See AUTHORS.txt - * @license GPL-2.0+ - */ -class ApiContentTranslationPublish extends ApiBase { - - /** -* Converts html to wikitext -* -* @param Title $title -* @param string $html -* @return Status -* @throw MWException -*/ - protected function convertHtmlToWikitext( Title $title, $html ) { - global $wgContentTranslationParsoid; - - $conf = $wgContentTranslationParsoid; - $page = urlencode( $title-getPrefixedDBkey() ); - - $req = MWHttpRequest::factory( - {$conf['url']}/{$conf['prefix']}/$page, - array( - 'method' = 'POST', - 'postData' = array( - 'content' = $html, - ), - 'timeout' = $conf['timeout'], - ) - ); - - $status = $req-execute(); - if ( !$status-isOK() ) { - throw new MWException( $req-getContent() ); - } - - return $req-getContent(); - } - - protected function saveWikitext( $title, $wikitext, $params ) { - global $wgContentTranslationHighMTCategory; - - $sourceLink = '[[:' . $params['from'] - . ':Special:Redirect/revision/' - . $params['sourcerevision'] - . '|' . $params['sourcetitle'] . ']]'; - - if ( $params['categories'] ) { - $categories = explode( '|', $params['categories'] ); - foreach ( $categories as $categoryTitle ) { - $wikitext .= \n[[ . $categoryTitle . ]]; - } - } - - $progress = json_decode( $params['progress'], true ); - if ( - $progress - $wgContentTranslationHighMTCategory - $this-hasHighMT( $progress ) - ) { - $wikitext .= \n[[ . $wgContentTranslationHighMTCategory .
[MediaWiki-commits] [Gerrit] Typical .gitignore enties for python and json - change (pywikibot/i18n)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/182066 Change subject: Typical .gitignore enties for python and json .. Typical .gitignore enties for python and json Change-Id: I0e74aab02d18bea88c6e614f094e3abea917b490 --- M .gitignore 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/i18n refs/changes/66/182066/1 diff --git a/.gitignore b/.gitignore index 92a4414..2470f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ *.bak *.pyc +*.pyo +*.py~ +*pycache* +*.json~ + -- To view, visit https://gerrit.wikimedia.org/r/182066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e74aab02d18bea88c6e614f094e3abea917b490 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/i18n Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Typical .gitignore enties for python and json - change (pywikibot/i18n)
jenkins-bot has submitted this change and it was merged. Change subject: Typical .gitignore enties for python and json .. Typical .gitignore enties for python and json Change-Id: I0e74aab02d18bea88c6e614f094e3abea917b490 --- M .gitignore 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 92a4414..2470f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ *.bak *.pyc +*.pyo +*.py~ +*pycache* +*.json~ + -- To view, visit https://gerrit.wikimedia.org/r/182066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e74aab02d18bea88c6e614f094e3abea917b490 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/i18n Gerrit-Branch: master Gerrit-Owner: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.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] Activate flake8 on Python 3 for pywikibot - change (integration/config)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/182067 Change subject: Activate flake8 on Python 3 for pywikibot .. Activate flake8 on Python 3 for pywikibot With I3502b82 a separate environment 'flake83' was added which explicitly tests flake8 on Python 3 (while the current now flake8 explicitly tests on Python 2). Change-Id: I0e88a0b7780791594431f15d5c9f231058ee8bc0 --- M jjb/pywikibot.yaml M zuul/layout.yaml 2 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/67/182067/1 diff --git a/jjb/pywikibot.yaml b/jjb/pywikibot.yaml index ccb558f..de7c2ef 100644 --- a/jjb/pywikibot.yaml +++ b/jjb/pywikibot.yaml @@ -50,6 +50,7 @@ name: pywikibot-core toxenv: - flake8 + - flake83 # must only trigger the '-trusty' version - flake8-docstrings - flake8-docstrings-mandatory - nose diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 60e5b82..866f3e7 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -5989,12 +5989,14 @@ - name: pywikibot/core check-voter: - 'pywikibot-core-tox-flake8' + - 'pywikibot-core-tox-flake83-trusty' - 'pywikibot-core-tox-flake8-docstrings' - 'pywikibot-core-tox-flake8-docstrings-mandatory' - 'pywikibot-core-tox-nose' - 'pywikibot-core-tox-nose34-trusty' gate-and-submit: - 'pywikibot-core-tox-flake8' + - 'pywikibot-core-tox-flake83-trusty' - 'pywikibot-core-tox-flake8-docstrings-mandatory' - 'pywikibot-core-tox-nose' - 'pywikibot-core-tox-nose34-trusty' -- To view, visit https://gerrit.wikimedia.org/r/182067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e88a0b7780791594431f15d5c9f231058ee8bc0 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update version - change (mediawiki...CleanChanges)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/182068 Change subject: Update version .. Update version Change-Id: I23db250e9b326243979a8dbcff3240f766a9eefa --- M CleanChanges.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CleanChanges refs/changes/68/182068/1 diff --git a/CleanChanges.php b/CleanChanges.php index 6f93f0d..be721b2 100644 --- a/CleanChanges.php +++ b/CleanChanges.php @@ -28,7 +28,7 @@ $wgExtensionCredits['other'][] = array( 'path' = __FILE__, 'name' = 'Clean Changes', - 'version' = '2014-03-26', + 'version' = '2014-12-29', 'author' = 'Niklas Laxström', 'descriptionmsg' = 'cleanchanges-desc', 'url' = 'https://www.mediawiki.org/wiki/Extension:CleanChanges', -- To view, visit https://gerrit.wikimedia.org/r/182068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23db250e9b326243979a8dbcff3240f766a9eefa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CleanChanges Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correct version - change (mediawiki...cldr)
KartikMistry has uploaded a new change for review. https://gerrit.wikimedia.org/r/182069 Change subject: Correct version .. Correct version We're using CLDR 26 now. Change-Id: I7c662a7c8a9b916338bfa8eeac59fe40eeb2d06c --- M cldr.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr refs/changes/69/182069/1 diff --git a/cldr.php b/cldr.php index 7bd502e..f1ea467 100644 --- a/cldr.php +++ b/cldr.php @@ -9,7 +9,7 @@ * @copyright Copyright © 2007-2014, Niklas Laxström * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -define( 'CLDR_VERSION', '4.1.0 (CLDR 25)' ); +define( 'CLDR_VERSION', '4.1.0 (CLDR 26)' ); $wgExtensionCredits['other'][] = array( 'path' = __FILE__, -- To view, visit https://gerrit.wikimedia.org/r/182069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c662a7c8a9b916338bfa8eeac59fe40eeb2d06c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/cldr Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] * add support for undelete.py - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: * add support for undelete.py .. * add support for undelete.py Change-Id: I3938d1b616b388ba8e1c88be47cd55539e4fc2bf --- M groups/Pywikibot/Pywikibot.yaml 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/Pywikibot/Pywikibot.yaml b/groups/Pywikibot/Pywikibot.yaml index c69d282..2c2828b 100644 --- a/groups/Pywikibot/Pywikibot.yaml +++ b/groups/Pywikibot/Pywikibot.yaml @@ -357,6 +357,13 @@ sourcePattern: %GROUPROOT%/pywikibot/thirdparty/%CODE%.json --- BASIC: + id: out-pywikipedia-undelete + label: Pywikibot Undelete + +FILES: + sourcePattern: %GROUPROOT%/pywikibot/undelete/%CODE%.json +--- +BASIC: id: out-pywikipedia-unlink label: Pywikibot Unlink -- To view, visit https://gerrit.wikimedia.org/r/181887 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3938d1b616b388ba8e1c88be47cd55539e4fc2bf Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Xqt i...@gno.de 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] [WIP] Add account for Ananth Ramakrishnan (contractor) and a... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/182070 Change subject: [WIP] Add account for Ananth Ramakrishnan (contractor) and add to analytics-privatedata-users group .. [WIP] Add account for Ananth Ramakrishnan (contractor) and add to analytics-privatedata-users group (and bastiononly) T85229 Change-Id: I894fb5cb63d8ca802c7ccfc580b961f8b04c9616 --- M modules/admin/data/data.yaml 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/70/182070/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 30e73ad..f42526d 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -57,7 +57,7 @@ members: [howief, jforrester, jmorgan, maryana, msyed, haithams, mhurd, dbrant, mglaser, mah, kleduc, bsitzmann, deskana, jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, jkatz, - bmansurov, west1, jhernandez, smalyshev] + bmansurov, west1, jhernandez, smalyshev, ananthrk] cassandra-roots: gid: 708 description: users with root on cassandra hosts @@ -214,7 +214,7 @@ halfak, dr0ptp4kt, qchris, tnegrin, ironholds, kleduc, nuria, haithams, otto, deskana, bsitzmann, dbrant, declerambaul, ellery, nettrom, leila, - ezachte, mforns, reedy, west1, phuedx] + ezachte, mforns, reedy, west1, phuedx, ananthrk] analytics-admins: gid: 732 description: Admin access to analytics cluster. @@ -1226,3 +1226,10 @@ realname: Stas Malyshev ssh_keys: [ssh-rsa B3NzaC1yc2EDAQABAAABAQCpDNpAh83SAftCCJtjnvyTkN8uag0OmMk/Wpn+iAtZz5THTocU7MLdggW5scut+lMfog6Mf7aECC5vPo2eGtGkCXbmsGMhHsuA4mxo4vhnI5PduLY6F9PU4YCRe477NTEFfffy/HxDQR9gHNnuLyoHGqEgCQmmEtQoD1ChEiVHbwM35m6OVZjraMyy5Hfcnr7txHjOnVBGFW3Nn+bT3S42YdJDy3l9SIOg7NGi1WHo+cZaKIpO+wTelDSem1o7m+ERk10XaDOakCpznjnxmzfoy0WKeJWAkG0uGiE7vVAKzOhNw4/v6vaSSXWNRMD7MBea6iDaFduA1ghnq8i6Xf7f smalys...@wikimedia.org] uid: 10977 + ananthrk: +ensure: present +gid: 500 +name: ananthrk +realname: Ananth Ramakrishnan +ssh_keys: [] +uid: 11223 -- To view, visit https://gerrit.wikimedia.org/r/182070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I894fb5cb63d8ca802c7ccfc580b961f8b04c9616 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Run the ImagePageShowTOC hook before adding the 'metadata' link - change (mediawiki/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/182071 Change subject: Run the ImagePageShowTOC hook before adding the 'metadata' link .. Run the ImagePageShowTOC hook before adding the 'metadata' link For consistency with the ImagePageAfterImageLinks hook, which places the content before the 'metadata' section. Change-Id: Ibcffdd803ed0a6169558ea247e6ec812c356444d --- M includes/page/ImagePage.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/71/182071/1 diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index b4409c3..b8f67c2 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -241,11 +241,12 @@ 'lia href=#filehistory' . $this-getContext()-msg( 'filehist' )-escaped() . '/a/li', 'lia href=#filelinks' . $this-getContext()-msg( 'imagelinks' )-escaped() . '/a/li', ); + + Hooks::run( 'ImagePageShowTOC', array( $this, $r ) ); + if ( $metadata ) { $r[] = 'lia href=#metadata' . $this-getContext()-msg( 'metadata' )-escaped() . '/a/li'; } - - Hooks::run( 'ImagePageShowTOC', array( $this, $r ) ); return 'ul id=filetoc' . implode( \n, $r ) . '/ul'; } -- To view, visit https://gerrit.wikimedia.org/r/182071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibcffdd803ed0a6169558ea247e6ec812c356444d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove empty file - change (mediawiki...SocialProfile)
jenkins-bot has submitted this change and it was merged. Change subject: Remove empty file .. Remove empty file Change-Id: I35d4961bf820c491789b139806b569dd2d1226f3 --- D UserProfile/i18n/pt-br.json 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/UserProfile/i18n/pt-br.json b/UserProfile/i18n/pt-br.json deleted file mode 100644 index e69de29..000 --- a/UserProfile/i18n/pt-br.json +++ /dev/null -- To view, visit https://gerrit.wikimedia.org/r/181756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35d4961bf820c491789b139806b569dd2d1226f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com 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] Shorten lines to pass phpcs test - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Shorten lines to pass phpcs test .. Shorten lines to pass phpcs test Change-Id: I5588e1f16f1a23d77160cd180058bd2000a93ab6 --- M includes/parser/Parser.php 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 6b2444e..b7f8cf2 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -146,7 +146,8 @@ * @var MagicWordArray */ public $mSubstWords; - public $mConf, $mPreprocessor, $mExtLinkBracketedRegex, $mUrlProtocols; # Initialised in constructor + # Initialised in constructor + public $mConf, $mPreprocessor, $mExtLinkBracketedRegex, $mUrlProtocols; # Cleared with clearState(): /** @@ -633,7 +634,9 @@ * @param bool|PPFrame $frame * @return mixed|string */ - public function preprocess( $text, Title $title = null, ParserOptions $options, $revid = null, $frame = false ) { + public function preprocess( $text, Title $title = null, + ParserOptions $options, $revid = null, $frame = false + ) { wfProfileIn( __METHOD__ ); $magicScopeVariable = $this-lock(); $this-startParse( $title, $options, self::OT_PREPROCESS, true ); -- To view, visit https://gerrit.wikimedia.org/r/182000 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5588e1f16f1a23d77160cd180058bd2000a93ab6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Cscott canan...@wikimedia.org Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com 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] Add account for Ananth Ramakrishnan (contractor) and add to ... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add account for Ananth Ramakrishnan (contractor) and add to analytics-privatedata-users group .. Add account for Ananth Ramakrishnan (contractor) and add to analytics-privatedata-users group (and bastiononly) T85229 Change-Id: I894fb5cb63d8ca802c7ccfc580b961f8b04c9616 --- M modules/admin/data/data.yaml 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index 30e73ad..7691aec 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -57,7 +57,7 @@ members: [howief, jforrester, jmorgan, maryana, msyed, haithams, mhurd, dbrant, mglaser, mah, kleduc, bsitzmann, deskana, jzerebecki, declerambaul, ellery, dduvall, nettrom, mforns, jkatz, - bmansurov, west1, jhernandez, smalyshev] + bmansurov, west1, jhernandez, smalyshev, ananthrk] cassandra-roots: gid: 708 description: users with root on cassandra hosts @@ -214,7 +214,7 @@ halfak, dr0ptp4kt, qchris, tnegrin, ironholds, kleduc, nuria, haithams, otto, deskana, bsitzmann, dbrant, declerambaul, ellery, nettrom, leila, - ezachte, mforns, reedy, west1, phuedx] + ezachte, mforns, reedy, west1, phuedx, ananthrk] analytics-admins: gid: 732 description: Admin access to analytics cluster. @@ -1226,3 +1226,10 @@ realname: Stas Malyshev ssh_keys: [ssh-rsa B3NzaC1yc2EDAQABAAABAQCpDNpAh83SAftCCJtjnvyTkN8uag0OmMk/Wpn+iAtZz5THTocU7MLdggW5scut+lMfog6Mf7aECC5vPo2eGtGkCXbmsGMhHsuA4mxo4vhnI5PduLY6F9PU4YCRe477NTEFfffy/HxDQR9gHNnuLyoHGqEgCQmmEtQoD1ChEiVHbwM35m6OVZjraMyy5Hfcnr7txHjOnVBGFW3Nn+bT3S42YdJDy3l9SIOg7NGi1WHo+cZaKIpO+wTelDSem1o7m+ERk10XaDOakCpznjnxmzfoy0WKeJWAkG0uGiE7vVAKzOhNw4/v6vaSSXWNRMD7MBea6iDaFduA1ghnq8i6Xf7f smalys...@wikimedia.org] uid: 10977 + ananthrk: +ensure: present +gid: 500 +name: ananthrk +realname: Ananth Ramakrishnan +ssh_keys: [ssh-rsa B3NzaC1yc2EDAQABAAABAQDt/i1A7KCnZCqaV8oWp3Qg7ueXNFnU+Nl8809U4vvjouTYqndJGaV5xbe1zA6O3KbJH5iNKJf0UzEpTPoy7MR2CNVEh+JfUOgAYJYBnjJde5uogRBVGO6ZYG9FJ7fPuDoM3ueb32My5H/HxTiP21c3OlK6ZDHfiWkJ58PthvhM49is6N2rzdqFPMTWtaFPxtQW8XMJJJ56p2yubhLWDx0uDLV7m04f4ZSpWrnHIjFhVbURoDHA4p5Jaeq7JUV19Z61Iu5vJPS95iKpkcBrbtKPVSDnG3fk6OAKwnU9Ams6w6IWLnMwPuSOqUycxD6YSdDc/Q3JkX0iHqCKfneVqCPF anant...@ymxdata.com] +uid: 11223 -- To view, visit https://gerrit.wikimedia.org/r/182070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I894fb5cb63d8ca802c7ccfc580b961f8b04c9616 Gerrit-PatchSet: 2 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] Rename the TorBlock class to TorBlockHooks - change (mediawiki...TorBlock)
jenkins-bot has submitted this change and it was merged. Change subject: Rename the TorBlock class to TorBlockHooks .. Rename the TorBlock class to TorBlockHooks And move into an includes dir. Change-Id: Icc5c5a6800fef1b7208cdd560c8749e9b163ef10 --- M TorBlock.php R includes/TorBlockHooks.php R includes/TorExitNodes.php 3 files changed, 19 insertions(+), 26 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/TorBlock.php b/TorBlock.php index 0ed2af9..8356400 100644 --- a/TorBlock.php +++ b/TorBlock.php @@ -30,7 +30,6 @@ die(); } -$dir = __DIR__; $wgExtensionCredits['antispam'][] = array( 'path' = __FILE__, 'name' = 'TorBlock', @@ -40,21 +39,21 @@ ); $wgMessagesDirs['TorBlock'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['TorBlock'] = $dir/TorBlock.i18n.php; -$wgAutoloadClasses['TorBlock'] = $dir/TorBlock.class.php; -$wgAutoloadClasses['TorExitNodes'] = $dir/TorExitNodes.php; +$wgExtensionMessagesFiles['TorBlock'] = __DIR__ . /TorBlock.i18n.php; +$wgAutoloadClasses['TorBlockHooks'] = __DIR__ . '/includes/TorBlockHooks.php'; +$wgAutoloadClasses['TorExitNodes'] = __DIR__ . '/includes/TorExitNodes.php'; -$wgHooks['getUserPermissionsErrorsExpensive'][] = 'TorBlock::onGetUserPermissionsErrorsExpensive'; -$wgHooks['AbortAutoblock'][] = 'TorBlock::onAbortAutoblock'; -$wgHooks['GetAutoPromoteGroups'][] = 'TorBlock::onGetAutoPromoteGroups'; -$wgHooks['GetBlockedStatus'][] = 'TorBlock::onGetBlockedStatus'; -$wgHooks['AutopromoteCondition'][] = 'TorBlock::onAutopromoteCondition'; -$wgHooks['RecentChange_save'][] = 'TorBlock::onRecentChangeSave'; -$wgHooks['ListDefinedTags'][] = 'TorBlock::onListDefinedTags'; -$wgHooks['AbuseFilter-filterAction'][] = 'TorBlock::onAbuseFilterFilterAction'; -$wgHooks['AbuseFilter-builder'][] = 'TorBlock::onAbuseFilterBuilder'; -$wgHooks['EmailUserPermissionsErrors'][] = 'TorBlock::onEmailUserPermissionsErrors'; -$wgHooks['OtherBlockLogLink'][] = 'TorBlock::getTorBlockStatus'; +$wgHooks['getUserPermissionsErrorsExpensive'][] = 'TorBlockHooks::onGetUserPermissionsErrorsExpensive'; +$wgHooks['AbortAutoblock'][] = 'TorBlockHooks::onAbortAutoblock'; +$wgHooks['GetAutoPromoteGroups'][] = 'TorBlockHooks::onGetAutoPromoteGroups'; +$wgHooks['GetBlockedStatus'][] = 'TorBlockHooks::onGetBlockedStatus'; +$wgHooks['AutopromoteCondition'][] = 'TorBlockHooks::onAutopromoteCondition'; +$wgHooks['RecentChange_save'][] = 'TorBlockHooks::onRecentChangeSave'; +$wgHooks['ListDefinedTags'][] = 'TorBlockHooks::onListDefinedTags'; +$wgHooks['AbuseFilter-filterAction'][] = 'TorBlockHooks::onAbuseFilterFilterAction'; +$wgHooks['AbuseFilter-builder'][] = 'TorBlockHooks::onAbuseFilterBuilder'; +$wgHooks['EmailUserPermissionsErrors'][] = 'TorBlockHooks::onEmailUserPermissionsErrors'; +$wgHooks['OtherBlockLogLink'][] = 'TorBlockHooks::onOtherBlockLogLink'; // Define new autopromote condition define( 'APCOND_TOR', 'tor' ); // Numbers won't work, we'll get collisions @@ -103,13 +102,13 @@ * Path to the CA file for the Onionoo server. * Set to false or any other invalid value to disable. */ -$wgTorOnionooCA = $dir/torproject.crt; +$wgTorOnionooCA = __DIR__ . /torproject.crt; /** * Path to the CA file for the Tor Project. * Set to false or any other invalid value to disable. */ -$wgTorProjectCA = $dir/torproject.crt; +$wgTorProjectCA = __DIR__ . /torproject.crt; /** * Disable existing blocks of Tor nodes diff --git a/TorBlock.class.php b/includes/TorBlockHooks.php similarity index 96% rename from TorBlock.class.php rename to includes/TorBlockHooks.php index e6e8881..00c7187 100644 --- a/TorBlock.class.php +++ b/includes/TorBlockHooks.php @@ -26,11 +26,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -if ( !defined( 'MEDIAWIKI' ) ) { - die(); -} - -class TorBlock { +class TorBlockHooks { /** * Check if a user is a Tor node and not whitelisted or allowed * to bypass tor blocks. @@ -47,15 +43,13 @@ return true; } - // wfDebugLog( 'torblock', Checking Tor status\n ); - if ( TorExitNodes::isExitNode() ) { wfDebugLog( 'torblock', User detected as editing through tor. ); global $wgTorBypassPermissions; foreach ( $wgTorBypassPermissions as $perm) { if ( $user-isAllowed( $perm ) ) { - wfDebugLog( 'torblock', User has $perm permission. Exempting from Tor Blocks ); + wfDebugLog( 'torblock', User has $perm permission. Exempting from Tor Blocks. ); return true; } } @@ -274,7 +268,7 @@
[MediaWiki-commits] [Gerrit] Correct version - change (mediawiki...cldr)
jenkins-bot has submitted this change and it was merged. Change subject: Correct version .. Correct version We're using CLDR 26 now. Change-Id: I7c662a7c8a9b916338bfa8eeac59fe40eeb2d06c --- M cldr.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/cldr.php b/cldr.php index 7bd502e..f1ea467 100644 --- a/cldr.php +++ b/cldr.php @@ -9,7 +9,7 @@ * @copyright Copyright © 2007-2014, Niklas Laxström * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -define( 'CLDR_VERSION', '4.1.0 (CLDR 25)' ); +define( 'CLDR_VERSION', '4.1.0 (CLDR 26)' ); $wgExtensionCredits['other'][] = array( 'path' = __FILE__, -- To view, visit https://gerrit.wikimedia.org/r/182069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c662a7c8a9b916338bfa8eeac59fe40eeb2d06c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/cldr Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il 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] Update version - change (mediawiki...CleanChanges)
jenkins-bot has submitted this change and it was merged. Change subject: Update version .. Update version Change-Id: I23db250e9b326243979a8dbcff3240f766a9eefa --- M CleanChanges.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/CleanChanges.php b/CleanChanges.php index 6f93f0d..be721b2 100644 --- a/CleanChanges.php +++ b/CleanChanges.php @@ -28,7 +28,7 @@ $wgExtensionCredits['other'][] = array( 'path' = __FILE__, 'name' = 'Clean Changes', - 'version' = '2014-03-26', + 'version' = '2014-12-29', 'author' = 'Niklas Laxström', 'descriptionmsg' = 'cleanchanges-desc', 'url' = 'https://www.mediawiki.org/wiki/Extension:CleanChanges', -- To view, visit https://gerrit.wikimedia.org/r/182068 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23db250e9b326243979a8dbcff3240f766a9eefa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CleanChanges Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il 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] Use logster to parse varishkafka logs and send to statsd - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/182072 Change subject: Use logster to parse varishkafka logs and send to statsd .. Use logster to parse varishkafka logs and send to statsd This uses a local txstasd instance to cache and serialize the stats before sending to statsd on tungsten Change-Id: I6ef6412eddb2e9c4508d243b301b75d0d478961d --- M manifests/role/cache.pp 1 file changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/182072/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 09137ae..a374c29 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -379,6 +379,26 @@ } } +# == Class varnish::statsd +# Installs a local statsd instance for aggregating and serializing +# stats before sending them off to a remote statsd instance. +class varnish::statsd { +class { '::txstatsd': +settings = { +statsd = { +'carbon-cache-host' = graphite-in.eqiad.wmnet, +'carbon-cache-port' = 2004, +'listen-port'= 8125, +'statsd-compliance' = 0, +'prefix' = '', +'max-queue-size' = 1000 * 1000, +'max-datapoints-per-message' = 10 * 1000, +'instance-name' = statsd.${::hostname}, +}, +}, +} +} + # == Class varnish::kafka # Base class for instances of varnishkafka on cache servers. # @@ -398,6 +418,10 @@ # so that logs will go to rsyslog the first time puppet # sets up varnishkafka. Rsyslog::Conf['varnishkafka'] - Varnishkafka::Instance | | + +# varnishkafka will use a local statsd instance for +# using logster to collect metrics. +include role::cache::varnish::statsd } # == Class varnish::kafka::webrequest @@ -425,6 +449,7 @@ 'cp3022' = 2000, default = 3, } + varnishkafka::instance { 'webrequest': brokers = $kafka_brokers, topic= $topic, @@ -477,6 +502,15 @@ critical= '30.0', require = Varnishkafka::Monitor['webrequest'], } + +# Test using logster to send varnishkafka stats to statsd - graphite. +# This may be moved into the varnishkafka module. +logster::job { 'varnishkafka-webrequest': +parser = 'JsonParser', +logfile = /var/cache/varnishkafka/webrequest.stats.json, +logster_options = --statsd-host=statsd.${::hostname}:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest +require = Class['role::cache::varnish::statsd'], +} } # == Class varnish::kafka::statsv -- To view, visit https://gerrit.wikimedia.org/r/182072 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ef6412eddb2e9c4508d243b301b75d0d478961d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Consolidate duplicate code in TorBlockHooks - change (mediawiki...TorBlock)
jenkins-bot has submitted this change and it was merged. Change subject: Consolidate duplicate code in TorBlockHooks .. Consolidate duplicate code in TorBlockHooks Change-Id: Ia9ac17200314536d63b4cf71bec8aeaf8370db42 --- M includes/TorBlockHooks.php 1 file changed, 32 insertions(+), 35 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/TorBlockHooks.php b/includes/TorBlockHooks.php index 00c7187..6bca140 100644 --- a/includes/TorBlockHooks.php +++ b/includes/TorBlockHooks.php @@ -28,18 +28,21 @@ class TorBlockHooks { /** -* Check if a user is a Tor node and not whitelisted or allowed -* to bypass tor blocks. +* Whether the given user is allowed to perform $action from its current IP * -* @param Title $title Title being acted upon -* @param User $user User performing the action -* @param string $action Action being performed -* @param array $result Will be filled with block status if blocked +* @param User $user +* @param string|null $action * @return bool */ - public static function onGetUserPermissionsErrorsExpensive( $title, $user, $action, $result ) { - global $wgTorAllowedActions, $wgRequest; - if ( in_array( $action, $wgTorAllowedActions ) ) { + private static function checkUserCan( User $user, $action = null ) { + global $wgTorAllowedActions, $wgRequest, $wgUser; + + // Just in case we're checking another user + if ( $user-getName() !== $wgUser-getName() ) { + return true; + } + + if ( $action !== null in_array( $action, $wgTorAllowedActions ) ) { return true; } @@ -60,6 +63,24 @@ return true; } + return false; + } + + return true; + } + + /** +* Check if a user is a Tor node and not whitelisted or allowed +* to bypass tor blocks. +* +* @param Title $title Title being acted upon +* @param User $user User performing the action +* @param string $action Action being performed +* @param array $result Will be filled with block status if blocked +* @return bool +*/ + public static function onGetUserPermissionsErrorsExpensive( $title, $user, $action, $result ) { + if ( !self::checkUserCan( $user, $action ) ) { wfDebugLog( 'torblock', User detected as editing from Tor node. Adding Tor block to permissions errors. ); // Allow site customization of blocked message. @@ -83,32 +104,8 @@ * @return bool */ public static function onEmailUserPermissionsErrors( $user, $editToken, $hookError ) { - // wfDebugLog( 'torblock', Checking Tor status ); - - // Just in case we're checking another user - global $wgUser, $wgRequest; - if ( $user-getName() != $wgUser-getName() ) { - return true; - } - - if ( TorExitNodes::isExitNode() ) { - wfDebugLog( 'torblock', User detected as editing through tor. ); - - global $wgTorBypassPermissions; - foreach ( $wgTorBypassPermissions as $perm) { - if ( $user-isAllowed( $perm ) ) { - wfDebugLog( 'torblock', User has $perm permission. Exempting from Tor Blocks. ); - return true; - } - } - - $ip = $wgRequest-getIP(); - if ( Block::isWhitelistedFromAutoblocks( $ip ) ) { - wfDebugLog( 'torblock', IP is in autoblock whitelist. Exempting from Tor blocks. ); - return true; - } - - wfDebugLog( 'torblock', User detected as editing from Tor node. Denying email. ); + if ( !self::checkUserCan( $user ) ) { + wfDebugLog( 'torblock', User detected as trying to send an email from Tor node. Preventing. ); // Allow site customization of blocked message. $blockedMsg = 'torblock-blocked'; -- To view, visit https://gerrit.wikimedia.org/r/181809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9ac17200314536d63b4cf71bec8aeaf8370db42 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/TorBlock Gerrit-Branch: master Gerrit-Owner: Hoo man h...@online.de Gerrit-Reviewer: Alex Monk
[MediaWiki-commits] [Gerrit] Use logster to parse varnishkafka logs and send to statsd - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Use logster to parse varnishkafka logs and send to statsd .. Use logster to parse varnishkafka logs and send to statsd This uses a local txstasd instance to cache and serialize the stats before sending to statsd on tungsten T76342 Change-Id: I6ef6412eddb2e9c4508d243b301b75d0d478961d --- M manifests/role/cache.pp 1 file changed, 40 insertions(+), 0 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 09137ae..313663a 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -379,6 +379,26 @@ } } +# == Class varnish::statsd +# Installs a local statsd instance for aggregating and serializing +# stats before sending them off to a remote statsd instance. +class varnish::statsd { +class { '::txstatsd': +settings = { +statsd = { +'carbon-cache-host' = graphite-in.eqiad.wmnet, +'carbon-cache-port' = 2004, +'listen-port'= 8125, +'statsd-compliance' = 0, +'prefix' = '', +'max-queue-size' = 1000 * 1000, +'max-datapoints-per-message' = 10 * 1000, +'instance-name' = statsd.${::hostname}, +}, +}, +} +} + # == Class varnish::kafka # Base class for instances of varnishkafka on cache servers. # @@ -425,6 +445,7 @@ 'cp3022' = 2000, default = 3, } + varnishkafka::instance { 'webrequest': brokers = $kafka_brokers, topic= $topic, @@ -477,6 +498,25 @@ critical= '30.0', require = Varnishkafka::Monitor['webrequest'], } + +# test this on mobilesb before applying to all varnishes. +if ($topic == 'webrequest_mobile') { +# varnishkafka will use a local statsd instance for +# using logster to collect metrics. +# NOTE: This include will be moved into the parent +# varnish::kafka class once logster and local statsd +# are proven to work on mobiles. +include role::cache::varnish::statsd + +# Test using logster to send varnishkafka stats to statsd - graphite. +# This may be moved into the varnishkafka module. +logster::job { 'varnishkafka-webrequest': +parser = 'JsonParser', +logfile = /var/cache/varnishkafka/webrequest.stats.json, +logster_options = --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, +require = Class['role::cache::varnish::statsd'], +} +} } # == Class varnish::kafka::statsv -- To view, visit https://gerrit.wikimedia.org/r/182072 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ef6412eddb2e9c4508d243b301b75d0d478961d Gerrit-PatchSet: 6 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] shinken: Move shinkengen into ops/puppet - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: shinken: Move shinkengen into ops/puppet .. shinken: Move shinkengen into ops/puppet Has been simplified to a point where I do not think it requires its own debian package. Abandoning operations/software/shinkengen for now. Change-Id: I60ca09fefd3b664ea4a189e96611ad1a6cf82d0f --- A modules/shinken/files/shinkengen M modules/shinken/manifests/shinkengen.pp 2 files changed, 130 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Looks good to me, approved Filippo Giunchedi: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen new file mode 100755 index 000..c00dc0c --- /dev/null +++ b/modules/shinken/files/shinkengen @@ -0,0 +1,111 @@ +#!/usr/bin/python3 +import yaml +import ldap3 +import jinja2 +from collections import OrderedDict + + +class ConfigObject(): + +A Shinken configuration object. + +Has a type (Host, Hostgroup, Service, etc) and a bunch of key +value pairs that it can output in a format that shinken understands. + +TEMPLATE = jinja2.Template('''define {{ o.type }} { +{% for key, value in o.properties.items() -%} +{{ key }}{{ value }} +{% endfor -%} +}''') + +def __init__(self, type): +self.type = type # Host, HostGroup, Service, whatever +self.properties = OrderedDict() + +def __str__(self): +return ConfigObject.TEMPLATE.render(o=self) + + +class LDAPSource(object): + +A source of information about labs instances, querying LDAP + +def __init__(self, server, bindas, passwd): +server = ldap3.Server(server) +self.conn = ldap3.Connection(server, read_only=True, + user=bindas, password=passwd, + auto_bind=ldap3.AUTO_BIND_TLS_AFTER_BIND) + +def get_hosts(self, project): + +Get info about all instances in the given project. + +Returns the following information for each instance in given project: +- ec2id: Permanent id for this particular instance +- ip: Internal IP of this instance +- region: Which OpenStack Region this Instance is in +- puppetClasses: List of puppet classes applied to this instance via + configure page in wikitech. Also contains default + roles `role::labs::instance` and `base` +- project: Name of project the instance is contained in +- name: Name of the instance +- puppetVars: Dictionary containing any custom puppet variables that + have been set in the configure page in wikitech. Also + contains default keys of `instanceproject` `instancename` + +self.conn.search('ou=hosts,dc=wikimedia,dc=org', + '(puppetVar=instanceproject=%s)' % project, + ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, + attributes=ldap3.ALL_ATTRIBUTES) +hosts = [] +for responseitem in self.conn.response: +hostinfo = responseitem['attributes'] +ip = [a for a in hostinfo['aRecord'] if a.startswith('10.')][0] +puppetvars = { +var[0]: var[1] +for var in [pv.split(=) for pv in hostinfo['puppetVar']] +} +hosts.append({ +'ec2id': hostinfo['dc'][0], +'ip': ip, +'region': hostinfo['l'][0], +'puppetClasses': hostinfo['puppetClass'], +'project': project, +'name': puppetvars['instancename'], +'puppetVars': puppetvars +}) + +return hosts + +if __name__ == '__main__': +with open('/etc/shinkengen.yaml') as f: +config = yaml.load(f) + +ldapsource = LDAPSource(config['ldap']['server'], +config['ldap']['bindas'], +config['ldap']['password']) + +for project in config['projects']: +instances = ldapsource.get_hostsinfo(project) +host_configs = [] +for instance in instances: +co = ConfigObject('host') +co.properties['use'] = 'generic-host' +co.properties['host_name'] = instance['name'] +co.properties['address'] = instance['ip'] +# Each role applied to this instance explicitly, via wikitech, +# is added as a hostgroup, so we can target particular roles wich checks. +co.properties['hostgroups'] = ','.join([project] + instance['puppetClasses']) +# For each project added to monitoring we expect a contactgroup with the same +# name added. +# FIXME: Implement access
[MediaWiki-commits] [Gerrit] Fix for new varnishkafka logster job - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/182073 Change subject: Fix for new varnishkafka logster job .. Fix for new varnishkafka logster job Change-Id: Ic4b99eee3963f32770e52845e6b484d8981ff3be --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/73/182073/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 313663a..e46b465 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -511,9 +511,9 @@ # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': -parser = 'JsonParser', +parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4b99eee3963f32770e52845e6b484d8981ff3be Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for new varnishkafka logster job - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Fix for new varnishkafka logster job .. Fix for new varnishkafka logster job Change-Id: Ic4b99eee3963f32770e52845e6b484d8981ff3be --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 313663a..e46b465 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -511,9 +511,9 @@ # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': -parser = 'JsonParser', +parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182073 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic4b99eee3963f32770e52845e6b484d8981ff3be Gerrit-PatchSet: 2 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] Use mw.Uri in bannerController to allow ugly URLs - change (mediawiki...CentralNotice)
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/182074 Change subject: Use mw.Uri in bannerController to allow ugly URLs .. Use mw.Uri in bannerController to allow ugly URLs We need to switch to ugly URLs in background calls to meta, in order to override the redirection to mobile URLs (and the extra round-trip) on mobile devices. Change-Id: I18e5f36b37c4fe35f627b6e8d3d94fdc209677d6 --- M CentralNotice.modules.php M modules/ext.centralNotice.bannerController/bannerController.js 2 files changed, 19 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice refs/changes/74/182074/1 diff --git a/CentralNotice.modules.php b/CentralNotice.modules.php index 7379fab..ce3f819 100644 --- a/CentralNotice.modules.php +++ b/CentralNotice.modules.php @@ -123,6 +123,7 @@ 'dependencies' = array( 'jquery.cookie', 'json', + 'mediawiki.Uri', 'ext.centralNotice.bannerChoiceData', 'ext.centralNotice.bannerController.lib', ), diff --git a/modules/ext.centralNotice.bannerController/bannerController.js b/modules/ext.centralNotice.bannerController/bannerController.js index e5247eb..beec85e 100644 --- a/modules/ext.centralNotice.bannerController/bannerController.js +++ b/modules/ext.centralNotice.bannerController/bannerController.js @@ -132,7 +132,7 @@ } }, loadTestingBanner: function ( bannerName, campaign ) { - var bannerPageQuery; + var bannerPageQuery, url; mw.centralNotice.data.testing = true; @@ -147,8 +147,11 @@ // TODO use the new $wgCentralSelectedBannerDispatcher here instead + url = new mw.Uri( mw.config.get( 'wgCentralPagePath' ) ); + url.extend( bannerPageQuery ); + $.ajax({ - url: mw.config.get( 'wgCentralPagePath' ) + '?' + $.param( bannerPageQuery ), + url: url.toString(), dataType: 'script', cache: true }); @@ -192,12 +195,12 @@ debug: mw.centralNotice.data.getVars.debug }; - scriptUrl = mw.config.get( 'wgCentralSelectedBannerDispatcher' ) + - '?' + $.param( loadBannerQueryParams ); + scriptUrl = new mw.Uri( mw.config.get( 'wgCentralSelectedBannerDispatcher' ) ); + scriptUrl.extend( loadBannerQueryParams ); // This will call insertBanner() after the banner is retrieved $.ajax( { - url: scriptUrl, + url: scriptUrl.toString(), dataType: 'script', cache: true } ); @@ -224,11 +227,11 @@ bucket: mw.centralNotice.data.bucket }; - scriptUrl = mw.config.get( 'wgCentralBannerDispatcher' ) + - '?' + $.param( loadBannerQueryParams ); + scriptUrl = new mw.Uri( mw.config.get( 'wgCentralBannerDispatcher' ) ); + scriptUrl.extend( loadBannerQueryParams ); $.ajax( { - url: scriptUrl, + url: scriptUrl.toString, dataType: 'script', cache: true } ); @@ -246,8 +249,9 @@ }, // Record banner impression using old-style URL recordImpression: function( data ) { - var url = mw.config.get( 'wgCentralBannerRecorder' ) + '?' + $.param( data ); - (new Image()).src = url; + var url = new mw.Uri( mw.config.get( 'wgCentralBannerRecorder' ) ); + url.extend( data ); + (new Image()).src = url.toString(); }, loadQueryStringVariables: function () { document.location.search.replace( /\??(?:([^=]+)=([^]*)?)/g, function ( str, p1, p2 ) { @@ -449,13 +453,13 @@ // Create landing page links if required
[MediaWiki-commits] [Gerrit] Work on getInterval() - change (mediawiki...MediaWikiChat)
UltrasonicNXT has uploaded a new change for review. https://gerrit.wikimedia.org/r/182075 Change subject: Work on getInterval() .. Work on getInterval() More reliable, properly tested version Change-Id: Ic8e614c06108f18a8b8449654f1ab23667c70240 --- M MediaWikiChat.php M MediaWikiChatClass.php 2 files changed, 13 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiChat refs/changes/75/182075/1 diff --git a/MediaWikiChat.php b/MediaWikiChat.php index f7471d4..d095129 100644 --- a/MediaWikiChat.php +++ b/MediaWikiChat.php @@ -16,7 +16,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'MediaWikiChat', - 'version' = '2.12.8', + 'version' = '2.12.9', 'author' = 'Adam Carter/UltrasonicNXT', 'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat', 'descriptionmsg' = 'chat-desc', diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php index 1bd4cc2..f3b3082 100644 --- a/MediaWikiChatClass.php +++ b/MediaWikiChatClass.php @@ -129,9 +129,9 @@ } /** -* Get interval to poll the server from. Based on the average milliseconds beteen recent messages. +* Get interval to poll the server from. Based on the average milliseconds between recent messages. * -* @return Integer: average milliseconds between message sends +* @return Integer: polling interval to use (how long between each poll) */ static function getInterval() { $dbr = wfGetDB( DB_SLAVE ); @@ -144,37 +144,28 @@ array( 'chat_type' = MediaWikiChat::TYPE_MESSAGE ), __METHOD__, array( - 'LIMIT' = 5, + 'LIMIT' = 1, + 'OFFSET' = 4, 'ORDER BY' = 'chat_timestamp DESC' ) ); - if ( $res-numRows() 4 ){ - $i = 0; + if ( $res-numRows() ) { + $row = $res-fetchObject(); + $oldest = $row-chat_timestamp; + $now = MediaWikiChat::now(); - foreach ( $res as $row ) { - if ( $i == 0 ) { - $latest = $row; - } elseif ( $i == 4 ) { - $oldest = $row; - } - $i++; - } - - $latestTime = $latest-chat_timestamp; - $oldestTime = $oldest-chat_timestamp; - - $av = ( $latestTime - $oldestTime ) / 10 ; // divide by 5 to find average, then half + $av = ( $now - $oldest ); // / 5 to find average, then / 2, then * 10 as MWC timestamps are 100th seconds, JS intervals are 1000th seconds if ( $av $maxInterval ) { $av = $maxInterval; - } elseif ( $minInterval ) { + } elseif ( $av $minInterval ) { $av = $minInterval; } return $av; - } else { - return 7 * 1000; + } else { // before there are any messages to consider + return 7 * 1000; // use 7 secs } } -- To view, visit https://gerrit.wikimedia.org/r/182075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8e614c06108f18a8b8449654f1ab23667c70240 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MediaWikiChat Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work on getInterval() - change (mediawiki...MediaWikiChat)
UltrasonicNXT has submitted this change and it was merged. Change subject: Work on getInterval() .. Work on getInterval() More reliable, properly tested version Change-Id: Ic8e614c06108f18a8b8449654f1ab23667c70240 --- M MediaWikiChat.php M MediaWikiChatClass.php 2 files changed, 13 insertions(+), 22 deletions(-) Approvals: UltrasonicNXT: Verified; Looks good to me, approved diff --git a/MediaWikiChat.php b/MediaWikiChat.php index f7471d4..d095129 100644 --- a/MediaWikiChat.php +++ b/MediaWikiChat.php @@ -16,7 +16,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' = __FILE__, 'name' = 'MediaWikiChat', - 'version' = '2.12.8', + 'version' = '2.12.9', 'author' = 'Adam Carter/UltrasonicNXT', 'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat', 'descriptionmsg' = 'chat-desc', diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php index 1bd4cc2..f3b3082 100644 --- a/MediaWikiChatClass.php +++ b/MediaWikiChatClass.php @@ -129,9 +129,9 @@ } /** -* Get interval to poll the server from. Based on the average milliseconds beteen recent messages. +* Get interval to poll the server from. Based on the average milliseconds between recent messages. * -* @return Integer: average milliseconds between message sends +* @return Integer: polling interval to use (how long between each poll) */ static function getInterval() { $dbr = wfGetDB( DB_SLAVE ); @@ -144,37 +144,28 @@ array( 'chat_type' = MediaWikiChat::TYPE_MESSAGE ), __METHOD__, array( - 'LIMIT' = 5, + 'LIMIT' = 1, + 'OFFSET' = 4, 'ORDER BY' = 'chat_timestamp DESC' ) ); - if ( $res-numRows() 4 ){ - $i = 0; + if ( $res-numRows() ) { + $row = $res-fetchObject(); + $oldest = $row-chat_timestamp; + $now = MediaWikiChat::now(); - foreach ( $res as $row ) { - if ( $i == 0 ) { - $latest = $row; - } elseif ( $i == 4 ) { - $oldest = $row; - } - $i++; - } - - $latestTime = $latest-chat_timestamp; - $oldestTime = $oldest-chat_timestamp; - - $av = ( $latestTime - $oldestTime ) / 10 ; // divide by 5 to find average, then half + $av = ( $now - $oldest ); // / 5 to find average, then / 2, then * 10 as MWC timestamps are 100th seconds, JS intervals are 1000th seconds if ( $av $maxInterval ) { $av = $maxInterval; - } elseif ( $minInterval ) { + } elseif ( $av $minInterval ) { $av = $minInterval; } return $av; - } else { - return 7 * 1000; + } else { // before there are any messages to consider + return 7 * 1000; // use 7 secs } } -- To view, visit https://gerrit.wikimedia.org/r/182075 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8e614c06108f18a8b8449654f1ab23667c70240 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MediaWikiChat Gerrit-Branch: master Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add cache type into statsd prefix for varnishkafka metrics - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/182076 Change subject: Add cache type into statsd prefix for varnishkafka metrics .. Add cache type into statsd prefix for varnishkafka metrics Change-Id: I0c7fe7504bcc938a2af8b21ea4eb1dd4ce8eda9d --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/76/182076/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index e46b465..993af9e 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -508,12 +508,13 @@ # are proven to work on mobiles. include role::cache::varnish::statsd +$cache_type = delete($topic, webrequest_) # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.${cache_type}, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c7fe7504bcc938a2af8b21ea4eb1dd4ce8eda9d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove use of jQuery .live() - change (mediawiki...AJAXPoll)
jenkins-bot has submitted this change and it was merged. Change subject: Remove use of jQuery .live() .. Remove use of jQuery .live() jQuery's .live was deprecated in jQuery 1.7 and removed in 1.9, so don't use it here as it'll just generate TypeErrors under MediaWiki 1.24. Change-Id: I703ea427e00fdea957788c8d29892ebb6fe3fffa --- M resources/ajaxpoll.js 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ajaxpoll.js b/resources/ajaxpoll.js index 2dc4c86..4857b54 100644 --- a/resources/ajaxpoll.js +++ b/resources/ajaxpoll.js @@ -1,6 +1,6 @@ var ajaxpollTmp; -$(.ajaxpoll-answer-vote).live(mouseover, +$(.ajaxpoll-answer-vote).on(mouseover, function(){ var sp=$(this).find(span); ajaxpollTmp=sp.html(); @@ -9,7 +9,7 @@ } ); -$(.ajaxpoll-answer-vote).live(mouseout, +$(.ajaxpoll-answer-vote).on(mouseout, function(){ var sp=$(this).find(span); sp.attr(title,sp.text()); @@ -19,7 +19,7 @@ /* attach click handler */ $(.ajaxpoll-answer-name label) - .live(click, + .on(click, function(event){ event.preventDefault(); event.stopPropagation(); @@ -44,23 +44,23 @@ } ) -$(.ajaxpoll-answer-name:not(.ajaxpoll-answer-name-revoke) label).live(mouseover, +$(.ajaxpoll-answer-name:not(.ajaxpoll-answer-name-revoke) label).on(mouseover, function(){ $(this).addClass(ajaxpoll-hover-vote); } ); -$(.ajaxpoll-answer-name:not(.ajaxpoll-answer-name-revoke) label).live(mouseout, +$(.ajaxpoll-answer-name:not(.ajaxpoll-answer-name-revoke) label).on(mouseout, function(){ $(this).removeClass(ajaxpoll-hover-vote); } ); -$(.ajaxpoll-answer-name-revoke label).live(mouseover, +$(.ajaxpoll-answer-name-revoke label).on(mouseover, function(){ $(this).addClass(ajaxpoll-hover-revoke); } ); -$(.ajaxpoll-answer-name-revoke label).live(mouseout, +$(.ajaxpoll-answer-name-revoke label).on(mouseout, function(){ $(this).removeClass(ajaxpoll-hover-revoke); } -- To view, visit https://gerrit.wikimedia.org/r/178175 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I703ea427e00fdea957788c8d29892ebb6fe3fffa Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/AJAXPoll Gerrit-Branch: master Gerrit-Owner: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Bartosz Dziewoński matma@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] jQuery.live is no more, so let's use .on instead - change (mediawiki...ArticleFeedbackv5)
jenkins-bot has submitted this change and it was merged. Change subject: jQuery.live is no more, so let's use .on instead .. jQuery.live is no more, so let's use .on instead This fixes this extension for MediaWiki 1.24+. Change-Id: I4d6f964dded544f5b55206f5af0bf930e34f0108 --- M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js index 167c5d3..0fb2e9a 100644 --- a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js +++ b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js @@ -2919,7 +2919,7 @@ } } if ( hasTipsy ) { - $( '.articleFeedbackv5-form-flyover-closebutton' ).live( 'click', function ( e ) { + $( '.articleFeedbackv5-form-flyover-closebutton' ).on( 'click', function ( e ) { e.preventDefault(); var $host = $( '.articleFeedbackv5-trigger-link-' + $( e.target ).attr( 'rel' ) ); $host.tipsy( 'hide' ); -- To view, visit https://gerrit.wikimedia.org/r/181402 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d6f964dded544f5b55206f5af0bf930e34f0108 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Jack Phoenix j...@countervandalism.net Gerrit-Reviewer: Bartosz Dziewoński matma@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 over/underescaping detected in Special:UserRights - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Remove over/underescaping detected in Special:UserRights .. Remove over/underescaping detected in Special:UserRights Bug: T31340 Change-Id: I99823cd56e0a6f501101cb85be832d2925ce9779 --- M includes/User.php M includes/specials/SpecialUserrights.php M languages/Language.php 3 files changed, 23 insertions(+), 16 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/User.php b/includes/User.php index 34af4c5..88004dc 100644 --- a/includes/User.php +++ b/includes/User.php @@ -4471,7 +4471,7 @@ if ( $title ) { return Linker::link( $title, htmlspecialchars( $text ) ); } else { - return $text; + return htmlspecialchars( $text ); } } diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 3e9313c..892ff5b 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -493,25 +493,32 @@ } $language = $this-getLanguage(); - $displayedList = $this-msg( 'userrights-groupsmember-type', - $language-listToText( $list ), - $language-listToText( $membersList ) - )-plain(); - $displayedAutolist = $this-msg( 'userrights-groupsmember-type', - $language-listToText( $autoList ), - $language-listToText( $autoMembersList ) - )-plain(); + $displayedList = $this-msg( 'userrights-groupsmember-type' ) + -rawParams( + $language-listToText( $list ), + $language-listToText( $membersList ) + )-escaped(); + $displayedAutolist = $this-msg( 'userrights-groupsmember-type' ) + -rawParams( + $language-listToText( $autoList ), + $language-listToText( $autoMembersList ) + )-escaped(); $grouplist = ''; $count = count( $list ); if ( $count 0 ) { - $grouplist = $this-msg( 'userrights-groupsmember', $count, $user-getName() )-parse(); + $grouplist = $this-msg( 'userrights-groupsmember' ) + -numParams( $count ) + -params( $user-getName() ) + -parse(); $grouplist = 'p' . $grouplist . ' ' . $displayedList . /p\n; } $count = count( $autoList ); if ( $count 0 ) { - $autogrouplistintro = $this-msg( 'userrights-groupsmember-auto', $count, $user-getName() ) + $autogrouplistintro = $this-msg( 'userrights-groupsmember-auto' ) + -numParams( $count ) + -params( $user-getName() ) -parse(); $grouplist .= 'p' . $autogrouplistintro . ' ' . $displayedAutolist . /p\n; } @@ -669,9 +676,9 @@ $member = User::getGroupMember( $group, $user-getName() ); if ( $checkbox['irreversible'] ) { - $text = $this-msg( 'userrights-irreversible-marker', $member )-escaped(); + $text = $this-msg( 'userrights-irreversible-marker', $member )-text(); } else { - $text = htmlspecialchars( $member ); + $text = $member; } $checkboxHtml = Xml::checkLabel( $text, wpGroup- . $group, wpGroup- . $group, $checkbox['set'], $attr ); diff --git a/languages/Language.php b/languages/Language.php index 93c186c..c0de1b4 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -3406,10 +3406,10 @@ return ''; } if ( $m 0 ) { - $and = $this-getMessageFromDB( 'and' ); - $space = $this-getMessageFromDB( 'word-separator' ); + $and = htmlspecialchars( $this-getMessageFromDB( 'and' ) ); + $space = htmlspecialchars( $this-getMessageFromDB( 'word-separator' ) ); if ( $m 1 ) { - $comma = $this-getMessageFromDB( 'comma-separator' ); + $comma = htmlspecialchars(
[MediaWiki-commits] [Gerrit] Add cache type into statsd prefix for varnishkafka metrics - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Add cache type into statsd prefix for varnishkafka metrics .. Add cache type into statsd prefix for varnishkafka metrics Change-Id: I0c7fe7504bcc938a2af8b21ea4eb1dd4ce8eda9d --- M manifests/role/cache.pp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index e46b465..993af9e 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -508,12 +508,13 @@ # are proven to work on mobiles. include role::cache::varnish::statsd +$cache_type = delete($topic, webrequest_) # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.${cache_type}, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182076 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c7fe7504bcc938a2af8b21ea4eb1dd4ce8eda9d Gerrit-PatchSet: 2 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] Emergency fix for last change. stdlib's delete did not do w... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/182077 Change subject: Emergency fix for last change. stdlib's delete did not do what I thought it did .. Emergency fix for last change. stdlib's delete did not do what I thought it did Change-Id: I33d8d8cd367302a83f5c2c3b55abacd0bcee42dc --- M manifests/role/cache.pp 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/77/182077/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 993af9e..3a4dc65 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -508,13 +508,12 @@ # are proven to work on mobiles. include role::cache::varnish::statsd -$cache_type = delete($topic, webrequest_) # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.${cache_type}, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.mobile, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33d8d8cd367302a83f5c2c3b55abacd0bcee42dc Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Emergency fix for last change. stdlib's delete did not do w... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Emergency fix for last change. stdlib's delete did not do what I thought it did .. Emergency fix for last change. stdlib's delete did not do what I thought it did Change-Id: I33d8d8cd367302a83f5c2c3b55abacd0bcee42dc --- M manifests/role/cache.pp 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 993af9e..3a4dc65 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -508,13 +508,12 @@ # are proven to work on mobiles. include role::cache::varnish::statsd -$cache_type = delete($topic, webrequest_) # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.${cache_type}, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.mobile, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182077 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33d8d8cd367302a83f5c2c3b55abacd0bcee42dc Gerrit-PatchSet: 2 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] DO NOT DEPLOY BEFORE https://gerrit.wikimedia.org/r/#/c/1820... - change (operations/mediawiki-config)
AndyRussG has uploaded a new change for review. https://gerrit.wikimedia.org/r/182078 Change subject: DO NOT DEPLOY BEFORE https://gerrit.wikimedia.org/r/#/c/182074/ Ugly URLs to override mobile redirect for CentralNotice .. DO NOT DEPLOY BEFORE https://gerrit.wikimedia.org/r/#/c/182074/ Ugly URLs to override mobile redirect for CentralNotice Change-Id: I1996cf9ebe4e06014fc863cafb1e4164ea1dfc07 --- M wmf-config/CommonSettings-labs.php M wmf-config/CommonSettings.php 2 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/78/182078/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index a53be90..cfde433 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -110,9 +110,9 @@ $wgCentralGeoScriptURL = false; $wgCentralPagePath = //meta.wikimedia.beta.wmflabs.org/w/index.php; - $wgCentralBannerDispatcher = //meta.wikimedia.beta.wmflabs.org/wiki/Special:BannerRandom; - $wgCentralSelectedBannerDispatcher = //meta.wikimedia.beta.wmflabs.org/wiki/Special:BannerLoader; - $wgCentralBannerRecorder = //meta.wikimedia.beta.wmflabs.org/wiki/Special:RecordImpression; + $wgCentralBannerDispatcher = //meta.wikimedia.beta.wmflabs.org/w/index.php?title=Special:BannerRandom; + $wgCentralSelectedBannerDispatcher = //meta.wikimedia.beta.wmflabs.org/w/index.php?title=Special:BannerLoader; + $wgCentralBannerRecorder = //meta.wikimedia.beta.wmflabs.org/w/index.php?title=Special:RecordImpression; $wgCentralNoticeChooseBannerOnClient = true; $wgCentralDBname = 'metawiki'; } diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 8d5658d..52865d7 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1460,14 +1460,14 @@ // for banner loading if ( $wgDBname == 'testwiki' ) { $wgCentralPagePath = //test.wikipedia.org/w/index.php; - $wgCentralBannerDispatcher = //test.wikipedia.org/wiki/Special:BannerRandom; - $wgCentralSelectedBannerDispatcher = //test.wikipedia.org/wiki/Special:BannerLoader; - $wgCentralBannerRecorder = //test.wikipedia.org/wiki/Special:RecordImpression; + $wgCentralBannerDispatcher = //test.wikipedia.org/w/index.php?title=Special:BannerRandom; + $wgCentralSelectedBannerDispatcher = //test.wikipedia.org/w/index.php?title=Special:BannerLoader; + $wgCentralBannerRecorder = //test.wikipedia.org/w/index.php?title=Special:RecordImpression; } else { $wgCentralPagePath = //{$wmfHostnames['meta']}/w/index.php; - $wgCentralBannerDispatcher = //{$wmfHostnames['meta']}/wiki/Special:BannerRandom; - $wgCentralSelectedBannerDispatcher = //{$wmfHostnames['meta']}/wiki/Special:BannerLoader; - $wgCentralBannerRecorder = //{$wmfHostnames['meta']}/wiki/Special:RecordImpression; + $wgCentralBannerDispatcher = //{$wmfHostnames['meta']}/w/index.php?title=Special:BannerRandom; + $wgCentralSelectedBannerDispatcher = //{$wmfHostnames['meta']}/w/index.php?title=Special:BannerLoader; + $wgCentralBannerRecorder = //{$wmfHostnames['meta']}/w/index.php?title=Special:RecordImpression; } $wgCentralNoticeChooseBannerOnClient = true; -- To view, visit https://gerrit.wikimedia.org/r/182078 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1996cf9ebe4e06014fc863cafb1e4164ea1dfc07 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: AndyRussG andrew.green...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] shinken: Style fixes for shinkengen - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/182079 Change subject: shinken: Style fixes for shinkengen .. shinken: Style fixes for shinkengen - Fix some names to be more consistent - Add some more documentation - Add license header Change-Id: Id3d0d7e9817da6a293cc0fb61d7b84e3e68bc913 --- M modules/shinken/files/shinkengen M modules/shinken/templates/shinkengen.yaml.erb 2 files changed, 35 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/79/182079/1 diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen index c00dc0c..8021746 100755 --- a/modules/shinken/files/shinkengen +++ b/modules/shinken/files/shinkengen @@ -1,4 +1,35 @@ #!/usr/bin/python3 +# Copyright 2014 Yuvi Panda yuvipa...@gmail.com +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +Generates config about labs instances for shinken, taking info from LDAP. + +Emits a host definition for each instance in the whitelisted projects +(whitelist in the config file). + +Sets as hostgroup for each instance: +- Name of project instance is a part of +- Each puppet role explicitly applied to it (via Wikitech) + +Sets as contact for each instance a contactgroup with the same name as the +project the instance is in. This contactgroup must be created whenever a +new project is whitelisted. + +Sets the project name in the notes section of each instance, so that +can be used when constructing graphite metric paths. + import yaml import ldap3 import jinja2 @@ -36,7 +67,7 @@ user=bindas, password=passwd, auto_bind=ldap3.AUTO_BIND_TLS_AFTER_BIND) -def get_hosts(self, project): +def get_instances(self, project): Get info about all instances in the given project. @@ -86,7 +117,7 @@ config['ldap']['password']) for project in config['projects']: -instances = ldapsource.get_hostsinfo(project) +instances = ldapsource.get_instances(project) host_configs = [] for instance in instances: co = ConfigObject('host') @@ -105,7 +136,7 @@ co.properties['notes'] = project # Used for auto deriving graphite path host_configs.append(co) hosts_config_path = '%s/%s.cfg' % ( -config['base_path'], project +config['output_path'], project ) with open(hosts_config_path, 'w') as hostsfile: hostsfile.write('\n'.join([str(hc) for hc in host_configs])) diff --git a/modules/shinken/templates/shinkengen.yaml.erb b/modules/shinken/templates/shinkengen.yaml.erb index e6e3ca0..2a13007 100644 --- a/modules/shinken/templates/shinkengen.yaml.erb +++ b/modules/shinken/templates/shinkengen.yaml.erb @@ -1,5 +1,5 @@ projects: [ 'tools', 'deployment-prep', 'extdist', 'analytics', 'integration', 'shinken', 'cvn', 'wdq-mm' ] -base_path: '/etc/shinken/generated' +output_path: '/etc/shinken/generated' ldap: server: %= @ldap_server % bindas: %= @ldap_bindas % -- To view, visit https://gerrit.wikimedia.org/r/182079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3d0d7e9817da6a293cc0fb61d7b84e3e68bc913 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] shinken: Style fixes for shinkengen - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: shinken: Style fixes for shinkengen .. shinken: Style fixes for shinkengen - Fix some names to be more consistent - Add some more documentation - Add license header Change-Id: Id3d0d7e9817da6a293cc0fb61d7b84e3e68bc913 --- M modules/shinken/files/shinkengen M modules/shinken/templates/shinkengen.yaml.erb 2 files changed, 35 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen index c00dc0c..8021746 100755 --- a/modules/shinken/files/shinkengen +++ b/modules/shinken/files/shinkengen @@ -1,4 +1,35 @@ #!/usr/bin/python3 +# Copyright 2014 Yuvi Panda yuvipa...@gmail.com +# +# Licensed under the Apache License, Version 2.0 (the License); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +Generates config about labs instances for shinken, taking info from LDAP. + +Emits a host definition for each instance in the whitelisted projects +(whitelist in the config file). + +Sets as hostgroup for each instance: +- Name of project instance is a part of +- Each puppet role explicitly applied to it (via Wikitech) + +Sets as contact for each instance a contactgroup with the same name as the +project the instance is in. This contactgroup must be created whenever a +new project is whitelisted. + +Sets the project name in the notes section of each instance, so that +can be used when constructing graphite metric paths. + import yaml import ldap3 import jinja2 @@ -36,7 +67,7 @@ user=bindas, password=passwd, auto_bind=ldap3.AUTO_BIND_TLS_AFTER_BIND) -def get_hosts(self, project): +def get_instances(self, project): Get info about all instances in the given project. @@ -86,7 +117,7 @@ config['ldap']['password']) for project in config['projects']: -instances = ldapsource.get_hostsinfo(project) +instances = ldapsource.get_instances(project) host_configs = [] for instance in instances: co = ConfigObject('host') @@ -105,7 +136,7 @@ co.properties['notes'] = project # Used for auto deriving graphite path host_configs.append(co) hosts_config_path = '%s/%s.cfg' % ( -config['base_path'], project +config['output_path'], project ) with open(hosts_config_path, 'w') as hostsfile: hostsfile.write('\n'.join([str(hc) for hc in host_configs])) diff --git a/modules/shinken/templates/shinkengen.yaml.erb b/modules/shinken/templates/shinkengen.yaml.erb index e6e3ca0..2a13007 100644 --- a/modules/shinken/templates/shinkengen.yaml.erb +++ b/modules/shinken/templates/shinkengen.yaml.erb @@ -1,5 +1,5 @@ projects: [ 'tools', 'deployment-prep', 'extdist', 'analytics', 'integration', 'shinken', 'cvn', 'wdq-mm' ] -base_path: '/etc/shinken/generated' +output_path: '/etc/shinken/generated' ldap: server: %= @ldap_server % bindas: %= @ldap_bindas % -- To view, visit https://gerrit.wikimedia.org/r/182079 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3d0d7e9817da6a293cc0fb61d7b84e3e68bc913 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Extract cache_type from $topic and use it in varnishkafka st... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/182080 Change subject: Extract cache_type from $topic and use it in varnishkafka statsd prefixes .. Extract cache_type from $topic and use it in varnishkafka statsd prefixes Change-Id: Ibebbab4dd12ff0e2f8a48f0c0f6b56664b00cd9f --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/80/182080/1 diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 3a4dc65..81170d6 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -508,12 +508,15 @@ # are proven to work on mobiles. include role::cache::varnish::statsd +# Extract cache type name from topic for use in statsd prefix. +# There is probably a better way to do this. +$cache_type = regsubst($topic, '^webrequest_(.+)$', '\1') # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.mobile, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.${cache_type}, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibebbab4dd12ff0e2f8a48f0c0f6b56664b00cd9f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Extract cache_type from $topic and use it in varnishkafka st... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Extract cache_type from $topic and use it in varnishkafka statsd prefixes .. Extract cache_type from $topic and use it in varnishkafka statsd prefixes Change-Id: Ibebbab4dd12ff0e2f8a48f0c0f6b56664b00cd9f --- M manifests/role/cache.pp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Ottomata: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 3a4dc65..81170d6 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -508,12 +508,15 @@ # are proven to work on mobiles. include role::cache::varnish::statsd +# Extract cache type name from topic for use in statsd prefix. +# There is probably a better way to do this. +$cache_type = regsubst($topic, '^webrequest_(.+)$', '\1') # Test using logster to send varnishkafka stats to statsd - graphite. # This may be moved into the varnishkafka module. logster::job { 'varnishkafka-webrequest': parser = 'JsonLogster', logfile = /var/cache/varnishkafka/webrequest.stats.json, -logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.mobile, +logster_options = -o statsd --statsd-host=localhost:8125 --metric-prefix=varnishkafka.${::hostname}.webrequest.${cache_type}, require = Class['role::cache::varnish::statsd'], } } -- To view, visit https://gerrit.wikimedia.org/r/182080 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibebbab4dd12ff0e2f8a48f0c0f6b56664b00cd9f Gerrit-PatchSet: 2 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] API: Improve handling of interwiki redirects when resolving - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/182081 Change subject: API: Improve handling of interwiki redirects when resolving .. API: Improve handling of interwiki redirects when resolving When ApiPageSet resolves redirects, it should add the targets of any interwiki redirects to its list of interwiki titles. Also, when outputting the list of redirects it may as well include a 'tointerwiki' property to match the 'tofragment' property it already outputs. Bug: T85417 Change-Id: Icf1346f52c8efa099b502433de1b18c4caad09df --- M RELEASE-NOTES-1.25 M includes/api/ApiPageSet.php 2 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/182081/1 diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 77dc55b..5e8c5e4 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -161,6 +161,10 @@ * (T76052) list=tags can now indicate whether a tag is defined. * (T75522) list=prefixsearch now supports continuation * (T78737) action=expandtemplates can now return page properties. +* (T85417) When resolving redirects, ApiPageSet will now add the targets of + interwiki redirects to the list of interwiki titles. +* (T85417) When outputting the list of redirect titles, a 'tointerwiki' + property (like the existing 'tofragment' property) will be set. === Action API internal changes in 1.25 === * ApiHelp has been rewritten to support i18n and paginated HTML output. diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 1417ef7..e72383e 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -450,6 +450,9 @@ if ( $titleTo-hasFragment() ) { $r['tofragment'] = $titleTo-getFragment(); } + if ( $titleTo-isExternal() ) { + $r['tointerwiki'] = $titleTo-getInterwiki(); + } $values[] = $r; } if ( !empty( $values ) $result ) { @@ -1049,7 +1052,9 @@ $row-rd_interwiki ); unset( $this-mPendingRedirectIDs[$rdfrom] ); - if ( !$to-isExternal() !isset( $this-mAllPages[$row-rd_namespace][$row-rd_title] ) ) { + if ( $to-isExternal() ) { + $this-mInterwikiTitles[$to-getPrefixedText()] = $to-getInterwiki(); + } elseif ( !isset( $this-mAllPages[$row-rd_namespace][$row-rd_title] ) ) { $lb-add( $row-rd_namespace, $row-rd_title ); } $this-mRedirectTitles[$from] = $to; -- To view, visit https://gerrit.wikimedia.org/r/182081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf1346f52c8efa099b502433de1b18c4caad09df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Error reporting - change (mediawiki...MobileFrontend)
Kaldari has uploaded a new change for review. https://gerrit.wikimedia.org/r/182082 Change subject: WIP: Error reporting .. WIP: Error reporting Change-Id: Ifd27f175fa9f0bcfcc8c286c834745a47b3c9991 --- M includes/Resources.php M less/Overlay.less 2 files changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/82/182082/1 diff --git a/includes/Resources.php b/includes/Resources.php index 05e0cf6..71e06ec 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -808,6 +808,29 @@ ), ), + 'mobile.errorReport' = $wgMFResourceFileModuleBoilerplate + array( + 'dependencies' = array( + 'mobile.startup', + 'mobile.overlays', + ), + 'scripts' = array( + 'javascripts/modules/errorReport/init.js', + ), + ), + + 'mobile.errorReport.overlay' = $wgMFResourceFileModuleBoilerplate + array( + 'dependencies' = array( + 'mobile.templates', + 'mobile.overlays', + ), + 'scripts' = array( + 'javascripts/modules/errorReport/ErrorReportOverlay.js', + ), + 'templates' = array( + 'ErrorReportOverlay.hogan' = 'templates/modules/errorReport/ErrorReportOverlay.hogan', + ), + ), + 'mobile.languages' = $wgMFResourceFileModuleBoilerplate + array( 'class' = 'ResourceLoaderParsedMessageModule', 'dependencies' = array( @@ -1382,6 +1405,7 @@ 'mobile.bannerImage', 'mobile.fontchanger', 'mobile.wikigrok.roulette', + 'mobile.errorReport', ), 'scripts' = array( 'javascripts/modules/infobox/init.js', diff --git a/less/Overlay.less b/less/Overlay.less index c534fb8..0c6ba2a 100644 --- a/less/Overlay.less +++ b/less/Overlay.less @@ -134,6 +134,7 @@ .content { // AbuseFilterOverlay + // FIXME: Don't hijack formatting of all cancel buttons just to center some .cancel { display: block; margin: 1em auto; -- To view, visit https://gerrit.wikimedia.org/r/182082 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd27f175fa9f0bcfcc8c286c834745a47b3c9991 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Kaldari rkald...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't transmit zero-result search events in TitleSearchFragm... - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Don't transmit zero-result search events in TitleSearchFragment funnel. .. Don't transmit zero-result search events in TitleSearchFragment funnel. The search funnel is meant to track user-perceived performance of search, and since the autoswitching means the user never perceives a zero result event for a title search, it doesn't make sense to log it. Change-Id: Ie974ef89eb3ff15a608ee3303b1c8574a78f136f --- M wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java b/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java index 988211d..c864453 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/TitleSearchFragment.java @@ -294,7 +294,11 @@ if (!isAdded()) { return; } -searchFragment.getFunnel().searchResults(false, result.size(), (int)(System.currentTimeMillis() - startMillis)); +// To ease data analysis and better make the funnel track with user behaviour, +// only transmit search results events if there are a nonzero number of results +if (result.size() 0) { +searchFragment.getFunnel().searchResults(false, result.size(), (int) (System.currentTimeMillis() - startMillis)); +} ((PageActivity)getActivity()).updateProgressBar(false, true, 0); searchNetworkError.setVisibility(View.GONE); displayResults(result); -- To view, visit https://gerrit.wikimedia.org/r/181429 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie974ef89eb3ff15a608ee3303b1c8574a78f136f Gerrit-PatchSet: 3 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Deskana dga...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@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] Escape word-separator and parenthesis in preferences - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/182083 Change subject: Escape word-separator and parenthesis in preferences .. Escape word-separator and parenthesis in preferences When building a link for email the messages word-separator and parenthesis are not escaped. Change-Id: Idbbec4dbdca1d0a0b598df2015c74961445e6d83 --- M includes/Preferences.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/182083/1 diff --git a/includes/Preferences.php b/includes/Preferences.php index aca6dcb..e0cfa77 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -450,8 +450,8 @@ array( 'returnto' = SpecialPage::getTitleFor( 'Preferences' )-getPrefixedText() ) ); $emailAddress .= $emailAddress == '' ? $link : ( - $context-msg( 'word-separator' )-plain() - . $context-msg( 'parentheses' )-rawParams( $link )-plain() + $context-msg( 'word-separator' )-escaped() + . $context-msg( 'parentheses' )-rawParams( $link )-escaped() ); } -- To view, visit https://gerrit.wikimedia.org/r/182083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbbec4dbdca1d0a0b598df2015c74961445e6d83 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] txstatsd: set explicit permissions and ownership - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/182084 Change subject: txstatsd: set explicit permissions and ownership .. txstatsd: set explicit permissions and ownership Change-Id: I1c9d5492512a60a00031baf9c7697fa028145c1b --- M modules/txstatsd/manifests/init.pp 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/84/182084/1 diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index e2af1c7..b11c80d 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -31,9 +31,15 @@ file { '/etc/txstatsd': ensure = directory, +owner = 'root', +group = 'root', +mode = '0555', } file { '/etc/txstatsd/txstatsd.cfg': +owner = 'root', +group = 'root', +mode = '0444', content = template('txstatsd/txstatsd.cfg.erb'), } -- To view, visit https://gerrit.wikimedia.org/r/182084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c9d5492512a60a00031baf9c7697fa028145c1b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not send X-WMF-UUID header if the user has opted out of E... - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Do not send X-WMF-UUID header if the user has opted out of EventLogging. .. Do not send X-WMF-UUID header if the user has opted out of EventLogging. If the user has opted out of EventLogging then we shouldn't be tracking them at all. This includes unique counting using the app install ID. This patch ensures that the app install ID not transmitted if the user has opted out. Bug: T85243 Change-Id: Ie6b9aea9708d382119372febd9b8c849360fd5ef --- M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 5733bd7..e0e8a48 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -277,7 +277,10 @@ // https://lists.wikimedia.org/pipermail/wikimedia-l/2014-April/071131.html HashMapString, String customHeaders = new HashMapString, String(); customHeaders.put(User-Agent, getUserAgent()); -customHeaders.put(X-WMF-UUID, getAppInstallID()); +// Add the app install ID to the header, but only if the user has not opted out of logging +if (isEventLoggingEnabled()) { +customHeaders.put(X-WMF-UUID, getAppInstallID()); +} String acceptLanguage = getAcceptLanguage(); // TODO: once we're not constraining this to just Chinese, add the header unconditionally. -- To view, visit https://gerrit.wikimedia.org/r/181673 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6b9aea9708d382119372febd9b8c849360fd5ef Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Deskana dga...@wikimedia.org Gerrit-Reviewer: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@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] txstatsd: set explicit permissions and ownership - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: txstatsd: set explicit permissions and ownership .. txstatsd: set explicit permissions and ownership Change-Id: I1c9d5492512a60a00031baf9c7697fa028145c1b --- M modules/txstatsd/manifests/init.pp 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved Ottomata: Looks good to me, but someone else must approve diff --git a/modules/txstatsd/manifests/init.pp b/modules/txstatsd/manifests/init.pp index e2af1c7..b11c80d 100644 --- a/modules/txstatsd/manifests/init.pp +++ b/modules/txstatsd/manifests/init.pp @@ -31,9 +31,15 @@ file { '/etc/txstatsd': ensure = directory, +owner = 'root', +group = 'root', +mode = '0555', } file { '/etc/txstatsd/txstatsd.cfg': +owner = 'root', +group = 'root', +mode = '0444', content = template('txstatsd/txstatsd.cfg.erb'), } -- To view, visit https://gerrit.wikimedia.org/r/182084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c9d5492512a60a00031baf9c7697fa028145c1b Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org Gerrit-Reviewer: Filippo Giunchedi fgiunch...@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] Fix warning on Special:ListGroupRights for group with invali... - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/182085 Change subject: Fix warning on Special:ListGroupRights for group with invalid group page .. Fix warning on Special:ListGroupRights for group with invalid group page Avoids Notice: Linker::link: Requires $target to be a Title object. [Called from SpecialListGroupRights::execute in \includes\specials\SpecialListgrouprights.php at line 97] Change-Id: Ie90ea33b0f57861985a296380e4ee7296dac79af --- M includes/specials/SpecialListgrouprights.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/85/182085/1 diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index 8b9a0ee..828a93b 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -86,13 +86,14 @@ $grouppageLocalized = !$msg-isBlank() ? $msg-text() : MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname; + $grouppageLocalizedTitle = Title::newFromText( $grouppageLocalized ); - if ( $group == '*' ) { - // Do not make a link for the generic * group + if ( $group == '*' || !$grouppageLocalizedTitle ) { + // Do not make a link for the generic * group or group with invalid group page $grouppage = htmlspecialchars( $groupnameLocalized ); } else { $grouppage = Linker::link( - Title::newFromText( $grouppageLocalized ), + $grouppageLocalizedTitle, htmlspecialchars( $groupnameLocalized ) ); } -- To view, visit https://gerrit.wikimedia.org/r/182085 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie90ea33b0f57861985a296380e4ee7296dac79af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Include log id in api error response - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Include log id in api error response .. Include log id in api error response For internal api error it is helpful for reporting when having the log id under the exception was logged in the exception log. Also use the redacted trace in the api error response instead of the normal one to avoid leakage of function values if exception details are shown. Change-Id: I7d917e532da1b1c7979a6599425f07d2f4f35aed --- M includes/api/ApiMain.php 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index a5287b6..99f90ee 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -710,11 +710,13 @@ $errMessage = array( 'code' = 'internal_api_error_' . get_class( $e ), - 'info' = $info, + 'info' = '[' . MWExceptionHandler::getLogId( $e ) . '] ' . $info, ); ApiResult::setContent( $errMessage, - $config-get( 'ShowExceptionDetails' ) ? \n\n{$e-getTraceAsString()}\n\n : '' + $config-get( 'ShowExceptionDetails' ) + ? \n\n . MWExceptionHandler::getRedactedTraceAsString( $e ) . \n\n + : '' ); } -- To view, visit https://gerrit.wikimedia.org/r/181940 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d917e532da1b1c7979a6599425f07d2f4f35aed Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: Anomie bjor...@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] Hygiene: reduce number of fields that are used unnecessarily. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: reduce number of fields that are used unnecessarily. .. Hygiene: reduce number of fields that are used unnecessarily. This patch takes some fields and either converts them to local variables, anonymous variables, or removes them entirely. There should be no change in user-facing behaviour, but having fewer fields floating around should reduce memory overhead slightly. Change-Id: I38b4d8ecc7a7d661faf85efb4e2477d017e2c5d1 --- M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java M wikipedia/src/main/java/org/wikipedia/bridge/StyleLoader.java M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java M wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java M wikipedia/src/main/java/org/wikipedia/editing/EditHandler.java M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java M wikipedia/src/main/java/org/wikipedia/pagehistory/usercontributions/FetchUserContribsTask.java M wikipedia/src/main/java/org/wikipedia/savedpages/RefreshSavedPageTask.java 10 files changed, 11 insertions(+), 30 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index e0e8a48..a382eac 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -480,9 +480,8 @@ return styleLoader; } -private String appInstallID; public String getAppInstallID() { -appInstallID = getAppInstallIDForFeature(PrefKeys.getAppInstallId()); +String appInstallID = getAppInstallIDForFeature(PrefKeys.getAppInstallId()); Log.d(Wikipedia, appInstallID is + appInstallID); return appInstallID; } diff --git a/wikipedia/src/main/java/org/wikipedia/bridge/StyleLoader.java b/wikipedia/src/main/java/org/wikipedia/bridge/StyleLoader.java index aa494dc..c52c9dd 100644 --- a/wikipedia/src/main/java/org/wikipedia/bridge/StyleLoader.java +++ b/wikipedia/src/main/java/org/wikipedia/bridge/StyleLoader.java @@ -20,13 +20,11 @@ public static final String BUNDLE_ABUSEFILTER = abusefilter.css; public static final String BUNDLE_NIGHT_MODE = night.css; -private final Context context; private final Date assetsUpdated; private final SharedPreferences prefs; public StyleLoader(Context context) { -this.context = context; this.prefs = PreferenceManager.getDefaultSharedPreferences(context); try { this.assetsUpdated = Utils.parseISO8601(context.getString(R.string.bundled_styles_updated)); diff --git a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java index 4664e42..67497b4 100644 --- a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java @@ -59,9 +59,6 @@ private CaptchaHandler captchaHandler; -private NonEmptyValidator nonEmptyValidator; -private NonEmptyValidator nonEmptyValidatorCaptcha; - private CreateAccountResult createAccountResult; private Validator validator; @@ -114,14 +111,16 @@ } }); -nonEmptyValidator = new NonEmptyValidator(new NonEmptyValidator.ValidationChangedCallback() { +// Don't allow user to submit registration unless they've put in a username and password +new NonEmptyValidator(new NonEmptyValidator.ValidationChangedCallback() { @Override public void onValidationChanged(boolean isValid) { createAccountButton.setEnabled(isValid); } }, usernameEdit, passwordEdit, passwordRepeatEdit); -nonEmptyValidatorCaptcha = new NonEmptyValidator(new NonEmptyValidator.ValidationChangedCallback() { +// Don't allow user to continue when they're shown a captcha until they fill it in +new NonEmptyValidator(new NonEmptyValidator.ValidationChangedCallback() { @Override public void onValidationChanged(boolean isValid) { createAccountButtonCaptcha.setEnabled(isValid); diff --git a/wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java b/wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java index 2c650b7..3ded4b5 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java @@ -16,7 +16,6 @@ private final int sectionID; private final String
[MediaWiki-commits] [Gerrit] Hygiene: change some if statements to switch statements. - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: change some if statements to switch statements. .. Hygiene: change some if statements to switch statements. JDK 7 added the ability to do switch statements on Strings. Since we're now using JDK 7, this patch changes some particularly convoluted if statements which operate on Strings to use switch statements instead, improving code readability and probably slightly improving performance. Change-Id: I36202c34f48b21347fa761e358dc0014ef3e9ca6 --- M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountTask.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java 4 files changed, 75 insertions(+), 57 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index b93ebaf..c4b11a2 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -308,12 +308,13 @@ public static String langCodeToWikiLang(String langCode) { // Convert deprecated language codes to modern ones. // See https://developer.android.com/reference/java/util/Locale.html -if (langCode.equals(iw)) { -return he; // Hebrew -} else if (langCode.equals(in)) { -return id; // Indonesian -} else if (langCode.equals(ji)) { -return yi; // Yiddish +switch (langCode) { +case iw: +return he; // Hebrew +case in: +return id; // Indonesian +case ji: +return yi; // Yiddish } return langCode; diff --git a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java index 67497b4..2b38650 100644 --- a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java @@ -201,31 +201,41 @@ public void handleError(CreateAccountResult result) { String errorCode = result.getResult(); -if (errorCode.equals(blocked)) { -if (app.getUserInfoStorage().isLoggedIn()) { -Crouton.makeText(this, R.string.create_account_blocked_error, Style.ALERT).show(); -} else { -Crouton.makeText(this, R.string.create_account_blocked_anon_error, Style.ALERT).show(); -} -} else if (errorCode.equals(acct_creation_throttle_hit)) { -Crouton.makeText(this, R.string.create_account_ip_throttle_error, Style.ALERT).show(); -} else if (errorCode.equals(sorbs_create_account_reason)) { -Crouton.makeText(this, R.string.create_account_open_proxy_error, Style.ALERT).show(); -} else if (errorCode.equals(userexists)) { -//Request focus before displaying error message, so that it pops up on its own -usernameEdit.requestFocus(); - usernameEdit.setError(getString(R.string.create_account_username_exists_error)); -} else if (errorCode.equals(noname)) { -Crouton.makeText(this, R.string.create_account_noname_error, Style.ALERT).show(); -} else if (errorCode.equals(invalidemailaddress)) { -Crouton.makeText(this, R.string.create_account_invalid_email_error, Style.ALERT).show(); -} else if (errorCode.equals(passwordtooshort)) { -//FIXME: Find the value of $wgMinimalPasswordLength and tell the user the minimum pwd length -Crouton.makeText(this, R.string.create_account_password_too_short_error, Style.ALERT).show(); -} else if (errorCode.equals(password-name-match)) { -Crouton.makeText(this, R.string.create_account_password_name_match_error, Style.ALERT).show(); -} else { -Crouton.makeText(this, R.string.create_account_generic_error, Style.ALERT).show(); +switch (errorCode) { +case blocked: +if (app.getUserInfoStorage().isLoggedIn()) { +Crouton.makeText(this, R.string.create_account_blocked_error, Style.ALERT).show(); +} else { +Crouton.makeText(this, R.string.create_account_blocked_anon_error, Style.ALERT).show(); +} +break; +case acct_creation_throttle_hit: +Crouton.makeText(this, R.string.create_account_ip_throttle_error, Style.ALERT).show(); +break; +case sorbs_create_account_reason: +Crouton.makeText(this,
[MediaWiki-commits] [Gerrit] Manual import of Android string translations from TWN - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/182086 Change subject: Manual import of Android string translations from TWN .. Manual import of Android string translations from TWN Change-Id: I2fabfd50368be646c1a371a559504de150aa93b5 --- M wikipedia/res/values-nb/strings.xml M wikipedia/res/values-nl/strings.xml M wikipedia/res/values-qq/strings.xml 3 files changed, 21 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/86/182086/1 diff --git a/wikipedia/res/values-nb/strings.xml b/wikipedia/res/values-nb/strings.xml index 3fec1e0..508b79f 100644 --- a/wikipedia/res/values-nb/strings.xml +++ b/wikipedia/res/values-nb/strings.xml @@ -11,7 +11,7 @@ string name=search_hintSøk i Wikipedia/string string name=history_activity_titleLogg/string string name=nav_item_historyLogg/string - string name=error_network_errorIngen nettverksforbindelse :(/string + string name=error_network_errorDet er ingen nettverksforbindelse :(/string string name=search_network_errorNettverksfeil. Trykk for å prøve igjen./string string name=page_error_retryPrøv igjen/string string name=menu_clear_all_historyTøm logg/string @@ -36,7 +36,7 @@ string name=toast_saved_page_missing_imagesKunne ikke lagre alle bilder/string string name=toast_save_page_failedLagring av siden feilet :(/string string name=toast_refresh_saved_pageGjenoppfrisker lagret side…/string - string name=delete_selected_saved_pagesSlett/string + string name=delete_selected_saved_pagesFjern/string string name=toast_saved_page_deletedSiden(e) ble fjernet/string string name=saved_pages_search_list_hintSøk/string string name=saved_pages_search_empty_messageFant ingen sider som matchet spørringen din./string @@ -80,7 +80,7 @@ string name=search_no_results_foundIngen resultater ble funnet/string string name=edit_section_captcha_messageFor å beskytte mot automatisk spam, vær vennlig å skrive inn ordene som vises under/string string name=edit_section_captcha_hintGjenta ordene ovenfor/string - string name=title_captchaFyll inn captcha/string + string name=title_captchaFyll inn CAPTCHA/string string name=edit_section_abusefilter_back_textGjør endringer i min redigering/string string name=edit_section_captcha_reloadTrykk på CAPTCHA for å laste inn på nytt/string string name=edit_saved_page_refreshDenne lagrede siden kan være utdatert, og må gjenoppfriskes for å kunne redigeres. Vil du gjenoppfriske siden?/string @@ -105,9 +105,9 @@ string name=toast_logout_completeLogget ut/string string name=saved_pages_empty_titleIngen lagrede sider her!/string string name=saved_pages_empty_messageLagrede sider er veldig praktisk. Tenk på dem som bokmerker som du også kan lese når du er offline./string - string name=history_empty_titleIngen besøkte sider./string - string name=history_empty_messageDu har kanskje tømt loggen. Neste gang du besøker en side kan du finne den igjen her etterpå./string - string name=delete_selected_historySlett/string + string name=history_empty_titleIngen besøkte sider her!/string + string name=history_empty_messageDu har antakelig fjernet alle sammen. Neste gang du besøker en side kan du etterpå finne den igjen her./string + string name=delete_selected_historyFjern/string string name=wp_stylizedlt;biggt;Wlt;/biggt;IKIPEDIlt;biggt;Alt;/biggt;/string string name=wp_tag_lineDen frie encyklopedi/string string name=skipHopp over/string @@ -129,7 +129,7 @@ string name=create_account_noname_errorBrukernavnet du oppga er ugyldig. Vennligst oppgi et annet brukernavn./string string name=create_account_invalid_email_errorEpost-adressen du oppga er ugyldig./string string name=create_account_password_too_short_errorPassordet du oppga er for kort./string - string name=create_account_blocked_anon_errorDu kan ikke opprette en konto fordi IP-en din er blokkert./string + string name=create_account_blocked_anon_errorDu kan ikke opprette en konto fordi IP-adressen din er blokkert./string string name=create_account_blocked_errorDu kan ikke opprette en konto fordi kontoen din er blokkert./string string name=create_account_password_name_match_errorBrukernavnet og passordet kan ikke være like./string string name=create_account_generic_errorKunne ikke opprette konto/string @@ -147,7 +147,7 @@ string name=zero_interstitial_titleForlater Wikipedia Zero/string string name=zero_interstitial_leave_appDatakostnader kan påløpe. Fortsette til eksternt nettsted?/string string name=zero_interstitial_continueForlat appen/string - string name=zero_interstitial_cancelForbli her/string + string name=zero_interstitial_cancelBli her/string string name=zero_learn_moreDatakostnader påløper ikke for denne Wikipedia-appen./string string name=zero_learn_more_learn_moreLær mer/string string
[MediaWiki-commits] [Gerrit] Manual import of iOS string translations from TWN - change (apps...wikipedia)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/182087 Change subject: Manual import of iOS string translations from TWN .. Manual import of iOS string translations from TWN Change-Id: I8d7def9fea5dae6797202b9f2fee8f5fcc381fb1 --- M wikipedia/nl.lproj/Localizable.strings M wikipedia/ru.lproj/Localizable.strings 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/87/182087/1 diff --git a/wikipedia/nl.lproj/Localizable.strings b/wikipedia/nl.lproj/Localizable.strings index 09f5f0d..333aa71 100644 --- a/wikipedia/nl.lproj/Localizable.strings +++ b/wikipedia/nl.lproj/Localizable.strings @@ -85,6 +85,10 @@ search-within-articles = In paginatekst; search-did-you-mean = Bedoelde u $1?; search-recent-title = Recente zoekopdrachten; +search-recent-clear-confirmation-heading = Alle recente zoekopdrachten verwijderen?; +search-recent-clear-confirmation-sub-heading = Deze handeling kan niet ongedaan worden gemaakt!; +search-recent-clear-cancel = Annuleren; +search-recent-clear-delete-all = Alles verwijderen; main-menu-title = Meer; main-menu-language-title = Zoeken in Wikipedia in het $1; main-menu-language-toggle-show = Talen bekijken; diff --git a/wikipedia/ru.lproj/Localizable.strings b/wikipedia/ru.lproj/Localizable.strings index 394c38a..b8b7c6d 100644 --- a/wikipedia/ru.lproj/Localizable.strings +++ b/wikipedia/ru.lproj/Localizable.strings @@ -199,7 +199,7 @@ abuse-filter-warning-heading = Эта правка выглядит деструктивной. Вы уверены, что хотите сохранить её?; abuse-filter-warning-subheading = Ваша правка может содержать одно или несколько из следующих действий:; abuse-filter-warning-caps = Печать ЗАГЛАВНЫМИ БУКВАМИ; -abuse-filter-warning-blanking = Заготовка статьи или спам; +abuse-filter-warning-blanking = Пустая статья или спам; abuse-filter-warning-irrelevant = Нерелевантные внешние ссылки или изображения; abuse-filter-warning-repeat = Повторяющиеся символы; abuse-filter-disallow-heading = Вы не можете сохранить эту правку. Пожалуйста, вернитесь назад и измените её.; -- To view, visit https://gerrit.wikimedia.org/r/182087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d7def9fea5dae6797202b9f2fee8f5fcc381fb1 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] API: Clean up uncaught exception backtrace output - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/182089 Change subject: API: Clean up uncaught exception backtrace output .. API: Clean up uncaught exception backtrace output The existing response seems to be designed to look good with format=xmlfm, which doesn't make much sense now that format=jsonfm is the default. Change-Id: Ic3993aaf7e401d6233bbbe4522e77004099e3c40 --- M includes/api/ApiMain.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/89/182089/1 diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 99f90ee..1544189 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -712,12 +712,12 @@ 'code' = 'internal_api_error_' . get_class( $e ), 'info' = '[' . MWExceptionHandler::getLogId( $e ) . '] ' . $info, ); - ApiResult::setContent( - $errMessage, - $config-get( 'ShowExceptionDetails' ) - ? \n\n . MWExceptionHandler::getRedactedTraceAsString( $e ) . \n\n - : '' - ); + if ( $config-get( 'ShowExceptionDetails' ) ) { + ApiResult::setContent( + $errMessage, + MWExceptionHandler::getRedactedTraceAsString( $e ) + ); + } } // Remember all the warnings to re-add them later -- To view, visit https://gerrit.wikimedia.org/r/182089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3993aaf7e401d6233bbbe4522e77004099e3c40 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add ParamInfo support for v1.15-18 - change (pywikibot/core)
John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/182088 Change subject: Add ParamInfo support for v1.15-18 .. Add ParamInfo support for v1.15-18 Version before 1.19 need to obtain the query modules from the paraminfo for the query module. In earlier versions, for modules which do not have any parameters, such as categoryinfo, the parameters member may be missing from the paraminfo structure. Change-Id: I779c7637d11a218ba389b05b222a384a0296b822 --- M pywikibot/data/api.py M tests/api_tests.py 2 files changed, 38 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/88/182088/1 diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index 5225322..04245ce 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -187,22 +187,29 @@ self.paraminfo_keys = frozenset(['modules']) def _init(self): +_mw_ver = MediaWikiVersion(self.site.version()) # The paraminfo api deprecated the old request syntax of # querymodules='info'; to avoid warnings sites with 1.25wmf4+ # must only use 'modules' parameter. if self.modules_only_mode is None: -self.modules_only_mode = MediaWikiVersion(self.site.version()) = MediaWikiVersion('1.25wmf4') +self.modules_only_mode = _mw_ver = MediaWikiVersion('1.25wmf4') if self.modules_only_mode: self.paraminfo_keys = frozenset(['modules']) -# Assume that by v1.26, it will be desirable to prefetch 'query' -if MediaWikiVersion(self.site.version()) MediaWikiVersion('1.26'): -self.preloaded_modules |= set(['query']) + +# v1.18 and earlier paraminfo doesnt include modules; must use 'query' +# Assume that by v1.26, it will be desirable to prefetch 'query' +if _mw_ver MediaWikiVersion('1.26') or _mw_ver MediaWikiVersion('1.19'): +self.preloaded_modules |= set(['query']) self.fetch(self.preloaded_modules, _init=True) + +# paraminfo 'mainmodule' was added 1.15 +assert('main' in self._paraminfo) main_modules_param = self.parameter('main', 'action') assert(main_modules_param) assert('type' in main_modules_param) +assert(isinstance(main_modules_param['type'], list)) self._action_modules = frozenset(main_modules_param['type']) # While deprecated with warning in 1.25, paraminfo param 'querymodules' @@ -214,26 +221,35 @@ assert('limit' in query_modules_param) self._limit = query_modules_param['limit'] -if query_modules_param: -assert('type' in query_modules_param) -self._query_modules = frozenset(query_modules_param['type']) -else: +if query_modules_param and 'type' in query_modules_param: +# 1.19+ 'type' is the list of modules; on 1.18, it is 'string' +if isinstance(query_modules_param['type'], list): +self._query_modules = frozenset(query_modules_param['type']) + +if not self._query_modules: if 'query' not in self._paraminfo: self.fetch(set(['query']), _init=True) +meta_param = self.parameter('query', 'meta') prop_param = self.parameter('query', 'prop') list_param = self.parameter('query', 'list') generator_param = self.parameter('query', 'generator') +assert(meta_param) assert(prop_param) assert(list_param) assert(generator_param) +assert('type' in meta_param) assert('type' in prop_param) assert('type' in list_param) assert('type' in generator_param) +assert(isinstance(meta_param['type'], list)) +assert(isinstance(prop_param['type'], list)) +assert(isinstance(list_param['type'], list)) +assert(isinstance(generator_param['type'], list)) self._query_modules = frozenset( -prop_param['type'] + list_param['type'] + +meta_param['type'] + prop_param['type'] + list_param['type'] + generator_param['type'] ) @@ -343,7 +359,8 @@ for paraminfo_key, modules_data in data['paraminfo'].items() if modules_data and paraminfo_key in cls.paraminfo_keys] - for mod_data in modules_data]) + for mod_data in modules_data + if 'missing' not in mod_data]) def __getitem__(self, key): Return a paraminfo property, caching it. @@ -377,7 +394,14 @@ # also params which are common to many modules, such as those provided # by the ApiPageSet php class: titles, pageids, redirects, etc.
[MediaWiki-commits] [Gerrit] Backend for x-by-y widget with 'group by' - change (wikimedia...dash)
jenkins-bot has submitted this change and it was merged. Change subject: Backend for x-by-y widget with 'group by' .. Backend for x-by-y widget with 'group by' New 'group by' parameters available. Columns in metadata now include a 'canGroup' property indicating they are available to use in a group clause. Specify each as its own querystring parameter, e.g. /data/x-by-y?group=Currencygroup=Day You can select only successful donations with $filter=Action eq 'process' and Status eq '1' or only failed donationis wtih $filter=Action ne 'process' or Status ne '1' Change-Id: I8f7a8c344b7aba4a9f39d97a86b9d9a46c42c413 --- M routes/data.js M widgets/fraud.js A widgets/x-by-y.js 3 files changed, 258 insertions(+), 13 deletions(-) Approvals: Ssmith: Looks good to me, approved jenkins-bot: Verified diff --git a/routes/data.js b/routes/data.js index 59b9372..7995c05 100644 --- a/routes/data.js +++ b/routes/data.js @@ -49,7 +49,23 @@ throw new Error( 'Invalid value ' + value + ' for filter ' + column.display ); } } - +/** + * Adds to the list of join statements + * @param string table alias required + * @param Object widget + * @param Array joins + */ +function addJoin( table, widget, joins ) { + var i; + if ( table !== widget.mainTableAlias joins.indexOf( table ) === -1 ) { + if ( widget.optionalJoins[table].requires ) { + for ( i = 0; i widget.optionalJoins[table].requires.length; i++ ) { + addJoin( widget.optionalJoins[table].requires[i], widget, joins ); + } + } + joins.push( table ); + } +} /** * Gets a filter and adds it to joins if not yet present * Throws an error if the column does not exist @@ -64,12 +80,27 @@ if ( !col ) { throw new Error( 'Illegal filter property ' + name ); } - if ( col.table !== widget.mainTableAlias joins.indexOf( col.table ) === -1 ) { - joins.push( col.table ); - } + addJoin( col.table, widget, joins ); return col; } +/** + * Formats a column object for SQL + * @param Object filter column object + * @returns SQL representation of the given column for use in where or group clauses + */ +function getColumnText( column ) { + var colText = column.table + '.' + column.column; + if ( column.func ) { + // If the function has a placeholder, use that. Otherwise just add parens. + if ( column.func.match( /\[\[COL\]\]/ ) ) { + colText = column.func.replace( '[[COL]]', colText ); + } else { + colText = column.func + '(' + colText + ')'; + } + } + return colText; +} /** * Create a SQL WHERE clause given a parsed filter node. * Uses '?' placeholders in clause, and appends literal values to values array @@ -137,10 +168,7 @@ } values.push( val ); //this may get more complex with nesting... - colText = col.table + '.' + col.column; - if ( col.func ) { - colText = col.func + '(' + colText + ')'; - } + colText = getColumnText( col ); return colText + ' ' + op + ' ?'; case 'fn': @@ -182,6 +210,9 @@ values = [], joins = [], joinClause = '', + groupCol, + groupClause = '', + selectGroup = '', i, result, cacheKey; @@ -201,6 +232,10 @@ cacheKey += '-' + parsedQs.$filter; } + if ( parsedQs.group ) { + cacheKey += '-' + parsedQs.group; + } + // cache=false param on QS means they want fresh results now if ( !parsedQs.cache || parsedQs.cache === 'true' ) { result = cache.get( cacheKey ); @@ -210,12 +245,43 @@ return; } } + logger.debug( 'Group:' + util.inspect( parsedQs.group) ); + sqlQuery = widget.query; + if ( widget.defaultGroup !parsedQs.group ) { + parsedQs.group = widget.defaultGroup; + } - // remove the cache param so as not to confuse the odata parser + if ( parsedQs.group ) { + try{ + if ( !Array.isArray( parsedQs.group ) ) { + parsedQs.group = [ parsedQs.group ]; + } + groupClause = 'GROUP BY '; + for ( i = 0; i parsedQs.group.length; i++ ) { + groupCol = getColumn( parsedQs.group[i], widget, joins ); + if ( !groupCol.canGroup ) { +
[MediaWiki-commits] [Gerrit] Restore backwards compatibility - change (mediawiki...Vector)
Jackmcbarn has uploaded a new change for review. https://gerrit.wikimedia.org/r/182091 Change subject: Restore backwards compatibility .. Restore backwards compatibility When status indicators were added, backwards compatibility was unnecessarily broken. This makes things like looking at old non-rebased branches, or running git bisect, unnecessarily annoying. This change adds an is_callable to restore backwards compatibility and removes the version check that was added in response to this break. Change-Id: Ia05aa73a1b027e667c52f54b6d6fdf6f42bbbadf --- M Vector.php M VectorTemplate.php 2 files changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/91/182091/1 diff --git a/Vector.php b/Vector.php index 784bf0b..4b7f95e 100644 --- a/Vector.php +++ b/Vector.php @@ -22,12 +22,6 @@ * @ingroup Skins */ -if ( version_compare( $GLOBALS['wgVersion'], '1.25c', '' ) ) { - echo 'This version of the Vector skin requires at least MediaWiki 1.25, you have ' . $GLOBALS['wgVersion'] . - '. You can download a more appropriate version here: https://www.mediawiki.org/wiki/Special:SkinDistributor/Vector'; - exit(); -} - $GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' = __FILE__, 'name' = 'Vector', diff --git a/VectorTemplate.php b/VectorTemplate.php index ab40693..4acfa8c 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -102,7 +102,11 @@ ?php } ? - ?php echo $this-getIndicators(); ? + ?php + if ( is_callable( array( $this, 'getIndicators' ) ) ) { + echo $this-getIndicators(); + } + ? h1 id=firstHeading class=firstHeading lang=?php $this-data['pageLanguage'] = $this-getSkin()-getTitle()-getPageViewLanguage()-getHtmlCode(); -- To view, visit https://gerrit.wikimedia.org/r/182091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia05aa73a1b027e667c52f54b6d6fdf6f42bbbadf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix escaping of specialList and clarify comments - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix escaping of specialList and clarify comments .. Fix escaping of specialList and clarify comments Change-Id: I4bead5f5f310dd35e8dfee738f35a070e7bf869f --- M languages/Language.php 1 file changed, 26 insertions(+), 11 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/Language.php b/languages/Language.php index c0de1b4..72cc1ac 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -962,7 +962,17 @@ * @return string */ function getMessageFromDB( $msg ) { - return wfMessage( $msg )-inLanguage( $this )-text(); + return $this-msg( $msg )-text(); + } + + /** +* Get message object in this language. Only for use inside this class. +* +* @param string $msg Message name +* @return Message +*/ + protected function msg( $msg ) { + return wfMessage( $msg )-inLanguage( $this ); } /** @@ -3406,10 +3416,10 @@ return ''; } if ( $m 0 ) { - $and = htmlspecialchars( $this-getMessageFromDB( 'and' ) ); - $space = htmlspecialchars( $this-getMessageFromDB( 'word-separator' ) ); + $and = $this-msg( 'and' )-escaped(); + $space = $this-msg( 'word-separator' )-escaped(); if ( $m 1 ) { - $comma = htmlspecialchars( $this-getMessageFromDB( 'comma-separator' ) ); + $comma = $this-msg( 'comma-separator' )-escaped(); } } $s = $l[$m]; @@ -4643,17 +4653,22 @@ * Make a list item, used by various special pages * * @param string $page Page link -* @param string $details Text between brackets +* @param string $details HTML safe text between brackets * @param bool $oppositedm Add the direction mark opposite to your * language, to display text properly -* @return string +* @return HTML escaped string */ function specialList( $page, $details, $oppositedm = true ) { - $dirmark = ( $oppositedm ? $this-getDirMark( true ) : '' ) . - $this-getDirMark(); - $details = $details ? $dirmark . $this-getMessageFromDB( 'word-separator' ) . - wfMessage( 'parentheses' )-rawParams( $details )-inLanguage( $this )-escaped() : ''; - return $page . $details; + if ( !$details ) { + return $page; + } + + $dirmark = ( $oppositedm ? $this-getDirMark( true ) : '' ) . $this-getDirMark(); + return + $page . + $dirmark . + $this-msg( 'word-separator' )-escaped() . + $this-msg( 'parentheses' )-rawParams( $details )-escaped(); } /** -- To view, visit https://gerrit.wikimedia.org/r/177980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bead5f5f310dd35e8dfee738f35a070e7bf869f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add the x-by-y chart widget - change (wikimedia...dash)
Ejegg has submitted this change and it was merged. Change subject: Add the x-by-y chart widget .. Add the x-by-y chart widget Change-Id: I7f7f473f7cb942766f9c2b8db408d4e94ceabd9e --- M src/app/startup.js M src/components/boards/bigEnglish/bigEnglishBoard.html M src/components/widgets/fraud-gauge/fraud-gauge.html A src/components/widgets/x-by-y-chart/x-by-y-chart.html A src/components/widgets/x-by-y-chart/x-by-y-chart.js M src/css/style.css 6 files changed, 215 insertions(+), 2 deletions(-) Approvals: Ejegg: Looks good to me, approved jenkins-bot: Verified diff --git a/src/app/startup.js b/src/app/startup.js index d564500..00c9550 100644 --- a/src/app/startup.js +++ b/src/app/startup.js @@ -23,6 +23,7 @@ ko.components.register( 'totals-earned-chart',{ require: 'components/widgets/totals-earned-chart/totals-earned-chart' }); ko.components.register( 'distance-to-goal-chart', { require: 'components/widgets/distance-to-goal-chart/distance-to-goal-chart' }); ko.components.register( 'amt-per-second-chart', { require: 'components/widgets/amt-per-second-chart/amt-per-second-chart' }); +ko.components.register( 'x-by-y-chart', { require: 'components/widgets/x-by-y-chart/x-by-y-chart' }); //fire up router ko.applyBindings({ route: router.currentRoute }); diff --git a/src/components/boards/bigEnglish/bigEnglishBoard.html b/src/components/boards/bigEnglish/bigEnglishBoard.html index 323f6d2..e13e142 100644 --- a/src/components/boards/bigEnglish/bigEnglishBoard.html +++ b/src/components/boards/bigEnglish/bigEnglishBoard.html @@ -61,6 +61,8 @@ /div /div +x-by-y-chart/x-by-y-chart + totals-earned-chart params=title: 'Donation Amounts by Day in December', dailyCountArray: dailyCountArray, dailyDataArray: dailyDataArray, dayObj: dayObj, dataChanged: dataChanged/totals-earned-chart div class=row layoutRow diff --git a/src/components/widgets/fraud-gauge/fraud-gauge.html b/src/components/widgets/fraud-gauge/fraud-gauge.html index 25bc16a..ac0fabc 100644 --- a/src/components/widgets/fraud-gauge/fraud-gauge.html +++ b/src/components/widgets/fraud-gauge/fraud-gauge.html @@ -21,8 +21,10 @@ div class=row id=unspecifiedFraudGauge data-bind=visible: !gaugeIsSetUp() div class=col-md-12 -h3This widget hasn't been set up yet./h3 -button type=button class=btn btn-primary btn-lg btn-block data-toggle=modal data-target=#modifyModalSet it up/button +div class=setupAsk +h3This widget hasn't been set up yet./h3 +button type=button class=btn btn-primary btn-lg btn-block data-toggle=modal data-target=#modifyModalSet it up/button +/div /div /div 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 new file mode 100644 index 000..b96849d --- /dev/null +++ b/src/components/widgets/x-by-y-chart/x-by-y-chart.html @@ -0,0 +1,129 @@ +div class=row + div class=panel panel-purple +div class=panel-heading + div class=btn-group btn-group-xs pull-right + button type=button class=btn btn-default dropdown-togglei class=fa fa-database/i/button + button type=button class=btn btn-default data-toggle=modal data-target=#modifyXYModali class=fa fa-edit/i/button + /div +/div + +div class=panel-body +div class=row + div class=col-md-12 + + div class=row-fluid + h1 data-bind=visible: xyIsSetUp(), text: title/h1 + /div + + div class=row id=specifiedXYchart data-bind=visible: xyIsSetUp + div class=col-md-2 + div class=row + div class=sidebox + h4Show:/h4 + select + optionThing/option + optionThing/option + optionThing/option + optionThing/option + optionThing/option + optionThing/option + /select + /div + /div +
[MediaWiki-commits] [Gerrit] API: Clean up uncaught exception backtrace output - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: API: Clean up uncaught exception backtrace output .. API: Clean up uncaught exception backtrace output The existing response seems to be designed to look good with format=xmlfm, which doesn't make much sense now that format=jsonfm is the default. Change-Id: Ic3993aaf7e401d6233bbbe4522e77004099e3c40 --- M includes/api/ApiMain.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 99f90ee..1544189 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -712,12 +712,12 @@ 'code' = 'internal_api_error_' . get_class( $e ), 'info' = '[' . MWExceptionHandler::getLogId( $e ) . '] ' . $info, ); - ApiResult::setContent( - $errMessage, - $config-get( 'ShowExceptionDetails' ) - ? \n\n . MWExceptionHandler::getRedactedTraceAsString( $e ) . \n\n - : '' - ); + if ( $config-get( 'ShowExceptionDetails' ) ) { + ApiResult::setContent( + $errMessage, + MWExceptionHandler::getRedactedTraceAsString( $e ) + ); + } } // Remember all the warnings to re-add them later -- To view, visit https://gerrit.wikimedia.org/r/182089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3993aaf7e401d6233bbbe4522e77004099e3c40 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie bjor...@wikimedia.org Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not send X-WMF-UUID header if the user has opted out of E... - change (apps...wikipedia)
Deskana has uploaded a new change for review. https://gerrit.wikimedia.org/r/182090 Change subject: Do not send X-WMF-UUID header if the user has opted out of EventLogging. .. Do not send X-WMF-UUID header if the user has opted out of EventLogging. If the user has opted out of EventLogging then we shouldn't be tracking them at all. This includes unique counting using the app install ID. This patch ensures that the app install ID not transmitted if the user has opted out. Bug: T85243 Change-Id: I3256f63436fa821b9d2e8bde830c267511ecfb84 --- M wikipedia/Networking/Queues/QueuesSingleton.m 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/90/182090/1 diff --git a/wikipedia/Networking/Queues/QueuesSingleton.m b/wikipedia/Networking/Queues/QueuesSingleton.m index 6f60faf..08a7e48 100644 --- a/wikipedia/Networking/Queues/QueuesSingleton.m +++ b/wikipedia/Networking/Queues/QueuesSingleton.m @@ -4,6 +4,7 @@ #import QueuesSingleton.h #import WikipediaAppUtils.h #import ReadingActionFunnel.h +#import SessionSingleton.h @implementation QueuesSingleton @@ -93,8 +94,10 @@ { [manager.requestSerializer setValue:@gzip forHTTPHeaderField:@Accept-Encoding]; [manager.requestSerializer setValue:[WikipediaAppUtils versionedUserAgent] forHTTPHeaderField:@User-Agent]; -ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init]; -[manager.requestSerializer setValue:funnel.appInstallID forHTTPHeaderField:@X-WMF-UUID]; +if ([SessionSingleton sharedInstance].sendUsageReports) { +ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init]; +[manager.requestSerializer setValue:funnel.appInstallID forHTTPHeaderField:@X-WMF-UUID]; +} // x-www-form-urlencoded is default, so probably don't need it. // See: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 -- To view, visit https://gerrit.wikimedia.org/r/182090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3256f63436fa821b9d2e8bde830c267511ecfb84 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Deskana dga...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement in View a declarative event map for DOM events - change (mediawiki...Mantle)
jenkins-bot has submitted this change and it was merged. Change subject: Implement in View a declarative event map for DOM events .. Implement in View a declarative event map for DOM events Inspired by backbone.js Advantages: * Event handling definitions and code are defined in the same place, and handlers are defined at the root view level resulting in cleaner more comprehensible code overall * Uses event delegation, thus being more efficient that individual manual events. Previous discussion/patch: https://gerrit.wikimedia.org/r/#/c/180834/ Examples of views with this new feature: * https://gerrit.wikimedia.org/r/#/c/180835/ * https://gerrit.wikimedia.org/r/#/c/180836/ * https://gerrit.wikimedia.org/r/#/c/180837/ Change-Id: I22f2e9e12e28542a5b136bfbf478a47fc657ef3e --- M javascripts/common/View.js M tests/javascripts/common/test_View.js 2 files changed, 167 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved Phuedx: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/javascripts/common/View.js b/javascripts/common/View.js index 1fcec8d..35ca9a8 100644 --- a/javascripts/common/View.js +++ b/javascripts/common/View.js @@ -1,6 +1,22 @@ ( function( M, $ ) { - var EventEmitter = M.require( 'eventemitter' ), View; + var EventEmitter = M.require( 'eventemitter' ), + View, + // Cached regex to split keys for `delegate`. + delegateEventSplitter = /^(\S+)\s*(.*)$/, + idCounter = 0; + + /** +* Generate a unique integer id (unique within the entire client session). +* Useful for temporary DOM ids. +* @ignore +* @param {String} prefix Prefix to be used when generating the id. +* @returns {String} +*/ + function uniqueId( prefix ) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; + } /** * Should be extended using extend(). @@ -28,6 +44,31 @@ * * append(), prepend(), before(), after() can be used to modify $el. on() * can be used to bind events. +* +* You can also use declarative DOM events binding by specifying an `events` +* map on the class. The keys will be 'event selector' and the value can be +* either the name of a method to call, or a function. All methods and +* functions will be executed on the context of the View. +* +* Inspired from Backbone.js +* https://github.com/jashkenas/backbone/blob/master/backbone.js#L1128 +* +* @example +* code +* var MyComponent = View.extend( { +* events: { +* 'mousedown .title': 'edit', +* 'click .button': 'save', +* 'click .open': function(e) { ... } +* }, +* edit: function ( ev ) { +* //... +* }, +* save: function ( ev ) { +* //... +* } +* } ); +* /code * * @class View * @extends EventEmitter @@ -84,6 +125,11 @@ defaults: {}, /** +* Default events map +*/ + events: null, + + /** * Run once during construction to set up the View * @method * @param {Object} options Object passed to the constructor. @@ -109,6 +155,10 @@ this.options = options; this.render( options ); + + // Assign a unique id for dom events binding/unbinding + this.cid = uniqueId( 'view' ); + this.delegateEvents(); }, /** @@ -154,9 +204,88 @@ * @param {string} query A jQuery CSS selector. * @return {jQuery.Object} jQuery object containing results of the search. */ - $: function( query ) { - return this.$el.find( query ); + $: function(query) { + return this.$el.find(query); + }, + + /** +* Set callbacks, where `this.events` is a hash of +* +* {event selector: callback} +* +* { +* 'mousedown .title': 'edit', +* 'click .button': 'save', +* 'click .open': function(e) { ... } +* } +* +* pairs. Callbacks will be bound to the view, with `this` set properly. +* Uses event delegation for efficiency. +* Omitting the selector binds the event to `this.el`. +
[MediaWiki-commits] [Gerrit] Specify an actual version constraint for composer/installers - change (mediawiki...AbuseFilter)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/182093 Change subject: Specify an actual version constraint for composer/installers .. Specify an actual version constraint for composer/installers Change-Id: Iac879820d0d4cc8b46c0daae42f5a4f1788be264 --- M composer.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter refs/changes/93/182093/1 diff --git a/composer.json b/composer.json index 3227b84..6030486 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ license : GPL-2.0+, require: { - composer/installers : dev-master, + composer/installers : 1.*,=1.0.1, mediawiki/anti-spoof : dev-master } } -- To view, visit https://gerrit.wikimedia.org/r/182093 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac879820d0d4cc8b46c0daae42f5a4f1788be264 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AbuseFilter 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] Update dependencies for MwEmbedSupport - change (mediawiki...TimedMediaHandler)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/182094 Change subject: Update dependencies for MwEmbedSupport .. Update dependencies for MwEmbedSupport Requires https://gerrit.wikimedia.org/r/#/c/182092/ Change-Id: I9bbf9ddef0480a7208b3e327f5a3fdf6282ce382 --- M MwEmbedModules/EmbedPlayer/EmbedPlayer.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/94/182094/1 diff --git a/MwEmbedModules/EmbedPlayer/EmbedPlayer.php b/MwEmbedModules/EmbedPlayer/EmbedPlayer.php index c60d41c..0a5ccaf 100644 --- a/MwEmbedModules/EmbedPlayer/EmbedPlayer.php +++ b/MwEmbedModules/EmbedPlayer/EmbedPlayer.php @@ -28,11 +28,11 @@ 'mediawiki.client', 'mediawiki.UtilitiesTime', 'mediawiki.Uri', - 'mediawiki.absoluteUrl', + 'mediawiki.UtilitiesUrl', 'mediawiki.jqueryMsg', // Browser fullscreen api support: - 'fullScreenApi', + 'screenfull', // We always end up loading native player 'mw.EmbedPlayerNative', -- To view, visit https://gerrit.wikimedia.org/r/182094 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bbf9ddef0480a7208b3e327f5a3fdf6282ce382 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Paladox thomasmulhall...@yahoo.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TableOfContents uses events map - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: TableOfContents uses events map .. TableOfContents uses events map Dependency: https://gerrit.wikimedia.org/r/181734 in Mantle extension Change-Id: I6e1c90a6db8be9235ac6cb9ff74375e196498337 --- M javascripts/modules/toc/TableOfContents.js 1 file changed, 17 insertions(+), 11 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/modules/toc/TableOfContents.js b/javascripts/modules/toc/TableOfContents.js index fd7b3c7..ad041a8 100644 --- a/javascripts/modules/toc/TableOfContents.js +++ b/javascripts/modules/toc/TableOfContents.js @@ -2,7 +2,8 @@ var TableOfContents, MobileWebClickTracking = M.require( 'loggingSchemas/MobileWebClickTracking' ), View = M.require( 'View' ), - Icon = M.require( 'Icon' ); + Icon = M.require( 'Icon' ), + log = MobileWebClickTracking.log; /** * View for table of contents @@ -30,17 +31,22 @@ tagName: 'div', className: 'toc-mobile', template: mw.template.get( 'mobile.toc', 'toc.hogan' ), - /** @inheritdoc */ - postRender: function () { - var log = MobileWebClickTracking.log; - View.prototype.postRender.apply( this, arguments ); + events: { // Click tracking for table of contents so we can see if people interact with it - this.$( 'h2' ).on( 'click', function () { - log( 'UI', 'page-toc-toggle' ); - } ); - this.$( 'a' ).on( 'click', function () { - log( 'UI', 'page-toc-link' ); - } ); + 'click h2': 'onTocToggle', + 'click a': 'onLinkClick' + }, + /** +* Log toggling the header +*/ + onTocToggle: function () { + log( 'UI', 'page-toc-toggle' ); + }, + /** +* Log clicking a TOC link +*/ + onLinkClick: function () { + log( 'UI', 'page-toc-link' ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/180836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6e1c90a6db8be9235ac6cb9ff74375e196498337 Gerrit-PatchSet: 10 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhernandez jhernan...@wikimedia.org Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: Jhernandez jhernan...@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] wfRunHooks() -- Hooks::run() - change (mediawiki...Renameuser)
jenkins-bot has submitted this change and it was merged. Change subject: wfRunHooks() -- Hooks::run() .. wfRunHooks() -- Hooks::run() Change-Id: If16fe19972c12f82c5477f06fd8ab685731ff732 --- M RenameuserSQL.php M specials/SpecialRenameuser.php 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Nikerabbit: Looks good to me, but someone else must approve Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/RenameuserSQL.php b/RenameuserSQL.php index 79f714c..cbac73f 100644 --- a/RenameuserSQL.php +++ b/RenameuserSQL.php @@ -97,7 +97,7 @@ $this-tables['recentchanges'] = array( 'rc_user_text', 'rc_user' ); } - wfRunHooks( 'RenameUserSQL', array( $this ) ); + Hooks::run( 'RenameUserSQL', array( $this ) ); } protected function debug( $msg ) { @@ -117,7 +117,7 @@ $dbw = wfGetDB( DB_MASTER ); $dbw-begin(); - wfRunHooks( 'RenameUserPreRename', array( $this-uid, $this-old, $this-new ) ); + Hooks::run( 'RenameUserPreRename', array( $this-uid, $this-old, $this-new ) ); // Rename and touch the user before re-attributing edits, // this avoids users still being logged in and making new edits while @@ -257,7 +257,7 @@ // Clear caches and inform authentication plugins $user = User::newFromId( $this-uid ); $wgAuth-updateExternalDB( $user ); - wfRunHooks( 'RenameUserComplete', array( $this-uid, $this-old, $this-new ) ); + Hooks::run( 'RenameUserComplete', array( $this-uid, $this-old, $this-new ) ); $this-debug( Finished rename for {$this-old} to {$this-new} ); wfProfileOut( __METHOD__ ); diff --git a/specials/SpecialRenameuser.php b/specials/SpecialRenameuser.php index f6b9bac..d7ada76 100644 --- a/specials/SpecialRenameuser.php +++ b/specials/SpecialRenameuser.php @@ -54,7 +54,7 @@ $warnings = array(); if ( $oun $nun !$request-getCheck( 'confirmaction' ) ) { - wfRunHooks( 'RenameUserWarning', array( $oun, $nun, $warnings ) ); + Hooks::run( 'RenameUserWarning', array( $oun, $nun, $warnings ) ); } $out-addHTML( @@ -263,7 +263,7 @@ $contribs = $olduser-getEditCount(); // Give other affected extensions a chance to validate or abort - if ( !wfRunHooks( 'RenameUserAbort', array( $uid, $oldusername-getText(), $newusername-getText() ) ) ) { + if ( !Hooks::run( 'RenameUserAbort', array( $uid, $oldusername-getText(), $newusername-getText() ) ) ) { return; } -- To view, visit https://gerrit.wikimedia.org/r/181517 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If16fe19972c12f82c5477f06fd8ab685731ff732 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Renameuser Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update DonationInterface submodule - change (mediawiki/core)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/182096 Change subject: update DonationInterface submodule .. update DonationInterface submodule Change-Id: Ide03a2f7a5f0c99a1c66da7a6edb2b47559dd234 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/96/182096/1 diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 783b1d5..a5772e8 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 783b1d50cee5d33535c14ac862f1356aaf8d852e +Subproject commit a5772e8dd4148b526e08e8eb16e9819f924ea8f6 -- To view, visit https://gerrit.wikimedia.org/r/182096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide03a2f7a5f0c99a1c66da7a6edb2b47559dd234 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_23 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] Deploy once Lithuania is on the Euro. - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Deploy once Lithuania is on the Euro. .. Deploy once Lithuania is on the Euro. Change-Id: I7bf84aee0702912409db9c3d200ebd387e645f0a --- M gateway_common/nationalCurrencies.inc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_common/nationalCurrencies.inc b/gateway_common/nationalCurrencies.inc index c3f07a2..a46f7da 100644 --- a/gateway_common/nationalCurrencies.inc +++ b/gateway_common/nationalCurrencies.inc @@ -140,7 +140,7 @@ LR = LRD, LY = LYD, LI = CHF, - LT = LTL, + LT = EUR, LU = EUR, MO = MOP, MK = MKD, -- To view, visit https://gerrit.wikimedia.org/r/182095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7bf84aee0702912409db9c3d200ebd387e645f0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: Awight awi...@wikimedia.org Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org Gerrit-Reviewer: Ssmith ssm...@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] Expose installed external libraries on Special:Version - change (mediawiki/core)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/182097 Change subject: Expose installed external libraries on Special:Version .. Expose installed external libraries on Special:Version Change-Id: Ic767a06ccfd938fbe519333bbd683f6116aaa262 --- M includes/specials/SpecialVersion.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/182097/1 diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 34f434f..4c3b4be 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -132,6 +132,7 @@ $out-addHtml( $this-getSkinCredits() . $this-getExtensionCredits() . + $this-getExternalLibraries() . $this-getParserTags() . $this-getParserFunctionHooks() ); @@ -504,6 +505,45 @@ } /** +* Generate an HTML table for external libraries that are installed +* +* @return string +*/ + protected function getExternalLibraries() { + global $IP; + $path = $IP/composer.lock; + if ( !file_exists( $path ) ) { + // Maybe they're using mediawiki/vendor? + $path = $IP/vendor/composer.lock; + if ( !file_exists( $path ) ) { + return ''; + } + } + + $lock = new ComposerLock( $path ); + $out = Html::element( + 'h2', + array( 'id' = 'mw-version-libraries' ), + $this-msg( 'version-libraries' )-text() + ); + $out .= Html::openElement( 'table', array( 'class' = 'wikitable plainlinks', 'id' = 'sv-libraries' ) ); + $out .= Html::openElement( 'tr' ) + . Html::element( 'th', array(), $this-msg( 'version-libraries-library' )-text() ) + . Html::element( 'th', array(), $this-msg( 'version-libraries-version' )-text() ) + . Html::closeElement( 'tr' ); + ; + foreach ( $lock-getInstalledDependencies() as $name = $version ) { + $out .= Html::openElement( 'tr' ) + . Html::rawElement( 'td', array(), Linker::makeExternalLink( https://packagist.org/packages/$name;, $name ) ) + . Html::element( 'td', array(), $version ) + . Html::closeElement( 'tr' ); + } + $out .= Html::closeElement( 'table' ); + + return $out; + } + + /** * Obtains a list of installed parser tags and the associated H2 header * * @return string HTML output diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 4b4188d..08754ee 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3288,6 +3288,9 @@ version-entrypoints-index-php: [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:index.php index.php], version-entrypoints-api-php: [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:api.php api.php], version-entrypoints-load-php: [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:load.php load.php], + version-libraries: Installed libraries, + version-libraries-library: Library, + version-libraries-version: Version, redirect: Redirect by file, user, page or revision ID, redirect-legend: Redirect to a file or page, redirect-text: , diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 4387623..ab8ecc5 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -3452,6 +3452,9 @@ version-entrypoints-index-php: A short description of the index.php entry point. Links to the mediawiki.org documentation page for index.php., version-entrypoints-api-php: A short description of the api.php entry point. Links to the mediawiki.org documentation page for api.php., version-entrypoints-load-php: A short description of the load.php entry point. Links to the mediawiki.org documentation page for load.php., + version-libraries: Header on [[Special:Version]] above a table that lists installed external libraries and their version numbers., + version-libraries-library: Column header for the library's name, + version-libraries-version: Column header for the library's version number, redirect: {{doc-special|Redirect}}\nThis
[MediaWiki-commits] [Gerrit] Deploy once Lithuania is on the Euro. - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/182095 Change subject: Deploy once Lithuania is on the Euro. .. Deploy once Lithuania is on the Euro. Change-Id: I7bf84aee0702912409db9c3d200ebd387e645f0a --- M gateway_common/nationalCurrencies.inc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/95/182095/1 diff --git a/gateway_common/nationalCurrencies.inc b/gateway_common/nationalCurrencies.inc index c3f07a2..a46f7da 100644 --- a/gateway_common/nationalCurrencies.inc +++ b/gateway_common/nationalCurrencies.inc @@ -140,7 +140,7 @@ LR = LRD, LY = LYD, LI = CHF, - LT = LTL, + LT = EUR, LU = EUR, MO = MOP, MK = MKD, -- To view, visit https://gerrit.wikimedia.org/r/182095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7bf84aee0702912409db9c3d200ebd387e645f0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment 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] Escape renameuser-linkoncontribs - change (mediawiki...Renameuser)
jenkins-bot has submitted this change and it was merged. Change subject: Escape renameuser-linkoncontribs .. Escape renameuser-linkoncontribs Change-Id: I997aa38715e3b0cf976ff07f845060b23966951b --- M Renameuser.hooks.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Umherirrender: Looks good to me, approved Nemo bis: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/Renameuser.hooks.php b/Renameuser.hooks.php index e527173..846f913 100644 --- a/Renameuser.hooks.php +++ b/Renameuser.hooks.php @@ -46,7 +46,7 @@ if ( $wgUser-isAllowed( 'renameuser' ) $id ) { $tools[] = Linker::link( SpecialPage::getTitleFor( 'Renameuser' ), - wfMessage( 'renameuser-linkoncontribs' )-text(), + wfMessage( 'renameuser-linkoncontribs' )-escaped(), array( 'title' = wfMessage( 'renameuser-linkoncontribs-text' )-parse() ), array( 'oldusername' = $nt-getText() ) ); -- To view, visit https://gerrit.wikimedia.org/r/177964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I997aa38715e3b0cf976ff07f845060b23966951b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Renameuser Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Nemo bis federicol...@tiscali.it Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] update DonationInterface submodule - change (mediawiki/core)
Awight has submitted this change and it was merged. Change subject: update DonationInterface submodule .. update DonationInterface submodule Change-Id: Ide03a2f7a5f0c99a1c66da7a6edb2b47559dd234 --- M extensions/DonationInterface 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Awight: Verified; Looks good to me, approved diff --git a/extensions/DonationInterface b/extensions/DonationInterface index 783b1d5..a5772e8 16 --- a/extensions/DonationInterface +++ b/extensions/DonationInterface -Subproject commit 783b1d50cee5d33535c14ac862f1356aaf8d852e +Subproject commit a5772e8dd4148b526e08e8eb16e9819f924ea8f6 -- To view, visit https://gerrit.wikimedia.org/r/182096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide03a2f7a5f0c99a1c66da7a6edb2b47559dd234 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: fundraising/REL1_23 Gerrit-Owner: Awight awi...@wikimedia.org Gerrit-Reviewer: Awight awi...@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] Escape word-separator in LogFormatter - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Escape word-separator in LogFormatter .. Escape word-separator in LogFormatter Change-Id: I9428f5ff5b95d09932b3588f0118d6992a384390 --- M includes/logging/LogFormatter.php 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index 464b723..c6fcdb0 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -355,8 +355,10 @@ $element = $this-styleRestricedElement( $element ); } } else { - $performer = $this-getPerformerElement() . $this-msg( 'word-separator' )-text(); - $element = $performer . $this-getRestrictedElement( 'rev-deleted-event' ); + $sep = $this-msg( 'word-separator' ); + $sep = $this-plaintext ? $sep-text() : $sep-escaped(); + $performer = $this-getPerformerElement(); + $element = $performer . $sep . $this-getRestrictedElement( 'rev-deleted-event' ); } return $element; @@ -731,7 +733,9 @@ $performer = $this-getPerformerElement(); if ( !$this-irctext ) { - $action = $performer . $this-msg( 'word-separator' )-text() . $action; + $sep = $this-msg( 'word-separator' ); + $sep = $this-plaintext ? $sep-text() : $sep-escaped(); + $action = $performer . $sep . $action; } return $action; -- To view, visit https://gerrit.wikimedia.org/r/177975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9428f5ff5b95d09932b3588f0118d6992a384390 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Manual import of Android string translations from TWN - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Manual import of Android string translations from TWN .. Manual import of Android string translations from TWN Change-Id: I2fabfd50368be646c1a371a559504de150aa93b5 --- M wikipedia/res/values-nb/strings.xml M wikipedia/res/values-nl/strings.xml M wikipedia/res/values-qq/strings.xml 3 files changed, 21 insertions(+), 15 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/wikipedia/res/values-nb/strings.xml b/wikipedia/res/values-nb/strings.xml index 3fec1e0..508b79f 100644 --- a/wikipedia/res/values-nb/strings.xml +++ b/wikipedia/res/values-nb/strings.xml @@ -11,7 +11,7 @@ string name=search_hintSøk i Wikipedia/string string name=history_activity_titleLogg/string string name=nav_item_historyLogg/string - string name=error_network_errorIngen nettverksforbindelse :(/string + string name=error_network_errorDet er ingen nettverksforbindelse :(/string string name=search_network_errorNettverksfeil. Trykk for å prøve igjen./string string name=page_error_retryPrøv igjen/string string name=menu_clear_all_historyTøm logg/string @@ -36,7 +36,7 @@ string name=toast_saved_page_missing_imagesKunne ikke lagre alle bilder/string string name=toast_save_page_failedLagring av siden feilet :(/string string name=toast_refresh_saved_pageGjenoppfrisker lagret side…/string - string name=delete_selected_saved_pagesSlett/string + string name=delete_selected_saved_pagesFjern/string string name=toast_saved_page_deletedSiden(e) ble fjernet/string string name=saved_pages_search_list_hintSøk/string string name=saved_pages_search_empty_messageFant ingen sider som matchet spørringen din./string @@ -80,7 +80,7 @@ string name=search_no_results_foundIngen resultater ble funnet/string string name=edit_section_captcha_messageFor å beskytte mot automatisk spam, vær vennlig å skrive inn ordene som vises under/string string name=edit_section_captcha_hintGjenta ordene ovenfor/string - string name=title_captchaFyll inn captcha/string + string name=title_captchaFyll inn CAPTCHA/string string name=edit_section_abusefilter_back_textGjør endringer i min redigering/string string name=edit_section_captcha_reloadTrykk på CAPTCHA for å laste inn på nytt/string string name=edit_saved_page_refreshDenne lagrede siden kan være utdatert, og må gjenoppfriskes for å kunne redigeres. Vil du gjenoppfriske siden?/string @@ -105,9 +105,9 @@ string name=toast_logout_completeLogget ut/string string name=saved_pages_empty_titleIngen lagrede sider her!/string string name=saved_pages_empty_messageLagrede sider er veldig praktisk. Tenk på dem som bokmerker som du også kan lese når du er offline./string - string name=history_empty_titleIngen besøkte sider./string - string name=history_empty_messageDu har kanskje tømt loggen. Neste gang du besøker en side kan du finne den igjen her etterpå./string - string name=delete_selected_historySlett/string + string name=history_empty_titleIngen besøkte sider her!/string + string name=history_empty_messageDu har antakelig fjernet alle sammen. Neste gang du besøker en side kan du etterpå finne den igjen her./string + string name=delete_selected_historyFjern/string string name=wp_stylizedlt;biggt;Wlt;/biggt;IKIPEDIlt;biggt;Alt;/biggt;/string string name=wp_tag_lineDen frie encyklopedi/string string name=skipHopp over/string @@ -129,7 +129,7 @@ string name=create_account_noname_errorBrukernavnet du oppga er ugyldig. Vennligst oppgi et annet brukernavn./string string name=create_account_invalid_email_errorEpost-adressen du oppga er ugyldig./string string name=create_account_password_too_short_errorPassordet du oppga er for kort./string - string name=create_account_blocked_anon_errorDu kan ikke opprette en konto fordi IP-en din er blokkert./string + string name=create_account_blocked_anon_errorDu kan ikke opprette en konto fordi IP-adressen din er blokkert./string string name=create_account_blocked_errorDu kan ikke opprette en konto fordi kontoen din er blokkert./string string name=create_account_password_name_match_errorBrukernavnet og passordet kan ikke være like./string string name=create_account_generic_errorKunne ikke opprette konto/string @@ -147,7 +147,7 @@ string name=zero_interstitial_titleForlater Wikipedia Zero/string string name=zero_interstitial_leave_appDatakostnader kan påløpe. Fortsette til eksternt nettsted?/string string name=zero_interstitial_continueForlat appen/string - string name=zero_interstitial_cancelForbli her/string + string name=zero_interstitial_cancelBli her/string string name=zero_learn_moreDatakostnader påløper ikke for denne Wikipedia-appen./string string name=zero_learn_more_learn_moreLær mer/string string name=zero_learn_more_dismissLukk/string @@ -216,7 +216,7 @@
[MediaWiki-commits] [Gerrit] Restore backwards compatibility - change (mediawiki...Vector)
jenkins-bot has submitted this change and it was merged. Change subject: Restore backwards compatibility .. Restore backwards compatibility When status indicators were added, backwards compatibility was unnecessarily broken. This makes things like looking at old non-rebased branches, or running git bisect, unnecessarily annoying. This change adds an is_callable to restore backwards compatibility and removes the version check that was added in response to this break. Change-Id: Ia05aa73a1b027e667c52f54b6d6fdf6f42bbbadf --- M Vector.php M VectorTemplate.php 2 files changed, 5 insertions(+), 7 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/Vector.php b/Vector.php index 784bf0b..4b7f95e 100644 --- a/Vector.php +++ b/Vector.php @@ -22,12 +22,6 @@ * @ingroup Skins */ -if ( version_compare( $GLOBALS['wgVersion'], '1.25c', '' ) ) { - echo 'This version of the Vector skin requires at least MediaWiki 1.25, you have ' . $GLOBALS['wgVersion'] . - '. You can download a more appropriate version here: https://www.mediawiki.org/wiki/Special:SkinDistributor/Vector'; - exit(); -} - $GLOBALS['wgExtensionCredits']['skin'][] = array( 'path' = __FILE__, 'name' = 'Vector', diff --git a/VectorTemplate.php b/VectorTemplate.php index ab40693..4acfa8c 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -102,7 +102,11 @@ ?php } ? - ?php echo $this-getIndicators(); ? + ?php + if ( is_callable( array( $this, 'getIndicators' ) ) ) { + echo $this-getIndicators(); + } + ? h1 id=firstHeading class=firstHeading lang=?php $this-data['pageLanguage'] = $this-getSkin()-getTitle()-getPageViewLanguage()-getHtmlCode(); -- To view, visit https://gerrit.wikimedia.org/r/182091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia05aa73a1b027e667c52f54b6d6fdf6f42bbbadf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Edokter er...@darcoury.nl Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits