[MediaWiki-commits] [Gerrit] [WIP] Change stylelint to use central Wikimedia configuration - change (oojs/ui)

2016-05-18 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289599

Change subject: [WIP] Change stylelint to use central Wikimedia configuration
..

[WIP] Change stylelint to use central Wikimedia configuration

Change-Id: I3a5a2dd51a88bee447b6fdbfd6262bf5213bc614
---
M .stylelintrc
M package.json
2 files changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/99/289599/1

diff --git a/.stylelintrc b/.stylelintrc
index 2d0d34d..d41d55d 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -1,4 +1,5 @@
 {
+   "extends": "stylelint-config-wikimedia",
"rules": {
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
@@ -10,6 +11,7 @@
 
"block-closing-brace-newline-after": [ "always" ],
"block-closing-brace-newline-before": [ "always-multi-line" ],
+   "block-closing-brace-space-after": [ "always-single-line" ],
"block-closing-brace-space-before": [ "always-single-line" ],
"block-opening-brace-newline-after": [ "always-multi-line" ],
"block-opening-brace-space-after": [ "always-single-line" ],
@@ -30,6 +32,8 @@
 
"declaration-colon-space-after": [ "always" ],
"declaration-colon-space-before": [ "never" ],
+
+   "declaration-no-important": false,
 
"font-family-name-quotes": [ "double-where-recommended" ],
"font-weight-notation": [ "named-where-possible" ],
@@ -57,6 +61,8 @@
"media-query-list-comma-space-after": [ "always-single-line" ],
"media-query-list-comma-space-before": [ "never" ],
 
+   "no-descending-specificity": false,
+
"selector-combinator-space-after": [ "always" ],
"selector-combinator-space-before": [ "always" ],
"selector-no-vendor-prefix": true,
@@ -69,6 +75,7 @@
"selector-list-comma-space-before": [ "never" ],
 
"string-no-newline": true,
+   "string-quotes": [ "double" ],
 
"value-list-comma-newline-after": [ "never-multi-line" ],
"value-list-comma-newline-before": [ "never-multi-line" ],
diff --git a/package.json b/package.json
index 96d985e..b9230bd 100644
--- a/package.json
+++ b/package.json
@@ -26,6 +26,7 @@
 "oojs": "1.1.10"
   },
   "devDependencies": {
+"grunt": "0.4.5",
 "grunt-banana-checker": "0.4.0",
 "grunt-cli": "0.1.13",
 "grunt-contrib-clean": "1.0.0",
@@ -48,13 +49,13 @@
 "grunt-stylelint": "0.2.0",
 "grunt-svg2png": 
"git://github.com/jdforrester/grunt-svg2png.git#v0.2.7-wmf.1",
 "grunt-tyops": "0.1.0",
-"grunt": "0.4.5",
+"karma": "0.13.22",
 "karma-chrome-launcher": "0.2.2",
 "karma-coverage": "0.5.5",
 "karma-firefox-launcher": "0.1.7",
 "karma-qunit": "0.1.9",
-"karma": "0.13.22",
 "q": "1.4.1",
-"qunitjs": "1.22.0"
+"qunitjs": "1.22.0",
+"stylelint-config-wikimedia": "^0.1.0"
   }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/289599
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a5a2dd51a88bee447b6fdbfd6262bf5213bc614
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Scap: execute checks after the restart_service stage
..


Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: I5ff27918fff8edac397b299449134f2cec0d122c
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mobrovac: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/checks.yaml b/scap/checks.yaml
index 5adfe2a..2e4cf0f 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_cxserver

-- 
To view, visit https://gerrit.wikimedia.org/r/289597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ff27918fff8edac397b299449134f2cec0d122c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Scap: execute checks after the restart_service stage
..


Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: I162238f47f344fcf4dbf83301800ea748ee4a576
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mobrovac: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/checks.yaml b/scap/checks.yaml
index d5a1b77..b3ee706 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_citoid

-- 
To view, visit https://gerrit.wikimedia.org/r/289596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I162238f47f344fcf4dbf83301800ea748ee4a576
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289598

Change subject: Scap: execute checks after the restart_service stage
..

Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: Icbb96deb93048707d39191585e55ac854fbf3f90
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid/deploy 
refs/changes/98/289598/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index 483fd51..c6fce37 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_mathoid

-- 
To view, visit https://gerrit.wikimedia.org/r/289598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbb96deb93048707d39191585e55ac854fbf3f90
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289597

Change subject: Scap: execute checks after the restart_service stage
..

Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: I5ff27918fff8edac397b299449134f2cec0d122c
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy 
refs/changes/97/289597/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index 5adfe2a..2e4cf0f 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_cxserver

-- 
To view, visit https://gerrit.wikimedia.org/r/289597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ff27918fff8edac397b299449134f2cec0d122c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289596

Change subject: Scap: execute checks after the restart_service stage
..

Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: I162238f47f344fcf4dbf83301800ea748ee4a576
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid/deploy 
refs/changes/96/289596/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index d5a1b77..b3ee706 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_citoid

-- 
To view, visit https://gerrit.wikimedia.org/r/289596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I162238f47f344fcf4dbf83301800ea748ee4a576
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289595

Change subject: Scap: execute checks after the restart_service stage
..

Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: I9cb407baf4c4ace6ba984ced775120e33554ab3e
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/95/289595/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index ce10842..90f74d9 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_changeprop

-- 
To view, visit https://gerrit.wikimedia.org/r/289595
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cb407baf4c4ace6ba984ced775120e33554ab3e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Scap: execute checks after the restart_service stage - change (analytics...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289594

Change subject: Scap: execute checks after the restart_service stage
..

Scap: execute checks after the restart_service stage

As of Scap 3.2.0-1, the service is restarted in the restart_service
stage instead of the promote stage, so execute the checks after that.

Bug: T135609
Change-Id: I5176dc1d2ca58189fd1f71db7e92d0dedd25ce74
---
M scap/checks.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/aqs/deploy 
refs/changes/94/289594/1

diff --git a/scap/checks.yaml b/scap/checks.yaml
index 96e8b20..1dc3a41 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
-command: check_endpoints_aqs
\ No newline at end of file
+stage: restart_service
+command: check_endpoints_aqs

-- 
To view, visit https://gerrit.wikimedia.org/r/289594
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5176dc1d2ca58189fd1f71db7e92d0dedd25ce74
Gerrit-PatchSet: 1
Gerrit-Project: analytics/aqs/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Clean up some warnings - change (wikimedia...tools)

2016-05-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289592

Change subject: Clean up some warnings
..

Clean up some warnings

Reverts the 'delete old table' cleanup, now that the table's gone.

Uses ON DUPLICATE KEY UPDATE no-op to suppress duplicate key
warnings generated by INSERT IGNORE.

We should check the timing to see if the trick makes the inserts
take longer.

Change-Id: I08955c7f477ffe96f4b17ce55a98ed280c86a748
---
M silverpop_export/update_table.sql
1 file changed, 10 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/92/289592/1

diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index 5019eef..9791ee3 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -12,9 +12,6 @@
 DROP TABLE IF EXISTS silverpop_export_dedupe_email;
 DROP TABLE IF EXISTS silverpop_export_stat;
 
--- Clean up from previous schema.
-DROP TABLE IF EXISTS silverpop_deleted;
-
 CREATE TABLE IF NOT EXISTS silverpop_export_staging(
   id int unsigned PRIMARY KEY,  -- This is actually civicrm_email.id
 
@@ -80,9 +77,11 @@
 -- recieve_date and total_amount descending should always insert 
 -- the latest donation first, with the larger prevailing for an
 -- email with multiple simultaneous donations. All the rest for
--- that email will be ignored due to the unique constraint.
+-- that email will be ignored due to the unique constraint. We
+-- use 'ON DUPLICATE KEY UPDATE' instead of 'INSERT IGNORE' as
+-- the latter throws warnings.
 -- (12 minutes)
-INSERT IGNORE INTO silverpop_export_latest
+INSERT INTO silverpop_export_latest
   SELECT
 e.email,
 ex.original_currency,
@@ -101,7 +100,8 @@
 ct.contribution_status_id = 1 -- 'Completed'
   ORDER BY
 ct.receive_date DESC,
-ct.total_amount DESC;
+ct.total_amount DESC
+ON DUPLICATE KEY UPDATE latest_currency = 
silverpop_export_latest.latest_currency;
 
 -- Populate data from contribution tracking, because that's fairly
 -- reliable. Do this before deduplication so we can attempt to make
@@ -306,9 +306,11 @@
   CONSTRAINT sx_email_u UNIQUE (email)
 ) COLLATE 'utf8_unicode_ci' AUTO_INCREMENT=1;
 
-INSERT IGNORE INTO silverpop_excluded (email)
+-- Same no-op update trick as with silverpop_export_latest
+INSERT INTO silverpop_excluded (email)
   SELECT email
-FROM log_civicrm.log_civicrm_email e;
+FROM log_civicrm.log_civicrm_email e
+ON DUPLICATE KEY UPDATE email = silverpop_excluded.email;
 
 DELETE silverpop_excluded
   FROM silverpop_excluded

-- 
To view, visit https://gerrit.wikimedia.org/r/289592
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08955c7f477ffe96f4b17ce55a98ed280c86a748
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix improper merge - change (wikimedia...tools)

2016-05-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289591

Change subject: Fix improper merge
..

Fix improper merge

I should have re-applied the reverted patch before merging.  This
brings deploy back to parity with master.

Change-Id: I6f551700aa5d8eb6ef4c69b323589dfc6a33055d
---
M database/db.py
M silverpop_export/silverpop_export.yaml.example
M silverpop_export/update.py
3 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/91/289591/1

diff --git a/database/db.py b/database/db.py
index 278afb3..ec8c41d 100644
--- a/database/db.py
+++ b/database/db.py
@@ -1,5 +1,5 @@
 '''
-Mysql wrapper which allows query composition
+Mysql wrapper providing query composition
 '''
 import MySQLdb as Dbi
 import atexit
diff --git a/silverpop_export/silverpop_export.yaml.example 
b/silverpop_export/silverpop_export.yaml.example
index 5f19f3e..64a8b66 100644
--- a/silverpop_export/silverpop_export.yaml.example
+++ b/silverpop_export/silverpop_export.yaml.example
@@ -19,6 +19,9 @@
 civicrm_db:
 db: dev_civicrm
 
+log_civicrm_db:
+db: dev_log_civicrm
+
 drupal_db:
 db: dev_drupal
 
diff --git a/silverpop_export/update.py b/silverpop_export/update.py
index ccad624..9524bfd 100644
--- a/silverpop_export/update.py
+++ b/silverpop_export/update.py
@@ -28,6 +28,7 @@
 # Do some database renaming
 query = re.sub(r"\scivicrm\.", " %s." % config.civicrm_db.db, 
query)
 query = re.sub(r"\sdrupal\.", " %s." % config.drupal_db.db, 
query)
+query = re.sub(r"\slog_civicrm\.", " %s." % 
config.log_civicrm_db.db, query)
 queries.append(query)
 
 qbuf = [prefix]

-- 
To view, visit https://gerrit.wikimedia.org/r/289591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f551700aa5d8eb6ef4c69b323589dfc6a33055d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: deploy
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix alias capitalization warning - change (mediawiki/core)

2016-05-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289590

Change subject: Fix alias capitalization warning
..

Fix alias capitalization warning

Change-Id: I35ba1d3d4afbf3e3aca093e17c2de459413d05d3
---
M includes/specials/SpecialUndelete.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/289590/1

diff --git a/includes/specials/SpecialUndelete.php 
b/includes/specials/SpecialUndelete.php
index c6d3f6e..5d230c0 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -872,7 +872,7 @@
"ids" => $revisions,
"target" => $this->mTargetObj->getPrefixedText()
];
-   $url = SpecialPage::getTitleFor( "RevisionDelete" 
)->getFullURL( $query );
+   $url = SpecialPage::getTitleFor( 'Revisiondelete' 
)->getFullURL( $query );
$this->getOutput()->redirect( $url );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35ba1d3d4afbf3e3aca093e17c2de459413d05d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Merge branch 'master' into deploy - change (wikimedia...tools)

2016-05-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289589

Change subject: Merge branch 'master' into deploy
..

Merge branch 'master' into deploy

13aa274 Remove old table
5942acf Aggregate contact ID in select (MySQL 5.7 fix)
013cae8 Fix encoding and paging on unsubscribe table

Change-Id: I365b8e172517562aa554ad96aaba7606a189665d
---
M silverpop_export/export.py
M silverpop_export/update_table.sql
2 files changed, 16 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/89/289589/1

diff --git a/silverpop_export/export.py b/silverpop_export/export.py
index 1ecc164..e4cbd9d 100644
--- a/silverpop_export/export.py
+++ b/silverpop_export/export.py
@@ -88,24 +88,13 @@
 
 log.info("Starting unsubscribe data export")
 exportq = DbQuery()
-<<< HEAD   (e29780 Revert "Unsubscribe old emails; fix is_primary bug")
-exportq.tables.append('silverpop_export')
-exportq.columns.append('contact_id')
-exportq.columns.append('email')
-exportq.where.append('opted_out=1')
-===
 exportq.tables.append('silverpop_excluded')
 exportq.columns.append('*')
->>> BRANCH (013cae Fix encoding and paging on unsubscribe table)
 run_export_query(
 db=db,
 query=exportq,
 output=output_path,
-<<< HEAD   (e29780 Revert "Unsubscribe old emails; fix is_primary bug")
-sort_by_index="contact_id"
-===
 sort_by_index="id"
->>> BRANCH (013cae Fix encoding and paging on unsubscribe table)
 )
 
 
diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index 540dae3..5019eef 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -290,49 +290,31 @@
   WHERE donation_count IS NULL AND opted_out = 0;
 UPDATE silverpop_export_staging SET country='US' where country IS NULL AND 
opted_out = 0;
 
--- Exclude non-primary addresses, or anyone whose old email address was deleted
--- during a merge.
+--
+-- Collect email addresses which should be excluded for various reasons, such 
as:
+-- * Exclude non-primary addresses
+-- * Exclude any "former residence" email addresses.
+-- * Exclude addresses dropped during contact merge.
+--
 DROP TABLE IF EXISTS silverpop_excluded;
 
 CREATE TABLE IF NOT EXISTS silverpop_excluded(
-<<< HEAD   (e29780 Revert "Unsubscribe old emails; fix is_primary bug")
-  email_id int unsigned,
-  contact_id int unsigned,
-  email varchar(255)
-);
-===
   id int AUTO_INCREMENT PRIMARY KEY,
   email varchar(255),
 
   INDEX sx_email (email),
   CONSTRAINT sx_email_u UNIQUE (email)
 ) COLLATE 'utf8_unicode_ci' AUTO_INCREMENT=1;
->>> BRANCH (013cae Fix encoding and paging on unsubscribe table)
 
-<<< HEAD   (e29780 Revert "Unsubscribe old emails; fix is_primary bug")
--- (20 minutes)
-INSERT INTO silverpop_excluded
-  (email_id, contact_id, email)
-  SELECT e.id, c.id, e.email
-FROM civicrm.civicrm_contact c
-JOIN civicrm.civicrm_email e
-  ON c.id = e.contact_id
-GROUP BY
-  e.email
-HAVING
-  MIN(c.is_deleted) = 1
-  OR MAX(e.is_primary) = 0;
-===
 INSERT IGNORE INTO silverpop_excluded (email)
   SELECT email
 FROM log_civicrm.log_civicrm_email e;
->>> BRANCH (013cae Fix encoding and paging on unsubscribe table)
 
--- Copy remaining excluded email addresses to the export as opted out.
-INSERT INTO silverpop_export_staging
-  (id, contact_id, email, opted_out)
-  SELECT email_id, contact_id, email, 1
-FROM silverpop_excluded;
+DELETE silverpop_excluded
+  FROM silverpop_excluded
+  JOIN silverpop_export_staging s
+ON s.email = silverpop_excluded.email
+WHERE s.opted_out = 0;
 
 -- Prepare the persistent export table.
 DROP TABLE IF EXISTS silverpop_export;
@@ -346,7 +328,6 @@
   last_name varchar(128),
   preferred_language varchar(5),
   email varchar(255),
-  opted_out tinyint(1),
 
   -- Lifetime contribution statistics
   has_recurred_donation tinyint(1),
@@ -371,22 +352,22 @@
   INDEX rspex_city (city),
   INDEX rspex_country (country),
   INDEX rspex_postal (postal_code),
-  INDEX rspex_opted_out (opted_out),
   CONSTRAINT sp_email UNIQUE (email)
 ) COLLATE 'utf8_unicode_ci';
 
 -- Move the data from the staging table into the persistent one
 -- (12 minutes)
 INSERT INTO silverpop_export (
-  id,contact_id,first_name,last_name,preferred_language,email,opted_out,
+  id,contact_id,first_name,last_name,preferred_language,email,
   has_recurred_donation,highest_usd_amount,lifetime_usd_total,donation_count,
   latest_currency,latest_native_amount,latest_usd_amount,latest_donation,
   city,country,state,postal_code )
-SELECT id,contact_id,first_name,last_name,preferred_language,email,opted_out,
+SELECT id,contact_id,first_name,last_name,preferred_language,email,
   has_recurred_donation,highest_usd_amount,lifetime_usd_total,donation_count,
   late

[MediaWiki-commits] [Gerrit] VCL: v4 deliver+synth refactoring - change (operations/puppet)

2016-05-18 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289588

Change subject: VCL: v4 deliver+synth refactoring
..

VCL: v4 deliver+synth refactoring

This ensures certain cluster-shared vcl_deliver functionality for
important functional/debug/analytics headers (X-Carrier,
X-Client-IP, X-Analytics, X-Cache, X-Connection-Properties, Via,
X-Varnish, HSTS) is also invoked in vcl_synth under varnish4, as
some classes of request flow skip vcl_deliver in varnish4 in favor
of vcl_synth, but these are all still applicable in that case.

Bug: T135696
Change-Id: I337beaf35b72d0f16cb2b05c23767eb4e6c39402
---
M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
3 files changed, 30 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/289588/1

diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
index 8d1690c..1d26a7c 100644
--- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb
@@ -100,7 +100,7 @@
 }
 
 sub vcl_deliver {
-   call wm_common_deliver;
+   call wm_common_xcache_deliver;
call cluster_be_deliver;
return (deliver); // no default VCL (which is just "return (deliver)" 
anyways)
 }
@@ -110,6 +110,7 @@
 // Varnish4 vcl_synth+vcl_backend_error
 
 sub vcl_synth {
+   call wm_common_xcache_deliver;
if (resp.status > 400 && resp.status != 413) {
call synth_errorpage;
}
diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index a8cae28..c1c3609 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -348,30 +348,26 @@
}
 }
 
-sub wm_common_deliver {
-   <% if not @varnish_version4 -%>
-   if (req.request != "PURGE") {
-   <% end -%>
-   if (!req.http.X-CDIS) {
-   // internally-generated response (not a cache object hit, and 
not a miss|pass to a deeper layer either)
-   set req.http.X-CDIS = "int";
-   } else if(req.http.X-CDIS == "hit") {
-   // obj.hits isn't known in vcl_hit, and not useful for other 
states
-   set req.http.X-CDIS = "hit/" + obj.hits;
-   }
+sub wm_common_xcache_deliver {
+   if (<%= req_method %> != "PURGE") {
+   if (!req.http.X-CDIS) {
+   // internally-generated response (not a cache object 
hit, and not a miss|pass to a deeper layer either)
+   set req.http.X-CDIS = "int";
+   } else if(req.http.X-CDIS == "hit") {
+   // obj.hits isn't known in vcl_hit, and not useful for 
other states
+   set req.http.X-CDIS = "hit/" + obj.hits;
+   }
 
-   // X-Cache-Int gets appended-to as we traverse cache layers
-   if (resp.http.X-Cache-Int) {
-   set resp.http.X-Cache-Int = resp.http.X-Cache-Int + ", <%= 
@hostname %> " + req.http.X-CDIS;
-   } else if (resp.http.X-Cache) { // XXX legacy, remove after these are 
gone from caches
-   set resp.http.X-Cache-Int = resp.http.X-Cache + ", <%= 
@hostname %> " + req.http.X-CDIS;
-   unset resp.http.X-Cache;
-   } else {
-   set resp.http.X-Cache-Int = "<%= @hostname %> " + 
req.http.X-CDIS;
+   // X-Cache-Int gets appended-to as we traverse cache layers
+   if (resp.http.X-Cache-Int) {
+   set resp.http.X-Cache-Int = resp.http.X-Cache-Int + ", 
<%= @hostname %> " + req.http.X-CDIS;
+   } else if (resp.http.X-Cache) { // XXX legacy, remove after 
these are gone from caches
+   set resp.http.X-Cache-Int = resp.http.X-Cache + ", <%= 
@hostname %> " + req.http.X-CDIS;
+   unset resp.http.X-Cache;
+   } else {
+   set resp.http.X-Cache-Int = "<%= @hostname %> " + 
req.http.X-CDIS;
+   }
}
-   <% if not @varnish_version4 -%>
-   }
-   <% end -%>
 }
 
 // This is not needed with Varnish 4, the Connection header is set to
diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 4322c99..59d0aaa 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -327,20 +327,17 @@
// default vcl_(fetch|backend_response) invokes here, unless cluster 
VCL unconditionally returns!
 }
 
-sub vcl_deliver {
-   call wm_common_deliver;
+// Common code in frontend vcl_d

[MediaWiki-commits] [Gerrit] Debug log strange-looking ETags being sent to RB - change (mediawiki...VisualEditor)

2016-05-18 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289587

Change subject: Debug log strange-looking ETags being sent to RB
..

Debug log strange-looking ETags being sent to RB

Bug: T135171
Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
---
M ApiVisualEditor.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/87/289587/1

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 5ef8e19..921c11c 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -162,6 +162,9 @@
if ( $parserParams['oldid'] ) {
$path .= '/' . $parserParams['oldid'];
}
+   if ( !is_string( $etag ) || $etag === '' ) {
+   wfDebugLog( 'AdHocDebug', 'VisualEditr T135171 - bad 
etag: ' . var_export( $etag, true ) );
+   }
return $this->requestRestbase(
'POST',
$path,

-- 
To view, visit https://gerrit.wikimedia.org/r/289587
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Alex Monk 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Debug log strange-looking ETags being sent to RB - change (mediawiki...VisualEditor)

2016-05-18 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289586

Change subject: Debug log strange-looking ETags being sent to RB
..

Debug log strange-looking ETags being sent to RB

Bug: T135171
Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
---
M ApiVisualEditor.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/86/289586/1

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 5ef8e19..921c11c 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -162,6 +162,9 @@
if ( $parserParams['oldid'] ) {
$path .= '/' . $parserParams['oldid'];
}
+   if ( !is_string( $etag ) || $etag === '' ) {
+   wfDebugLog( 'AdHocDebug', 'VisualEditr T135171 - bad 
etag: ' . var_export( $etag, true ) );
+   }
return $this->requestRestbase(
'POST',
$path,

-- 
To view, visit https://gerrit.wikimedia.org/r/289586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.28.0-wmf.1
Gerrit-Owner: Alex Monk 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Debug log strange-looking ETags being sent to RB - change (mediawiki...VisualEditor)

2016-05-18 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289585

Change subject: Debug log strange-looking ETags being sent to RB
..

Debug log strange-looking ETags being sent to RB

Bug: T135171
Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
---
M ApiVisualEditor.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/85/289585/1

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 5ef8e19..921c11c 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -162,6 +162,9 @@
if ( $parserParams['oldid'] ) {
$path .= '/' . $parserParams['oldid'];
}
+   if ( !is_string( $etag ) || $etag === '' ) {
+   wfDebugLog( 'AdHocDebug', 'VisualEditr T135171 - bad 
etag: ' . var_export( $etag, true ) );
+   }
return $this->requestRestbase(
'POST',
$path,

-- 
To view, visit https://gerrit.wikimedia.org/r/289585
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie127cfbd515cd217abd272cb7a81566b91e13f4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [bugfix] Fix TypeError when coercing string with dict - change (pywikibot/core)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [bugfix] Fix TypeError when coercing string with dict
..


[bugfix] Fix TypeError when coercing string with dict

Bug: T135507
Change-Id: I75797e214bbc4e0fd2e38cf755227edf2ff7d080
---
M pywikibot/logentries.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index a12715d..05607b6 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8  -*-
 """Objects representing Mediawiki log entries."""
 #
-# (C) Pywikibot team, 2007-2015
+# (C) Pywikibot team, 2007-2016
 #
 # Distributed under the terms of the MIT license.
 #
@@ -439,6 +439,6 @@
 logtype = logdata['type']
 return LogEntryFactory._getEntryClass(logtype)(logdata, self._site)
 except KeyError:
-pywikibot.debug(u"API log entry received:\n" + logdata,
+pywikibot.debug('API log entry received:\n{0}'.format(logdata),
 _logger)
 raise Error("Log entry has no 'type' key")

-- 
To view, visit https://gerrit.wikimedia.org/r/289212
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I75797e214bbc4e0fd2e38cf755227edf2ff7d080
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
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 banner history module to wmff setup - change (wikimedia...civicrm-buildkit)

2016-05-18 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Add banner history module to wmff setup
..


Add banner history module to wmff setup

So we can run tests on it.

Change-Id: I68cdbfd6e950aad7c7bb9db0d812e2a3d7db932f
---
M app/config/wmff/install.sh
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Cdentinger: Looks good to me, approved
  Ejegg: Verified



diff --git a/app/config/wmff/install.sh b/app/config/wmff/install.sh
index d0739b0..7b761fb 100644
--- a/app/config/wmff/install.sh
+++ b/app/config/wmff/install.sh
@@ -43,6 +43,7 @@
   adyen_audit \
   amazon_audit \
   astropay_audit \
+  banner_history \
   contribution_audit \
   contribution_tracking \
   environment_indicator \

-- 
To view, visit https://gerrit.wikimedia.org/r/289571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I68cdbfd6e950aad7c7bb9db0d812e2a3d7db932f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/civicrm-buildkit
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add notification_seen column to mark whether user saw that n... - change (mediawiki...Echo)

2016-05-18 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289583

Change subject: Add notification_seen column to mark whether user saw that 
notification
..

Add notification_seen column to mark whether user saw that notification

This is a boolean, not a timestamp, per discussion.

It looks like we're going to persistently cache the unseen count
for each user.  So we may not need an index.  It can be added
now or later if needed, though.

Bug: T135661
Change-Id: I6e590bea86d8f97f6bdc11e83c4a2a4766b9a5bc
---
M Hooks.php
A db_patches/patch-notification_seen-add.sql
M echo.sql
3 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/83/289583/1

diff --git a/Hooks.php b/Hooks.php
index 2d9dd85..c981a74 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -164,6 +164,9 @@
$updater->addExtensionField( 'echo_event', 'event_page_id', 
"$dir/db_patches/patch-add-echo_event-event_page_id.sql" );
$updater->addExtensionIndex( 'echo_event', 'echo_event_type', 
"$dir/db_patches/patch-alter-event_type-index.sql" );
$updater->addExtensionIndex( 'echo_notification', 
'echo_user_timestamp', "$dir/db_patches/patch-alter-user_timestamp-index.sql" );
+
+   $updater->addExtensionField( 'echo_notification', 
'notification_seen',
+   "$dir/db_patches/patch-notification_seen-add.sql" );
}
 
/**
diff --git a/db_patches/patch-notification_seen-add.sql 
b/db_patches/patch-notification_seen-add.sql
new file mode 100644
index 000..ecc02e3
--- /dev/null
+++ b/db_patches/patch-notification_seen-add.sql
@@ -0,0 +1 @@
+ALTER TABLE /*_*/echo_notification ADD COLUMN notification_seen boolean not 
null default 0;
diff --git a/echo.sql b/echo.sql
index 910203a..0716463 100644
--- a/echo.sql
+++ b/echo.sql
@@ -19,6 +19,7 @@
notification_user int unsigned not null,
notification_timestamp binary(14) not null,
notification_read_timestamp binary(14) null,
+   notification_seen boolean not null default 0,
notification_bundle_base boolean not null default 1,
notification_bundle_hash varchar(32) binary not null, -- The hash for 
bundling notifications regardless of timestamp
notification_bundle_display_hash varchar(32) binary not null -- The 
hash for displaying bundle notifications with regard to timestamp, this is is a 
subset of notification_bundle_hash

-- 
To view, visit https://gerrit.wikimedia.org/r/289583
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e590bea86d8f97f6bdc11e83c4a2a4766b9a5bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Change the way installer overrides work - change (mediawiki/core)

2016-05-18 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289581

Change subject: Change the way installer overrides work
..

Change the way installer overrides work

Instead of "don't edit this file, edit that file", do it settings.d
style where packagers can drop their stuff in mw-config/overrides.

I propose to backport it to 1.27 because LTS.

Bug: T135695
Change-Id: I2661ba2036b2887d31ab356751d731cc8b499f26
---
M RELEASE-NOTES-1.27
M autoload.php
M includes/installer/Installer.php
R includes/installer/InstallerOverrides.php
A mw-config/overrides/README
5 files changed, 53 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/289581/1

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 7c50e4f..5f2d4e7 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -536,6 +536,8 @@
 * User::isPasswordReminderThrottled() was deprecated.
 * Bot-oriented parameters to Special:UserLogin (wpCookieCheck, 
wpSkipCookieCheck)
   were removed.
+* Installer can now be customized without patching MediaWiki code, see
+  mw-config/overrides/README for details.
 
 == Compatibility ==
 
diff --git a/autoload.php b/autoload.php
index aeb69fd..624fca4 100644
--- a/autoload.php
+++ b/autoload.php
@@ -601,7 +601,7 @@
'InitSiteStats' => __DIR__ . '/maintenance/initSiteStats.php',
'InstallDocFormatter' => __DIR__ . 
'/includes/installer/InstallDocFormatter.php',
'Installer' => __DIR__ . '/includes/installer/Installer.php',
-   'InstallerOverrides' => __DIR__ . '/mw-config/overrides.php',
+   'InstallerOverrides' => __DIR__ . 
'/includes/installer/InstallerOverrides.php',
'InstallerSessionProvider' => __DIR__ . 
'/includes/installer/InstallerSessionProvider.php',
'Interwiki' => __DIR__ . '/includes/interwiki/Interwiki.php',
'InvalidPassword' => __DIR__ . '/includes/password/InvalidPassword.php',
@@ -930,7 +930,6 @@
'MutableConfig' => __DIR__ . '/includes/config/MutableConfig.php',
'MutableContext' => __DIR__ . '/includes/context/MutableContext.php',
'MwSql' => __DIR__ . '/maintenance/sql.php',
-   'MyLocalSettingsGenerator' => __DIR__ . '/mw-config/overrides.php',
'MySQLField' => __DIR__ . '/includes/db/DatabaseMysqlBase.php',
'MySQLMasterPos' => __DIR__ . '/includes/db/DatabaseMysqlBase.php',
'MySqlLockManager' => __DIR__ . 
'/includes/filebackend/lockmanager/DBLockManager.php',
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 85b1013..bdecda6 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -1,6 +1,9 @@
 values['wgDefaultSkin'] = 'vector';
-   // add a new setting
-   $ls = parent::getText();
-   return $ls . "\n\$wgUseTex = true;\n";
-   }
-}
-*/
-
 /**
  * @since 1.20
  */
 class InstallerOverrides {
+   private static function getOverrides() {
+   global $IP;
+   static $overrides;
+
+   if ( !$overrides ) {
+   $overrides = [
+   'LocalSettingsGenerator' => 
'LocalSettingsGenerator',
+   'WebInstaller' => 'WebInstaller',
+   'getCliInstaller' => 'getCliInstaller',
+   ];
+   foreach ( glob( "$IP/mw-config/overrides/*.php" ) as 
$file ) {
+   require $file;
+   }
+   }
+
+   return $overrides;
+   }
+
/**
 * Instantiates and returns an instance of LocalSettingsGenerator or 
its descendant classes
 * @param Installer $installer
 * @return LocalSettingsGenerator
 */
public static function getLocalSettingsGenerator( Installer $installer 
) {
-   return new LocalSettingsGenerator( $installer );
+   $className = self::getOverrides()['LocalSettingsGenerator'];
+   return new $className( $installer );
}
 
/**
@@ -65,7 +58,8 @@
 * @return WebInstaller
 */
public static function getWebInstaller( WebRequest $request ) {
-   return new WebInstaller( $request );
+   $className = self::getOverrides()['WebInstaller'];
+   return new $className( $request );
}
 
/**
@@ -76,6 +70,7 @@
 * @return CliInstaller
 */
public static function getCliInstaller( $siteName, $admin = null, array 
$options = [] ) {
-   return new CliInstaller( $siteName, $admin, $options );
+   $className = self::getOverrides()['CliInstaller'];
+   return new $className( $siteName, $admin, $options );
}
 }
diff --git a/mw-config/overrides/README b/mw-config/overrides/README
new file mode 100644
index 0

[MediaWiki-commits] [Gerrit] Fix preview failure because of missing map data. - change (mediawiki...Kartographer)

2016-05-18 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289579

Change subject: Fix preview failure because of missing map data.
..

Fix preview failure because of missing map data.

When previewing a brand new article (has not been saved yet),
Kartographer may load group data but the API won't return
any data (the article does not exist in the database yet).

This patch adds a safe check to avoid failing, but in theory
Kartographer should not try to load any map data that we know does
not exist.

Bug: T135546
Change-Id: Id8248d4d507d50b6700255dbd1791e0b05cff1a8
---
M modules/kartographer.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/79/289579/1

diff --git a/modules/kartographer.js b/modules/kartographer.js
index 793d996..7787103 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -125,7 +125,7 @@
if ( mapData.hasOwnProperty( group ) && 
mapData[ group ] ) {
map.dataLayers[ group ] = 
mw.kartographer.addDataLayer( map, mapData[ group ] );
} else {
-   mw.log( 'Layer not found or 
contains no data: "' + group + '"' );
+   mw.log.warn( 'Layer not found 
or contains no data: "' + group + '"' );
}
} );
} );
@@ -318,7 +318,7 @@
mpdgroups: groupsToLoad.join( '|' )
} ).done( function ( data ) {
var rawMapData = data.query.pages[ 0 ].mapdata,
-   mapData = JSON.parse( rawMapData );
+   mapData = rawMapData && JSON.parse( rawMapData 
) || {};
 
$.extend( groupsLoaded, mapData );
mw.config.set( 'wgKartographerLiveData', groupsLoaded );

-- 
To view, visit https://gerrit.wikimedia.org/r/289579
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8248d4d507d50b6700255dbd1791e0b05cff1a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remove "Recommends" for mediawiki-extensions-base package - change (mediawiki/debian)

2016-05-18 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: Remove "Recommends" for mediawiki-extensions-base package
..


Remove "Recommends" for mediawiki-extensions-base package

That package was basically folded into this one since we now include the
bundled tarball extensions with the main mediawiki package.

Change-Id: Ic4a986459e98687d62a5bd7292ccc3a648f8f8fb
---
M control
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Legoktm: Verified
  LFaraone: Looks good to me, approved



diff --git a/control b/control
index 08a8520..1a0fdca 100644
--- a/control
+++ b/control
@@ -13,7 +13,7 @@
 Package: mediawiki
 Architecture: all
 Depends: apache2 | httpd, php5, php5-mysql | php5-pgsql | php5-sqlite | 
php5-mysqlnd, php5-common (>= 5.5.0+dfsg-10~), mime-support, libjs-jquery, 
mediawiki-classes, ${misc:Depends}
-Recommends: mysql-server | postgresql-contrib, php5-cli, python, 
php-wikidiff2, mediawiki-extensions-base
+Recommends: mysql-server | postgresql-contrib, php5-cli, python, php-wikidiff2
 Suggests: imagemagick | php5-gd, mediawiki-extensions-math, memcached, clamav, 
php5-apcu, php5-intl
 Breaks: fusionforge-plugin-mediawiki (<< 5.2~rc1+1~),
  mediawiki-extensions-geshi (<< 2.8~),

-- 
To view, visit https://gerrit.wikimedia.org/r/289577
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4a986459e98687d62a5bd7292ccc3a648f8f8fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: LFaraone 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Muehlenhoff 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Support replacing the current entry in history. - change (mediawiki/core)

2016-05-18 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289578

Change subject: Support replacing the current entry in history.
..

Support replacing the current entry in history.

* Rewrite the router code to use the History API
  instead of the hashchange event when possible.

* Abstract the differences between pushState
  method and hashchange method in OOjs Router.

* Change signature of navigate to support options.replace = true:

* Remove router.back() hack, as this should be
  possible with the new "history replace" method.

Bug: T135692
Change-Id: Ieb3779ae721abdb03956e98e5115f659bcfff752
---
M resources/lib/oojs-router/oojs-router.js
1 file changed, 62 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/289578/1

diff --git a/resources/lib/oojs-router/oojs-router.js 
b/resources/lib/oojs-router/oojs-router.js
index b136923..b9dc11b 100644
--- a/resources/lib/oojs-router/oojs-router.js
+++ b/resources/lib/oojs-router/oojs-router.js
@@ -46,41 +46,58 @@
this.routes = {};
this.enabled = true;
this.oldHash = this.getPath();
+   this.hasPushState = window.history && window.history.pushState;
 
-   $( window ).on( 'popstate', function () {
-   self.emit( 'popstate' );
-   } );
-
-   $( window ).on( 'hashchange', function () {
-   self.emit( 'hashchange' );
-   } );
-
-   this.on( 'hashchange', function () {
-   // ev.originalEvent.newURL is undefined on Android 2.x
-   var routeEv;
-
-   if ( self.enabled ) {
-   routeEv = $.Event( 'route', {
-   path: self.getPath()
-   } );
-   self.emit( 'route', routeEv );
-
-   if ( !routeEv.isDefaultPrevented() ) {
-   self.checkRoute();
-   } else {
-   // if route was prevented, ignore the next hash 
change and revert the
-   // hash to its old value
-   self.enabled = false;
-   self.navigate( self.oldHash );
-   }
-   } else {
-   self.enabled = true;
-   }
-
-   self.oldHash = self.getPath();
+   $( window ).on( this.hasPushState ? 'popstate' : 'hashchange', function 
() {
+   self.checkRoute();
} );
 }
 OO.mixinClass( Router, OO.EventEmitter );
+
+/**
+ * Check the current route and tries to navigate to it, otherwise revert back
+ * to the previous route.
+ *
+ * @method
+ */
+Router.prototype.checkRoute = function () {
+   var routeEv,
+   path = this.getPath();
+
+   if ( this.enabled ) {
+   routeEv = $.Event( 'route', {
+   path: path
+   } );
+   this.emit( 'route', routeEv );
+
+   if ( !routeEv.isDefaultPrevented() ) {
+   this.loadRoute( path );
+   } else {
+   // if route was prevented, ignore the next hash change 
and revert the
+   // hash to its old value
+   this.enabled = false;
+   this.replace( this.oldHash );
+   }
+   } else {
+   this.enabled = true;
+   }
+
+   this.oldHash = self.getPath();
+};
+
+/**
+ * Check the route and run appropriate callback if it matches.
+ *
+ * @param {string} [hash] Route (hash without #).
+ * @method
+ */
+Router.prototype.loadRoute = function ( hash ) {
+   hash = hash || this.getPath();
+
+   $.each( this.routes, function ( id, entry ) {
+   return !matchRoute( hash, entry );
+   } );
+};
 
 /**
  * Check the current route and run appropriate callback if it matches.
@@ -123,19 +140,27 @@
  * Navigate to a specific route.
  *
  * @method
- * @param {string} path string with a route (hash without #).
+ * @param {string} path Route (hash without #).
+ * @param {Object} [options]
+ * @param {boolean} [options.replace] If set to `true`, the current entry in
+ *   the history will be replaced, instead of creating a new one.
  */
-Router.prototype.navigate = function ( path ) {
-   var history = window.history;
+Router.prototype.navigate = function ( path, options ) {
// Take advantage of `pushState` when available, to clear the hash and
// not leave `#` in the history. An entry with `#` in the history has
// the side-effect of resetting the scroll position when navigating the
// history.
-   if ( path === '' && history && history.pushState ) {
+   var href = window.location.href.replace( /#.*$/, '' ),
+   url = ( path === '' ) ? href : href + '#' + path;
+
+   options = options || {};

[MediaWiki-commits] [Gerrit] Expand URLs of icon and actions in HTML email formatter - change (mediawiki...Echo)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Expand URLs of icon and actions in HTML email formatter
..


Expand URLs of icon and actions in HTML email formatter

The plain text email formatter already does this.

Bug: T135625
Change-Id: I630b49ef59988744fa0f89af62655f879e34a6fb
(cherry picked from commit 224caaf0725d31382875e4ad2f972caefb6c4b98)
---
M includes/formatters/EchoHtmlDigestEmailFormatter.php
M includes/formatters/EchoHtmlEmailFormatter.php
2 files changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/formatters/EchoHtmlDigestEmailFormatter.php 
b/includes/formatters/EchoHtmlDigestEmailFormatter.php
index 93543ce..77895d0 100644
--- a/includes/formatters/EchoHtmlDigestEmailFormatter.php
+++ b/includes/formatters/EchoHtmlDigestEmailFormatter.php
@@ -174,7 +174,10 @@
 * @return string
 */
protected function applyStyleToEvent( EchoEventPresentationModel $model 
) {
-   $iconUrl = EchoNotificationFormatter::getIconUrl( 
$model->getIconType(), $this->language->getDir() );
+   $iconUrl = wfExpandUrl(
+   EchoNotificationFormatter::getIconUrl( 
$model->getIconType(), $this->language->getDir() ),
+   PROTO_CANONICAL
+   );
$imgSrc = Sanitizer::encodeAttribute( $iconUrl );
 
// notification text
diff --git a/includes/formatters/EchoHtmlEmailFormatter.php 
b/includes/formatters/EchoHtmlEmailFormatter.php
index 3c4e4d2..c97c217 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -25,7 +25,10 @@
$actions[] = $this->renderLink( $secondaryLink, 
self::SECONDARY_LINK_STYLE );
}
 
-   $iconUrl = EchoNotificationFormatter::getIconUrl( 
$model->getIconType(), $this->language->getDir() );
+   $iconUrl = wfExpandUrl(
+   EchoNotificationFormatter::getIconUrl( 
$model->getIconType(), $this->language->getDir() ),
+   PROTO_CANONICAL
+   );
 
$body = $this->renderBody(
$this->language,
@@ -135,7 +138,7 @@
return Html::element(
'a',
array(
-   'href' => $link['url'],
+   'href' => wfExpandUrl( $link['url'], 
PROTO_CANONICAL ),
'style' => $style,
),
$link['label']

-- 
To view, visit https://gerrit.wikimedia.org/r/289503
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I630b49ef59988744fa0f89af62655f879e34a6fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Sbisson 
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 "Recommends" for mediawiki-extensions-base package - change (mediawiki/debian)

2016-05-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289577

Change subject: Remove "Recommends" for mediawiki-extensions-base package
..

Remove "Recommends" for mediawiki-extensions-base package

That package was basically folded into this one since we now include the
bundled tarball extensions with the main mediawiki package.

Change-Id: Ic4a986459e98687d62a5bd7292ccc3a648f8f8fb
---
M control
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/77/289577/1

diff --git a/control b/control
index 08a8520..1a0fdca 100644
--- a/control
+++ b/control
@@ -13,7 +13,7 @@
 Package: mediawiki
 Architecture: all
 Depends: apache2 | httpd, php5, php5-mysql | php5-pgsql | php5-sqlite | 
php5-mysqlnd, php5-common (>= 5.5.0+dfsg-10~), mime-support, libjs-jquery, 
mediawiki-classes, ${misc:Depends}
-Recommends: mysql-server | postgresql-contrib, php5-cli, python, 
php-wikidiff2, mediawiki-extensions-base
+Recommends: mysql-server | postgresql-contrib, php5-cli, python, php-wikidiff2
 Suggests: imagemagick | php5-gd, mediawiki-extensions-math, memcached, clamav, 
php5-apcu, php5-intl
 Breaks: fusionforge-plugin-mediawiki (<< 5.2~rc1+1~),
  mediawiki-extensions-geshi (<< 2.8~),

-- 
To view, visit https://gerrit.wikimedia.org/r/289577
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4a986459e98687d62a5bd7292ccc3a648f8f8fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Gate Android patches on instrumentation test cc too - change (integration/config)

2016-05-18 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289576

Change subject: Gate Android patches on instrumentation test cc too
..

Gate Android patches on instrumentation test cc too

It takes a little longer but it's reasonable to require that Android
(longer running) instrumentation tests must at least compile.

Change-Id: I666c75bb4072470bb13f807e8741cc1195e2d707
---
M jjb/mobile.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/76/289576/1

diff --git a/jjb/mobile.yaml b/jjb/mobile.yaml
index 547e52c..88a0246 100644
--- a/jjb/mobile.yaml
+++ b/jjb/mobile.yaml
@@ -44,7 +44,7 @@
 builders:
  - shell: |
  scripts/missing-qq.py
- ./gradlew clean checkstyle assembleAlphaRelease testAlphaRelease
+ ./gradlew clean checkstyle assembleAlphaRelease testAlphaRelease 
compileAlphaReleaseAndroidTestSources
 publishers:
  - archive:
  # Capture generated .apk, ProGuard mappings, checkstyle.xml, and test 
results

-- 
To view, visit https://gerrit.wikimedia.org/r/289576
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I666c75bb4072470bb13f807e8741cc1195e2d707
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Enable Flow beta feature on outreachwiki - change (operations/mediawiki-config)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable Flow beta feature on outreachwiki
..


Enable Flow beta feature on outreachwiki

Bug: T135582
Change-Id: If44e8ef26dc3dbf77de7d68bdcf56943f51df678
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 27e1684..cd60468 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15653,6 +15653,7 @@
'zhwiki' => true,
'wikidatawiki' => true,
'specieswiki' => true, // T134898
+   'outreachwiki' => true, // T135582
 ],
 'wmgUseDisambiguator' => [
'default' => true,

-- 
To view, visit https://gerrit.wikimedia.org/r/289492
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If44e8ef26dc3dbf77de7d68bdcf56943f51df678
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix slave lag wait calls for read-only ES clusters - change (operations/mediawiki-config)

2016-05-18 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289575

Change subject: Fix slave lag wait calls for read-only ES clusters
..

Fix slave lag wait calls for read-only ES clusters

Bug: T135690
Change-Id: Ib048a4b7e9112db012bb81e7e14bca1fbc9fe559
---
M wmf-config/db-eqiad.php
1 file changed, 15 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/75/289575/1

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 8c9a2c7..7986d66 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -550,20 +550,21 @@
 ),
 
 'templateOverridesByCluster' => array(
-   'cluster1'  => array( 'blobs table' => 'blobs_cluster1' ),
-   'cluster2'  => array( 'blobs table' => 'blobs_cluster2' ),
-   'cluster3'  => array( 'blobs table' => 'blobs_cluster3' ),
-   'cluster4'  => array( 'blobs table' => 'blobs_cluster4' ),
-   'cluster5'  => array( 'blobs table' => 'blobs_cluster5' ),
-   'cluster6'  => array( 'blobs table' => 'blobs_cluster6' ),
-   'cluster7'  => array( 'blobs table' => 'blobs_cluster7' ),
-   'cluster8'  => array( 'blobs table' => 'blobs_cluster8' ),
-   'cluster9'  => array( 'blobs table' => 'blobs_cluster9' ),
-   'cluster10' => array( 'blobs table' => 'blobs_cluster10' ),
-   'cluster20' => array( 'blobs table' => 'blobs_cluster20' ),
-   'cluster21' => array( 'blobs table' => 'blobs_cluster21' ),
-   'cluster22' => array( 'blobs table' => 'blobs_cluster22' ),
-   'cluster23' => array( 'blobs table' => 'blobs_cluster23' ),
+   'rc1'   => array( 'is static' => true ),
+   'cluster1'  => array( 'blobs table' => 'blobs_cluster1', 'is 
static' => true ),
+   'cluster2'  => array( 'blobs table' => 'blobs_cluster2', 'is 
static' => true ),
+   'cluster3'  => array( 'blobs table' => 'blobs_cluster3', 'is 
static' => true ),
+   'cluster4'  => array( 'blobs table' => 'blobs_cluster4', 'is 
static' => true ),
+   'cluster5'  => array( 'blobs table' => 'blobs_cluster5', 'is 
static' => true ),
+   'cluster6'  => array( 'blobs table' => 'blobs_cluster6', 'is 
static' => true ),
+   'cluster7'  => array( 'blobs table' => 'blobs_cluster7', 'is 
static' => true ),
+   'cluster8'  => array( 'blobs table' => 'blobs_cluster8', 'is 
static' => true ),
+   'cluster9'  => array( 'blobs table' => 'blobs_cluster9', 'is 
static' => true ),
+   'cluster10' => array( 'blobs table' => 'blobs_cluster10', 'is 
static' => true ),
+   'cluster20' => array( 'blobs table' => 'blobs_cluster20', 'is 
static' => true ),
+   'cluster21' => array( 'blobs table' => 'blobs_cluster21', 'is 
static' => true ),
+   'cluster22' => array( 'blobs table' => 'blobs_cluster22', 'is 
static' => true ),
+   'cluster23' => array( 'blobs table' => 'blobs_cluster23', 'is 
static' => true ),
'cluster24' => array( 'blobs table' => 'blobs_cluster24' ),
'cluster25' => array( 'blobs table' => 'blobs_cluster25' ),
 ),

-- 
To view, visit https://gerrit.wikimedia.org/r/289575
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib048a4b7e9112db012bb81e7e14bca1fbc9fe559
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Support non-replicating DB clusters for static datasets - change (mediawiki/core)

2016-05-18 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289574

Change subject: Support non-replicating DB clusters for static datasets
..

Support non-replicating DB clusters for static datasets

* Make the slave wait methods work properly in this case if
  the config flag is set.
* Also fixed a small IDEA error.

Bug: T135690
Change-Id: I9a12f1fc54c0b426f64c19ac2bf720e683fcf2fe
---
M includes/DefaultSettings.php
M includes/db/DatabaseMysqlBase.php
M includes/db/loadbalancer/LoadBalancer.php
3 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/74/289574/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index d6db388..a542ed8 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1902,6 +1902,7 @@
  *if available
  *
  *   - max lag: (optional) Maximum replication lag before a slave will 
taken out of rotation
+ *   - is static:   (optional) Set to true if the dataset is static and no 
replication is used.
  *
  *   These and any other user-defined properties will be assigned to the 
mLBInfo member
  *   variable of the Database object.
diff --git a/includes/db/DatabaseMysqlBase.php 
b/includes/db/DatabaseMysqlBase.php
index 13be911..3ebc3ec 100644
--- a/includes/db/DatabaseMysqlBase.php
+++ b/includes/db/DatabaseMysqlBase.php
@@ -782,8 +782,10 @@
throw new InvalidArgumentException( "Position not an 
instance of MySQLMasterPos" );
}
 
-   if ( $this->lastKnownSlavePos && 
$this->lastKnownSlavePos->hasReached( $pos ) ) {
-   return 0;
+   if ( $this->getLBInfo( 'is static' ) === true ) {
+   return 0; // this is a copy of a read-only dataset with 
no master DB
+   } elseif ( $this->lastKnownSlavePos && 
$this->lastKnownSlavePos->hasReached( $pos ) ) {
+   return 0; // already reached this point for sure
}
 
# Commit any open transactions
diff --git a/includes/db/loadbalancer/LoadBalancer.php 
b/includes/db/loadbalancer/LoadBalancer.php
index 5578099..43da218 100644
--- a/includes/db/loadbalancer/LoadBalancer.php
+++ b/includes/db/loadbalancer/LoadBalancer.php
@@ -1402,7 +1402,7 @@
}
 
$pos = $pos ?: $this->getConnection( DB_MASTER 
)->getMasterPos();
-   if ( !$pos ) {
+   if ( !( $pos instanceof DBMasterPos ) ) {
return false; // something is misconfigured
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289574
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a12f1fc54c0b426f64c19ac2bf720e683fcf2fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Allow mwEmbed to pick up classes from media element - change (mediawiki...TimedMediaHandler)

2016-05-18 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289573

Change subject: Allow mwEmbed to pick up classes from media element
..

Allow mwEmbed to pick up classes from media element

This let's the player pick up classes passed by the audio and video
tags. We need to make sure that we don't also pick up the skin
classname, because that's not how MwEmbed works.

Bug: T135537
Change-Id: I112d2b54407e1f61cb67a04e7d67df42aff4ab67
---
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/73/289573/1

diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
index a9aea2b..13a815b 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -18,6 +18,9 @@
// id: Auto-populated if unset
"id" : null,
 
+   // class: Auto-populated if unset
+   "class": null,
+
// Width: alternate to "style" to set player width
"width" : null,
 
@@ -1177,7 +1180,8 @@
// build the interface wrapper
this.$interface = $( this ).wrap(
$('')
-   .addClass( 'mwPlayerContainer ' + 
this.controlBuilder.playerClass )
+   .addClass( 'mwPlayerContainer ' + this[ 
'class' ] + ' ' + this.controlBuilder.playerClass )
+   .removeClass( this.skinName )
.append(
$('').addClass( 
'videoHolder' )
)

-- 
To view, visit https://gerrit.wikimedia.org/r/289573
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I112d2b54407e1f61cb67a04e7d67df42aff4ab67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Detect email typos, suggest correction - change (mediawiki...DonationInterface)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Detect email typos, suggest correction
..


Detect email typos, suggest correction

Uses MIT-licensed library mailcheck.js
https://github.com/mailcheck/mailcheck

Bug: T135567
Change-Id: I73da1218ffd43376354b82a553e22926560bdb1e
---
M DonationInterface.php
M Gruntfile.js
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/qqq.json
M modules/js/ext.donationInterface.validation.js
A modules/js/mailcheck.js
6 files changed, 253 insertions(+), 1 deletion(-)

Approvals:
  Cdentinger: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DonationInterface.php b/DonationInterface.php
index 9f32747..072baea 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -964,12 +964,18 @@
 // Migrate everything using di.form.core.validate to mustache,
 // then completely rewrite those functions
 $wgResourceModules[ 'ext.donationInterface.validation' ] = array(
-   'scripts' => 'ext.donationInterface.validation.js',
+   'scripts' => array(
+   'mailcheck.js',
+   'ext.donationInterface.validation.js',
+   ),
'dependencies' => array(
'di.form.core.validate',
/*'ext.donationInterface.currencyRates',
'ext.donationInterface.errorMessages',*/
),
+   'messages' => array(
+   'donate_interface-did-you-mean',
+   ),
'localBasePath' => __DIR__ . '/modules/js',
'remoteExtPath' => 'DonationInterface/modules/js',
 );
diff --git a/Gruntfile.js b/Gruntfile.js
index 24cd4bf..f17bed8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -22,6 +22,7 @@
'*.js',
'modules/*.js',
'modules/js/*.js',
+   '!modules/js/mailcheck.js',
'gateway_forms/rapidhtml/**/*.js'
],
tests: 'tests/*/*.js',
diff --git a/gateway_common/i18n/interface/en.json 
b/gateway_common/i18n/interface/en.json
index 5ba6089..0e6f8dd 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -307,6 +307,7 @@
"donate_interface-cvv-number": "CVV number",
"donate_interface-verification-number": "Verification number",
"donate_interface-what-is-this": "What is this?",
+   "donate_interface-did-you-mean": "Did you mean $1?",
"donate_interface-debit": "debit",
"donate_interface-do-not-include-dashes": "Please do not include 
dashes",
"donate_interface-please-donate-today": "Please donate today",
diff --git a/gateway_common/i18n/interface/qqq.json 
b/gateway_common/i18n/interface/qqq.json
index 5a5078f..af18aa5 100644
--- a/gateway_common/i18n/interface/qqq.json
+++ b/gateway_common/i18n/interface/qqq.json
@@ -332,6 +332,7 @@
"donate_interface-cvv-number": "Abbreviation of 'Card Verification 
Value' + 'Number' (unabbreviated)",
"donate_interface-verification-number": "Prompt for the card's 
verification number",
"donate_interface-what-is-this": "{{Identical|What is this}}",
+   "donate_interface-did-you-mean": "A prompt shown when the user may have 
typed a field in error. Parameter $1 is replaced by a suggested correction. It 
is wrapped in a link so that the donor can click it to apply the correction.",
"donate_interface-debit": "Text to indicate that the choice is a debit 
card as distinct from a credit card. Maximum width is 
8em.\n{{Identical|Debit}}",
"donate_interface-do-not-include-dashes": "Reminder to exclude dashes 
from entries",
"donate_interface-please-donate-today": "Label for request urging 
donation",
diff --git a/modules/js/ext.donationInterface.validation.js 
b/modules/js/ext.donationInterface.validation.js
index 9138431..ddf2840 100644
--- a/modules/js/ext.donationInterface.validation.js
+++ b/modules/js/ext.donationInterface.validation.js
@@ -34,4 +34,30 @@
validatePersonal: window.validate_personal,
showErrors: showErrors
};
+   // Set up email error detection and correction
+   $( document ).on( 'blur', '#email', function () {
+   $( this ).mailcheck( {
+   suggested: function ( element, suggestion ) {
+   var message = mw.msg(
+   'donate_interface-did-you-mean',
+   suggestion.full
+   );
+   $( '#emailMsg' )
+   .removeClass( 'errorMsgHide' )
+   .addClass( 'errorMsg' )
+   .html( message );
+   },
+   empty: function ( element ) {

[MediaWiki-commits] [Gerrit] Make LinksUpdate only wait on the DB with the link tables - change (mediawiki/core)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make LinksUpdate only wait on the DB with the link tables
..


Make LinksUpdate only wait on the DB with the link tables

Bug: T135690

Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
---
M includes/deferred/LinksUpdate.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index ac08374..1f7f3b0 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -389,14 +389,14 @@
foreach ( $deleteWheres as $deleteWhere ) {
$this->mDb->delete( $table, $deleteWhere, __METHOD__ );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
$insertBatches = array_chunk( $insertions, self::BATCH_SIZE );
foreach ( $insertBatches as $insertBatch ) {
$this->mDb->insert( $table, $insertBatch, __METHOD__, 
'IGNORE' );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
if ( count( $insertions ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/289568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] If available, use MediaWikiTestCase::getTestSysop() - change (mediawiki...Wikibase)

2016-05-18 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289572

Change subject: If available, use MediaWikiTestCase::getTestSysop()
..

If available, use MediaWikiTestCase::getTestSysop()

Instead of hard-coding UTSysop, use the interface for obtaining a test User
object implemented in 17ef1f51, if available. This change is a prerequisite to
I17ef1f51 getting merged.

Change-Id: Ic2f54178a96ccef7a3b7a1e40b1672e9ccf7cb0b
---
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/72/289572/1

diff --git 
a/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php 
b/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
index 679ac94..3145d4e 100644
--- a/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
+++ b/repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
@@ -340,8 +340,12 @@
'Q2' => $toData,
) );
 
-   User::newFromName( 'UTSysop' )
-   ->addWatch( 
$this->getEntityTitleLookup()->getTitleForId( $fromId ) );
+   if ( method_exists( $this, 'getTestSysop' ) ) {
+   $user = $this->getTestSysop( true )->getUser();
+   } else {
+   $user = User::newFromName( 'UTSysop' );
+   }
+   $user->addWatch( $this->getEntityTitleLookup()->getTitleForId( 
$fromId ) );
 
$interactor->mergeItems( $fromId, $toId, $ignoreConflicts, 
'CustomSummary' );
 
@@ -357,7 +361,7 @@
'summary for target item'
);
 
-   $this->assertItemMergedIntoIsWatched( $toId );
+   $this->assertItemMergedIntoIsWatched( $toId, $user );
}
 
private function assertRedirectWorks( $expectedFrom, ItemId $fromId, 
ItemId $toId ) {
@@ -375,9 +379,9 @@
}
}
 
-   private function assertItemMergedIntoIsWatched( ItemId $toId ) {
+   private function assertItemMergedIntoIsWatched( ItemId $toId, User 
$user ) {
$this->assertTrue(
-   User::newFromName( 'UTSysop' )
+   $user
->isWatched( 
$this->getEntityTitleLookup()->getTitleForId( $toId ) ),
'Item merged into is being watched'
);

-- 
To view, visit https://gerrit.wikimedia.org/r/289572
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2f54178a96ccef7a3b7a1e40b1672e9ccf7cb0b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] group1 to 1.28.0-wmf.2 - change (operations/mediawiki-config)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: group1 to 1.28.0-wmf.2
..


group1 to 1.28.0-wmf.2

Bug: T134450
Change-Id: If326f393595b45bd9e9bf1829562314f6e6dcad2
---
M wikiversions.json
1 file changed, 594 insertions(+), 594 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikiversions.json b/wikiversions.json
index a20aae1..6ca937b 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.1",
-"aawikibooks": "php-1.28.0-wmf.1",
-"aawiktionary": "php-1.28.0-wmf.1",
+"aawikibooks": "php-1.28.0-wmf.2",
+"aawiktionary": "php-1.28.0-wmf.2",
 "abwiki": "php-1.28.0-wmf.1",
-"abwiktionary": "php-1.28.0-wmf.1",
+"abwiktionary": "php-1.28.0-wmf.2",
 "acewiki": "php-1.28.0-wmf.1",
-"advisorywiki": "php-1.28.0-wmf.1",
+"advisorywiki": "php-1.28.0-wmf.2",
 "adywiki": "php-1.28.0-wmf.1",
 "afwiki": "php-1.28.0-wmf.1",
-"afwikibooks": "php-1.28.0-wmf.1",
-"afwikiquote": "php-1.28.0-wmf.1",
-"afwiktionary": "php-1.28.0-wmf.1",
+"afwikibooks": "php-1.28.0-wmf.2",
+"afwikiquote": "php-1.28.0-wmf.2",
+"afwiktionary": "php-1.28.0-wmf.2",
 "akwiki": "php-1.28.0-wmf.1",
-"akwikibooks": "php-1.28.0-wmf.1",
-"akwiktionary": "php-1.28.0-wmf.1",
+"akwikibooks": "php-1.28.0-wmf.2",
+"akwiktionary": "php-1.28.0-wmf.2",
 "alswiki": "php-1.28.0-wmf.1",
-"alswikibooks": "php-1.28.0-wmf.1",
-"alswikiquote": "php-1.28.0-wmf.1",
-"alswiktionary": "php-1.28.0-wmf.1",
+"alswikibooks": "php-1.28.0-wmf.2",
+"alswikiquote": "php-1.28.0-wmf.2",
+"alswiktionary": "php-1.28.0-wmf.2",
 "amwiki": "php-1.28.0-wmf.1",
-"amwikiquote": "php-1.28.0-wmf.1",
-"amwiktionary": "php-1.28.0-wmf.1",
+"amwikiquote": "php-1.28.0-wmf.2",
+"amwiktionary": "php-1.28.0-wmf.2",
 "angwiki": "php-1.28.0-wmf.1",
-"angwikibooks": "php-1.28.0-wmf.1",
-"angwikiquote": "php-1.28.0-wmf.1",
-"angwikisource": "php-1.28.0-wmf.1",
-"angwiktionary": "php-1.28.0-wmf.1",
+"angwikibooks": "php-1.28.0-wmf.2",
+"angwikiquote": "php-1.28.0-wmf.2",
+"angwikisource": "php-1.28.0-wmf.2",
+"angwiktionary": "php-1.28.0-wmf.2",
 "anwiki": "php-1.28.0-wmf.1",
-"anwiktionary": "php-1.28.0-wmf.1",
+"anwiktionary": "php-1.28.0-wmf.2",
 "arbcom_dewiki": "php-1.28.0-wmf.1",
 "arbcom_enwiki": "php-1.28.0-wmf.1",
 "arbcom_fiwiki": "php-1.28.0-wmf.1",
 "arbcom_nlwiki": "php-1.28.0-wmf.1",
 "arcwiki": "php-1.28.0-wmf.1",
 "arwiki": "php-1.28.0-wmf.1",
-"arwikibooks": "php-1.28.0-wmf.1",
-"arwikimedia": "php-1.28.0-wmf.1",
-"arwikinews": "php-1.28.0-wmf.1",
-"arwikiquote": "php-1.28.0-wmf.1",
-"arwikisource": "php-1.28.0-wmf.1",
-"arwikiversity": "php-1.28.0-wmf.1",
-"arwiktionary": "php-1.28.0-wmf.1",
+"arwikibooks": "php-1.28.0-wmf.2",
+"arwikimedia": "php-1.28.0-wmf.2",
+"arwikinews": "php-1.28.0-wmf.2",
+"arwikiquote": "php-1.28.0-wmf.2",
+"arwikisource": "php-1.28.0-wmf.2",
+"arwikiversity": "php-1.28.0-wmf.2",
+"arwiktionary": "php-1.28.0-wmf.2",
 "arzwiki": "php-1.28.0-wmf.1",
 "astwiki": "php-1.28.0-wmf.1",
-"astwikibooks": "php-1.28.0-wmf.1",
-"astwikiquote": "php-1.28.0-wmf.1",
-"astwiktionary": "php-1.28.0-wmf.1",
+"astwikibooks": "php-1.28.0-wmf.2",
+"astwikiquote": "php-1.28.0-wmf.2",
+"astwiktionary": "php-1.28.0-wmf.2",
 "aswiki": "php-1.28.0-wmf.1",
-"aswikibooks": "php-1.28.0-wmf.1",
-"aswikisource": "php-1.28.0-wmf.1",
-"aswiktionary": "php-1.28.0-wmf.1",
-"auditcomwiki": "php-1.28.0-wmf.1",
+"aswikibooks": "php-1.28.0-wmf.2",
+"aswikisource": "php-1.28.0-wmf.2",
+"aswiktionary": "php-1.28.0-wmf.2",
+"auditcomwiki": "php-1.28.0-wmf.2",
 "avwiki": "php-1.28.0-wmf.1",
-"avwiktionary": "php-1.28.0-wmf.1",
+"avwiktionary": "php-1.28.0-wmf.2",
 "aywiki": "php-1.28.0-wmf.1",
-"aywikibooks": "php-1.28.0-wmf.1",
-"aywiktionary": "php-1.28.0-wmf.1",
+"aywikibooks": "php-1.28.0-wmf.2",
+"aywiktionary": "php-1.28.0-wmf.2",
 "azbwiki": "php-1.28.0-wmf.1",
 "azwiki": "php-1.28.0-wmf.1",
-"azwikibooks": "php-1.28.0-wmf.1",
-"azwikiquote": "php-1.28.0-wmf.1",
-"azwikisource": "php-1.28.0-wmf.1",
-"azwiktionary": "php-1.28.0-wmf.1",
+"azwikibooks": "php-1.28.0-wmf.2",
+"azwikiquote": "php-1.28.0-wmf.2",
+"azwikisource": "php-1.28.0-wmf.2",
+"azwiktionary": "php-1.28.0-wmf.2",
 "barwiki": "php-1.28.0-wmf.1",
 "bat_smgwiki": "php-1.28.0-wmf.1",
 "bawiki": "php-1.28.0-wmf.1",
-"bawikibooks": "php-1.28.0-wmf.1",
+"bawikibooks": "php-1.28.0-wmf.2",
 "bclwiki": "php-1.28.0-wmf.1",
-"bdwikimedia": "php-1.28.0-wmf.1",
+"bdwikimedia": "php-1.28.0-wmf.2",
 "be_x_oldwiki": "p

[MediaWiki-commits] [Gerrit] Add banner history module to wmff setup - change (wikimedia...civicrm-buildkit)

2016-05-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289571

Change subject: Add banner history module to wmff setup
..

Add banner history module to wmff setup

So we can run tests on it.

Change-Id: I68cdbfd6e950aad7c7bb9db0d812e2a3d7db932f
---
M app/config/wmff/install.sh
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/civicrm-buildkit 
refs/changes/71/289571/1

diff --git a/app/config/wmff/install.sh b/app/config/wmff/install.sh
index d0739b0..7b761fb 100644
--- a/app/config/wmff/install.sh
+++ b/app/config/wmff/install.sh
@@ -43,6 +43,7 @@
   adyen_audit \
   amazon_audit \
   astropay_audit \
+  banner_history \
   contribution_audit \
   contribution_tracking \
   environment_indicator \

-- 
To view, visit https://gerrit.wikimedia.org/r/289571
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68cdbfd6e950aad7c7bb9db0d812e2a3d7db932f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/civicrm-buildkit
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make LinksUpdate only wait on the DB with the link tables - change (mediawiki/core)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make LinksUpdate only wait on the DB with the link tables
..


Make LinksUpdate only wait on the DB with the link tables

Bug: T135690

Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
---
M includes/deferred/LinksUpdate.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index ac08374..1f7f3b0 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -389,14 +389,14 @@
foreach ( $deleteWheres as $deleteWhere ) {
$this->mDb->delete( $table, $deleteWhere, __METHOD__ );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
$insertBatches = array_chunk( $insertions, self::BATCH_SIZE );
foreach ( $insertBatches as $insertBatch ) {
$this->mDb->insert( $table, $insertBatch, __METHOD__, 
'IGNORE' );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
if ( count( $insertions ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/289569
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] group1 to 1.28.0-wmf.2 - change (operations/mediawiki-config)

2016-05-18 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289570

Change subject: group1 to 1.28.0-wmf.2
..

group1 to 1.28.0-wmf.2

Bug: T134450
Change-Id: If326f393595b45bd9e9bf1829562314f6e6dcad2
---
M wikiversions.json
1 file changed, 594 insertions(+), 594 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/70/289570/1

diff --git a/wikiversions.json b/wikiversions.json
index a20aae1..6ca937b 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.1",
-"aawikibooks": "php-1.28.0-wmf.1",
-"aawiktionary": "php-1.28.0-wmf.1",
+"aawikibooks": "php-1.28.0-wmf.2",
+"aawiktionary": "php-1.28.0-wmf.2",
 "abwiki": "php-1.28.0-wmf.1",
-"abwiktionary": "php-1.28.0-wmf.1",
+"abwiktionary": "php-1.28.0-wmf.2",
 "acewiki": "php-1.28.0-wmf.1",
-"advisorywiki": "php-1.28.0-wmf.1",
+"advisorywiki": "php-1.28.0-wmf.2",
 "adywiki": "php-1.28.0-wmf.1",
 "afwiki": "php-1.28.0-wmf.1",
-"afwikibooks": "php-1.28.0-wmf.1",
-"afwikiquote": "php-1.28.0-wmf.1",
-"afwiktionary": "php-1.28.0-wmf.1",
+"afwikibooks": "php-1.28.0-wmf.2",
+"afwikiquote": "php-1.28.0-wmf.2",
+"afwiktionary": "php-1.28.0-wmf.2",
 "akwiki": "php-1.28.0-wmf.1",
-"akwikibooks": "php-1.28.0-wmf.1",
-"akwiktionary": "php-1.28.0-wmf.1",
+"akwikibooks": "php-1.28.0-wmf.2",
+"akwiktionary": "php-1.28.0-wmf.2",
 "alswiki": "php-1.28.0-wmf.1",
-"alswikibooks": "php-1.28.0-wmf.1",
-"alswikiquote": "php-1.28.0-wmf.1",
-"alswiktionary": "php-1.28.0-wmf.1",
+"alswikibooks": "php-1.28.0-wmf.2",
+"alswikiquote": "php-1.28.0-wmf.2",
+"alswiktionary": "php-1.28.0-wmf.2",
 "amwiki": "php-1.28.0-wmf.1",
-"amwikiquote": "php-1.28.0-wmf.1",
-"amwiktionary": "php-1.28.0-wmf.1",
+"amwikiquote": "php-1.28.0-wmf.2",
+"amwiktionary": "php-1.28.0-wmf.2",
 "angwiki": "php-1.28.0-wmf.1",
-"angwikibooks": "php-1.28.0-wmf.1",
-"angwikiquote": "php-1.28.0-wmf.1",
-"angwikisource": "php-1.28.0-wmf.1",
-"angwiktionary": "php-1.28.0-wmf.1",
+"angwikibooks": "php-1.28.0-wmf.2",
+"angwikiquote": "php-1.28.0-wmf.2",
+"angwikisource": "php-1.28.0-wmf.2",
+"angwiktionary": "php-1.28.0-wmf.2",
 "anwiki": "php-1.28.0-wmf.1",
-"anwiktionary": "php-1.28.0-wmf.1",
+"anwiktionary": "php-1.28.0-wmf.2",
 "arbcom_dewiki": "php-1.28.0-wmf.1",
 "arbcom_enwiki": "php-1.28.0-wmf.1",
 "arbcom_fiwiki": "php-1.28.0-wmf.1",
 "arbcom_nlwiki": "php-1.28.0-wmf.1",
 "arcwiki": "php-1.28.0-wmf.1",
 "arwiki": "php-1.28.0-wmf.1",
-"arwikibooks": "php-1.28.0-wmf.1",
-"arwikimedia": "php-1.28.0-wmf.1",
-"arwikinews": "php-1.28.0-wmf.1",
-"arwikiquote": "php-1.28.0-wmf.1",
-"arwikisource": "php-1.28.0-wmf.1",
-"arwikiversity": "php-1.28.0-wmf.1",
-"arwiktionary": "php-1.28.0-wmf.1",
+"arwikibooks": "php-1.28.0-wmf.2",
+"arwikimedia": "php-1.28.0-wmf.2",
+"arwikinews": "php-1.28.0-wmf.2",
+"arwikiquote": "php-1.28.0-wmf.2",
+"arwikisource": "php-1.28.0-wmf.2",
+"arwikiversity": "php-1.28.0-wmf.2",
+"arwiktionary": "php-1.28.0-wmf.2",
 "arzwiki": "php-1.28.0-wmf.1",
 "astwiki": "php-1.28.0-wmf.1",
-"astwikibooks": "php-1.28.0-wmf.1",
-"astwikiquote": "php-1.28.0-wmf.1",
-"astwiktionary": "php-1.28.0-wmf.1",
+"astwikibooks": "php-1.28.0-wmf.2",
+"astwikiquote": "php-1.28.0-wmf.2",
+"astwiktionary": "php-1.28.0-wmf.2",
 "aswiki": "php-1.28.0-wmf.1",
-"aswikibooks": "php-1.28.0-wmf.1",
-"aswikisource": "php-1.28.0-wmf.1",
-"aswiktionary": "php-1.28.0-wmf.1",
-"auditcomwiki": "php-1.28.0-wmf.1",
+"aswikibooks": "php-1.28.0-wmf.2",
+"aswikisource": "php-1.28.0-wmf.2",
+"aswiktionary": "php-1.28.0-wmf.2",
+"auditcomwiki": "php-1.28.0-wmf.2",
 "avwiki": "php-1.28.0-wmf.1",
-"avwiktionary": "php-1.28.0-wmf.1",
+"avwiktionary": "php-1.28.0-wmf.2",
 "aywiki": "php-1.28.0-wmf.1",
-"aywikibooks": "php-1.28.0-wmf.1",
-"aywiktionary": "php-1.28.0-wmf.1",
+"aywikibooks": "php-1.28.0-wmf.2",
+"aywiktionary": "php-1.28.0-wmf.2",
 "azbwiki": "php-1.28.0-wmf.1",
 "azwiki": "php-1.28.0-wmf.1",
-"azwikibooks": "php-1.28.0-wmf.1",
-"azwikiquote": "php-1.28.0-wmf.1",
-"azwikisource": "php-1.28.0-wmf.1",
-"azwiktionary": "php-1.28.0-wmf.1",
+"azwikibooks": "php-1.28.0-wmf.2",
+"azwikiquote": "php-1.28.0-wmf.2",
+"azwikisource": "php-1.28.0-wmf.2",
+"azwiktionary": "php-1.28.0-wmf.2",
 "barwiki": "php-1.28.0-wmf.1",
 "bat_smgwiki": "php-1.28.0-wmf.1",
 "bawiki": "php-1.28.0-wmf.1",
-"bawikibooks": "php-1.28.0-wmf.1",
+"bawikibooks": "php-1.28.0-wmf.2",
 "bclwiki": "php-1.28.0-wmf.1",
-"bdwikimedia": "php-1.28.0-wmf.1",
+"bdwi

[MediaWiki-commits] [Gerrit] Fix isEmpty util - change (mediawiki...mobileapps)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Fix isEmpty util
..


Fix isEmpty util

isEmpty always returns true for booleans (even true) and numbers (even
nonzero) which may be unexpected. Return false for these types instead.

Change-Id: I13bc669471106548ae401c885766fb92fc0cb3f4
---
M lib/mobile-util.js
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  Mobrovac: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 6c0db3d..c1676d3 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -3,7 +3,17 @@
 var underscore = require('underscore');
 var uuid = require('cassandra-uuid').TimeUuid;
 
-var isNonempty = underscore.negate(underscore.isEmpty);
+/**
+ * @returns true if val is null, undefined, an empty object, an empty array, or
+ *  an empty string.
+ */
+function isEmpty(val) {
+  return !underscore.isNumber(val)
+  && !underscore.isBoolean(val)
+  && underscore.isEmpty(val);
+}
+
+var isNonempty = underscore.negate(isEmpty);
 
 /**
  * @param [fallback]

-- 
To view, visit https://gerrit.wikimedia.org/r/289328
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I13bc669471106548ae401c885766fb92fc0cb3f4
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make LinksUpdate only wait on the DB with the link tables - change (mediawiki/core)

2016-05-18 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289569

Change subject: Make LinksUpdate only wait on the DB with the link tables
..

Make LinksUpdate only wait on the DB with the link tables

Bug: T135690

Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
---
M includes/deferred/LinksUpdate.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/289569/1

diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index ac08374..1f7f3b0 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -389,14 +389,14 @@
foreach ( $deleteWheres as $deleteWhere ) {
$this->mDb->delete( $table, $deleteWhere, __METHOD__ );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
$insertBatches = array_chunk( $insertions, self::BATCH_SIZE );
foreach ( $insertBatches as $insertBatch ) {
$this->mDb->insert( $table, $insertBatch, __METHOD__, 
'IGNORE' );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
if ( count( $insertions ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/289569
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: 20after4 
Gerrit-Reviewer: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] base::service_unit: Remove old cruft - change (operations/puppet)

2016-05-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: base::service_unit: Remove old cruft
..


base::service_unit: Remove old cruft

As the subject says, remove old cruft that ensure absent an older
approach to shipping unit files by us

Change-Id: I2131110abea8a06720b5d92ac70c3e140bfa5a88
---
M modules/base/manifests/service_unit.pp
1 file changed, 0 insertions(+), 7 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/base/manifests/service_unit.pp 
b/modules/base/manifests/service_unit.pp
index 6b7df8e..4df9f75 100644
--- a/modules/base/manifests/service_unit.pp
+++ b/modules/base/manifests/service_unit.pp
@@ -99,13 +99,6 @@
 # systemd complains if unit files are executable
 if $initscript == 'systemd' {
 $i_mode = '0444'
-# TODO: Temporary resource to ensure old /etc based units removal
-# Run before the actual /lib population in order to depend on it 
for
-# refresh systemd. Delete after a week or so
-file { "/etc/systemd/system/${name}.service":
-ensure => absent,
-before => File[$path],
-}
 } else {
 $i_mode = '0544'
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/289565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2131110abea8a06720b5d92ac70c3e140bfa5a88
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Perform endpoint checks in restart_service stage - change (mediawiki...deploy)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Perform endpoint checks in restart_service stage
..


Perform endpoint checks in restart_service stage

The Scap3 stages were recently changed such that a service restart is no
longer performed during the 'promote' stage, but is now performed in the
new 'restart_service' stage.  This patch directs that our endpoint checks
be performed in 'restart_service' stage.

https://lists.wikimedia.org/pipermail/wikitech-l/2016-May/085666.html

Change-Id: I08af9f62790884a923c89e63f391589c150f3ad9
---
M scap/checks.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mobrovac: Verified; Looks good to me, approved



diff --git a/scap/checks.yaml b/scap/checks.yaml
index 15cff3e..1eb7ca3 100644
--- a/scap/checks.yaml
+++ b/scap/checks.yaml
@@ -1,5 +1,5 @@
 checks:
   endpoints:
 type: nrpe
-stage: promote
+stage: restart_service
 command: check_endpoints_mobileapps

-- 
To view, visit https://gerrit.wikimedia.org/r/289485
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I08af9f62790884a923c89e63f391589c150f3ad9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mobrovac 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make LinksUpdate only wait on the DB with the link tables - change (mediawiki/core)

2016-05-18 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289568

Change subject: Make LinksUpdate only wait on the DB with the link tables
..

Make LinksUpdate only wait on the DB with the link tables

Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
---
M includes/deferred/LinksUpdate.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/289568/1

diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index ac08374..1f7f3b0 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -389,14 +389,14 @@
foreach ( $deleteWheres as $deleteWhere ) {
$this->mDb->delete( $table, $deleteWhere, __METHOD__ );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
$insertBatches = array_chunk( $insertions, self::BATCH_SIZE );
foreach ( $insertBatches as $insertBatch ) {
$this->mDb->insert( $table, $insertBatch, __METHOD__, 
'IGNORE' );
$this->mDb->commit( __METHOD__, 'flush' );
-   wfGetLBFactory()->waitForReplication();
+   wfGetLBFactory()->waitForReplication( [ 'wiki' => 
$this->mDb->getWikiID() ] );
}
 
if ( count( $insertions ) ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/289568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If79ca385884f422e5ed11e77b29033c8cabf494c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] in configs, allow comma separated list of files of wikis to ... - change (operations/dumps)

2016-05-18 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289567

Change subject: in configs, allow comma separated list of files of wikis to be 
skipped
..

in configs, allow comma separated list of files of wikis to be skipped

sometimes we may want to toss private and/or closed or other lists
in there with the standard exclusion list; this makes that easy

Change-Id: Ife835a9bb1f686ae6885bdca2556972b491e44d2
---
M xmldumps-backup/dumps/WikiDump.py
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/67/289567/1

diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index 73d54ce..0845aad 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -174,7 +174,20 @@
 
 def parse_conffile_globally(self):
 self.db_list = MiscUtils.db_list(self.conf.get("wiki", "dblist"))
-self.skip_db_list = MiscUtils.db_list(self.conf.get("wiki", 
"skipdblist"))
+
+# permit comma-separated list of files so that eg some script
+# can skip all private and/or closed wikis in addition to some
+# other exclusion list
+to_skip = self.conf.get("wiki", "skipdblist")
+if ',' in to_skip:
+skipfiles = split(to_skip,',')
+else:
+skipfiles = [to_skip]
+self.skip_db_list = []
+for skipfile in skipfiles:
+self.skip_db_list.extend(MiscUtils.db_list(skipfiles))
+self.skip_db_list = list(set(self.skip_db_list))
+
 self.private_list = MiscUtils.db_list(self.conf.get("wiki", 
"privatelist"))
 self.closed_list = MiscUtils.db_list(self.conf.get("wiki", 
"closedlist"))
 self.flagged_revs_list = MiscUtils.db_list(self.conf.get("wiki", 
"flaggedrevslist"))

-- 
To view, visit https://gerrit.wikimedia.org/r/289567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife835a9bb1f686ae6885bdca2556972b491e44d2
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Validate banner history messages before insert - change (wikimedia...crm)

2016-05-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289566

Change subject: Validate banner history messages before insert
..

Validate banner history messages before insert

Banner history log id is currently 16 hex chars, this lets 'em grow
to 20 if need be.

Bug: T134916
Change-Id: Ibd87dbeeb1ed98fde77473a5a794b623dd0967c3
---
M sites/all/modules/queue2civicrm/banner_history/banner_history.module
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/66/289566/1

diff --git 
a/sites/all/modules/queue2civicrm/banner_history/banner_history.module 
b/sites/all/modules/queue2civicrm/banner_history/banner_history.module
index 950a614..21ff9e7 100644
--- a/sites/all/modules/queue2civicrm/banner_history/banner_history.module
+++ b/sites/all/modules/queue2civicrm/banner_history/banner_history.module
@@ -106,6 +106,14 @@
'Missing banner history or contribution tracking ID.' );
}
 
+   if (
+   ( intval( $contributionTrackingId ) != $contributionTrackingId 
) ||
+   !preg_match( '^[0-9a-f]{16,20}$', $bannerHistoryId )
+   ) {
+   throw new WmfException( 'BANNER_HISTORY',
+   'Invalid data in banner history message.' );
+   }
+
watchdog( 'banner_history', "About to add row for $bannerHistoryId",
array(), WATCHDOG_INFO);
 
@@ -121,4 +129,4 @@
->execute();
 
watchdog( 'banner_history', "Processed $bannerHistoryId" );
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/289566
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd87dbeeb1ed98fde77473a5a794b623dd0967c3
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Helps to apply the patch to the right place - change (mediawiki...release)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Helps to apply the patch to the right place
..


Helps to apply the patch to the right place

Change-Id: Iafc5e03d869ef8363c4393ba9b8a6552b9bf3232
---
M make-release/make-release.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/make-release/make-release.py b/make-release/make-release.py
index 1eaade8..320e44f 100755
--- a/make-release/make-release.py
+++ b/make-release/make-release.py
@@ -470,7 +470,7 @@
 self.getGit(gitroot + '/' + extension,
 dir + '/' + extension, extension, branch)
 for patch in patches:
-self.applyPatch(patch, dir)
+self.applyPatch(patch, dir + '/' + extension)
 logging.info('Done with exporting %s', extension)
 
 def makePatch(self, destDir, patchFileName, dir1, dir2, type):

-- 
To view, visit https://gerrit.wikimedia.org/r/289560
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafc5e03d869ef8363c4393ba9b8a6552b9bf3232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Always use --3way merging or patches conflict too easily - change (mediawiki...release)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Always use --3way merging or patches conflict too easily
..


Always use --3way merging or patches conflict too easily

Change-Id: I18128649b48b44faf80a281e45df58c753356439
---
M make-release/make-release.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/make-release/make-release.py b/make-release/make-release.py
index 24c5340..1eaade8 100755
--- a/make-release/make-release.py
+++ b/make-release/make-release.py
@@ -507,7 +507,7 @@
 oldDir = os.getcwd()
 os.chdir(targetDir)
 with open(patchFile) as patchIn:
-patchProc = subprocess.Popen(['git', 'am', '--signoff'], 
stdin=patchIn)
+patchProc = subprocess.Popen(['git', 'am', '--signoff', '--3way'], 
stdin=patchIn)
 status = patchProc.wait()
 if status != 0:
 logging.error("Patch failed, exiting")

-- 
To view, visit https://gerrit.wikimedia.org/r/289500
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I18128649b48b44faf80a281e45df58c753356439
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] base::service_unit: Remove old cruft - change (operations/puppet)

2016-05-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289565

Change subject: base::service_unit: Remove old cruft
..

base::service_unit: Remove old cruft

As the subject says, remove old cruft that ensure absent an older
approach to shipping unit files by us

Change-Id: I2131110abea8a06720b5d92ac70c3e140bfa5a88
---
M modules/base/manifests/service_unit.pp
1 file changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/289565/1

diff --git a/modules/base/manifests/service_unit.pp 
b/modules/base/manifests/service_unit.pp
index 6b7df8e..4df9f75 100644
--- a/modules/base/manifests/service_unit.pp
+++ b/modules/base/manifests/service_unit.pp
@@ -99,13 +99,6 @@
 # systemd complains if unit files are executable
 if $initscript == 'systemd' {
 $i_mode = '0444'
-# TODO: Temporary resource to ensure old /etc based units removal
-# Run before the actual /lib population in order to depend on it 
for
-# refresh systemd. Delete after a week or so
-file { "/etc/systemd/system/${name}.service":
-ensure => absent,
-before => File[$path],
-}
 } else {
 $i_mode = '0544'
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/289565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2131110abea8a06720b5d92ac70c3e140bfa5a88
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Apply ext.tmh.player.styles w/ videojs styles on mobile - change (mediawiki...TimedMediaHandler)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Apply ext.tmh.player.styles w/ videojs styles on mobile
..


Apply ext.tmh.player.styles w/ videojs styles on mobile

Was missing the target specifier on the ext.tmh.player.styles.

Had to add a workaround for Minerva skin for thumbnailed videos,
as Minerva stuff rewrites some of the surrounding div styles to
use 'width: auto', which apparently doesn't handle properly the
case where the .video-js block is 'display: inline-block'. In
this case it's safe to use 'display: block' since it's in a block
anyway, so that's why the *:not(.thumbinner) bit.

Change-Id: Ifd50dd4aab29997fc1345854809997460ef280d3
---
M TimedMediaHandler.hooks.php
M resources/ext.tmh.player.styles.less
2 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  TheDJ: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 3e2a69f..9b186e5 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -171,6 +171,7 @@
],
'ext.tmh.player.styles' => 
$baseExtensionResource + [
'styles' => 
'resources/ext.tmh.player.styles.less',
+   'targets' => [ 'mobile', 
'desktop' ],
]
];
}
diff --git a/resources/ext.tmh.player.styles.less 
b/resources/ext.tmh.player.styles.less
index b556e62..4e6d293 100644
--- a/resources/ext.tmh.player.styles.less
+++ b/resources/ext.tmh.player.styles.less
@@ -12,11 +12,16 @@
}
 }
 
-/* Make video-js behave like standard  elements */
-.video-js.video-js:not( .vjs-fullscreen ) {
+/*
+ * Make video-js behave like standard  elements
+ * The thumbinner check works around a width interaction for
+ * thumbnail style adjustments in Minerva mobile skin.
+ */
+*:not(.thumbinner) > .video-js.video-js:not( .vjs-fullscreen ) {
display: inline-block;
vertical-align: initial;
 }
+
 /* Resets styling on the resolution button. Our content linewraps */
 .vjs-resolution-button ul.vjs-menu-content.vjs-menu-content {
margin-left: -6em;

-- 
To view, visit https://gerrit.wikimedia.org/r/288643
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd50dd4aab29997fc1345854809997460ef280d3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: TheDJ 
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 tests to reflect updated page protection response format - change (mediawiki...mobileapps)

2016-05-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Fix tests to reflect updated page protection response format
..


Fix tests to reflect updated page protection response format

As a result of T69054, the value of a lead response's "protection" field
for an unprotected page is now an empty object rather than an empty array,
which confused a couple of our tests; this gets the tests passing again
and adds a type check.

Bug: T135649
Change-Id: I09cea13e797c71345c408eb336ebd96286646366
---
M test/features/mobile-sections-lead/pagecontent.js
M test/features/mobile-sections/pagecontent.js
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  BearND: Looks good to me, but someone else must approve
  Mobrovac: Looks good to me, approved
  Niedzielski: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index 93c3d0f..dd3893e 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -21,7 +21,8 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Sections/deep');
-assert.ok(!lead.protection, 'Page should not be protected');
+assert.ok(lead.protection.constructor === Object, 
'lead.protection should be an Object');
+assert.ok(!Object.keys(lead.protection).length, 'Page should 
not be protected');
 assert.deepEqual(lead.editable, true);
 assert.ok(lead.sections.length >= 6, 'Expected at least six 
section elements');
 assert.deepEqual(lead.sections[0].id, 0);
diff --git a/test/features/mobile-sections/pagecontent.js 
b/test/features/mobile-sections/pagecontent.js
index b7c5a35..07a5c29 100644
--- a/test/features/mobile-sections/pagecontent.js
+++ b/test/features/mobile-sections/pagecontent.js
@@ -32,7 +32,8 @@
 assert.deepEqual(res.status, 200);
 assert.ok(lead.lastmodified.startsWith('201'), 
lead.lastmodified + ' should start with 201'); // 2015-
 assert.deepEqual(lead.displaytitle, 'Sections/deep');
-assert.ok(!lead.protection, 'Page should not be protected');
+assert.ok(lead.protection.constructor === Object, 
'lead.protection should be an Object');
+assert.ok(!Object.keys(lead.protection).length, 'Page should 
not be protected');
 assert.deepEqual(lead.editable, true);
 assert.ok(lead.sections.length >= 6, 'Expected at least six 
section elements');
 assert.deepEqual(lead.sections[0].id, 0);

-- 
To view, visit https://gerrit.wikimedia.org/r/289320
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I09cea13e797c71345c408eb336ebd96286646366
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
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 query string from referrer - change (mediawiki...DonationInterface)

2016-05-18 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289563

Change subject: remove query string from referrer
..

remove query string from referrer

Change-Id: Ib68e61099693675c649292f61b02cce44185c140
---
M gateway_common/DonationData.php
1 file changed, 4 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/63/289563/1

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 02064d0..f2d5447 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -689,14 +689,10 @@
 */
protected function setReferrer() {
if ( !$this->isSomething( 'referrer' ) ) {
-   // Remove the protocol string to avoid tripping 
modsecurity OWASP CRS #950120
-   $referrer = preg_replace(
-   "/^(?:ht|f)tps?:\\/\\//",
-   "",
-   $this->gateway->getRequest()->getHeader( 
'referer' )
-   );
-   $this->setVal( 'referrer', $referrer );
-   // grumble grumble real header not a real word grumble.
+   // Remove protocol and query strings to avoid tripping 
modsecurity
+   // TODO it would be a lot more privacy respecting to 
omit path too.
+   $parts = parse_url( 
$this->gateway->getRequest()->getHeader( 'referer' ) );
+   $this->setVal( 'referrer', $parts['host'] . 
$parts['path'] );
}
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289563
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib68e61099693675c649292f61b02cce44185c140
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] maps: Specify cassandra graphite host - change (operations/puppet)

2016-05-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289564

Change subject: maps: Specify cassandra graphite host
..

maps: Specify cassandra graphite host

Default is localhost, we might want to push maps cassandra metrics
into graphite

Change-Id: Ibe598c5c670ce89a4950aaf8e57dfb0be22b4958
---
M hieradata/role/common/maps/server.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/289564/1

diff --git a/hieradata/role/common/maps/server.yaml 
b/hieradata/role/common/maps/server.yaml
index 8f6efa5..0249efa 100644
--- a/hieradata/role/common/maps/server.yaml
+++ b/hieradata/role/common/maps/server.yaml
@@ -5,6 +5,7 @@
 cassandra::data_file_directories: [/srv/cassandra/data]
 cassandra::commitlog_directory: /srv/cassandra/commitlog
 cassandra::saved_caches_directory: /srv/cassandra/saved_caches
+cassandra::metrics::graphite_host: 'graphite-in.eqiad.wmnet'
 admin::groups:
   - maps-admins
   - kartotherian-admin

-- 
To view, visit https://gerrit.wikimedia.org/r/289564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe598c5c670ce89a4950aaf8e57dfb0be22b4958
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] roll group1 back to 1.28.0-wmf.1 - change (operations/mediawiki-config)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: roll group1 back to 1.28.0-wmf.1
..


roll group1 back to 1.28.0-wmf.1

Change-Id: I6a24aea6c818cc6e770e35c01c4c0d0f69ebb770
---
M wikiversions.json
1 file changed, 594 insertions(+), 594 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikiversions.json b/wikiversions.json
index 6ca937b..a20aae1 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.1",
-"aawikibooks": "php-1.28.0-wmf.2",
-"aawiktionary": "php-1.28.0-wmf.2",
+"aawikibooks": "php-1.28.0-wmf.1",
+"aawiktionary": "php-1.28.0-wmf.1",
 "abwiki": "php-1.28.0-wmf.1",
-"abwiktionary": "php-1.28.0-wmf.2",
+"abwiktionary": "php-1.28.0-wmf.1",
 "acewiki": "php-1.28.0-wmf.1",
-"advisorywiki": "php-1.28.0-wmf.2",
+"advisorywiki": "php-1.28.0-wmf.1",
 "adywiki": "php-1.28.0-wmf.1",
 "afwiki": "php-1.28.0-wmf.1",
-"afwikibooks": "php-1.28.0-wmf.2",
-"afwikiquote": "php-1.28.0-wmf.2",
-"afwiktionary": "php-1.28.0-wmf.2",
+"afwikibooks": "php-1.28.0-wmf.1",
+"afwikiquote": "php-1.28.0-wmf.1",
+"afwiktionary": "php-1.28.0-wmf.1",
 "akwiki": "php-1.28.0-wmf.1",
-"akwikibooks": "php-1.28.0-wmf.2",
-"akwiktionary": "php-1.28.0-wmf.2",
+"akwikibooks": "php-1.28.0-wmf.1",
+"akwiktionary": "php-1.28.0-wmf.1",
 "alswiki": "php-1.28.0-wmf.1",
-"alswikibooks": "php-1.28.0-wmf.2",
-"alswikiquote": "php-1.28.0-wmf.2",
-"alswiktionary": "php-1.28.0-wmf.2",
+"alswikibooks": "php-1.28.0-wmf.1",
+"alswikiquote": "php-1.28.0-wmf.1",
+"alswiktionary": "php-1.28.0-wmf.1",
 "amwiki": "php-1.28.0-wmf.1",
-"amwikiquote": "php-1.28.0-wmf.2",
-"amwiktionary": "php-1.28.0-wmf.2",
+"amwikiquote": "php-1.28.0-wmf.1",
+"amwiktionary": "php-1.28.0-wmf.1",
 "angwiki": "php-1.28.0-wmf.1",
-"angwikibooks": "php-1.28.0-wmf.2",
-"angwikiquote": "php-1.28.0-wmf.2",
-"angwikisource": "php-1.28.0-wmf.2",
-"angwiktionary": "php-1.28.0-wmf.2",
+"angwikibooks": "php-1.28.0-wmf.1",
+"angwikiquote": "php-1.28.0-wmf.1",
+"angwikisource": "php-1.28.0-wmf.1",
+"angwiktionary": "php-1.28.0-wmf.1",
 "anwiki": "php-1.28.0-wmf.1",
-"anwiktionary": "php-1.28.0-wmf.2",
+"anwiktionary": "php-1.28.0-wmf.1",
 "arbcom_dewiki": "php-1.28.0-wmf.1",
 "arbcom_enwiki": "php-1.28.0-wmf.1",
 "arbcom_fiwiki": "php-1.28.0-wmf.1",
 "arbcom_nlwiki": "php-1.28.0-wmf.1",
 "arcwiki": "php-1.28.0-wmf.1",
 "arwiki": "php-1.28.0-wmf.1",
-"arwikibooks": "php-1.28.0-wmf.2",
-"arwikimedia": "php-1.28.0-wmf.2",
-"arwikinews": "php-1.28.0-wmf.2",
-"arwikiquote": "php-1.28.0-wmf.2",
-"arwikisource": "php-1.28.0-wmf.2",
-"arwikiversity": "php-1.28.0-wmf.2",
-"arwiktionary": "php-1.28.0-wmf.2",
+"arwikibooks": "php-1.28.0-wmf.1",
+"arwikimedia": "php-1.28.0-wmf.1",
+"arwikinews": "php-1.28.0-wmf.1",
+"arwikiquote": "php-1.28.0-wmf.1",
+"arwikisource": "php-1.28.0-wmf.1",
+"arwikiversity": "php-1.28.0-wmf.1",
+"arwiktionary": "php-1.28.0-wmf.1",
 "arzwiki": "php-1.28.0-wmf.1",
 "astwiki": "php-1.28.0-wmf.1",
-"astwikibooks": "php-1.28.0-wmf.2",
-"astwikiquote": "php-1.28.0-wmf.2",
-"astwiktionary": "php-1.28.0-wmf.2",
+"astwikibooks": "php-1.28.0-wmf.1",
+"astwikiquote": "php-1.28.0-wmf.1",
+"astwiktionary": "php-1.28.0-wmf.1",
 "aswiki": "php-1.28.0-wmf.1",
-"aswikibooks": "php-1.28.0-wmf.2",
-"aswikisource": "php-1.28.0-wmf.2",
-"aswiktionary": "php-1.28.0-wmf.2",
-"auditcomwiki": "php-1.28.0-wmf.2",
+"aswikibooks": "php-1.28.0-wmf.1",
+"aswikisource": "php-1.28.0-wmf.1",
+"aswiktionary": "php-1.28.0-wmf.1",
+"auditcomwiki": "php-1.28.0-wmf.1",
 "avwiki": "php-1.28.0-wmf.1",
-"avwiktionary": "php-1.28.0-wmf.2",
+"avwiktionary": "php-1.28.0-wmf.1",
 "aywiki": "php-1.28.0-wmf.1",
-"aywikibooks": "php-1.28.0-wmf.2",
-"aywiktionary": "php-1.28.0-wmf.2",
+"aywikibooks": "php-1.28.0-wmf.1",
+"aywiktionary": "php-1.28.0-wmf.1",
 "azbwiki": "php-1.28.0-wmf.1",
 "azwiki": "php-1.28.0-wmf.1",
-"azwikibooks": "php-1.28.0-wmf.2",
-"azwikiquote": "php-1.28.0-wmf.2",
-"azwikisource": "php-1.28.0-wmf.2",
-"azwiktionary": "php-1.28.0-wmf.2",
+"azwikibooks": "php-1.28.0-wmf.1",
+"azwikiquote": "php-1.28.0-wmf.1",
+"azwikisource": "php-1.28.0-wmf.1",
+"azwiktionary": "php-1.28.0-wmf.1",
 "barwiki": "php-1.28.0-wmf.1",
 "bat_smgwiki": "php-1.28.0-wmf.1",
 "bawiki": "php-1.28.0-wmf.1",
-"bawikibooks": "php-1.28.0-wmf.2",
+"bawikibooks": "php-1.28.0-wmf.1",
 "bclwiki": "php-1.28.0-wmf.1",
-"bdwikimedia": "php-1.28.0-wmf.2",
+"bdwikimedia": "php-1.28.0-wmf.1",
 "be_x_oldwi

[MediaWiki-commits] [Gerrit] Organize Ganglia cluster names for labs - change (operations/puppet)

2016-05-18 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Organize Ganglia cluster names for labs
..


Organize Ganglia cluster names for labs

Previously we had some, but not all, labs hosts grouped
into the 'Virtualization cluster.'  That was inconsistent
and also not very useful for auditing VM capacity.

Now we have two clusters:

'labvirt' aka 'Labs virt hosts' which contains only the
compute nodes

'labs' aka 'Labs services' which contains all other Labs-related
hosts, excluding the compute nodes.

Change-Id: I654eb47cad184bf972db5e237b620771e8aafec8
---
M hieradata/common.yaml
M hieradata/hosts/holmium.yaml
D hieradata/hosts/labcontrol1001.yaml
D hieradata/hosts/labcontrol1002.yaml
M hieradata/hosts/labmon1001.yaml
D hieradata/hosts/labnet1001.yaml
D hieradata/hosts/labnet1002.yaml
D hieradata/hosts/nembus.yaml
D hieradata/hosts/neptunium.yaml
M hieradata/hosts/silver.yaml
M hieradata/regex.yaml
M hieradata/role/common/nova/compute.yaml
12 files changed, 18 insertions(+), 15 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/common.yaml b/hieradata/common.yaml
index 26f25ae..acc89d0 100644
--- a/hieradata/common.yaml
+++ b/hieradata/common.yaml
@@ -105,11 +105,16 @@
   eqiad: []
   codfw: []
   esams: []
-  virt:
-name: "Virtualization cluster"
+  labvirt:
+name: "Labs virt hosts"
 id: 29
 sites:
   eqiad: []
+  labs:
+name: "Labs services"
+id: 30
+sites:
+  eqiad: []
   jobrunner:
 name: "Jobrunners"
 id: 31
diff --git a/hieradata/hosts/holmium.yaml b/hieradata/hosts/holmium.yaml
index 781125d..d41687e 100644
--- a/hieradata/hosts/holmium.yaml
+++ b/hieradata/hosts/holmium.yaml
@@ -1,4 +1,4 @@
-cluster: virt
+cluster: labs
 
 labsdnsconfig:
   host: 'labs-ns1.wikimedia.org'
diff --git a/hieradata/hosts/labcontrol1001.yaml 
b/hieradata/hosts/labcontrol1001.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labcontrol1001.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/labcontrol1002.yaml 
b/hieradata/hosts/labcontrol1002.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labcontrol1002.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/labmon1001.yaml b/hieradata/hosts/labmon1001.yaml
index ae478d3..04132c7 100644
--- a/hieradata/hosts/labmon1001.yaml
+++ b/hieradata/hosts/labmon1001.yaml
@@ -1,3 +1,3 @@
 statsite::instance::graphite_host: 'localhost'
 statsite::instance::extended_counters: 1
-cluster: "virt"
+cluster: labs
diff --git a/hieradata/hosts/labnet1001.yaml b/hieradata/hosts/labnet1001.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labnet1001.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/labnet1002.yaml b/hieradata/hosts/labnet1002.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/labnet1002.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/nembus.yaml b/hieradata/hosts/nembus.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/nembus.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/neptunium.yaml b/hieradata/hosts/neptunium.yaml
deleted file mode 100644
index 4559a8a..000
--- a/hieradata/hosts/neptunium.yaml
+++ /dev/null
@@ -1 +0,0 @@
-cluster: virt
diff --git a/hieradata/hosts/silver.yaml b/hieradata/hosts/silver.yaml
index 7a9b1ad..ff76c55 100644
--- a/hieradata/hosts/silver.yaml
+++ b/hieradata/hosts/silver.yaml
@@ -1,4 +1,4 @@
-cluster: virt
+cluster: labs
 admin::groups:
   - deployment
 
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 767375d..837750a 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -66,9 +66,13 @@
   __regex: !ruby/regexp 
/^(db20[0-9][0-9]|dbstore200[1-2]|es201[1-9])\.codfw\.wmnet$/
   cluster: mysql
 
-virtualization:
-  __regex: !ruby/regexp /^(labnet|labvirt|virt)100[1-9]\.eqiad\.wmnet$/
-  cluster: "virt"
+labvirt:
+  __regex: !ruby/regexp /^labvirt10[0-9][0-9]\.eqiad\.wmnet$/
+  cluster: labvirt
+
+labs:
+  __regex: !ruby/regexp 
/^(labnet|labservices|labnodepool|labsdb|labstore|labcontrol)100[1-9]\.eqiad\.wmnet$/
+  cluster: labs
 
 cassandra_test_eqiad:
   __regex: !ruby/regexp /^(cerium|praseodymium|xenon)\.eqiad\.wmnet$/
diff --git a/hieradata/role/common/nova/compute.yaml 
b/hieradata/role/common/nova/compute.yaml
index 981749b..cd73d8c 100644
--- a/hieradata/role/common/nova/compute.yaml
+++ b/hieradata/role/common/nova/compute.yaml
@@ -1,4 +1,4 @@
-cluster: virt
+cluster: labvirt
 debdeploy::grains:
   debdeploy-nova-compute:
 value: standard

-- 
To view, visit https://gerrit.wikimedia.org/r/289315
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I654eb47cad184bf972db5e237b620771e8aafec8

[MediaWiki-commits] [Gerrit] roll group1 back to 1.28.0-wmf.1 - change (operations/mediawiki-config)

2016-05-18 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289562

Change subject: roll group1 back to 1.28.0-wmf.1
..

roll group1 back to 1.28.0-wmf.1

Change-Id: I6a24aea6c818cc6e770e35c01c4c0d0f69ebb770
---
M wikiversions.json
1 file changed, 594 insertions(+), 594 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/62/289562/1

diff --git a/wikiversions.json b/wikiversions.json
index 6ca937b..a20aae1 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.1",
-"aawikibooks": "php-1.28.0-wmf.2",
-"aawiktionary": "php-1.28.0-wmf.2",
+"aawikibooks": "php-1.28.0-wmf.1",
+"aawiktionary": "php-1.28.0-wmf.1",
 "abwiki": "php-1.28.0-wmf.1",
-"abwiktionary": "php-1.28.0-wmf.2",
+"abwiktionary": "php-1.28.0-wmf.1",
 "acewiki": "php-1.28.0-wmf.1",
-"advisorywiki": "php-1.28.0-wmf.2",
+"advisorywiki": "php-1.28.0-wmf.1",
 "adywiki": "php-1.28.0-wmf.1",
 "afwiki": "php-1.28.0-wmf.1",
-"afwikibooks": "php-1.28.0-wmf.2",
-"afwikiquote": "php-1.28.0-wmf.2",
-"afwiktionary": "php-1.28.0-wmf.2",
+"afwikibooks": "php-1.28.0-wmf.1",
+"afwikiquote": "php-1.28.0-wmf.1",
+"afwiktionary": "php-1.28.0-wmf.1",
 "akwiki": "php-1.28.0-wmf.1",
-"akwikibooks": "php-1.28.0-wmf.2",
-"akwiktionary": "php-1.28.0-wmf.2",
+"akwikibooks": "php-1.28.0-wmf.1",
+"akwiktionary": "php-1.28.0-wmf.1",
 "alswiki": "php-1.28.0-wmf.1",
-"alswikibooks": "php-1.28.0-wmf.2",
-"alswikiquote": "php-1.28.0-wmf.2",
-"alswiktionary": "php-1.28.0-wmf.2",
+"alswikibooks": "php-1.28.0-wmf.1",
+"alswikiquote": "php-1.28.0-wmf.1",
+"alswiktionary": "php-1.28.0-wmf.1",
 "amwiki": "php-1.28.0-wmf.1",
-"amwikiquote": "php-1.28.0-wmf.2",
-"amwiktionary": "php-1.28.0-wmf.2",
+"amwikiquote": "php-1.28.0-wmf.1",
+"amwiktionary": "php-1.28.0-wmf.1",
 "angwiki": "php-1.28.0-wmf.1",
-"angwikibooks": "php-1.28.0-wmf.2",
-"angwikiquote": "php-1.28.0-wmf.2",
-"angwikisource": "php-1.28.0-wmf.2",
-"angwiktionary": "php-1.28.0-wmf.2",
+"angwikibooks": "php-1.28.0-wmf.1",
+"angwikiquote": "php-1.28.0-wmf.1",
+"angwikisource": "php-1.28.0-wmf.1",
+"angwiktionary": "php-1.28.0-wmf.1",
 "anwiki": "php-1.28.0-wmf.1",
-"anwiktionary": "php-1.28.0-wmf.2",
+"anwiktionary": "php-1.28.0-wmf.1",
 "arbcom_dewiki": "php-1.28.0-wmf.1",
 "arbcom_enwiki": "php-1.28.0-wmf.1",
 "arbcom_fiwiki": "php-1.28.0-wmf.1",
 "arbcom_nlwiki": "php-1.28.0-wmf.1",
 "arcwiki": "php-1.28.0-wmf.1",
 "arwiki": "php-1.28.0-wmf.1",
-"arwikibooks": "php-1.28.0-wmf.2",
-"arwikimedia": "php-1.28.0-wmf.2",
-"arwikinews": "php-1.28.0-wmf.2",
-"arwikiquote": "php-1.28.0-wmf.2",
-"arwikisource": "php-1.28.0-wmf.2",
-"arwikiversity": "php-1.28.0-wmf.2",
-"arwiktionary": "php-1.28.0-wmf.2",
+"arwikibooks": "php-1.28.0-wmf.1",
+"arwikimedia": "php-1.28.0-wmf.1",
+"arwikinews": "php-1.28.0-wmf.1",
+"arwikiquote": "php-1.28.0-wmf.1",
+"arwikisource": "php-1.28.0-wmf.1",
+"arwikiversity": "php-1.28.0-wmf.1",
+"arwiktionary": "php-1.28.0-wmf.1",
 "arzwiki": "php-1.28.0-wmf.1",
 "astwiki": "php-1.28.0-wmf.1",
-"astwikibooks": "php-1.28.0-wmf.2",
-"astwikiquote": "php-1.28.0-wmf.2",
-"astwiktionary": "php-1.28.0-wmf.2",
+"astwikibooks": "php-1.28.0-wmf.1",
+"astwikiquote": "php-1.28.0-wmf.1",
+"astwiktionary": "php-1.28.0-wmf.1",
 "aswiki": "php-1.28.0-wmf.1",
-"aswikibooks": "php-1.28.0-wmf.2",
-"aswikisource": "php-1.28.0-wmf.2",
-"aswiktionary": "php-1.28.0-wmf.2",
-"auditcomwiki": "php-1.28.0-wmf.2",
+"aswikibooks": "php-1.28.0-wmf.1",
+"aswikisource": "php-1.28.0-wmf.1",
+"aswiktionary": "php-1.28.0-wmf.1",
+"auditcomwiki": "php-1.28.0-wmf.1",
 "avwiki": "php-1.28.0-wmf.1",
-"avwiktionary": "php-1.28.0-wmf.2",
+"avwiktionary": "php-1.28.0-wmf.1",
 "aywiki": "php-1.28.0-wmf.1",
-"aywikibooks": "php-1.28.0-wmf.2",
-"aywiktionary": "php-1.28.0-wmf.2",
+"aywikibooks": "php-1.28.0-wmf.1",
+"aywiktionary": "php-1.28.0-wmf.1",
 "azbwiki": "php-1.28.0-wmf.1",
 "azwiki": "php-1.28.0-wmf.1",
-"azwikibooks": "php-1.28.0-wmf.2",
-"azwikiquote": "php-1.28.0-wmf.2",
-"azwikisource": "php-1.28.0-wmf.2",
-"azwiktionary": "php-1.28.0-wmf.2",
+"azwikibooks": "php-1.28.0-wmf.1",
+"azwikiquote": "php-1.28.0-wmf.1",
+"azwikisource": "php-1.28.0-wmf.1",
+"azwiktionary": "php-1.28.0-wmf.1",
 "barwiki": "php-1.28.0-wmf.1",
 "bat_smgwiki": "php-1.28.0-wmf.1",
 "bawiki": "php-1.28.0-wmf.1",
-"bawikibooks": "php-1.28.0-wmf.2",
+"bawikibooks": "php-1.28.0-wmf.1",
 "bclwiki": "php-1.28.0-wmf.1",
-"bdwikimedia": "php-1.28.0-wmf.2",
+  

[MediaWiki-commits] [Gerrit] Special:EnableFlow: Support subpage to pre-fill page name - change (mediawiki...Flow)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Special:EnableFlow: Support subpage to pre-fill page name
..


Special:EnableFlow: Support subpage to pre-fill page name

Bug: T135678
Change-Id: Icf823b14391ec7639bf6f062cf7209583c351da4
---
M includes/Specials/SpecialEnableFlow.php
1 file changed, 13 insertions(+), 1 deletion(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Specials/SpecialEnableFlow.php 
b/includes/Specials/SpecialEnableFlow.php
index 21235b3..514b6f1 100644
--- a/includes/Specials/SpecialEnableFlow.php
+++ b/includes/Specials/SpecialEnableFlow.php
@@ -26,7 +26,7 @@
/**
 * @var string $page Full page name that was converted to a board
 */
-   protected $page;
+   protected $page = '';
 
public function __construct() {
parent::__construct( 'EnableFlow', 'flow-create-board' );
@@ -35,11 +35,23 @@
$this->occupationController = Container::get( 
'occupation_controller' );
}
 
+   public function execute( $par ) {
+   if ( $par !== null ) {
+   $title = Title::newFromText( $par );
+   if ( $title ) {
+   $this->page = $title->getPrefixedText();
+   }
+   }
+
+   parent::execute( $par );
+   }
+
protected function getFormFields() {
return array(
'page' => array(
'type' => 'text',
'label-message' => 
'flow-special-enableflow-page',
+   'default' => $this->page,
),
'header' => array(
'type' => 'textarea',

-- 
To view, visit https://gerrit.wikimedia.org/r/289540
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf823b14391ec7639bf6f062cf7209583c351da4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sethakill 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] enable onallwikis to run non php scripts by passing full arg... - change (operations/dumps)

2016-05-18 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: enable onallwikis to run non php scripts by passing full 
arguments
..


enable onallwikis to run non php scripts by passing full arguments

All php scripts will be assumed to be MediaWiki maintenance scripts,
as opposed to all other scripts.

Change-Id: Ie86fba5d69c1de525be5768ce1565453e200fc34
---
M xmldumps-backup/onallwikis.py
1 file changed, 19 insertions(+), 6 deletions(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/xmldumps-backup/onallwikis.py b/xmldumps-backup/onallwikis.py
index 8441e0a..959f8bf 100644
--- a/xmldumps-backup/onallwikis.py
+++ b/xmldumps-backup/onallwikis.py
@@ -70,10 +70,13 @@
 '''
 if base is None:
 base = wiki
-script_command = MultiVersion.mw_script_as_array(
-base.config, self.scriptname)
-script_command = [base.config.php, "-q"] + script_command
-script_command.extend(["--wiki", base.db_name])
+if self.scriptname.endswith('.php'):
+script_command = MultiVersion.mw_script_as_array(
+base.config, self.scriptname)
+script_command = [base.config.php, "-q"] + script_command
+script_command.extend(["--wiki", base.db_name])
+else:
+script_command = [self.scriptname]
 if self.args is not None:
 script_command.extend(self.args)
 script_command = [field.format(DIR=output_dir, FILE=outfile_base, 
w=wiki.db_name)
@@ -265,8 +268,18 @@
 sys.stderr.write(message + "\n")
 usage_message = """Usage: python onallwikis.py [options] [script-args]
 
-This script runs a mysql query or a php maintenance script across all
-wikis, stashing the outputs in files in the directory(ies) specified.
+This script runs a mysql query or a php maintenance script or any
+other specified script across all wikis, stashing the outputs in files
+in the directory(ies) specified.
+
+Scripts ending in '.php' will be treated as MediaWiki maintenance scripts
+and will be run via MW multiversion lookups. The --wiki argument to
+those scripts will be handled automatically, as will the invocation of
+php itself.
+
+For all other scripts, the full command line must be given. It's best
+to specify -s /path/to/interpreter /path/to/script -- --all --other --args...
+at the end of the argument list to onallwikis.
 
 Args following the options will be treated as arguments to the script if
 a script is to be run rather than a query, and they will be passed on.

-- 
To view, visit https://gerrit.wikimedia.org/r/289561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie86fba5d69c1de525be5768ce1565453e200fc34
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Bump src to 67816adf for deploy. - change (mediawiki...deploy)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bump src to 67816adf for deploy.
..


Bump src to 67816adf for deploy.

Change-Id: If030b47cc2ca7268c18e06cc7ad31ff95e348e03
---
M src
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Arlolra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src b/src
index b692ba9..67816ad 16
--- a/src
+++ b/src
-Subproject commit b692ba97df11a20978c155e2316578aac2ac973d
+Subproject commit 67816adfb2528e5ff45c7a27e9500e7bd7da0f96

-- 
To view, visit https://gerrit.wikimedia.org/r/289550
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If030b47cc2ca7268c18e06cc7ad31ff95e348e03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Cscott 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] cassandra::metrics: Refresh the collector on a unit file change - change (operations/puppet)

2016-05-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: cassandra::metrics: Refresh the collector on a unit file change
..


cassandra::metrics: Refresh the collector on a unit file change

There is no reason to not refresh the collector when we update the unit
file, since it holds not state or data. Hence removing the refresh
parameter and setting it to the default

Change-Id: Iacbe2db95b54c24dfb6a87bc4c35dd0db3cc0d8e
---
M modules/cassandra/manifests/metrics.pp
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/cassandra/manifests/metrics.pp 
b/modules/cassandra/manifests/metrics.pp
index ae56824..a02fecd 100644
--- a/modules/cassandra/manifests/metrics.pp
+++ b/modules/cassandra/manifests/metrics.pp
@@ -97,7 +97,6 @@
 ensure=> present,
 template_name => 'cassandra-metrics-collector',
 systemd   => true,
-refresh   => false,
 require   => [
 File[$collector_jar],
 File[$filter_file],

-- 
To view, visit https://gerrit.wikimedia.org/r/289559
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iacbe2db95b54c24dfb6a87bc4c35dd0db3cc0d8e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Eevans 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] enable onallwikis to run non php scripts by passing full arg... - change (operations/dumps)

2016-05-18 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289561

Change subject: enable onallwikis to run non php scripts by passing full 
arguments
..

enable onallwikis to run non php scripts by passing full arguments

All php scripts will be assumed to be MediaWiki maintenance scripts,
as opposed to all other scripts.

Change-Id: Ie86fba5d69c1de525be5768ce1565453e200fc34
---
M xmldumps-backup/onallwikis.py
1 file changed, 19 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/61/289561/1

diff --git a/xmldumps-backup/onallwikis.py b/xmldumps-backup/onallwikis.py
index 8441e0a..959f8bf 100644
--- a/xmldumps-backup/onallwikis.py
+++ b/xmldumps-backup/onallwikis.py
@@ -70,10 +70,13 @@
 '''
 if base is None:
 base = wiki
-script_command = MultiVersion.mw_script_as_array(
-base.config, self.scriptname)
-script_command = [base.config.php, "-q"] + script_command
-script_command.extend(["--wiki", base.db_name])
+if self.scriptname.endswith('.php'):
+script_command = MultiVersion.mw_script_as_array(
+base.config, self.scriptname)
+script_command = [base.config.php, "-q"] + script_command
+script_command.extend(["--wiki", base.db_name])
+else:
+script_command = [self.scriptname]
 if self.args is not None:
 script_command.extend(self.args)
 script_command = [field.format(DIR=output_dir, FILE=outfile_base, 
w=wiki.db_name)
@@ -265,8 +268,18 @@
 sys.stderr.write(message + "\n")
 usage_message = """Usage: python onallwikis.py [options] [script-args]
 
-This script runs a mysql query or a php maintenance script across all
-wikis, stashing the outputs in files in the directory(ies) specified.
+This script runs a mysql query or a php maintenance script or any
+other specified script across all wikis, stashing the outputs in files
+in the directory(ies) specified.
+
+Scripts ending in '.php' will be treated as MediaWiki maintenance scripts
+and will be run via MW multiversion lookups. The --wiki argument to
+those scripts will be handled automatically, as will the invocation of
+php itself.
+
+For all other scripts, the full command line must be given. It's best
+to specify -s /path/to/interpreter /path/to/script -- --all --other --args...
+at the end of the argument list to onallwikis.
 
 Args following the options will be treated as arguments to the script if
 a script is to be run rather than a query, and they will be passed on.

-- 
To view, visit https://gerrit.wikimedia.org/r/289561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie86fba5d69c1de525be5768ce1565453e200fc34
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Helps to apply the patch to the right place - change (mediawiki...release)

2016-05-18 Thread Chad (Code Review)
Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289560

Change subject: Helps to apply the patch to the right place
..

Helps to apply the patch to the right place

Change-Id: Iafc5e03d869ef8363c4393ba9b8a6552b9bf3232
---
M make-release/make-release.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/60/289560/1

diff --git a/make-release/make-release.py b/make-release/make-release.py
index 1eaade8..320e44f 100755
--- a/make-release/make-release.py
+++ b/make-release/make-release.py
@@ -470,7 +470,7 @@
 self.getGit(gitroot + '/' + extension,
 dir + '/' + extension, extension, branch)
 for patch in patches:
-self.applyPatch(patch, dir)
+self.applyPatch(patch, dir + '/' + extension)
 logging.info('Done with exporting %s', extension)
 
 def makePatch(self, destDir, patchFileName, dir1, dir2, type):

-- 
To view, visit https://gerrit.wikimedia.org/r/289560
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafc5e03d869ef8363c4393ba9b8a6552b9bf3232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix resetServiceForTesting() param type in comment - change (mediawiki/core)

2016-05-18 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289558

Change subject: Fix resetServiceForTesting() param type in comment
..

Fix resetServiceForTesting() param type in comment

Change-Id: I05ba45a812a6d6aa7e9c90ea17b5a24b606e815c
---
M includes/MediaWikiServices.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/289558/1

diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index e2dc691..d423212 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -265,7 +265,7 @@
 * instances to clean up.
 *
 * @param string $name
-* @param string $destroy Whether the service instance should be 
destroyed if it exists.
+* @param bool $destroy Whether the service instance should be 
destroyed if it exists.
 *When set to false, any existing service instance will 
effectively be detached
 *from the container.
 *

-- 
To view, visit https://gerrit.wikimedia.org/r/289558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05ba45a812a6d6aa7e9c90ea17b5a24b606e815c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] cassandra::metrics: Refresh the collector on a unit file change - change (operations/puppet)

2016-05-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289559

Change subject: cassandra::metrics: Refresh the collector on a unit file change
..

cassandra::metrics: Refresh the collector on a unit file change

There is no reason to not refresh the collector when we update the unit
file, since it holds not state or data. Hence removing the refresh
parameter and setting it to the default

Change-Id: Iacbe2db95b54c24dfb6a87bc4c35dd0db3cc0d8e
---
M modules/cassandra/manifests/metrics.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/289559/1

diff --git a/modules/cassandra/manifests/metrics.pp 
b/modules/cassandra/manifests/metrics.pp
index 7bd57b9..92e6f64 100644
--- a/modules/cassandra/manifests/metrics.pp
+++ b/modules/cassandra/manifests/metrics.pp
@@ -87,7 +87,6 @@
 ensure=> present,
 template_name => 'cassandra-metrics-collector',
 systemd   => true,
-refresh   => false,
 require   => [
 File[$collector_jar],
 File[$filter_file],

-- 
To view, visit https://gerrit.wikimedia.org/r/289559
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacbe2db95b54c24dfb6a87bc4c35dd0db3cc0d8e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Allow selectively disabling tags - change (mediawiki...Kartographer)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow selectively disabling tags
..


Allow selectively disabling tags

Bug: T135188
Change-Id: I1355e5d8adfa12efe8d2f4ac3954dfb442c017c5
---
M extension.json
M includes/Hooks.php
2 files changed, 11 insertions(+), 5 deletions(-)

Approvals:
  Yurik: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index af336fd..ea00097 100644
--- a/extension.json
+++ b/extension.json
@@ -238,7 +238,7 @@
"KartographerIconServer": "https://maps.wikimedia.org";,
"KartographerFrameMode": "interactive",
"KartographerUseMarkerStyle": true,
-   "KartographerEnableMapFrame": true
+   "KartographerEnableTags": [ "mapframe", "maplink" ]
},
"TrackingCategories": [
"kartographer-tracking-category",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 965c87d..8343ee5 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -13,6 +13,10 @@
 use Parser;
 
 class Hooks {
+   static $tags = [
+   'mapframe' => 'Kartographer\Tag\MapFrame::entryPoint',
+   'maplink' => 'Kartographer\Tag\MapLink::entryPoint',
+   ];
 
/**
 * ParserFirstCallInit hook handler
@@ -21,12 +25,14 @@
 * @return bool
 */
public static function onParserFirstCallInit( Parser $parser ) {
-   global $wgKartographerEnableMapFrame;
+   global $wgKartographerEnableTags;
 
-   if ( $wgKartographerEnableMapFrame ) {
-   $parser->setHook( 'mapframe', 
'Kartographer\Tag\MapFrame::entryPoint' );
+   foreach ( $wgKartographerEnableTags as $tag ) {
+   if ( isset( self::$tags[$tag] ) ) {
+   $parser->setHook( $tag, self::$tags[$tag] );
+   }
}
-   $parser->setHook( 'maplink', 
'Kartographer\Tag\MapLink::entryPoint' );
+
return true;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289556
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1355e5d8adfa12efe8d2f4ac3954dfb442c017c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Yurik 
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 up the internal forms to use v3 post endpoint - change (mediawiki...parsoid)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix up the internal forms to use v3 post endpoint
..


Fix up the internal forms to use v3 post endpoint

Change-Id: I6ff61a406d7a08bd02942436f30b2ab5fbd5e7b9
---
M lib/api/routes.js
1 file changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/api/routes.js b/lib/api/routes.js
index 7e54b79..21291c9 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -220,24 +220,26 @@
// Form-based HTML DOM -> wikitext interface for manual testing.
routes.html2wtForm = function(req, res) {
var env = res.locals.env;
-   var action = '/' + res.locals.iwp + '/' + res.locals.pageName;
+   var domain = parsoidConfig.mwApiMap.get(res.locals.iwp).domain;
+   var action = '/' + domain + '/v3/transform/html/to/wikitext/' + 
res.locals.pageName;
if (req.query.hasOwnProperty('scrub_wikitext')) {
action += "?scrub_wikitext=" + req.query.scrub_wikitext;
}
-   apiUtils.renderResponse(res, env, "form", {
-   title: "Your HTML DOM:",
+   apiUtils.renderResponse(res, env, 'form', {
+   title: 'Your HTML DOM:',
action: action,
-   name: "html",
+   name: 'html',
});
};
 
// Form-based wikitext -> HTML DOM interface for manual testing
routes.wt2htmlForm = function(req, res) {
var env = res.locals.env;
+   var domain = parsoidConfig.mwApiMap.get(res.locals.iwp).domain;
apiUtils.renderResponse(res, env, 'form', {
title: 'Your wikitext:',
-   action: '/' + res.locals.iwp + '/' + 
res.locals.pageName,
-   name: 'wt',
+   action: '/' + domain + 
'/v3/transform/wikitext/to/html/' + res.locals.pageName,
+   name: 'wikitext',
});
};
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289449
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ff61a406d7a08bd02942436f30b2ab5fbd5e7b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] T135596: Return client error for missing data attributes - change (mediawiki...parsoid)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: T135596: Return client error for missing data attributes
..


T135596: Return client error for missing data attributes

Change-Id: I96789363c2cba655f9ed985a5d5733ab5290c11d
---
M HISTORY.md
M lib/html2wt/DOMHandlers.js
2 files changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  Mobrovac: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/HISTORY.md b/HISTORY.md
index 69fb018..4bc281d 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -4,6 +4,7 @@
 
   * T100681: Remove deprecated v1/v2 HTTP APIs
   * T130638: Add data-mw as a separate JSON blob in the pagebundle
+  * T135596: Return client error for missing data attributes
 
 0.4.1 / 2015-09-17
 ==
diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index 4cdc667..c93ab8f 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -1345,6 +1345,14 @@
return bullets;
 }
 
+function ClientError(message) {
+   Error.captureStackTrace(this, ClientError);
+   this.name = 'Bad Request';
+   this.message = message || 'Bad Request';
+   this.httpStatus = 400;
+}
+ClientError.prototype = Error.prototype;
+
 /**
  * Function returning `domHandler`s for nodes with encapsulated content.
  */
@@ -1364,13 +1372,13 @@
env.log("error", "data-mw missing in: " 
+ node.outerHTML);
p = Promise.resolve(dp.src);
} else {
-   throw new Error("Cannot serialize 
transclusion without data-mw.parts or data-parsoid.src.");
+   throw new ClientError("Cannot serialize 
transclusion without data-mw.parts or data-parsoid.src.");
}
} else if (/(?:^|\s)mw:Param(?=$|\s)/.test(typeOf)) {
if (dp.src !== undefined) {
p = Promise.resolve(dp.src);
} else {
-   throw new Error("No source for 
params.");
+   throw new ClientError("No source for 
params.");
}
} else if (/(?:^|\s)mw:Extension\//.test(typeOf)) {
if (!dataMw.name && dp.src === undefined) {
@@ -1395,7 +1403,7 @@
env.log('error', 'data-mw missing in: ' 
+ node.outerHTML);
p = Promise.resolve(dp.src);
} else {
-   throw new Error('Cannot serialize 
extension without data-mw.name or data-parsoid.src.');
+   throw new ClientError('Cannot serialize 
extension without data-mw.name or data-parsoid.src.');
}
} else {
throw new Error('Should never reach here');

-- 
To view, visit https://gerrit.wikimedia.org/r/289439
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I96789363c2cba655f9ed985a5d5733ab5290c11d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Revert "Revert "Add properties that will be logged with each... - change (mediawiki...Popups)

2016-05-18 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289557

Change subject: Revert "Revert "Add properties that will be logged with each EL 
request""
..

Revert "Revert "Add properties that will be logged with each EL request""

This reverts commit eff7dc95e625b8092eef219ac94bab63b6bd438f.

Change-Id: I15e7275ace149a9b95bdad85cd023b20357de95f
---
M Popups.hooks.php
M resources/ext.popups.renderer.article.js
M resources/ext.popups.renderer/desktopRenderer.js
M resources/ext.popups.schemaPopups.js
4 files changed, 58 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/57/289557/1

diff --git a/Popups.hooks.php b/Popups.hooks.php
index 2b9b4b4..97d0582 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -75,6 +75,7 @@
$schemaPopups += [
'dependencies' => [
'schema.Popups',
+   'mediawiki.user'
],
'scripts' => [
'resources/ext.popups.schemaPopups.js',
diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index 508df9c..5569f6e 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -149,6 +149,7 @@
 
mw.popups.render.cache[ href ].settings = {
title: page.title,
+   namespace: page.ns,
tall: ( tall === undefined ) ? false : tall,
thumbnail: ( thumbnail === undefined ) ? false : 
thumbnail
};
diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index 3f89daf..53f5ec9 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -188,7 +188,7 @@
// Event logging
mw.popups.logData = {
pageTitleHover: cache.settings.title,
-   pageTitleSource: mw.config.get( 'wgTitle' ),
+   namespaceIdHover: cache.settings.namespace,
popupEnabled: mw.popups.enabled,
time: mw.now()
};
diff --git a/resources/ext.popups.schemaPopups.js 
b/resources/ext.popups.schemaPopups.js
index 9deb2fb..60b0cff 100644
--- a/resources/ext.popups.schemaPopups.js
+++ b/resources/ext.popups.schemaPopups.js
@@ -1,15 +1,66 @@
 ( function ( $, mw ) {
+   var schemaPopups,
+   defaults;
+
/**
-* Log the popup event as defined in the schema
+* Return the sampling rate for the Schema:Popups
 *
-* https://meta.wikimedia.org/wiki/Schema:Popups
+* The sampling rate is always 0 if the browser doesn't support
+* `navigator.sendBeacon`.
+*
+* @return {number}
 */
-   var schemaPopups = new mw.eventLog.Schema(
+   function getSamplingRate() {
+   return $.isFunction( navigator.sendBeacon ) ?
+   mw.config.get( 'wgPopupsSchemaPopupsSamplingRate', 0 ) 
: 0;
+   }
+
+   /**
+* Return edit count bucket based on the number of edits
+*
+* @return {string}
+*/
+   function getEditCountBucket( editCount ) {
+   var bucket;
+
+   if ( editCount === 0 ) {
+   bucket = '0';
+   } else if ( editCount >= 1 && editCount <= 4 ) {
+   bucket = '1-4';
+   } else if ( editCount >= 5 && editCount <= 99 ) {
+   bucket = '5-99';
+   } else if ( editCount >= 100 && editCount <= 999 ) {
+   bucket = '100-999';
+   } else if ( editCount >= 1000 ) {
+   bucket = '1000+';
+   }
+
+   return bucket + ' edits';
+   }
+
+   // Data that will be logged with each EL request
+   defaults = {
+   pageTitleSource: mw.config.get( 'wgPageName' ),
+   namespaceIdSource: mw.config.get( 'wgNamespaceNumber' ),
+   pageIdSource: mw.config.get( 'wgArticleId' ),
+   isAnon: mw.user.isAnon()
+   };
+
+   // Include edit count bucket if the user is logged in.
+   if ( !mw.user.isAnon() ) {
+   defaults.editCountBucket = getEditCountBucket( mw.config.get( 
'wgUserEditCount' ) );
+   }
+
+   // Log the popup event as defined in the schema
+   // https://meta.wikimedia.org/wiki/Schema:Popups
+   schemaPopups = new mw.eventLog.Schema(
'Popups',
-   mw.config.get( 'wgPopupsSchemaPopupsSamplingRate', 0 )
+   getSamplingRate(

[MediaWiki-commits] [Gerrit] Allow selectively disabling tags - change (mediawiki...Kartographer)

2016-05-18 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289556

Change subject: Allow selectively disabling tags
..

Allow selectively disabling tags

Bug: T135188
Change-Id: I1355e5d8adfa12efe8d2f4ac3954dfb442c017c5
---
M extension.json
M includes/Hooks.php
2 files changed, 11 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/56/289556/1

diff --git a/extension.json b/extension.json
index af336fd..ea00097 100644
--- a/extension.json
+++ b/extension.json
@@ -238,7 +238,7 @@
"KartographerIconServer": "https://maps.wikimedia.org";,
"KartographerFrameMode": "interactive",
"KartographerUseMarkerStyle": true,
-   "KartographerEnableMapFrame": true
+   "KartographerEnableTags": [ "mapframe", "maplink" ]
},
"TrackingCategories": [
"kartographer-tracking-category",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 965c87d..8343ee5 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -13,6 +13,10 @@
 use Parser;
 
 class Hooks {
+   static $tags = [
+   'mapframe' => 'Kartographer\Tag\MapFrame::entryPoint',
+   'maplink' => 'Kartographer\Tag\MapLink::entryPoint',
+   ];
 
/**
 * ParserFirstCallInit hook handler
@@ -21,12 +25,14 @@
 * @return bool
 */
public static function onParserFirstCallInit( Parser $parser ) {
-   global $wgKartographerEnableMapFrame;
+   global $wgKartographerEnableTags;
 
-   if ( $wgKartographerEnableMapFrame ) {
-   $parser->setHook( 'mapframe', 
'Kartographer\Tag\MapFrame::entryPoint' );
+   foreach ( $wgKartographerEnableTags as $tag ) {
+   if ( isset( self::$tags[$tag] ) ) {
+   $parser->setHook( $tag, self::$tags[$tag] );
+   }
}
-   $parser->setHook( 'maplink', 
'Kartographer\Tag\MapLink::entryPoint' );
+
return true;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289556
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1355e5d8adfa12efe8d2f4ac3954dfb442c017c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Clear the queue when logging is done - change (mediawiki...SpamBlacklist)

2016-05-18 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289555

Change subject: Clear the queue when logging is done
..

Clear the queue when logging is done

Follows-up 5910bfd7ba.

* Remove one-off $domain variable.
* Rename $urlChanges to highlight that urlChanges is a log of changes,
  not a list of changes to be applied.
* Rename doEventLogging() to isLoggingEnabled().

Change-Id: Idbd6551502362422beea4d86b912128a43e9c96b
---
M SpamBlacklist_body.php
1 file changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamBlacklist 
refs/changes/55/289555/1

diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php
index 647a1fc..3c427e0 100644
--- a/SpamBlacklist_body.php
+++ b/SpamBlacklist_body.php
@@ -9,7 +9,7 @@
/**
 * @var array[]
 */
-   private $urlChanges = array();
+   private $urlChangeLog = array();
 
/**
 * Returns the code for the blacklist implementation
@@ -122,7 +122,7 @@
return $retVal;
}
 
-   private function doEventLogging() {
+   private function isLoggingEnabled() {
global $wgSpamBlacklistEventLogging;
return $wgSpamBlacklistEventLogging && class_exists( 
'EventLogging' );
}
@@ -135,7 +135,7 @@
 * @param string[] $addedLinks
 */
private function logUrlChanges( $oldLinks, $newLinks, $addedLinks ) {
-   if ( !$this->doEventLogging() ) {
+   if ( !$this->isLoggingEnabled() ) {
return;
}
 
@@ -157,7 +157,7 @@
 * @param Revision $rev
 */
public function doLogging( User $user, Title $title, Revision $rev ) {
-   if ( !$this->doEventLogging() ) {
+   if ( !$this->isLoggingEnabled() ) {
return;
}
 
@@ -168,7 +168,8 @@
'userId' => $user->getId(),
'userText' => $user->getName(),
);
-   $changes = $this->urlChanges;
+   $changes = $this->urlChangeLog;
+   $this->urlChangeLog = array();
 
DeferredUpdates::addCallableUpdate( function() use ( $changes, 
$baseInfo ) {
foreach ( $changes as $change ) {
@@ -182,24 +183,23 @@
}
 
/**
-* Generate events for each url addition or removal
+* Queue log data about change for a url addition or removal
 *
 * @param string $url
-* @param string $type 'insert' or 'remove'
+* @param string $action 'insert' or 'remove'
 */
-   private function logUrlChange( $url, $type ) {
+   private function logUrlChanges( $url, $action ) {
$parsed = wfParseUrl( $url );
-   $domain = $parsed['host'];
$info = array(
-   'action' => $type,
+   'action' => $action,
'protocol' => $parsed['scheme'],
-   'domain' => $domain,
+   'domain' => $parsed['host'],
'path' => $parsed['path'],
'query' => $parsed['query'],
'fragment' => $parsed['fragment'],
);
 
-   $this->urlChanges[] = $info;
+   $this->urlChangeLog[] = $info;
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/289555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbd6551502362422beea4d86b912128a43e9c96b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Use the passed EntityTermsView in view factory function - change (mediawiki...WikibaseMediaInfo)

2016-05-18 Thread Adrian Heine (Code Review)
Adrian Heine has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289554

Change subject: Use the passed EntityTermsView in view factory function
..

Use the passed EntityTermsView in view factory function

Change-Id: I6418e1f03a591b7dd0eb08fd46eba7890f9d
---
M WikibaseMediaInfo.entitytypes.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseMediaInfo 
refs/changes/54/289554/1

diff --git a/WikibaseMediaInfo.entitytypes.php 
b/WikibaseMediaInfo.entitytypes.php
index d8f04f8..a11a9f0 100644
--- a/WikibaseMediaInfo.entitytypes.php
+++ b/WikibaseMediaInfo.entitytypes.php
@@ -28,6 +28,7 @@
 use Wikibase\Repo\MediaWikiLanguageDirectionalityLookup;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\View\EditSectionGenerator;
+use Wikibase\View\EntityTermsView;
 use Wikibase\View\Template\TemplateFactory;
 
 return [
@@ -48,13 +49,14 @@
$languageCode,
LabelDescriptionLookup $labelDescriptionLookup,
LanguageFallbackChain $fallbackChain,
-   EditSectionGenerator $editSectionGenerator
+   EditSectionGenerator $editSectionGenerator,
+   EntityTermsView $entityTermsView
) {
$viewFactory = 
WikibaseRepo::getDefaultInstance()->getViewFactory();
 
return new MediaInfoView(
TemplateFactory::getDefaultInstance(),
-   $viewFactory->newEntityTermsView( 
$editSectionGenerator ),
+   $entityTermsView,
$viewFactory->newStatementSectionsView(
$languageCode,
$labelDescriptionLookup,

-- 
To view, visit https://gerrit.wikimedia.org/r/289554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6418e1f03a591b7dd0eb08fd46eba7890f9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: Adrian Heine 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WIP: Switch to Schema:Popups revid 15597282 - change (mediawiki...Popups)

2016-05-18 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289553

Change subject: WIP: Switch to Schema:Popups revid 15597282
..

WIP: Switch to Schema:Popups revid 15597282

Bug: T131315
Change-Id: I2ed18e00afb3e355327b417e68e5930b46d49086
---
M Popups.hooks.php
M extension.json
M resources/ext.popups.core.js
M resources/ext.popups.renderer.article.js
M resources/ext.popups.renderer/desktopRenderer.js
M resources/ext.popups.schemaPopups.js
M resources/ext.popups.targets/desktopTarget.js
7 files changed, 143 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/53/289553/1

diff --git a/Popups.hooks.php b/Popups.hooks.php
index 2b9b4b4..830221f 100644
--- a/Popups.hooks.php
+++ b/Popups.hooks.php
@@ -74,7 +74,9 @@
if ( class_exists( 'EventLogging' ) ) {
$schemaPopups += [
'dependencies' => [
+   'jquery.jStorage',
'schema.Popups',
+   'mediawiki.user'
],
'scripts' => [
'resources/ext.popups.schemaPopups.js',
diff --git a/extension.json b/extension.json
index 22767b8..6e3012d 100644
--- a/extension.json
+++ b/extension.json
@@ -80,6 +80,7 @@
"dependencies": [
"jquery.jStorage",
"jquery.client",
+   "mediawiki.Title",
"ext.popups.core",
"ext.popups.renderer.desktopRenderer"
],
diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 80900c3..2feed76 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -161,4 +161,13 @@
}
};
 
+   /**
+* Get a random token
+* 
+* @returns {string}
+*/
+   mw.popups.getRandomToken = function () {
+   return mw.user.generateRandomSessionId() + new 
Date().getTime().toString();
+   }
+
 } )( jQuery, mediaWiki );
diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index 508df9c..5569f6e 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -149,6 +149,7 @@
 
mw.popups.render.cache[ href ].settings = {
title: page.title,
+   namespace: page.ns,
tall: ( tall === undefined ) ? false : tall,
thumbnail: ( thumbnail === undefined ) ? false : 
thumbnail
};
diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index 3f89daf..53f5ec9 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -188,7 +188,7 @@
// Event logging
mw.popups.logData = {
pageTitleHover: cache.settings.title,
-   pageTitleSource: mw.config.get( 'wgTitle' ),
+   namespaceIdHover: cache.settings.namespace,
popupEnabled: mw.popups.enabled,
time: mw.now()
};
diff --git a/resources/ext.popups.schemaPopups.js 
b/resources/ext.popups.schemaPopups.js
index 9deb2fb..d8d02ce 100644
--- a/resources/ext.popups.schemaPopups.js
+++ b/resources/ext.popups.schemaPopups.js
@@ -1,15 +1,113 @@
 ( function ( $, mw ) {
+   var schemaPopups,
+   // data that will be logged with each EL request
+   defaults = {
+   pageTitleSource: mw.config.get( 'wgTitle' ),
+   namespaceIdSource: mw.config.get( 'wgNamespaceNumber' ),
+   pageIdSource: mw.config.get( 'wgArticleId' ),
+   isAnon: mw.user.isAnon(),
+   pageToken: mw.user.generateRandomSessionId() +
+   new Date().getTime().toString() + 
mw.user.generateRandomSessionId()
+   };
+
/**
-* Log the popup event as defined in the schema
+* Return the sampling rate for the Schema:Popups
 *
-* https://meta.wikimedia.org/wiki/Schema:Popups
+* The sampling rate is always 0 if the browser doesn't support
+* `navigator.sendBeacon`. In this case no events will be logged.
+* Whether the user is in sample will be memorized until the user
+* session ID changes, i.e. browser restart/cache clear.
+*
+* @return {number}
 */
-   var schemaPopups = new mw.eventLog.Schema(
+   function get

[MediaWiki-commits] [Gerrit] Build lego message for HTML email footer - change (mediawiki...Echo)

2016-05-18 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289552

Change subject: Build lego message for HTML email footer
..

Build lego message for HTML email footer

Change-Id: Ic750ff3eb4e97c0cd23dd39a998c60860a49cf45
---
M i18n/en.json
M i18n/qqq.json
M includes/formatters/EchoHtmlEmailFormatter.php
3 files changed, 19 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/52/289552/1

diff --git a/i18n/en.json b/i18n/en.json
index 16a99e2..d74a4ae 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -197,7 +197,8 @@
"echo-email-footer-default-html": "To control which emails we send you, 
check your 
preferences.\n$1",
"echo-email-footer-default": "$2\n\nTo control which emails we send 
you, check your 
preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1",
"echo-email-plain-footer": "To control which emails we send you, check 
your preferences:",
-   "echo-email-html-footer": "To control which emails we send you, check your 
preferences.\n$1",
+   "echo-email-html-footer-preference-link-text": "check your preferences",
+   "echo-email-html-footer-with-link": "To control which emails we send 
you, $1.",
"echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts 
($1)|100=Alerts (99+)}}",
"echo-notification-message": "{{PLURAL:$1|Message ($1)|Messages 
($1)|100=Messages (99+)}}",
"echo-notification-alert-text-only": "Alerts",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bb0233e..15037be 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -188,7 +188,8 @@
"echo-email-footer-default-html": "Default footer content for Echo html 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - the URL to the notification preference page\nFor 
plain-text version, see {{msg-mw|Echo-email-footer-default}}.",
"echo-email-footer-default": "Default footer content for Echo text 
e-mail notifications. Parameters:\n* $1 - the address of the organization that 
sent the email\n* $2 - \"---...\" 
({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see 
{{msg-mw|echo-email-footer-default-html}}.",
"echo-email-plain-footer": "Footer content for Echo text e-mail 
notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.",
-   "echo-email-html-footer": "Default footer content for Echo html e-mail 
notifications. Parameters:\n* $1 - the address of the organization that sent 
the email\n* $2 - the URL to the notification preference page\nFor plain-text 
version, see {{msg-mw|Echo-email-footer-default}}.",
+   "echo-email-html-footer-preference-link-text": "Text of link to the 
preference page in the footer of HTML emails.",
+   "echo-email-html-footer-with-link": "Footer content of the HTML 
email.\n* $1 - complete HTML link to the preference page.\n\nSee 
{{msg-mw:echo-email-html-footer-preference-link-text}} for the text of the 
link.",
"echo-notification-alert": "Label for alert notifications (= non 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread alerts. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}",
"echo-notification-message": "Label for message notifications (= 
discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number 
of unread messages. The number cannot be higher than 100.\nSee also:\n* 
{{msg-mw|Echo-notification-alert}}\n{{Identical|Message}}",
"echo-notification-alert-text-only": "Label for alert notifications (= 
non discussion notifications) tab in Echo overlay without alert notification 
count next to it\n{{Identical|Alert}}",
diff --git a/includes/formatters/EchoHtmlEmailFormatter.php 
b/includes/formatters/EchoHtmlEmailFormatter.php
index c97c217..21caefc 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -125,13 +125,24 @@
public function getFooter() {
global $wgEchoEmailFooterAddress;
 
-   $prefsUrl = SpecialPage::getTitleFor( 'Preferences', false, 
'mw-prefsection-echo' )
-   ->getFullURL( '', false, PROTO_CANONICAL );
+   $preferenceLink = $this->renderLink(
+   array(
+   'label' => $this->msg( 
'echo-email-html-footer-preference-link-text' )->text(),
+   'url' => SpecialPage::getTitleFor( 
'Preferences', false, 'mw-prefsection-echo' )->getFullURL( '', false, 
PROTO_CANONICAL ),
+   ),
+   'text-decoration: none; color: #3868B0;'
+   );
 
-   return $this->msg( 'echo-email-html-footer' )
-   ->params( $wgEchoEmailFooterAddress, $p

[MediaWiki-commits] [Gerrit] RecompressTracked: Remove useless member variable - change (mediawiki/core)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: RecompressTracked: Remove useless member variable
..


RecompressTracked: Remove useless member variable

It's only checked once and has no external users

Change-Id: I6951b799759f1d8b0063a3059bec5c1c64a35815
---
M maintenance/storage/recompressTracked.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Anomie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/storage/recompressTracked.php 
b/maintenance/storage/recompressTracked.php
index 2f414df..292a25d 100644
--- a/maintenance/storage/recompressTracked.php
+++ b/maintenance/storage/recompressTracked.php
@@ -59,7 +59,7 @@
public $reportingInterval = 10;
public $numProcs = 1;
public $numBatches = 0;
-   public $useDiff, $pageBlobClass, $orphanBlobClass;
+   public $pageBlobClass, $orphanBlobClass;
public $slavePipes, $slaveProcs, $prevSlaveId;
public $copyOnly = false;
public $isChild = false;
@@ -112,8 +112,8 @@
} elseif ( $this->slaveId !== false ) {
$GLOBALS['wgDebugLogPrefix'] = "RCT {$this->slaveId}: ";
}
-   $this->useDiff = function_exists( 'xdiff_string_bdiff' );
-   $this->pageBlobClass = $this->useDiff ? 'DiffHistoryBlob' : 
'ConcatenatedGzipHistoryBlob';
+   $this->pageBlobClass = function_exists( 'xdiff_string_bdiff' ) ?
+   'DiffHistoryBlob' : 'ConcatenatedGzipHistoryBlob';
$this->orphanBlobClass = 'ConcatenatedGzipHistoryBlob';
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289465
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6951b799759f1d8b0063a3059bec5c1c64a35815
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] labs nfs client instance refactor - change (operations/puppet)

2016-05-18 Thread Rush (Code Review)
Rush has submitted this change and it was merged.

Change subject: labs nfs client instance refactor
..


labs nfs client instance refactor

Change-Id: I426a0311b641901241f259241a6371f1ece92994
---
R modules/labstore/files/block-for-export
M modules/role/manifests/labs/instance.pp
A modules/role/manifests/labs/nfsclient.pp
3 files changed, 150 insertions(+), 158 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, but someone else must approve
  Rush: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/files/nfs/block-for-export 
b/modules/labstore/files/block-for-export
similarity index 95%
rename from files/nfs/block-for-export
rename to modules/labstore/files/block-for-export
index b9bd1ad..dd8c9e7 100644
--- a/files/nfs/block-for-export
+++ b/modules/labstore/files/block-for-export
@@ -21,6 +21,7 @@
 exit 1
 fi
 
+# query openstack metadata service
 ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 domain=`hostname -d | sed -r 's/.*\.([^.]+\.[^.]+)$/\1/'`
 for i in `seq 1 ${TIMEOUT}`; do
diff --git a/modules/role/manifests/labs/instance.pp 
b/modules/role/manifests/labs/instance.pp
index 8718204..088d193 100644
--- a/modules/role/manifests/labs/instance.pp
+++ b/modules/role/manifests/labs/instance.pp
@@ -32,150 +32,11 @@
 ensure => present,
 }
 
+# Allows per-host overriding of NFS mounts
+$mount_nfs = hiera('mount_nfs', true)
 # No NFS on labs metal for now.
-if $::virtual == 'kvm' {
-
-# This script will block until the NFS volume is available
-file { '/usr/local/sbin/block-for-export':
-ensure => present,
-owner  => root,
-mode   => '0555',
-source => 'puppet:///files/nfs/block-for-export',
-}
-
-if hiera('mount_nfs_hard_mode', true) {
-$mode = 'hard'
-} else {
-$mode = 'soft,timeo=10'
-}
-$nfs_opts = 
"vers=4,bg,${mode},intr,sec=sys,proto=tcp,port=0,noatime,lookupcache=none,nofsc"
-$nfs_server = 'labstore.svc.eqiad.wmnet'
-$dumps_server = 'labstore1003.eqiad.wmnet'
-
-# Allows per-host overriding of NFS mounts
-$mount_nfs = hiera('mount_nfs', true)
-
-# ideally this is only on NFS enabled hosts in the future
-diamond::collector { 'Nfsiostat':
-source  => 'puppet:///modules/diamond/collector/nfsiostat.py',
-require => Package['diamond'],
-}
-
-if mount_nfs_volume($::labsproject, 'home') and $mount_nfs {
-include labstore::traffic_shaping
-# Note that this is the same export as for /data/project
-exec { 'block-for-home-export':
-command => "/usr/local/sbin/block-for-export ${nfs_server} 
project/${::labsproject} 180",
-require => [File['/etc/modprobe.d/nfs-no-idmap.conf'], 
File['/usr/local/sbin/block-for-export']],
-unless  => '/bin/mountpoint -q /home',
-}
-
-mount { '/home':
-ensure  => mounted,
-atboot  => true,
-fstype  => 'nfs',
-options => "rw,${nfs_opts}",
-device  => "${nfs_server}:/project/${::labsproject}/home",
-require => [File['/etc/modprobe.d/nfs-no-idmap.conf'], 
Exec['block-for-home-export']],
-}
-}
-
-if mount_nfs_volume($::labsproject, 'project') or 
mount_nfs_volume($::labsproject, 'scratch') {
-include labstore::traffic_shaping
-# Directory for data mounts
-file { '/data':
-ensure => directory,
-owner  => 'root',
-group  => 'root',
-mode   => '0755',
-}
-}
-
-if mount_nfs_volume($::labsproject, 'project') and $mount_nfs {
-include labstore::traffic_shaping
-exec { 'block-for-project-export':
-command => "/usr/local/sbin/block-for-export ${nfs_server} 
project/${::labsproject} 180",
-require => [File['/etc/modprobe.d/nfs-no-idmap.conf'], 
File['/usr/local/sbin/block-for-export']],
-unless  => '/bin/mountpoint -q /data/project',
-}
-
-file { '/data/project':
-ensure  => directory,
-require => File['/data'],
-}
-
-mount { '/data/project':
-ensure  => mounted,
-atboot  => true,
-fstype  => 'nfs',
-options => "rw,${nfs_opts}",
-device  => "${nfs_server}:/project/${::labsproject}/project",
-require => [File['/data/project', 
'/etc/modprobe.d/nfs-no-idmap.conf'], Exec['block-for-project-export']],
-}
-}
-
-if mount_nfs_volume($::labsproject, 'scratch') and $mount_nfs {
-include labstore::tra

[MediaWiki-commits] [Gerrit] Remove poster attribute from elements - change (mediawiki...TimedMediaHandler)

2016-05-18 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289551

Change subject: Remove poster attribute from  elements
..

Remove poster attribute from  elements

HTML5  elements do not have poster attributes. This wasn't
really used and was creating a hidden image. It now creates a hidden
1pixel fallback image for MwEmbed and properly omits the poster
completely for video.js

Bug: T135603
Change-Id: I30e29dcdff4a71fc7a30795117848536d7747429
---
M TimedMediaTransformOutput.php
M tests/parserTests.txt
2 files changed, 8 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/51/289551/1

diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index 31008e4..19758f3 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -406,9 +406,6 @@
$width = $sizeOverride ? $sizeOverride[0] : 
$this->getPlayerWidth();
$height = $sizeOverride ? $sizeOverride[1]: 
$this->getPlayerHeight();
 
-   // The poster url:
-   $posterUrl = $this->getUrl( $sizeOverride );
-
if ( $this->fillwindow ) {
$width = '100%';
$height = '100%';
@@ -420,7 +417,7 @@
$mediaAttr = [
'id' => self::PLAYER_ID_PREFIX . 
TimedMediaTransformOutput::$serial++,
// Get the correct size:
-   'poster' => $posterUrl,
+   'poster' => $this->getUrl( $sizeOverride ),
 
// Note we set controls to true ( for no-js players ) 
when mwEmbed rewrites the interface
// it updates the controls attribute of the embed video
@@ -434,6 +431,11 @@
$mediaAttr['autoplay'] = 'true';
}
 
+   if ( !$this->isVideo ) {
+   // audio element doesn't have poster attribute
+   unset( $mediaAttr[ 'poster' ] );
+   }
+
if ( $wgTmhWebPlayer === 'videojs' ) {
$mediaAttr['class'] = 'video-js ' . $wgVideoPlayerSkin;
$mediaAttr['width'] = intval( $width );
@@ -441,7 +443,6 @@
$mediaAttr['height'] = intval( $height );
} else {
unset( $mediaAttr['height'] );
-   unset( $mediaAttr['poster'] );
}
 
if ( $this->disablecontrols ) {
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index c374316..a292c6d 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -102,9 +102,9 @@
 !! wikitext
 [[File:Audio.oga]]
 !! html
-http://example.com/images/4/41/Audio.oga"; type="audio/ogg; 
codecs="vorbis"" data-title="Original Ogg file (41 kbps)" 
data-shorttitle="Ogg source" data-width="0" data-height="0" 
data-bandwidth="41107"/>
+http://example.com/images/4/41/Audio.oga"; 
type="audio/ogg; codecs="vorbis"" data-title="Original Ogg file (41 
kbps)" data-shorttitle="Ogg source" data-width="0" data-height="0" 
data-bandwidth="41107"/>
 
 !! html+tidy
-
+
 http://example.com/images/4/41/Audio.oga"; type="audio/ogg; 
codecs="vorbis"" data-title="Original Ogg file (41 kbps)" 
data-shorttitle="Ogg source" data-width="0" data-height="0" 
data-bandwidth="41107" />
 !!end

-- 
To view, visit https://gerrit.wikimedia.org/r/289551
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30e29dcdff4a71fc7a30795117848536d7747429
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Bump src to 67816adf for deploy. - change (mediawiki...deploy)

2016-05-18 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289550

Change subject: Bump src to 67816adf for deploy.
..

Bump src to 67816adf for deploy.

Change-Id: If030b47cc2ca7268c18e06cc7ad31ff95e348e03
---
M src
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/50/289550/1

diff --git a/src b/src
index b692ba9..67816ad 16
--- a/src
+++ b/src
-Subproject commit b692ba97df11a20978c155e2316578aac2ac973d
+Subproject commit 67816adfb2528e5ff45c7a27e9500e7bd7da0f96

-- 
To view, visit https://gerrit.wikimedia.org/r/289550
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If030b47cc2ca7268c18e06cc7ad31ff95e348e03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Cscott 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improve unstyled updatedmarker - change (mediawiki/core)

2016-05-18 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289549

Change subject: Improve unstyled updatedmarker
..

Improve unstyled updatedmarker

This is the "changed since your last visit" marker that you'll
see on ?action=history for a page on your watchlist, marking
edits that were made since you last viewed the page.
updatedmarker is styled by some skins, but not all of them.
Updating CSS selector and involved colors to address some of the concerns
and improving consistency.

Bug: T134515
Change-Id: Ib21ee453f0fa71fc8f516db1fec71096d962d194
---
M resources/src/mediawiki.legacy/oldshared.css
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/289549/1

diff --git a/resources/src/mediawiki.legacy/oldshared.css 
b/resources/src/mediawiki.legacy/oldshared.css
index 9adfba1..a599a46 100644
--- a/resources/src/mediawiki.legacy/oldshared.css
+++ b/resources/src/mediawiki.legacy/oldshared.css
@@ -293,9 +293,8 @@
color: red;
 }
 
-span.updatedmarker {
-   color: black;
-   background-color: #00FF00;
+.updatedmarker {
+   background-color: #b7f430;
 }
 
 div.gallerybox {

-- 
To view, visit https://gerrit.wikimedia.org/r/289549
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib21ee453f0fa71fc8f516db1fec71096d962d194
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Don't use deprecated User::checkPassword() in TestUser - change (mediawiki/core)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't use deprecated User::checkPassword() in TestUser
..


Don't use deprecated User::checkPassword() in TestUser

I423f09f added this call in an attempt to speed things up. However,
User::checkPassword() was deprecated in I2c736ad7, and the call causes
some tests to fail when $wgDisableAuthManager is false.

Since this is trying to determine whether the user_password column in
the user table needs updating for the unit test, let's test that
directly instead of the much-more-complicated User::checkPassword().

Change-Id: I410de706f9074edea3f3988769a3e99231d8dca3
---
M tests/phpunit/includes/TestUser.php
1 file changed, 18 insertions(+), 9 deletions(-)

Approvals:
  Chad: Looks good to me, but someone else must approve
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/includes/TestUser.php 
b/tests/phpunit/includes/TestUser.php
index 13bfa46..247b6e4 100644
--- a/tests/phpunit/includes/TestUser.php
+++ b/tests/phpunit/includes/TestUser.php
@@ -129,19 +129,28 @@
throw new MWException( "Passed User has not been added 
to the database yet!" );
}
 
-   if ( $user->checkPassword( $password ) === true ) {
-   return;  // Nothing to do.
+   $dbw = wfGetDB( DB_MASTER );
+   $row = $dbw->selectRow(
+   'user',
+   [ 'user_password' ],
+   [ 'user_id' => $user->getId() ],
+   __METHOD__
+   );
+   if ( !$row ) {
+   throw new MWException( "Passed User has an ID but is 
not in the database?" );
}
 
$passwordFactory = new PasswordFactory();
$passwordFactory->init( RequestContext::getMain()->getConfig() 
);
-   $passwordHash = $passwordFactory->newFromPlaintext( $password );
-   wfGetDB( DB_MASTER )->update(
-   'user',
-   [ 'user_password' => $passwordHash->toString() ],
-   [ 'user_id' => $user->getId() ],
-   __METHOD__
-   );
+   if ( !$passwordFactory->newFromCiphertext( $row->user_password 
)->equals( $password ) ) {
+   $passwordHash = $passwordFactory->newFromPlaintext( 
$password );
+   $dbw->update(
+   'user',
+   [ 'user_password' => $passwordHash->toString() 
],
+   [ 'user_id' => $user->getId() ],
+   __METHOD__
+   );
+   }
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/289453
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I410de706f9074edea3f3988769a3e99231d8dca3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gergő Tisza 
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 order if univ lang selector and "not logged in" message - change (mediawiki...MonoBook)

2016-05-18 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289548

Change subject: Fix order if univ lang selector and "not logged in" message
..

Fix order if univ lang selector and "not logged in" message

Bug: T121793
Change-Id: Ia6406fe535916684c998225f052f7e8b2231cbe1
---
M MonoBookTemplate.php
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MonoBook 
refs/changes/48/289548/1

diff --git a/MonoBookTemplate.php b/MonoBookTemplate.php
index c4ff806..7f496a0 100644
--- a/MonoBookTemplate.php
+++ b/MonoBookTemplate.php
@@ -120,6 +120,14 @@

html( 
'userlangattributes' ) ?>>
getPersonalTools();
+
+   if ( array_key_exists( 'uls', 
$personalTools ) ) {
+   echo 
$this->makeListItem( 'uls', $personalTools[ 'uls' ] );
+   unset( $personalTools[ 
'uls' ] );
+   }
+
if ( 
!$this->getSkin()->getUser()->isLoggedIn() &&

User::groupHasPermission( '*', 'edit' ) ) {
 
@@ -129,7 +137,7 @@
 
}
 
-   foreach ( 
$this->getPersonalTools() as $key => $item ) { ?>
+   foreach ( $personalTools as 
$key => $item ) { ?>
makeListItem( $key, $item ); ?>
 
https://gerrit.wikimedia.org/r/289548
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6406fe535916684c998225f052f7e8b2231cbe1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MonoBook
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [WIP] Convert Special:NewFiles to use OOUI. - change (mediawiki/core)

2016-05-18 Thread Sethakill (Code Review)
Sethakill has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289547

Change subject: [WIP] Convert Special:NewFiles to use OOUI.
..

[WIP] Convert Special:NewFiles to use OOUI.

Other changes:
* moved form from pager
* added FormOptions
* added support for filtering by username

Bug: T121865, T135680
Change-Id: I1d9c0a761fd3d71fe58c2621c9766c2c6dd39dcb
---
M includes/specials/SpecialNewimages.php
M includes/specials/pagers/NewFilesPager.php
2 files changed, 97 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/289547/1

diff --git a/includes/specials/SpecialNewimages.php 
b/includes/specials/SpecialNewimages.php
index 14391d2..05651cf 100644
--- a/includes/specials/SpecialNewimages.php
+++ b/includes/specials/SpecialNewimages.php
@@ -33,14 +33,30 @@
$out = $this->getOutput();
$this->addHelpLink( 'Help:New images' );
 
-   $pager = new NewFilesPager( $this->getContext(), $par );
+   $opts = new FormOptions();
+
+   $opts->add( 'like', '' );
+   $opts->add( 'username', '' );
+   $opts->add( 'showbots', false );
+   $opts->add( 'hidepatrolled', false );
+   $opts->add( 'limit', 50 );
+   $opts->add( 'offset', 0 );
+
+   $opts->fetchValuesFromRequest( $this->getRequest() );
+
+   if ( $par !== null ) {
+   $opts->setValue( is_numeric( $par ) ? 'limit' : 'like', 
$par );
+   }
+
+   $opts->validateIntBounds( 'limit', 0, 500 );
+
+   $this->opts = $opts;
 
if ( !$this->including() ) {
-   $this->setTopText();
-   $form = $pager->getForm();
-   $form->prepareForm();
-   $form->displayForm( '' );
+   $this->buildForm();
}
+
+   $pager = new NewFilesPager( $this->getContext(), $opts );
 
$out->addHTML( $pager->getBody() );
if ( !$this->including() ) {
@@ -48,6 +64,49 @@
}
}
 
+   protected function buildForm() {
+   $formDescriptor = [
+   'like' => [
+   'type' => 'text',
+   'label-message' => 'newimages-label',
+   'name' => 'like',
+   ],
+
+   'username' => [
+   'type' => 'user',
+   'label-message' => 'username',
+   'name' => 'username',
+   ],
+
+   'showbots' => [
+   'type' => 'check',
+   'label-message' => 'newimages-showbots',
+   'name' => 'showbots',
+   ],
+
+   'hidepatrolled' => [
+   'type' => 'check',
+   'label-message' => 'newimages-hidepatrolled',
+   'name' => 'hidepatrolled',
+   ],
+   ];
+
+   if ( $this->getConfig()->get( 'MiserMode' ) ) {
+   unset( $formDescriptor['like'] );
+   }
+
+   if ( !$this->getUser()->useFilePatrol() ) {
+   unset( $formDescriptor['hidepatrolled'] );
+   }
+
+   $form = HTMLForm::factory( 'ooui', $formDescriptor, 
$this->getContext() )
+   ->setWrapperLegendMsg( 'newimages-legend' )
+   ->setSubmitTextMsg( 'ilsubmit' )
+   ->setMethod( 'get' )
+   ->prepareForm()
+   ->displayForm( false );
+   }
+
protected function getGroupName() {
return 'changes';
}
diff --git a/includes/specials/pagers/NewFilesPager.php 
b/includes/specials/pagers/NewFilesPager.php
index ae57736..a10d8d5 100644
--- a/includes/specials/pagers/NewFilesPager.php
+++ b/includes/specials/pagers/NewFilesPager.php
@@ -30,33 +30,30 @@
protected $gallery;
 
/**
-* @var bool
+* @var FormOptions
 */
-   protected $showBots;
+   protected $opts;
 
/**
-* @var bool
+* @param IContextSource $context
+* @param FormOptions $opts
 */
-   protected $hidePatrolled;
+   function __construct( IContextSource $context, FormOptions $opts ) {
+   $this->opts = $opts;
 
-   function __construct( IContextSource $context, $par = null ) {
-   $this->like = $context->getRequest()->getText( 'like' );
-   $this->showBots = $context->getRequest()->getBool( 'showbots', 
0 );
-   $this->

[MediaWiki-commits] [Gerrit] Avoid 'insert ignore' warning with no-op - change (wikimedia...DjangoBannerStats)

2016-05-18 Thread Cdentinger (Code Review)
Cdentinger has submitted this change and it was merged.

Change subject: Avoid 'insert ignore' warning with no-op
..


Avoid 'insert ignore' warning with no-op

INSERT IGNORE throws warnings, which python bubbles up and we show
in the logs.  ON DUPLICATE KEY UPDATE a=a acts the same, but doesn't
warn on repeats.

Change-Id: I77d7b04f9862a7963a86dc49022ca4b319104b1c
---
M fundraiser/analytics/management/commands/LoadLPImpressions.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Cdentinger: Verified; Looks good to me, approved



diff --git a/fundraiser/analytics/management/commands/LoadLPImpressions.py 
b/fundraiser/analytics/management/commands/LoadLPImpressions.py
index 15f22c0..fcb32eb 100644
--- a/fundraiser/analytics/management/commands/LoadLPImpressions.py
+++ b/fundraiser/analytics/management/commands/LoadLPImpressions.py
@@ -54,7 +54,8 @@
 help = 'Parses the specified squid log file and stores the impression in 
the database.'
 
 impression_sql = "INSERT INTO `landingpageimpression_raw%s` (timestamp, 
squid_id, squid_sequence, utm_source, utm_campaign, utm_key, utm_medium, 
landingpage, project_id, language_id, country_id) VALUES %s"
-unique_sql = "INSERT IGNORE INTO `donatewiki_unique` (timestamp, 
utm_source, utm_campaign, contact_id, link_id) VALUES %s"
+# Using ON DUPLICATE KEY UPDATE with a deliberate no-op rather than INSERT 
IGNORE, as the latter raises warnings
+unique_sql = "INSERT INTO `donatewiki_unique` (timestamp, utm_source, 
utm_campaign, contact_id, link_id) VALUES %s ON DUPLICATE KEY UPDATE 
link_id=link_id"
 
 pending_impressions = []
 pending_uniques = []

-- 
To view, visit https://gerrit.wikimedia.org/r/289499
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I77d7b04f9862a7963a86dc49022ca4b319104b1c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Gather] Undeployed from WMF cluster - change (translatewiki)

2016-05-18 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289546

Change subject: [Gather] Undeployed from WMF cluster
..

[Gather] Undeployed from WMF cluster

https://git.wikimedia.org/commitdiff/operations%2Fmediawiki-config/1acaecc59adb325ae333743f64cb88f5e7d4170e

Change-Id: Ia1ec05b655d1a8587b01e598f598766fa6d6cdc8
---
M groups/MediaWiki/WikimediaAgg.yaml
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/46/289546/1

diff --git a/groups/MediaWiki/WikimediaAgg.yaml 
b/groups/MediaWiki/WikimediaAgg.yaml
index 521620e..f82daf0 100644
--- a/groups/MediaWiki/WikimediaAgg.yaml
+++ b/groups/MediaWiki/WikimediaAgg.yaml
@@ -48,7 +48,6 @@
   - ext-flow # 2013-12-11: testwiki, test2wiki and mediawikiwiki
   - ext-fundraiserlandingpage # r101409 for donatewiki
   - ext-fundraisingtranslateworkflow # 2014-07-14 for Meta
-  - ext-gather
   - ext-geocrumbs # Change id bc3616c74aab74b74f78bbb2ce3241e5a564b4f9 for 
Wikivoyage
   - ext-geodata
   - ext-gettingstarted # Change-Id: d1aac2d3dc774299c3e61ef8e163b50dfd89d313 
for a bunch of wikis

-- 
To view, visit https://gerrit.wikimedia.org/r/289546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1ec05b655d1a8587b01e598f598766fa6d6cdc8
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] [Gather] Undeployed from WMF cluster - change (translatewiki)

2016-05-18 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Gather] Undeployed from WMF cluster
..


[Gather] Undeployed from WMF cluster

https://git.wikimedia.org/commitdiff/operations%2Fmediawiki-config/1acaecc59adb325ae333743f64cb88f5e7d4170e

Change-Id: Ia1ec05b655d1a8587b01e598f598766fa6d6cdc8
---
M groups/MediaWiki/WikimediaAgg.yaml
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/WikimediaAgg.yaml 
b/groups/MediaWiki/WikimediaAgg.yaml
index 521620e..f82daf0 100644
--- a/groups/MediaWiki/WikimediaAgg.yaml
+++ b/groups/MediaWiki/WikimediaAgg.yaml
@@ -48,7 +48,6 @@
   - ext-flow # 2013-12-11: testwiki, test2wiki and mediawikiwiki
   - ext-fundraiserlandingpage # r101409 for donatewiki
   - ext-fundraisingtranslateworkflow # 2014-07-14 for Meta
-  - ext-gather
   - ext-geocrumbs # Change id bc3616c74aab74b74f78bbb2ce3241e5a564b4f9 for 
Wikivoyage
   - ext-geodata
   - ext-gettingstarted # Change-Id: d1aac2d3dc774299c3e61ef8e163b50dfd89d313 
for a bunch of wikis

-- 
To view, visit https://gerrit.wikimedia.org/r/289546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1ec05b655d1a8587b01e598f598766fa6d6cdc8
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] group1 to 1.28.0-wmf.2 - change (operations/mediawiki-config)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: group1 to 1.28.0-wmf.2
..


group1 to 1.28.0-wmf.2

Bug: T134450

Change-Id: Ibd56ebc3575f7dc396d5b6fe9b1dfaa4a093f0c5
---
M php
M wikiversions.json
2 files changed, 595 insertions(+), 595 deletions(-)

Approvals:
  20after4: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/php b/php
index 6acd9fa..1da8b33 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.28.0-wmf.1
\ No newline at end of file
+php-1.28.0-wmf.2
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index a20aae1..6ca937b 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.1",
-"aawikibooks": "php-1.28.0-wmf.1",
-"aawiktionary": "php-1.28.0-wmf.1",
+"aawikibooks": "php-1.28.0-wmf.2",
+"aawiktionary": "php-1.28.0-wmf.2",
 "abwiki": "php-1.28.0-wmf.1",
-"abwiktionary": "php-1.28.0-wmf.1",
+"abwiktionary": "php-1.28.0-wmf.2",
 "acewiki": "php-1.28.0-wmf.1",
-"advisorywiki": "php-1.28.0-wmf.1",
+"advisorywiki": "php-1.28.0-wmf.2",
 "adywiki": "php-1.28.0-wmf.1",
 "afwiki": "php-1.28.0-wmf.1",
-"afwikibooks": "php-1.28.0-wmf.1",
-"afwikiquote": "php-1.28.0-wmf.1",
-"afwiktionary": "php-1.28.0-wmf.1",
+"afwikibooks": "php-1.28.0-wmf.2",
+"afwikiquote": "php-1.28.0-wmf.2",
+"afwiktionary": "php-1.28.0-wmf.2",
 "akwiki": "php-1.28.0-wmf.1",
-"akwikibooks": "php-1.28.0-wmf.1",
-"akwiktionary": "php-1.28.0-wmf.1",
+"akwikibooks": "php-1.28.0-wmf.2",
+"akwiktionary": "php-1.28.0-wmf.2",
 "alswiki": "php-1.28.0-wmf.1",
-"alswikibooks": "php-1.28.0-wmf.1",
-"alswikiquote": "php-1.28.0-wmf.1",
-"alswiktionary": "php-1.28.0-wmf.1",
+"alswikibooks": "php-1.28.0-wmf.2",
+"alswikiquote": "php-1.28.0-wmf.2",
+"alswiktionary": "php-1.28.0-wmf.2",
 "amwiki": "php-1.28.0-wmf.1",
-"amwikiquote": "php-1.28.0-wmf.1",
-"amwiktionary": "php-1.28.0-wmf.1",
+"amwikiquote": "php-1.28.0-wmf.2",
+"amwiktionary": "php-1.28.0-wmf.2",
 "angwiki": "php-1.28.0-wmf.1",
-"angwikibooks": "php-1.28.0-wmf.1",
-"angwikiquote": "php-1.28.0-wmf.1",
-"angwikisource": "php-1.28.0-wmf.1",
-"angwiktionary": "php-1.28.0-wmf.1",
+"angwikibooks": "php-1.28.0-wmf.2",
+"angwikiquote": "php-1.28.0-wmf.2",
+"angwikisource": "php-1.28.0-wmf.2",
+"angwiktionary": "php-1.28.0-wmf.2",
 "anwiki": "php-1.28.0-wmf.1",
-"anwiktionary": "php-1.28.0-wmf.1",
+"anwiktionary": "php-1.28.0-wmf.2",
 "arbcom_dewiki": "php-1.28.0-wmf.1",
 "arbcom_enwiki": "php-1.28.0-wmf.1",
 "arbcom_fiwiki": "php-1.28.0-wmf.1",
 "arbcom_nlwiki": "php-1.28.0-wmf.1",
 "arcwiki": "php-1.28.0-wmf.1",
 "arwiki": "php-1.28.0-wmf.1",
-"arwikibooks": "php-1.28.0-wmf.1",
-"arwikimedia": "php-1.28.0-wmf.1",
-"arwikinews": "php-1.28.0-wmf.1",
-"arwikiquote": "php-1.28.0-wmf.1",
-"arwikisource": "php-1.28.0-wmf.1",
-"arwikiversity": "php-1.28.0-wmf.1",
-"arwiktionary": "php-1.28.0-wmf.1",
+"arwikibooks": "php-1.28.0-wmf.2",
+"arwikimedia": "php-1.28.0-wmf.2",
+"arwikinews": "php-1.28.0-wmf.2",
+"arwikiquote": "php-1.28.0-wmf.2",
+"arwikisource": "php-1.28.0-wmf.2",
+"arwikiversity": "php-1.28.0-wmf.2",
+"arwiktionary": "php-1.28.0-wmf.2",
 "arzwiki": "php-1.28.0-wmf.1",
 "astwiki": "php-1.28.0-wmf.1",
-"astwikibooks": "php-1.28.0-wmf.1",
-"astwikiquote": "php-1.28.0-wmf.1",
-"astwiktionary": "php-1.28.0-wmf.1",
+"astwikibooks": "php-1.28.0-wmf.2",
+"astwikiquote": "php-1.28.0-wmf.2",
+"astwiktionary": "php-1.28.0-wmf.2",
 "aswiki": "php-1.28.0-wmf.1",
-"aswikibooks": "php-1.28.0-wmf.1",
-"aswikisource": "php-1.28.0-wmf.1",
-"aswiktionary": "php-1.28.0-wmf.1",
-"auditcomwiki": "php-1.28.0-wmf.1",
+"aswikibooks": "php-1.28.0-wmf.2",
+"aswikisource": "php-1.28.0-wmf.2",
+"aswiktionary": "php-1.28.0-wmf.2",
+"auditcomwiki": "php-1.28.0-wmf.2",
 "avwiki": "php-1.28.0-wmf.1",
-"avwiktionary": "php-1.28.0-wmf.1",
+"avwiktionary": "php-1.28.0-wmf.2",
 "aywiki": "php-1.28.0-wmf.1",
-"aywikibooks": "php-1.28.0-wmf.1",
-"aywiktionary": "php-1.28.0-wmf.1",
+"aywikibooks": "php-1.28.0-wmf.2",
+"aywiktionary": "php-1.28.0-wmf.2",
 "azbwiki": "php-1.28.0-wmf.1",
 "azwiki": "php-1.28.0-wmf.1",
-"azwikibooks": "php-1.28.0-wmf.1",
-"azwikiquote": "php-1.28.0-wmf.1",
-"azwikisource": "php-1.28.0-wmf.1",
-"azwiktionary": "php-1.28.0-wmf.1",
+"azwikibooks": "php-1.28.0-wmf.2",
+"azwikiquote": "php-1.28.0-wmf.2",
+"azwikisource": "php-1.28.0-wmf.2",
+"azwiktionary": "php-1.28.0-wmf.2",
 "barwiki": "php-1.28.0-wmf.1",
 "bat_smgwiki": "php-1.28.0-wmf.1",
 "bawiki": "php-1.28.0-wmf.1",
-"bawikibooks": "php-1.28.0-wm

[MediaWiki-commits] [Gerrit] Fix order if univ lang selector and "not logged in" message - change (mediawiki...Vector)

2016-05-18 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289545

Change subject: Fix order if univ lang selector and "not logged in" message
..

Fix order if univ lang selector and "not logged in" message

Bug: T121793
Change-Id: I1a42443dab0dd064c35f858ece69e6d9cdb398a1
---
M VectorTemplate.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/45/289545/1

diff --git a/VectorTemplate.php b/VectorTemplate.php
index 7a02b36..5b27141 100644
--- a/VectorTemplate.php
+++ b/VectorTemplate.php
@@ -513,17 +513,26 @@
 
}
 
+   $personalTools = 
$this->getPersonalTools();
+
+   $langSelector = '';
+   if ( array_key_exists( 
'uls', $personalTools ) ) {
+   $langSelector = 
$this->makeListItem( 'uls', $personalTools[ 'uls' ] );
+   unset( 
$personalTools[ 'uls' ] );
+   }
+
if ( !$this->data[ 
'rtl' ] ) {
+   echo 
$langSelector;
echo 
$notLoggedIn;
}
 
-   $personalTools = 
$this->getPersonalTools();
foreach ( 
$personalTools as $key => $item ) {
echo 
$this->makeListItem( $key, $item );
}
 
if ( $this->data[ 'rtl' 
] ) {
echo 
$notLoggedIn;
+   echo 
$langSelector;
}
?>


-- 
To view, visit https://gerrit.wikimedia.org/r/289545
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a42443dab0dd064c35f858ece69e6d9cdb398a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Remap store indexes when modifying items during #sanitize - change (VisualEditor/VisualEditor)

2016-05-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289544

Change subject: Remap store indexes when modifying items during #sanitize
..

Remap store indexes when modifying items during #sanitize

Change-Id: I40a3e705703909014567a7280501f6a9840eb5b1
---
M src/dm/lineardata/ve.dm.ElementLinearData.js
M tests/dm/lineardata/ve.dm.ElementLinearData.test.js
2 files changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/44/289544/1

diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js 
b/src/dm/lineardata/ve.dm.ElementLinearData.js
index 6ac9362..24d811e 100644
--- a/src/dm/lineardata/ve.dm.ElementLinearData.js
+++ b/src/dm/lineardata/ve.dm.ElementLinearData.js
@@ -1024,17 +1024,25 @@
  * @param {boolean} [keepEmptyContentBranches=false] Preserve empty content 
branch nodes
  */
 ve.dm.ElementLinearData.prototype.sanitize = function ( rules, 
keepEmptyContentBranches ) {
-   var i, len, annotations, emptySet, setToRemove, type, 
canContainContent, contentElement, isOpen, nodeClass,
+   var i, len, annotations, emptySet, setToRemove, type,
+   canContainContent, contentElement, isOpen, nodeClass, oldIndex, 
newIndex,
+   storeMapping = {},
+   store = this.getStore(),
allAnnotations = this.getAnnotationsFromRange( new ve.Range( 0, 
this.getLength() ), true );
 
if ( rules.plainText ) {
-   emptySet = new ve.dm.AnnotationSet( this.getStore() );
+   emptySet = new ve.dm.AnnotationSet( store );
} else {
if ( rules.removeOriginalDomElements ) {
// Remove originalDomElements from annotations
for ( i = 0, len = allAnnotations.getLength(); i < len; 
i++ ) {
+   oldIndex = allAnnotations.storeIndexes[ i ];
delete allAnnotations.get( i 
).element.originalDomElements;
+   newIndex = store.index( allAnnotations.get( i ) 
);
+   storeMapping[ oldIndex ] = newIndex;
+   allAnnotations.storeIndexes[ i ] = newIndex;
}
+   this.remapStoreIndexes( storeMapping );
}
 
// Create annotation set to remove from blacklist
diff --git a/tests/dm/lineardata/ve.dm.ElementLinearData.test.js 
b/tests/dm/lineardata/ve.dm.ElementLinearData.test.js
index 19803f9..d32c912 100644
--- a/tests/dm/lineardata/ve.dm.ElementLinearData.test.js
+++ b/tests/dm/lineardata/ve.dm.ElementLinearData.test.js
@@ -1544,12 +1544,12 @@
html: 'Foo',
data: [
{ type: 'paragraph' },
-   'F', [ 'o', [ 0 ] ], 'o',
+   'F', [ 'o', [ 1 ] ], 'o',
{ type: '/paragraph' },
{ type: 'internalList' },
{ type: '/internalList' }
],
-   store: [ bold ],
+   store: [ bold, bold ],
rules: { removeOriginalDomElements: true },
msg: 'Original DOM elements removed'
},

-- 
To view, visit https://gerrit.wikimedia.org/r/289544
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40a3e705703909014567a7280501f6a9840eb5b1
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] group1 to 1.28.0-wmf.2 - change (operations/mediawiki-config)

2016-05-18 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289543

Change subject: group1 to 1.28.0-wmf.2
..

group1 to 1.28.0-wmf.2

Change-Id: Ibd56ebc3575f7dc396d5b6fe9b1dfaa4a093f0c5
---
M php
M wikiversions.json
2 files changed, 595 insertions(+), 595 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/43/289543/1

diff --git a/php b/php
index 6acd9fa..1da8b33 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.28.0-wmf.1
\ No newline at end of file
+php-1.28.0-wmf.2
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index a20aae1..6ca937b 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,898 +1,898 @@
 {
 "aawiki": "php-1.28.0-wmf.1",
-"aawikibooks": "php-1.28.0-wmf.1",
-"aawiktionary": "php-1.28.0-wmf.1",
+"aawikibooks": "php-1.28.0-wmf.2",
+"aawiktionary": "php-1.28.0-wmf.2",
 "abwiki": "php-1.28.0-wmf.1",
-"abwiktionary": "php-1.28.0-wmf.1",
+"abwiktionary": "php-1.28.0-wmf.2",
 "acewiki": "php-1.28.0-wmf.1",
-"advisorywiki": "php-1.28.0-wmf.1",
+"advisorywiki": "php-1.28.0-wmf.2",
 "adywiki": "php-1.28.0-wmf.1",
 "afwiki": "php-1.28.0-wmf.1",
-"afwikibooks": "php-1.28.0-wmf.1",
-"afwikiquote": "php-1.28.0-wmf.1",
-"afwiktionary": "php-1.28.0-wmf.1",
+"afwikibooks": "php-1.28.0-wmf.2",
+"afwikiquote": "php-1.28.0-wmf.2",
+"afwiktionary": "php-1.28.0-wmf.2",
 "akwiki": "php-1.28.0-wmf.1",
-"akwikibooks": "php-1.28.0-wmf.1",
-"akwiktionary": "php-1.28.0-wmf.1",
+"akwikibooks": "php-1.28.0-wmf.2",
+"akwiktionary": "php-1.28.0-wmf.2",
 "alswiki": "php-1.28.0-wmf.1",
-"alswikibooks": "php-1.28.0-wmf.1",
-"alswikiquote": "php-1.28.0-wmf.1",
-"alswiktionary": "php-1.28.0-wmf.1",
+"alswikibooks": "php-1.28.0-wmf.2",
+"alswikiquote": "php-1.28.0-wmf.2",
+"alswiktionary": "php-1.28.0-wmf.2",
 "amwiki": "php-1.28.0-wmf.1",
-"amwikiquote": "php-1.28.0-wmf.1",
-"amwiktionary": "php-1.28.0-wmf.1",
+"amwikiquote": "php-1.28.0-wmf.2",
+"amwiktionary": "php-1.28.0-wmf.2",
 "angwiki": "php-1.28.0-wmf.1",
-"angwikibooks": "php-1.28.0-wmf.1",
-"angwikiquote": "php-1.28.0-wmf.1",
-"angwikisource": "php-1.28.0-wmf.1",
-"angwiktionary": "php-1.28.0-wmf.1",
+"angwikibooks": "php-1.28.0-wmf.2",
+"angwikiquote": "php-1.28.0-wmf.2",
+"angwikisource": "php-1.28.0-wmf.2",
+"angwiktionary": "php-1.28.0-wmf.2",
 "anwiki": "php-1.28.0-wmf.1",
-"anwiktionary": "php-1.28.0-wmf.1",
+"anwiktionary": "php-1.28.0-wmf.2",
 "arbcom_dewiki": "php-1.28.0-wmf.1",
 "arbcom_enwiki": "php-1.28.0-wmf.1",
 "arbcom_fiwiki": "php-1.28.0-wmf.1",
 "arbcom_nlwiki": "php-1.28.0-wmf.1",
 "arcwiki": "php-1.28.0-wmf.1",
 "arwiki": "php-1.28.0-wmf.1",
-"arwikibooks": "php-1.28.0-wmf.1",
-"arwikimedia": "php-1.28.0-wmf.1",
-"arwikinews": "php-1.28.0-wmf.1",
-"arwikiquote": "php-1.28.0-wmf.1",
-"arwikisource": "php-1.28.0-wmf.1",
-"arwikiversity": "php-1.28.0-wmf.1",
-"arwiktionary": "php-1.28.0-wmf.1",
+"arwikibooks": "php-1.28.0-wmf.2",
+"arwikimedia": "php-1.28.0-wmf.2",
+"arwikinews": "php-1.28.0-wmf.2",
+"arwikiquote": "php-1.28.0-wmf.2",
+"arwikisource": "php-1.28.0-wmf.2",
+"arwikiversity": "php-1.28.0-wmf.2",
+"arwiktionary": "php-1.28.0-wmf.2",
 "arzwiki": "php-1.28.0-wmf.1",
 "astwiki": "php-1.28.0-wmf.1",
-"astwikibooks": "php-1.28.0-wmf.1",
-"astwikiquote": "php-1.28.0-wmf.1",
-"astwiktionary": "php-1.28.0-wmf.1",
+"astwikibooks": "php-1.28.0-wmf.2",
+"astwikiquote": "php-1.28.0-wmf.2",
+"astwiktionary": "php-1.28.0-wmf.2",
 "aswiki": "php-1.28.0-wmf.1",
-"aswikibooks": "php-1.28.0-wmf.1",
-"aswikisource": "php-1.28.0-wmf.1",
-"aswiktionary": "php-1.28.0-wmf.1",
-"auditcomwiki": "php-1.28.0-wmf.1",
+"aswikibooks": "php-1.28.0-wmf.2",
+"aswikisource": "php-1.28.0-wmf.2",
+"aswiktionary": "php-1.28.0-wmf.2",
+"auditcomwiki": "php-1.28.0-wmf.2",
 "avwiki": "php-1.28.0-wmf.1",
-"avwiktionary": "php-1.28.0-wmf.1",
+"avwiktionary": "php-1.28.0-wmf.2",
 "aywiki": "php-1.28.0-wmf.1",
-"aywikibooks": "php-1.28.0-wmf.1",
-"aywiktionary": "php-1.28.0-wmf.1",
+"aywikibooks": "php-1.28.0-wmf.2",
+"aywiktionary": "php-1.28.0-wmf.2",
 "azbwiki": "php-1.28.0-wmf.1",
 "azwiki": "php-1.28.0-wmf.1",
-"azwikibooks": "php-1.28.0-wmf.1",
-"azwikiquote": "php-1.28.0-wmf.1",
-"azwikisource": "php-1.28.0-wmf.1",
-"azwiktionary": "php-1.28.0-wmf.1",
+"azwikibooks": "php-1.28.0-wmf.2",
+"azwikiquote": "php-1.28.0-wmf.2",
+"azwikisource": "php-1.28.0-wmf.2",
+"azwiktionary": "php-1.28.0-wmf.2",
 "barwiki": "php-1.28.0-wmf.1",
 "bat_smgwiki": "php-1.28.0-wmf.1",
 "bawiki": "php-1.28.0-wmf

[MediaWiki-commits] [Gerrit] Rebuild with composer 1.0.0 for PHP >=5.6 users - change (mediawiki/vendor)

2016-05-18 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289541

Change subject: Rebuild with composer 1.0.0 for PHP >=5.6 users
..

Rebuild with composer 1.0.0 for PHP >=5.6 users

Building with Composer 1.1.x will generate a PHP >=5.6 specific
'autoload_static.php'. This file was omitted from I8e8101e when Composer
1.1.x was used to update the repo. This omission is required to pass our
current CI tests, but it leaves the Composer autoloader in a state where
it can't be used by clients running PHP >=5.6. This does not cause any
issues currently for the Wikimedia production and testing clusters, but
it will break 3rd party consumers of mediawiki/vendor.git.

Bug: T135635
Bug: T135161
Change-Id: I6b5f6788d2c0bbbcf6902e15bf6dbb634c6852c2
(cherry picked from commit 6a5b5d8bb18aa7a7df349bf5d300f46ae50f6b73)
---
M composer/autoload_real.php
1 file changed, 4 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/41/289541/1

diff --git a/composer/autoload_real.php b/composer/autoload_real.php
index 6a50b69..a8565e8 100644
--- a/composer/autoload_real.php
+++ b/composer/autoload_real.php
@@ -27,26 +27,15 @@
 array_push($includePaths, get_include_path());
 set_include_path(join(PATH_SEPARATOR, $includePaths));
 
-$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
-if ($useStaticLoader) {
-require_once __DIR__ . '/autoload_static.php';
-
-
call_user_func(\Composer\Autoload\ComposerStaticInit_mediawiki_vendor::getInitializer($loader));
-} else {
-$classMap = require __DIR__ . '/autoload_classmap.php';
-if ($classMap) {
-$loader->addClassMap($classMap);
-}
+$classMap = require __DIR__ . '/autoload_classmap.php';
+if ($classMap) {
+$loader->addClassMap($classMap);
 }
 
 $loader->setClassMapAuthoritative(true);
 $loader->register(false);
 
-if ($useStaticLoader) {
-$includeFiles = 
Composer\Autoload\ComposerStaticInit_mediawiki_vendor::$files;
-} else {
-$includeFiles = require __DIR__ . '/autoload_files.php';
-}
+$includeFiles = require __DIR__ . '/autoload_files.php';
 foreach ($includeFiles as $fileIdentifier => $file) {
 composerRequire_mediawiki_vendor($fileIdentifier, $file);
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/289541
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b5f6788d2c0bbbcf6902e15bf6dbb634c6852c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: wmf/1.28.0-wmf.2
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BryanDavis 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Special:EnableFlow: Support subpage to pre-fill page name - change (mediawiki...Flow)

2016-05-18 Thread Sethakill (Code Review)
Sethakill has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289540

Change subject: Special:EnableFlow: Support subpage to pre-fill page name
..

Special:EnableFlow: Support subpage to pre-fill page name

Bug: T135678
Change-Id: Icf823b14391ec7639bf6f062cf7209583c351da4
---
M includes/Specials/SpecialEnableFlow.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/40/289540/1

diff --git a/includes/Specials/SpecialEnableFlow.php 
b/includes/Specials/SpecialEnableFlow.php
index 21235b3..8038b33 100644
--- a/includes/Specials/SpecialEnableFlow.php
+++ b/includes/Specials/SpecialEnableFlow.php
@@ -26,7 +26,7 @@
/**
 * @var string $page Full page name that was converted to a board
 */
-   protected $page;
+   protected $page = '';
 
public function __construct() {
parent::__construct( 'EnableFlow', 'flow-create-board' );
@@ -35,11 +35,20 @@
$this->occupationController = Container::get( 
'occupation_controller' );
}
 
+   public function execute( $par ) {
+   if ( $par !== null ) {
+   $this->page = str_replace( '_', ' ', $par );
+   }
+
+   parent::execute( $par );
+   }
+
protected function getFormFields() {
return array(
'page' => array(
'type' => 'text',
'label-message' => 
'flow-special-enableflow-page',
+   'default' => $this->page,
),
'header' => array(
'type' => 'textarea',

-- 
To view, visit https://gerrit.wikimedia.org/r/289540
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf823b14391ec7639bf6f062cf7209583c351da4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sethakill 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Allow to chaining calls in setSubmitDestructive and setSubmi... - change (mediawiki/core)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow to chaining calls in setSubmitDestructive and 
setSubmitProgressive.
..


Allow to chaining calls in setSubmitDestructive
and setSubmitProgressive.

Change-Id: I926fa717edf146c64bb7e5287f9dc051e30f6566
---
M includes/htmlform/HTMLForm.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index 0dab3bb..e891c9c 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -1226,17 +1226,25 @@
/**
 * Identify that the submit button in the form has a destructive action
 * @since 1.24
+*
+* @return HTMLForm $this for chaining calls (since 1.28)
 */
public function setSubmitDestructive() {
$this->mSubmitFlags = [ 'destructive', 'primary' ];
+
+   return $this;
}
 
/**
 * Identify that the submit button in the form has a progressive action
 * @since 1.25
+*
+* @return HTMLForm $this for chaining calls (since 1.28)
 */
public function setSubmitProgressive() {
$this->mSubmitFlags = [ 'progressive', 'primary' ];
+
+   return $this;
}
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/289452
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I926fa717edf146c64bb7e5287f9dc051e30f6566
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sethakill 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] add option to onallwikis to run from a base wiki, with wikis... - change (operations/dumps)

2016-05-18 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: add option to onallwikis to run from a base wiki, with wikis as 
args
..


add option to onallwikis to run from a base wiki, with wikis as args

The idea here is to be able to run a query or a script that takes as
in its arguments a wiki name which needs to loop through all wikis
in some list, while the script/query itself runs from one base wiki.

This might be true for e.e. commons (global usage data) or wikidata.

Also fix typo in usage message and move a section for clarity.

Change-Id: Iad40e440af5d919b67418bdc9a00eb0a2e958efb
---
M xmldumps-backup/onallwikis.py
1 file changed, 60 insertions(+), 34 deletions(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/xmldumps-backup/onallwikis.py b/xmldumps-backup/onallwikis.py
index f14c668..8441e0a 100644
--- a/xmldumps-backup/onallwikis.py
+++ b/xmldumps-backup/onallwikis.py
@@ -45,7 +45,7 @@
 return None, None
 return(outfile_base, outfile_path)
 
-def run(self, wiki, filenameformat, output_dir, overwrite):
+def run(self, wiki, filenameformat, output_dir, overwrite, base):
 '''
 implement this in your subclass
 '''
@@ -61,24 +61,26 @@
 self.args = args
 super(ScriptRunner, self).__init__(dryrun, verbose)
 
-def get_command(self, wiki, output_dir, outfile_base):
+def get_command(self, wiki, output_dir, outfile_base, base):
 '''
 given the output directory and filename and the wiki
 object, put together and return an array consisting
 of the script name, args, and any multiversion
 invocations that need to precede it
 '''
+if base is None:
+base = wiki
 script_command = MultiVersion.mw_script_as_array(
-wiki.config, self.scriptname)
-script_command = [wiki.config.php, "-q"] + script_command
-script_command.extend(["--wiki", wiki.db_name])
+base.config, self.scriptname)
+script_command = [base.config.php, "-q"] + script_command
+script_command.extend(["--wiki", base.db_name])
 if self.args is not None:
 script_command.extend(self.args)
-script_command = [field.format(
-DIR=output_dir, FILE=outfile_base) for field in script_command]
+script_command = [field.format(DIR=output_dir, FILE=outfile_base, 
w=wiki.db_name)
+  for field in script_command]
 return script_command
 
-def run(self, wiki, filenameformat, output_dir, overwrite):
+def run(self, wiki, filenameformat, output_dir, overwrite, base=None):
 '''
 run a (maintenance) script on one wiki, expecting relevant output to
 go to a file
@@ -90,7 +92,7 @@
 wiki, filenameformat, output_dir, overwrite)
 if outfile_base is None:
 return True
-command = self.get_command(wiki, outfile_path, outfile_base)
+command = self.get_command(wiki, outfile_path, outfile_base, base)
 if self.dryrun:
 print "Would run:",
 print command
@@ -108,14 +110,17 @@
 self.query = query
 super(QueryRunner, self).__init__(dryrun, verbose)
 
-def get_command(self, wiki, outfile_path, outfile_base):
+def get_command(self, wiki, outfile_path, outfile_base, base):
 '''
 given the output directory and filename and the wiki
 object, put together and return a command string
 for mysql to run the query and dump the output
 where required.
 '''
-dbserver = DbServerInfo(wiki, wiki.db_name)
+if base is None:
+base = wiki
+
+dbserver = DbServerInfo(base, base.db_name)
 
 if outfile_base.endswith(".gz"):
 compress = "gzip"
@@ -128,7 +133,7 @@
 query = self.query.format(w=wiki.db_name)
 return dbserver.build_sql_command(query, pipeto)
 
-def run(self, wiki, filenameformat, output_dir, overwrite):
+def run(self, wiki, filenameformat, output_dir, overwrite, base=None):
 '''
 run a (maintenance) script on one wiki, expecting relevant output to
 go to a file
@@ -139,7 +144,7 @@
 return True
 
 command = self.get_command(wiki, outfile_path,
-   outfile_base)
+   outfile_base, base)
 
 if not isinstance(command, basestring):
 # see if the list elts are lists tht need to be turned into strings
@@ -160,12 +165,16 @@
 methods for running a script once on one wiki
 '''
 def __init__(self, runner, wiki,
- filenameformat, output_dir):
+ filenameformat, output_dir,
+ base):
 self.wiki = wiki
 self.wiki.config.parse_conffile_per_project(wiki

[MediaWiki-commits] [Gerrit] jsduck: Sort list of globals in jsduck.json - change (mediawiki/core)

2016-05-18 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289511

Change subject: jsduck: Sort list of globals in jsduck.json
..

jsduck: Sort list of globals in jsduck.json

Change-Id: Ifb920c055740575edcda0b4f460cc8c5b377ba87
---
M jsduck.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/289511/1

diff --git a/jsduck.json b/jsduck.json
index a75c9f0..5b18365 100644
--- a/jsduck.json
+++ b/jsduck.json
@@ -7,7 +7,7 @@
"--builtin-classes": true,
"--processes": "0",
"--warnings-exit-nonzero": true,
-   "--external": 
"HTMLElement,HTMLDocument,Window,Blob,File,MouseEvent,KeyboardEvent,HTMLIframeElement,HTMLInputElement,XMLDocument,Node",
+   "--external": 
"Blob,File,HTMLDocument,HTMLElement,HTMLIframeElement,HTMLInputElement,KeyboardEvent,MouseEvent,Node,Window,XMLDocument",
"--output": "docs/js",
"--": [
"maintenance/jsduck/external.js",

-- 
To view, visit https://gerrit.wikimedia.org/r/289511
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb920c055740575edcda0b4f460cc8c5b377ba87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Refactor hard to read language fallback indicator rendering - change (mediawiki...Wikibase)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Refactor hard to read language fallback indicator rendering
..


Refactor hard to read language fallback indicator rendering

Change-Id: Iabf2cd1e72371b0afcf9a10aea0d33857f7c9a63
---
M lib/includes/LanguageFallbackIndicator.php
1 file changed, 13 insertions(+), 20 deletions(-)

Approvals:
  Adrian Heine: Looks good to me, approved
  Daniel Kinzler: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/includes/LanguageFallbackIndicator.php 
b/lib/includes/LanguageFallbackIndicator.php
index 5c6f4dd..10c2ea8 100644
--- a/lib/includes/LanguageFallbackIndicator.php
+++ b/lib/includes/LanguageFallbackIndicator.php
@@ -6,7 +6,9 @@
 use Wikibase\DataModel\Term\TermFallback;
 
 /**
- * Formats entity IDs by generating an HTML link to the corresponding page 
title.
+ * Generates HTML (usually a  element) to make the actual and source 
languages of terms
+ * (typically labels and descriptions) that are the result of a language 
fallback chain and/or
+ * transliteration visible to the user.
  *
  * @since 0.5
  *
@@ -33,38 +35,29 @@
$actualLanguage = $term->getActualLanguageCode();
$sourceLanguage = $term->getSourceLanguageCode();
 
-   // FIXME: TermFallback should either return equal values or null
-   $sourceLanguage = $sourceLanguage === null ? $actualLanguage : 
$sourceLanguage;
+   $isFallback = $actualLanguage !== $requestedLanguage;
+   $isTransliteration = $sourceLanguage !== null && 
$sourceLanguage !== $actualLanguage;
 
-   $isInRequestedLanguage = $actualLanguage === $requestedLanguage;
-   $isInSourceLanguage = $actualLanguage === $sourceLanguage;
-
-   if ( $isInRequestedLanguage && $isInSourceLanguage ) {
-   // This is neither a fallback nor a transliteration
+   if ( !$isFallback && !$isTransliteration ) {
return '';
}
 
-   $sourceLanguageName = $this->languageNameLookup->getName( 
$sourceLanguage );
-   $actualLanguageName = $this->languageNameLookup->getName( 
$actualLanguage );
+   $text = $this->languageNameLookup->getName( $actualLanguage );
 
-   // Generate indicator text
-   if ( $isInSourceLanguage ) {
-   $text = $sourceLanguageName;
-   } else {
+   if ( $isTransliteration ) {
$text = wfMessage(

'wikibase-language-fallback-transliteration-hint',
-   $sourceLanguageName,
-   $actualLanguageName
+   $this->languageNameLookup->getName( 
$sourceLanguage ),
+   $text
)->text();
}
 
-   // Generate HTML class names
$classes = 'wb-language-fallback-indicator';
-   if ( !$isInSourceLanguage ) {
+   if ( $isTransliteration ) {
$classes .= ' wb-language-fallback-transliteration';
}
-   if ( !$isInRequestedLanguage
-   && $this->getBaseLanguage( $actualLanguage ) 
=== $this->getBaseLanguage( $requestedLanguage )
+   if ( $isFallback
+   && $this->getBaseLanguage( $actualLanguage ) === 
$this->getBaseLanguage( $requestedLanguage )
) {
$classes .= ' wb-language-fallback-variant';
}

-- 
To view, visit https://gerrit.wikimedia.org/r/289204
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iabf2cd1e72371b0afcf9a10aea0d33857f7c9a63
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Adrian Heine 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Cassandra 2.2.6 config - change (operations/puppet)

2016-05-18 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Cassandra 2.2.6 config
..


Cassandra 2.2.6 config

This introduces a new variable, cassandra::target_version.  Valid values for
cassandra::target_version are '2.1' and '2.2' (defaults to '2.1').  The values
correspond with Cassandra minor versions (2.1.x and 2.2.x respectively), and
result in a version appropriate configuration.

For systems that are (and should continue to be) Cassandra 2.1, this changeset
should be a no-op.

Bug: T126629
Change-Id: I24a19f5bae00696d5223327501e615723081c6f3
---
M hieradata/labs/deployment-prep/common.yaml
M modules/cassandra/manifests/init.pp
M modules/cassandra/manifests/instance.pp
M modules/cassandra/manifests/metrics.pp
R modules/cassandra/templates/cassandra-env.sh-2.1.erb
A modules/cassandra/templates/cassandra-env.sh-2.2.erb
R modules/cassandra/templates/cassandra.yaml-2.1.erb
A modules/cassandra/templates/cassandra.yaml-2.2.erb
M 
modules/cassandra/templates/initscripts/cassandra-metrics-collector.systemd.erb
R modules/cassandra/templates/logback.xml-2.1.erb
A modules/cassandra/templates/logback.xml-2.2.erb
11 files changed, 1,415 insertions(+), 12 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 0210177..32ab0f1 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -92,7 +92,9 @@
 cassandra::seeds:
   - deployment-restbase01.deployment-prep.eqiad.wmflabs
   - deployment-restbase02.deployment-prep.eqiad.wmflabs
-cassandra::logging::logstash_host: 
deployment-logstash2.deployment-prep.eqiad.wmflabs
+cassandra::logstash_host: deployment-logstash2.deployment-prep.eqiad.wmflabs
+cassandra::target_version: '2.2'
+cassandra::metrics::graphite_host: labmon1001.eqiad.wmnet
 restbase::seeds:
   - 10.68.16.128
   - 10.68.17.189
diff --git a/modules/cassandra/manifests/init.pp 
b/modules/cassandra/manifests/init.pp
index b03ecf0..4792912 100644
--- a/modules/cassandra/manifests/init.pp
+++ b/modules/cassandra/manifests/init.pp
@@ -223,6 +223,10 @@
 # [*auto_bootstrap*]
 #   Control whether new nodes joining the cluster will get data they own.
 #   Default: true
+#
+# [*target_version*]
+#   The Cassandra version to configure for.  Valid choices are '2.1' and '2.2'.
+#   Default: 2.1
 
 class cassandra(
 $cluster_name = 'Test Cluster',
@@ -273,10 +277,7 @@
 $application_username = undef,
 $application_password = undef,
 $auto_bootstrap   = true,
-
-$yaml_template= "${::module}/cassandra.yaml.erb",
-$env_template = "${::module}/cassandra-env.sh.erb",
-$rackdc_template  = 
"${::module}/cassandra-rackdc.properties.erb",
+$target_version   = '2.1',
 
 $logstash_host= 'logstash1003.eqiad.wmnet',
 $logstash_port= 11514,
@@ -341,6 +342,10 @@
 fail('data_file_directories must not be empty')
 }
 
+if (!($target_version in ['2.1', '2.2'])) {
+fail("${target_version} is not a valid Cassandra target version!")
+}
+
 # Choose real authenticator and authorizor values
 $authenticator_value = $authenticator ? {
 true=> 'PasswordAuthenticator',
diff --git a/modules/cassandra/manifests/instance.pp 
b/modules/cassandra/manifests/instance.pp
index d37afb9..401014e 100644
--- a/modules/cassandra/manifests/instance.pp
+++ b/modules/cassandra/manifests/instance.pp
@@ -82,6 +82,7 @@
 $tls_cluster_name   = $::cassandra::tls_cluster_name
 $application_username   = $::cassandra::application_username
 $native_transport_port  = $::cassandra::native_transport_port
+$target_version = $::cassandra::target_version
 
 file { $config_directory:
 ensure  => directory,
@@ -111,7 +112,7 @@
 
 file { "${config_directory}/cassandra-env.sh":
 ensure  => present,
-content => template("${module_name}/cassandra-env.sh.erb"),
+content => 
template("${module_name}/cassandra-env.sh-${target_version}.erb"),
 owner   => 'cassandra',
 group   => 'cassandra',
 mode=> '0444',
@@ -120,7 +121,7 @@
 
 file { "${config_directory}/cassandra.yaml":
 ensure  => present,
-content => template("${module_name}/cassandra.yaml.erb"),
+content => 
template("${module_name}/cassandra.yaml-${target_version}.erb"),
 owner   => 'cassandra',
 group   => 'cassandra',
 mode=> '0444',
@@ -138,7 +139,7 @@
 
 file { "${config_directory}/logback.xml":
 ensure  => present,
-content => template("${module_name}/logback.xml.erb"),
+content => 
template("${module_name}/logback.xml

[MediaWiki-commits] [Gerrit] tests: Remove duplicate unit tests in HtmlTest.php - change (mediawiki/core)

2016-05-18 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289510

Change subject: tests: Remove duplicate unit tests in HtmlTest.php
..

tests: Remove duplicate unit tests in HtmlTest.php

Follows-up ee4d5c6ee ("Remove support for $wgWellFormedXml = false")

Remove now-redundant duplicate tests that were previously there
to test the same thing again with $wgWellFormedXml set to false.

Change-Id: I91623a8c10e5108ffae13f67328aece2cf33c719
---
M tests/phpunit/includes/HtmlTest.php
1 file changed, 1 insertion(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/289510/1

diff --git a/tests/phpunit/includes/HtmlTest.php 
b/tests/phpunit/includes/HtmlTest.php
index a01f2f5..4721793 100644
--- a/tests/phpunit/includes/HtmlTest.php
+++ b/tests/phpunit/includes/HtmlTest.php
@@ -46,7 +46,7 @@
$this->assertEquals(
'',
Html::element( 'img', null, '' ),
-   'No close tag for short-tag elements'
+   'Self-closing tag for short-tag elements'
);
 
$this->assertEquals(
@@ -59,12 +59,6 @@
'',
Html::element( 'element', [], '' ),
'Close tag for empty element (array, string)'
-   );
-
-   $this->assertEquals(
-   '',
-   Html::element( 'img', null, '' ),
-   'Self-closing tag for short-tag elements'
);
}
 
@@ -139,12 +133,6 @@
' selected=""',
Html::expandAttributes( [ 'selected' ] ),
'Boolean attributes have no value when value is true 
(passed as numerical array)'
-   );
-
-   $this->assertEquals(
-   ' selected=""',
-   Html::expandAttributes( [ 'selected' => true ] ),
-   'Boolean attributes have empty string value when value 
is true'
);
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289510
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91623a8c10e5108ffae13f67328aece2cf33c719
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Replace expensive statementview.isValid implementation - change (mediawiki...Wikibase)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace expensive statementview.isValid implementation
..


Replace expensive statementview.isValid implementation

Bug: T124787
Change-Id: Ice9931bbcaee2850cc6e331f36aa9b8df6a357d0
---
M 
view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
M view/resources/jquery/wikibase/jquery.wikibase.referenceview.js
M view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js
M view/resources/jquery/wikibase/jquery.wikibase.statementview.js
4 files changed, 23 insertions(+), 9 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, but someone else must approve
  Adrian Heine: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
 
b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
index 7180427..da94f99 100644
--- 
a/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
+++ 
b/view/resources/jquery/wikibase/jquery.wikibase.entitytermsforlanguagelistview.js
@@ -390,6 +390,10 @@
 * @return {boolean}
 */
isValid: function() {
+   if ( !this._isInEditMode ) {
+   return true;
+   }
+
var listview = this.$listview.data( 'listview' ),
lia = listview.listItemAdapter(),
isValid = true;
diff --git a/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js
index d393918..a8a33d2 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.referenceview.js
@@ -289,13 +289,17 @@
 * @return {boolean}
 */
isValid: function() {
+   if ( !this._isInEditMode ) {
+   return true;
+   }
+
var isValid = true;
+
$.each( this.$listview.data( 'listview' ).value(), function() {
-   if ( !this.isValid() ) {
-   isValid = false;
-   }
+   isValid = this.isValid();
return isValid;
} );
+
return isValid;
},
 
diff --git a/view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js
index 0b82c43..2599cec 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.snaklistview.js
@@ -175,7 +175,7 @@
 * Starts the widget's edit mode.
 */
startEditing: function() {
-   if ( this.isInEditMode() ) {
+   if ( this._isInEditMode ) {
return;
}
 
@@ -196,7 +196,7 @@
 *before edit mode was started
 */
stopEditing: function( dropValue ) {
-   if ( !this.isInEditMode() ) {
+   if ( !this._isInEditMode ) {
return;
}
 
@@ -295,6 +295,10 @@
 * @return {boolean}
 */
isValid: function() {
+   if ( !this._isInEditMode ) {
+   return true;
+   }
+
return this._listview.value().every( function( snakview ) {
return snakview.isValid() && snakview.snak() !== null;
} );
diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
index 77c228e..068f5b0 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
@@ -790,10 +790,12 @@
return true;
}
 
-   return this._mainSnakSnakView.isValid() &&
-   ( !this._qualifiers || this._listViewIsValid( 
this._qualifiers ) ) &&
-   this._listViewIsValid( this._referencesListview ) &&
-   this._instantiateStatement( null ) instanceof 
wb.datamodel.Statement;
+   return this._mainSnakSnakView.isValid()
+   // Main snak must be valid and serializable, which 
fails when the snaktype is missing.
+   && this._mainSnakSnakView.snak()
+   && this._rankSelector.isValid()
+   && ( !this._qualifiers || this._listViewIsValid( 
this._qualifiers ) )
+   && ( !this._referencesListview || 
this._listViewIsValid( this._referencesListview ) );
},
 
/**

-- 
To view, visit https://gerrit.wikimedia.org/r/287611
To unsubscribe, visit https://gerrit.wikimedia.o

[MediaWiki-commits] [Gerrit] WIP: Replace custom server.js with service-runner - change (mediawiki...parsoid)

2016-05-18 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289508

Change subject: WIP: Replace custom server.js with service-runner
..

WIP: Replace custom server.js with service-runner

 * This is installed with --no-optional to avoid the binary dep on
   dtrace-provider.

Change-Id: I41265ecd955259f29af0fc84a53a0af489a8ec79
---
A config.yaml
M lib/index.js
M npm-shrinkwrap.json
M package.json
M tests/apiServer.js
M tests/mocha/api.js
M tests/mocha/templatedata.js
M tests/mockAPI.js
M tests/testreduce/rtTestWrapper.js
9 files changed, 335 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/08/289508/1

diff --git a/config.yaml b/config.yaml
new file mode 100644
index 000..216ccef
--- /dev/null
+++ b/config.yaml
@@ -0,0 +1,5 @@
+services:
+  - module: lib/index.js
+entrypoint: apiServiceWorker
+conf:
+localsettings: ./localsettings.js
\ No newline at end of file
diff --git a/lib/index.js b/lib/index.js
index 6dd6017..b96baf0 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,6 +1,7 @@
 'use strict';
 require('../core-upgrade.js');
 
+var path = require('path');
 var json = require('../package.json');
 var parseJs = require('../bin/parse.js');
 var ParsoidConfig = require('./config/ParsoidConfig.js').ParsoidConfig;
@@ -149,6 +150,10 @@
  * @return {Promise} a Promise for an `http.Server`.
  */
 Parsoid.apiServiceWorker = function apiServiceWorker(options) {
-   var parsoidConfig = new ParsoidConfig(null, options.config);
+   var localSettings = null;
+   if (options.config.localsettings) {
+   localSettings = require(path.resolve(process.cwd(), 
options.config.localsettings));
+   }
+   var parsoidConfig = new ParsoidConfig(localSettings, options.config);
return ParsoidService.init(parsoidConfig, options.logger);
 };
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 8a375c5..7ecab62 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -4432,6 +4432,287 @@
 }
   }
 },
+"service-runner": {
+  "version": "1.2.2",
+  "resolved": 
"https://registry.npmjs.org/service-runner/-/service-runner-1.2.2.tgz";,
+  "dependencies": {
+"bluebird": {
+  "version": "3.2.2",
+  "resolved": 
"https://registry.npmjs.org/bluebird/-/bluebird-3.2.2.tgz";
+},
+"bunyan": {
+  "version": "1.8.1",
+  "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.1.tgz";
+},
+"bunyan-syslog-udp": {
+  "version": "0.1.0",
+  "resolved": 
"https://registry.npmjs.org/bunyan-syslog-udp/-/bunyan-syslog-udp-0.1.0.tgz";
+},
+"core-js": {
+  "version": "2.4.0",
+  "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.0.tgz";
+},
+"extend": {
+  "version": "3.0.0",
+  "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz";
+},
+"gelf-stream": {
+  "version": "1.1.1",
+  "resolved": 
"https://registry.npmjs.org/gelf-stream/-/gelf-stream-1.1.1.tgz";,
+  "dependencies": {
+"gelfling": {
+  "version": "0.3.0",
+  "resolved": 
"https://registry.npmjs.org/gelfling/-/gelfling-0.3.0.tgz";
+}
+  }
+},
+"hot-shots": {
+  "version": "2.4.0",
+  "resolved": 
"https://registry.npmjs.org/hot-shots/-/hot-shots-2.4.0.tgz";
+},
+"js-yaml": {
+  "version": "3.6.1",
+  "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz";,
+  "dependencies": {
+"argparse": {
+  "version": "1.0.7",
+  "resolved": 
"https://registry.npmjs.org/argparse/-/argparse-1.0.7.tgz";,
+  "dependencies": {
+"sprintf-js": {
+  "version": "1.0.3",
+  "resolved": 
"https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz";
+}
+  }
+},
+"esprima": {
+  "version": "2.7.2",
+  "resolved": 
"https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz";
+}
+  }
+},
+"limitation": {
+  "version": "0.1.8",
+  "resolved": 
"https://registry.npmjs.org/limitation/-/limitation-0.1.8.tgz";,
+  "dependencies": {
+"bluebird": {
+  "version": "3.4.0",
+  "resolved": 
"https://registry.npmjs.org/bluebird/-/bluebird-3.4.0.tgz";
+},
+"kad": {
+  "version": "1.3.6",
+  "from": 
"kad@git+https://github.com/gwicke/kad.git#31449a27a289b6f0ecbeec193d8bac9db8b9f513";,
+  "resolved": 
"git+https://github.com/gwicke/kad.git#31449a27a289b6f0ecbeec193d8bac9db8b9f513";,
+  "dependenc

[MediaWiki-commits] [Gerrit] Fix encoding and paging on unsubscribe table - change (wikimedia...tools)

2016-05-18 Thread Cdentinger (Code Review)
Cdentinger has submitted this change and it was merged.

Change subject: Fix encoding and paging on unsubscribe table
..


Fix encoding and paging on unsubscribe table

Make collation match other tables, give it an int ID to page on.

FIXME: export.py always writes the order_by column to the csv.

Bug: T135204
Change-Id: I2b4ff0f5949b11d6bc5f7f9bdc2442bcc04a7785
---
M silverpop_export/export.py
M silverpop_export/update_table.sql
2 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  Cdentinger: Verified; Looks good to me, approved



diff --git a/silverpop_export/export.py b/silverpop_export/export.py
index f70a151..e4cbd9d 100644
--- a/silverpop_export/export.py
+++ b/silverpop_export/export.py
@@ -89,12 +89,12 @@
 log.info("Starting unsubscribe data export")
 exportq = DbQuery()
 exportq.tables.append('silverpop_excluded')
-exportq.columns.append('email')
+exportq.columns.append('*')
 run_export_query(
 db=db,
 query=exportq,
 output=output_path,
-sort_by_index="email"
+sort_by_index="id"
 )
 
 
diff --git a/silverpop_export/update_table.sql 
b/silverpop_export/update_table.sql
index ba294e0..5019eef 100755
--- a/silverpop_export/update_table.sql
+++ b/silverpop_export/update_table.sql
@@ -299,13 +299,14 @@
 DROP TABLE IF EXISTS silverpop_excluded;
 
 CREATE TABLE IF NOT EXISTS silverpop_excluded(
+  id int AUTO_INCREMENT PRIMARY KEY,
   email varchar(255),
 
   INDEX sx_email (email),
   CONSTRAINT sx_email_u UNIQUE (email)
-);
+) COLLATE 'utf8_unicode_ci' AUTO_INCREMENT=1;
 
-INSERT IGNORE INTO silverpop_excluded
+INSERT IGNORE INTO silverpop_excluded (email)
   SELECT email
 FROM log_civicrm.log_civicrm_email e;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/289247
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b4ff0f5949b11d6bc5f7f9bdc2442bcc04a7785
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Springle 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Add autoload_static.php - change (mediawiki/vendor)

2016-05-18 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/289507

Change subject: Add autoload_static.php
..

Add autoload_static.php

Bug: T135533
Change-Id: I69495f493e6e47000386ef8c9f8231f2d95a2eed
---
A composer/autoload_static.php
1 file changed, 792 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/07/289507/1

diff --git a/composer/autoload_static.php b/composer/autoload_static.php
new file mode 100644
index 000..a0f2652
--- /dev/null
+++ b/composer/autoload_static.php
@@ -0,0 +1,792 @@
+ __DIR__ . '/..' . 
'/mediawiki/at-ease/src/Functions.php',
+'c3f7f0e81464740a933532e81fa26cc7' => __DIR__ . '/..' . 
'/wikimedia/base-convert/src/Functions.php',
+'d55c27a601de788b19a09b7d057d07ae' => __DIR__ . '/..' . 
'/wikimedia/relpath/src/RelPath.php',
+);
+
+public static $prefixLengthsPsr4 = array (
+'W' => 
+array (
+'WrappedString\\' => 14,
+'Wikimedia\\Composer\\' => 19,
+'Wikimedia\\Assert\\Test\\' => 22,
+'Wikimedia\\Assert\\' => 17,
+),
+'S' => 
+array (
+'Symfony\\Component\\Process\\' => 26,
+),
+'M' => 
+array (
+'Monolog\\' => 8,
+),
+'J' => 
+array (
+'JsonSchema\\' => 11,
+),
+'F' => 
+array (
+'Firebase\\JWT\\' => 13,
+),
+'E' => 
+array (
+'Elastica\\' => 9,
+),
+'C' => 
+array (
+'Composer\\Semver\\' => 16,
+'CLDRPluralRuleParser\\' => 21,
+),
+);
+
+public static $prefixDirsPsr4 = array (
+'WrappedString\\' => 
+array (
+0 => __DIR__ . '/..' . '/wikimedia/wrappedstring/src',
+),
+'Wikimedia\\Composer\\' => 
+array (
+0 => __DIR__ . '/..' . '/wikimedia/composer-merge-plugin/src',
+),
+'Wikimedia\\Assert\\Test\\' => 
+array (
+0 => __DIR__ . '/..' . '/wikimedia/assert/tests/phpunit',
+),
+'Wikimedia\\Assert\\' => 
+array (
+0 => __DIR__ . '/..' . '/wikimedia/assert/src',
+),
+'Symfony\\Component\\Process\\' => 
+array (
+0 => __DIR__ . '/..' . '/symfony/process',
+),
+'Monolog\\' => 
+array (
+0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
+),
+'JsonSchema\\' => 
+array (
+0 => __DIR__ . '/..' . '/justinrainbow/json-schema/src/JsonSchema',
+),
+'Firebase\\JWT\\' => 
+array (
+0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
+),
+'Elastica\\' => 
+array (
+0 => __DIR__ . '/..' . '/ruflin/elastica/lib/Elastica',
+),
+'Composer\\Semver\\' => 
+array (
+0 => __DIR__ . '/..' . '/composer/semver/src',
+),
+'CLDRPluralRuleParser\\' => 
+array (
+0 => __DIR__ . '/..' . '/wikimedia/cldr-plural-rule-parser/src',
+),
+);
+
+public static $prefixesPsr0 = array (
+'T' => 
+array (
+'TextCat' => 
+array (
+0 => __DIR__ . '/..' . '/wikimedia/textcat',
+),
+),
+'P' => 
+array (
+'Psr\\Log\\' => 
+array (
+0 => __DIR__ . '/..' . '/psr/log',
+),
+'PEAR' => 
+array (
+0 => __DIR__ . '/..' . '/pear/pear_exception',
+),
+),
+'N' => 
+array (
+'Net' => 
+array (
+0 => __DIR__ . '/..' . '/pear/net_socket',
+1 => __DIR__ . '/..' . '/pear/net_smtp',
+),
+),
+'M' => 
+array (
+'Mail_mimeDecode' => 
+array (
+0 => __DIR__ . '/..' . '/pear/mail_mime-decode',
+),
+'Mail' => 
+array (
+0 => __DIR__ . '/..' . '/pear/mail_mime',
+1 => __DIR__ . '/..' . '/pear/mail',
+),
+),
+'L' => 
+array (
+'Liuggio' => 
+array (
+0 => __DIR__ . '/..' . '/liuggio/statsd-php-client/src',
+),
+'Less' => 
+array (
+0 => __DIR__ . '/..' . '/oyejorge/less.php/lib',
+),
+),
+'K' => 
+array (
+'Kafka\\' => 
+array (
+0 => __DIR__ . '/..' . '/nmred/kafka-php/src',
+),
+),
+'C' => 
+array (
+'Console' => 
+array (
+0 => __DIR__ . '/..' . '/pear/console_getopt',
+),
+),

[MediaWiki-commits] [Gerrit] Parse the result when all promises are done - change (mediawiki...PerformanceInspector)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Parse the result when all promises are done
..


Parse the result when all promises are done

The old version only took the first result from the Promise array,
instead take them all and parse them. Also wait for all promises
to be done before generating the dialog.

This is similar to 8e321d89 which accidentally got reverted in e783081.

Change-Id: I341fac3b8dafdcbaf6fcd40f3896e8ef9416eee2
---
M modules/ext.PerformanceInspector.startup.js
1 file changed, 21 insertions(+), 23 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.PerformanceInspector.startup.js 
b/modules/ext.PerformanceInspector.startup.js
index a3f8ee6..a7877be 100644
--- a/modules/ext.PerformanceInspector.startup.js
+++ b/modules/ext.PerformanceInspector.startup.js
@@ -21,40 +21,38 @@
}
 
inspectData.then( function ( moduleData ) {
-   $.when(
-   mw.loader.using( [ 
'ext.PerformanceInspector.analyze' ] ),
-   $.ready
-   ).done( function () {
+   $.when( mw.loader.using( [ 
'ext.PerformanceInspector.analyze' ] ), $.ready ).then( function () {
var collectors = mw.loader.require( 
'ext.PerformanceInspector.analyze' ).collectors,
views = [],
summary = {},
windowManager = new 
OO.ui.WindowManager(),
-   dialog,
-   PiDialog = mw.loader.require( 
'ext.PerformanceInspector.analyze' ).PiDialog;
+   promises = [],
+   PiDialog = mw.loader.require( 
'ext.PerformanceInspector.analyze' ).PiDialog,
+   dialog;
 
// for each collector object collect 
summary and view data and
// pass it on to the dialog
collectors.forEach( function ( 
collector ) {
-   var data = collector( {
-   inspect: moduleData
-   } );
-   if ( data.view ) {
-   views.push( data.view );
-   Object.keys( 
data.summary ).forEach( function ( summaryItem ) {
-   summary[ 
summaryItem ] = data.summary[ summaryItem ];
-   } );
-   }
+   promises.push( collector( { 
inspect: moduleData } ) );
} );
-
-   dialog = new PiDialog( {
+   // instead of Promise.all, is there a 
better way of doing it with jQuery?
+   $.when.apply( $, promises ).then( 
function () {
+   $.makeArray( arguments 
).forEach( function ( data ) {
+   if ( data.view ) {
+   views.push( 
data.view );
+   Object.keys( 
data.summary ).forEach( function ( summaryItem ) {
+   
summary[ summaryItem ] = data.summary[ summaryItem ];
+   } );
+   }
+   } );
+   dialog = new PiDialog( {
size: 'larger'
-   },
-   summary,
-   views );
+   }, summary, views );
 
-   $( 'body' ).append( 
windowManager.$element );
-   windowManager.addWindows( [ dialog ] );
-   windowManager.openWindow( dialog );
+   $( 'body' ).append( 
windowManager.$elemen

[MediaWiki-commits] [Gerrit] Rebuild with composer 1.0.0 for PHP >=5.6 users - change (mediawiki/vendor)

2016-05-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rebuild with composer 1.0.0 for PHP >=5.6 users
..


Rebuild with composer 1.0.0 for PHP >=5.6 users

Building with Composer 1.1.x will generate a PHP >=5.6 specific
'autoload_static.php'. This file was omitted from I8e8101e when Composer
1.1.x was used to update the repo. This omission is required to pass our
current CI tests, but it leaves the Composer autoloader in a state where
it can't be used by clients running PHP >=5.6. This does not cause any
issues currently for the Wikimedia production and testing clusters, but
it will break 3rd party consumers of mediawiki/vendor.git.

Bug: T135635
Bug: T135161
Change-Id: I6b5f6788d2c0bbbcf6902e15bf6dbb634c6852c2
---
M composer/autoload_real.php
1 file changed, 4 insertions(+), 15 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  Paladox: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer/autoload_real.php b/composer/autoload_real.php
index 6a50b69..a8565e8 100644
--- a/composer/autoload_real.php
+++ b/composer/autoload_real.php
@@ -27,26 +27,15 @@
 array_push($includePaths, get_include_path());
 set_include_path(join(PATH_SEPARATOR, $includePaths));
 
-$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
-if ($useStaticLoader) {
-require_once __DIR__ . '/autoload_static.php';
-
-
call_user_func(\Composer\Autoload\ComposerStaticInit_mediawiki_vendor::getInitializer($loader));
-} else {
-$classMap = require __DIR__ . '/autoload_classmap.php';
-if ($classMap) {
-$loader->addClassMap($classMap);
-}
+$classMap = require __DIR__ . '/autoload_classmap.php';
+if ($classMap) {
+$loader->addClassMap($classMap);
 }
 
 $loader->setClassMapAuthoritative(true);
 $loader->register(false);
 
-if ($useStaticLoader) {
-$includeFiles = 
Composer\Autoload\ComposerStaticInit_mediawiki_vendor::$files;
-} else {
-$includeFiles = require __DIR__ . '/autoload_files.php';
-}
+$includeFiles = require __DIR__ . '/autoload_files.php';
 foreach ($includeFiles as $fileIdentifier => $file) {
 composerRequire_mediawiki_vendor($fileIdentifier, $file);
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/289434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b5f6788d2c0bbbcf6902e15bf6dbb634c6852c2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


  1   2   3   4   >