[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Another attempt to fix jenkins

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398532 )

Change subject: Another attempt to fix jenkins
..


Another attempt to fix jenkins

Change-Id: I94b1552a4dec5231bcf287cab68654bf22b7d5c7
---
M client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
M lib/tests/phpunit/Changes/TestChanges.php
2 files changed, 11 insertions(+), 11 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git 
a/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
index 1b13ffc..fe9d416 100644
--- a/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/EchoNotificationsHandlersTest.php
@@ -151,28 +151,28 @@
$settings->setSetting( 'sendEchoNotification', true );
$handlers = $this->getHandlers( $settings );
 
-   Title::newFromText( 'Dummy2' )->resetArticleID( 0 );
+   Title::newFromText( 'Duummy2' )->resetArticleID( 0 );
$this->assertFalse(
$handlers->doWikibaseHandleChange( $changeDe ),
-   "Failed asserting that 'Dummy' does not create an event"
+   "Failed asserting that 'Duummy' does not create an 
event"
);
 
-   $this->insertPage( 'Dummy2' );
+   $this->insertPage( 'Duummy2' );
$this->assertFalse(
$handlers->doWikibaseHandleChange( $changeDe ),
-   "Failed asserting that 'Dummy2' does not create an 
event"
+   "Failed asserting that 'Duummy2' does not create an 
event"
);
 
-   $this->insertPage( 'Dummy', '#REDIRECT [[Dummy2]]' );
+   $this->insertPage( 'Duummy', '#REDIRECT [[Duummy2]]' );
$this->assertFalse(
$handlers->doWikibaseHandleChange( $changeDe ),
-   "Failed asserting that 'Dummy2' redirected to by 
'Dummy' does not create an event"
+   "Failed asserting that 'Duummy2' redirected to by 
'Duummy' does not create an event"
);
 
-   $this->insertPage( 'Dummy' );
+   $this->insertPage( 'Duummy' );
$this->assertTrue(
$handlers->doWikibaseHandleChange( $changeDe ),
-   "Failed asserting that 'Dummy2' creates an event"
+   "Failed asserting that 'Duummy2' creates an event"
);
}
 
diff --git a/lib/tests/phpunit/Changes/TestChanges.php 
b/lib/tests/phpunit/Changes/TestChanges.php
index ec0024d..ad8c293 100644
--- a/lib/tests/phpunit/Changes/TestChanges.php
+++ b/lib/tests/phpunit/Changes/TestChanges.php
@@ -74,7 +74,7 @@
// -
 
$new = new Item( new ItemId( 'Q100' ) );
-   $new->getSiteLinkList()->addNewSiteLink( 'dewiki', 
'Dummy' );
+   $new->getSiteLinkList()->addNewSiteLink( 'dewiki', 
'Duummy' );
$changes['set-dewiki-sitelink'] = 
$changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new );
$old = $new->copy();
 
@@ -86,13 +86,13 @@
$new = new Item( new ItemId( 'Q100' ) );
 
$new->getSiteLinkList()->addNewSiteLink( 'enwiki', 
'Emmy' );
-   $new->getSiteLinkList()->addNewSiteLink( 'dewiki', 
'Dummy' );
+   $new->getSiteLinkList()->addNewSiteLink( 'dewiki', 
'Duummy' );
 
$changes['change-sitelink-order'] = 
$changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new );
$old = $new->copy();
 
// -
-   $new->getSiteLinkList()->setNewSiteLink( 'dewiki', 
'Dummy2' );
+   $new->getSiteLinkList()->setNewSiteLink( 'dewiki', 
'Duummy2' );
$changes['change-dewiki-sitelink'] = 
$changeFactory->newFromUpdate( EntityChange::UPDATE, $old, $new );
$old = $new->copy();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94b1552a4dec5231bcf287cab68654bf22b7d5c7
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix heading selecting over-select

2017-12-17 Thread Golopotw (Code Review)
Golopotw has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398792 )

Change subject: Fix heading selecting over-select
..

Fix heading selecting over-select

In Chrome, multiple clicking selecting a heading cause a bug that the
first character in the next paragrpah is also selected.

Change-Id: Ib52662c39720dcd36ea0b60c9884530895dd9e6a
---
M resources/src/mediawiki.legacy/shared.css
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/398792/1

diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 9f48204..19b51eb 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -760,11 +760,6 @@
vertical-align: baseline;
/* Reset line-height; headings tend to have it set to larger values */
line-height: 1em;
-   /* As .mw-editsection is a  (inline element), it is treated as 
part */
-   /* of the heading content when selecting text by multiple clicks and 
thus */
-   /* selected together with heading content, despite the user-select: 
none; */
-   /* rule set above. This enforces non-selection without changing the 
look. */
-   display: inline-block;
 }
 
 /* Correct directionality when page dir is different from site/user dir */

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1073

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398790 )

Change subject: db-eqiad.php: Depool db1073
..


db-eqiad.php: Depool db1073

Needs alter table

Bug: T174569
Change-Id: I8ebd0f2c8cf34f29a1e9198b7e97a911d1a88fe8
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index cf67da4..a6b9b3a 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -109,7 +109,7 @@
# 'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager # T178359
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
-   'db1073' => 50,  # B3 2.8TB 160GB, api
+   # 'db1073' => 50,  # B3 2.8TB 160GB, api # T174569
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
@@ -296,7 +296,7 @@
],
'api' => [
'db1080' => 1,
-   'db1073' => 1,
+   # 'db1073' => 1,
'db1066' => 1,
],
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ebd0f2c8cf34f29a1e9198b7e97a911d1a88fe8
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1106"

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398791 )

Change subject: Revert "db-eqiad.php: Depool db1106"
..


Revert "db-eqiad.php: Depool db1106"

This reverts commit e826646f14e29f73b205ab422148fad45dd75f4e.

Change-Id: Ic325996ccdc5e9666f586ec6433a8859882512e8
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f45ab9e..cf67da4 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -149,7 +149,7 @@
'db1096:3315' => 1,   # A6 3.6TB 512GB, # rc, log: s5 and s6
'db1097:3315' => 1,   # D1 3.6TB 512GB, # rc, log: s4 and s5
# 'db1100' => 50,  # C2 3.6TB 512GB, old master #api, depool, 
broken
-   # 'db1106' => 500, # D3 3.6TB 512GB # going to dump tag_summary
+   'db1106' => 500, # D3 3.6TB 512GB
'db1110' => 500, # C3 3.6TB 512GB
],
's6' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic325996ccdc5e9666f586ec6433a8859882512e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1106"

2017-12-17 Thread Marostegui (Code Review)
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "db-eqiad.php: Depool db1106"
..

Revert "db-eqiad.php: Depool db1106"

This reverts commit e826646f14e29f73b205ab422148fad45dd75f4e.

Change-Id: Ic325996ccdc5e9666f586ec6433a8859882512e8
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f45ab9e..cf67da4 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -149,7 +149,7 @@
'db1096:3315' => 1,   # A6 3.6TB 512GB, # rc, log: s5 and s6
'db1097:3315' => 1,   # D1 3.6TB 512GB, # rc, log: s4 and s5
# 'db1100' => 50,  # C2 3.6TB 512GB, old master #api, depool, 
broken
-   # 'db1106' => 500, # D3 3.6TB 512GB # going to dump tag_summary
+   'db1106' => 500, # D3 3.6TB 512GB
'db1110' => 500, # C3 3.6TB 512GB
],
's6' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic325996ccdc5e9666f586ec6433a8859882512e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1073

2017-12-17 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398790 )

Change subject: db-eqiad.php: Depool db1073
..

db-eqiad.php: Depool db1073

Needs alter table

Bug: T174569
Change-Id: I8ebd0f2c8cf34f29a1e9198b7e97a911d1a88fe8
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index f45ab9e..54688f0 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -109,7 +109,7 @@
# 'db1055' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager # T178359
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
-   'db1073' => 50,  # B3 2.8TB 160GB, api
+   # 'db1073' => 50,  # B3 2.8TB 160GB, api # T174569
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
'db1089' => 500, # C3 3.6TB 512GB
@@ -296,7 +296,7 @@
],
'api' => [
'db1080' => 1,
-   'db1073' => 1,
+   # 'db1073' => 1,
'db1066' => 1,
],
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ebd0f2c8cf34f29a1e9198b7e97a911d1a88fe8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1106

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398789 )

Change subject: db-eqiad.php: Depool db1106
..


db-eqiad.php: Depool db1106

Going to stop replication in sync on db1106 and db1110 to reimport
tag_summary on db1100

Bug: T161294
Change-Id: Ia266f969d506957e1f2a0a532ac5fa313d6c4dfd
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index cf67da4..f45ab9e 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -149,7 +149,7 @@
'db1096:3315' => 1,   # A6 3.6TB 512GB, # rc, log: s5 and s6
'db1097:3315' => 1,   # D1 3.6TB 512GB, # rc, log: s4 and s5
# 'db1100' => 50,  # C2 3.6TB 512GB, old master #api, depool, 
broken
-   'db1106' => 500, # D3 3.6TB 512GB
+   # 'db1106' => 500, # D3 3.6TB 512GB # going to dump tag_summary
'db1110' => 500, # C3 3.6TB 512GB
],
's6' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia266f969d506957e1f2a0a532ac5fa313d6c4dfd
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1106

2017-12-17 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398789 )

Change subject: db-eqiad.php: Depool db1106
..

db-eqiad.php: Depool db1106

Going to stop replication in sync on db1106 and db1110 to reimport
tag_summary on db1106

Bug: T161294
Change-Id: Ia266f969d506957e1f2a0a532ac5fa313d6c4dfd
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index cf67da4..f45ab9e 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -149,7 +149,7 @@
'db1096:3315' => 1,   # A6 3.6TB 512GB, # rc, log: s5 and s6
'db1097:3315' => 1,   # D1 3.6TB 512GB, # rc, log: s4 and s5
# 'db1100' => 50,  # C2 3.6TB 512GB, old master #api, depool, 
broken
-   'db1106' => 500, # D3 3.6TB 512GB
+   # 'db1106' => 500, # D3 3.6TB 512GB # going to dump tag_summary
'db1110' => 500, # C3 3.6TB 512GB
],
's6' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia266f969d506957e1f2a0a532ac5fa313d6c4dfd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: logstash: Install python-setuptools and python-wheel

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398705 )

Change subject: logstash: Install python-setuptools and python-wheel
..


logstash: Install python-setuptools and python-wheel

Bug: T183095
Change-Id: I9b88f88633271c19ae690b2d9ad4c8ebb07a5603
---
M puppet/modules/mwv/manifests/packages.pp
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/mwv/manifests/packages.pp 
b/puppet/modules/mwv/manifests/packages.pp
index 4193c38..f85d745 100644
--- a/puppet/modules/mwv/manifests/packages.pp
+++ b/puppet/modules/mwv/manifests/packages.pp
@@ -1,7 +1,11 @@
 # == Class: mwv::packages
 #
 class mwv::packages {
-package { 'python-pip': } -> Package <| provider == pip |>
+package { [
+  'python-pip',
+  'python-setuptools',
+  'python-wheel',
+]: } -> Package <| provider == pip |>
 
 # Install common packages
 require_package(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b88f88633271c19ae690b2d9ad4c8ebb07a5603
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Pass in skip_greeting_proceessing param

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398788 )

Change subject: Pass in skip_greeting_proceessing param
..

Pass in skip_greeting_proceessing param

Having moved this skip from a hack to a param we need to pass this in on our
main contact import shim. It doesn't matter if we by-pass it sometimes, this
is for performance rather than for functionality so as
long as we get the main volume q.

Bug: T156193
Change-Id: I14b55e54d18239febf01c93894c62dd68021e8b1
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/88/398788/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 9485811..67664cd 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1089,6 +1089,10 @@
 'contact_type' => $msg['contact_type'],
 'contact_source' => $msg['contact_source'],
 'debug' => TRUE,
+// We speed up our imports by passing in this param.
+// going forwards there is scope to a) improve the processing
+// upstream rather than skip & b) not skip for Major Gifts contacts.
+'skip_greeting_processing' => TRUE,
 );
 if (strtolower($msg['contact_type']) !== "organization") {
   foreach (array('first_name', 'last_name', 'middle_name') as $name) {

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CiviCRM updates to support changing contact type.

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398787 )

Change subject: CiviCRM updates to support changing contact type.
..

CiviCRM updates to support changing contact type.

These are mostly around processing greetings, which we in fact opt out of
when doing bulk processing

Bug: T156193
Change-Id: I30ac3cfc698c74606e6b270508cfd585df3fafe5
---
M civicrm
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/87/398787/1

diff --git a/civicrm b/civicrm
index b2fab9d..bd3fadb 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit b2fab9d9d24b1187e845ec601f4165683278243c
+Subproject commit bd3fadbf3335985e0b7ac425217b05ee5e963f11

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21551 Add parameter to support skipping processing greet...

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398786 )

Change subject: CRM-21551 Add parameter to support skipping processing 
greetings when calling api contact.create
..

CRM-21551 Add parameter to support skipping processing greetings when calling 
api contact.create

https://github.com/civicrm/civicrm-core/pull/11405

This allows unit tests in the extension to run for us & on stock & brings us 
closer
to stock

Change-Id: Ib99a659495b7c584a986d056d53667b23f62494c
---
M CRM/Contact/BAO/Contact.php
M api/v3/Contact.php
2 files changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/86/398786/1

diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 53730bd..7511c4f 100644
--- a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -437,8 +437,12 @@
   }
 }
 
-// process greetings CRM-4575, cache greetings
-// NOT: self::processGreetings($contact);
+// In order to prevent a series of expensive queries in intensive batch 
processing
+// api calls may pass in skip_greeting_processing, probably doing it later 
via the
+// scheduled job. CRM-21551
+if (empty($params['skip_greeting_processing'])) {
+  self::processGreetings($contact);
+}
 
 return $contact;
   }
diff --git a/api/v3/Contact.php b/api/v3/Contact.php
index 7329458..c8332d2 100644
--- a/api/v3/Contact.php
+++ b/api/v3/Contact.php
@@ -153,6 +153,12 @@
 'description' => 'Throw error if contact create matches dedupe rule',
 'type' => CRM_Utils_Type::T_BOOLEAN,
   );
+  $params['skip_greeting_processing'] = array(
+'title' => 'Skip Greeting processing',
+'description' => 'Do not process greetings, (these can be done by 
scheduled job and there may be a preference to do so for performance reasons)',
+'type' => CRM_Utils_Type::T_BOOLEAN,
+'api.default' => 0,
+  );
   $params['prefix_id']['api.aliases'] = array('individual_prefix', 
'individual_prefix_id');
   $params['suffix_id']['api.aliases'] = array('individual_suffix', 
'individual_suffix_id');
   $params['gender_id']['api.aliases'] = array('gender');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib99a659495b7c584a986d056d53667b23f62494c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: Set log level for com.google.gerrit.server.plugins.P...

2017-12-17 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398785 )

Change subject: gerrit: Set log level for 
com.google.gerrit.server.plugins.PluginLoader to ERROR
..

gerrit: Set log level for com.google.gerrit.server.plugins.PluginLoader to ERROR

It is spamming the logs with

No Plugin provider was found that handles this file format:
wikimedia-polygerrit-style.html

On gerrit 2.14

Which is because polymer plugins are not supported on 2.14 but it's ok
to have the plugin file in the plugins folder as it is not used just yet.

Also remove plugin_log. It's unneeded as it logs to error_log.

Change-Id: Ic7d8a0e504bff490d1b0db40e09321eca5e0502f
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/398785/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7d8a0e504bff490d1b0db40e09321eca5e0502f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Extend risk score limiting to cover components of the score

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398783 )

Change subject: Extend risk score limiting to cover components of the score
..


Extend risk score limiting to cover components of the score

Bug: T183102
Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
---
M sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
index 0e5dfb0..9613f27 100644
--- a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -94,6 +94,9 @@
}
if ( $id ) {
foreach ( $msg['score_breakdown'] as $test => $score ) {
+ if ($score > 1) {
+   $score = 1;
+}
$breakdown = array(
'payments_fraud_id' => $id,
'filter_name' => $test,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GraphViz[master]: Regenerate graphs even when user is not permitted to upload

2017-12-17 Thread Samwilson (Code Review)
Samwilson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398784 )

Change subject: Regenerate graphs even when user is not permitted to upload
..

Regenerate graphs even when user is not permitted to upload

This adds a new feature whereby graph images can be regenerated
and uploaded to the wiki even when the user viewing them does
not have upload permission. This means that one need not grant
upload permission to users who just need to edit graphs (i.e. they
already are allowed to edit wikitext) and is also of use to other
extensions such as SemanticResultFormats and Genealogy which
create dynamic graphs that need to be re-rendered by anonymous
users.

The upload is done by a new 'GraphViz' user, whose name is defined
by the 'graphviz-upload-user' system message.

This change also fixes a few minor deprecations and bugs such as
the error message shown when there is no filename known.

Bug: T176594
Change-Id: Idc72ff953a82229665e4aa1798eaf785750cab45
---
M i18n/en.json
M i18n/qqq.json
M includes/GraphViz.php
M includes/UploadFromLocalFile.php
M includes/UploadLocalFile.php
M tests/phpunit/GraphVizTest.php
6 files changed, 75 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GraphViz 
refs/changes/84/398784/1

diff --git a/i18n/en.json b/i18n/en.json
index 10d772f..5c38016 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -25,5 +25,6 @@
"graphviz-unrecognized-preparse-value": "The preparse value \"$1\" is 
unrecognized.",
"graphviz-category-desc": "$1 contains pages created by the GraphViz 
extension.",
"graphviz-subcategory-desc": "$1 contains pages created using the $2 
command.",
-   "graphviz-map-desc": "= ImageMap =\nWhen including this image in a wiki 
page, use the following mark-up to enable links:\n 
\n\nFile:$1\n$2\n\nSee 
[https://www.mediawiki.org/wiki/Extension:ImageMap ImageMap] for more 
information."
+   "graphviz-map-desc": "= ImageMap =\nWhen including this image in a wiki 
page, use the following mark-up to enable links:\n 
\n\nFile:$1\n$2\n\nSee 
[https://www.mediawiki.org/wiki/Extension:ImageMap ImageMap] for more 
information.",
+   "graphviz-upload-user": "GraphViz"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a8267e8..e201986 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -26,5 +26,6 @@
"graphviz-unrecognized-preparse-value": "Used as error message.  
Parameters:\n* $1 - attribute name",
"graphviz-category-desc": "GraphViz category page text.  Parameters:\n* 
$1 - GraphViz category tag",
"graphviz-subcategory-desc": "GraphViz subcategory page text.  
Parameters:\n* $1 - GraphViz subcategory tag\n* $2 - graph render command 
associated with subcategory",
-   "graphviz-map-desc": "Do not translate the tags , 
,  or .  
Parameters:\n* $1 - image file name\n* $2 - image map shape, coordinates and 
URL (0 or more lines)"
+   "graphviz-map-desc": "Do not translate the tags , 
,  or .  
Parameters:\n* $1 - image file name\n* $2 - image map shape, coordinates and 
URL (0 or more lines)",
+   "graphviz-upload-user": "The username of the user that graph images 
should be uploaded as (if the current user doesn't have permission)"
 }
diff --git a/includes/GraphViz.php b/includes/GraphViz.php
index c1f5d91..7524a50 100644
--- a/includes/GraphViz.php
+++ b/includes/GraphViz.php
@@ -29,6 +29,7 @@
 use ImageMap;
 use MWException;
 use Parser;
+use PPFrame;
 use Sanitizer;
 use User;
 
@@ -475,13 +476,15 @@
 * - The optional "format" attribute allows the user to specify the 
image type from
 * among those supported for the graph language.  @ref Files.
 *
-* @param[in] Parser $parser
+* @param Parser $parser The parser.
+*
+* @param PPFrame $frame The preprocessor frame.
 *
 * @return string HTML of a graph image and optional map or an HTML 
error message.
 *
 * @author Keith Welter et al.
 */
-   protected static function render( $input, $args, $parser, $frame ) {
+   protected static function render( $input, $args, Parser $parser, 
PPFrame $frame ) {
global $wgUser;
 
// sanity check the input
@@ -536,11 +539,18 @@
$imageType = $settings->defaultImageType;
}
 
-   // determine user...
+   // Determine user. If the current user can't upload (e.g. this 
graph generation is being
+   // done by an extension and no user is logged in) then fall 
back to the GraphViz user as
+   // defined by the system message.
// In testing I found that $parser->getUser() did not give the 
logged-in user when doing an edit preview.
// So, I've gone against the recommended practice and used the 
global which gave the desired results.

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Extend risk score limiting to cover components of the score

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398783 )

Change subject: Extend risk score limiting to cover components of the score
..

Extend risk score limiting to cover components of the score

Bug: T183102
Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
---
M sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/83/398783/1

diff --git a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
index 0e5dfb0..9613f27 100644
--- a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -94,6 +94,9 @@
}
if ( $id ) {
foreach ( $msg['score_breakdown'] as $test => $score ) {
+ if ($score > 1) {
+   $score = 1;
+}
$breakdown = array(
'payments_fraud_id' => $id,
'filter_name' => $test,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Explain that user must execute a second time the command

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/388257 )

Change subject: Explain that user must execute a second time the command
..


Explain that user must execute a second time the command

Bug: T179627
Change-Id: If8223f3be6981607e775d9f168b7ccddcaefdd53
---
M pwb.py
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Dalba: Looks good to me, approved
  jenkins-bot: Verified
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/pwb.py b/pwb.py
index cd99f5f..7d877ed 100755
--- a/pwb.py
+++ b/pwb.py
@@ -194,6 +194,7 @@
 ['generate_user_files.py'])
 # because we have loaded pywikibot without user-config.py loaded, we 
need to re-start
 # the entire process. Ask the user to do so.
+print('Now, you have to re-execute the command to start your script.')
 sys.exit(1)
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8223f3be6981607e775d9f168b7ccddcaefdd53
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Extend risk score limiting to cover components of the score

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398780 )

Change subject: Extend risk score limiting to cover components of the score
..


Extend risk score limiting to cover components of the score

Bug: T183102
Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
---
M sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
M sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
M sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
3 files changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
index 0e5dfb0..9613f27 100644
--- a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -94,6 +94,9 @@
}
if ( $id ) {
foreach ( $msg['score_breakdown'] as $test => $score ) {
+ if ($score > 1) {
+   $score = 1;
+}
$breakdown = array(
'payments_fraud_id' => $id,
'filter_name' => $test,
diff --git 
a/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
index 91ce046..9ac3059 100644
--- a/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
+++ b/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
@@ -9,7 +9,8 @@
"getScoreUtmCampaignMap": "0",
"getScoreEmailDomainMap": "0",
"minfraud_filter": "0.10",
-   "IPVelocityFilter": "0"
+   "IPVelocityFilter": "0",
+   "SessionVelocity" : "4.6602755623854E+38"
},
"php-message-class": 
"SmashPig\\CrmLink\\Messages\\DonationInterfaceAntifraud",
"user_ip": "1.2.3.4",
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
index feffc91..f577cc1 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
@@ -107,7 +107,7 @@
$dbEntries = $this->getDbEntries(
$common['contribution_tracking_id'], $common['order_id']
);
-   $this->assertEquals( 8, count( $dbEntries ) );
+   $this->assertEquals( count($breakdown), count( $dbEntries ) );
$fields = array(
'gateway',  'validation_action', 'payment_method',
'risk_score', 'server'
@@ -121,8 +121,9 @@
);
foreach ( $dbEntries as $score ) {
$name = $score['filter_name'];
+   $expectedScore = $breakdown[$name] <= 1 ? 
$breakdown[$name] : 1;
$this->assertEquals(
-   $breakdown[$name], $score['fb_risk_score'], 
"Mismatched $name score"
+$expectedScore, $score['fb_risk_score'], "Mismatched $name score"
);
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Apply drupal formatting to AntifraudQueueConsumer.php

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398782 )

Change subject: Apply drupal formatting to AntifraudQueueConsumer.php
..

Apply drupal formatting to AntifraudQueueConsumer.php

Change-Id: I5279c87e5c80a4561753709e6e72a8ec0aea73a2
---
M sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
1 file changed, 107 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/82/398782/1

diff --git a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
index 9613f27..a0aa736 100644
--- a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -6,112 +6,119 @@
 
 class AntifraudQueueConsumer extends WmfQueueConsumer {
 
-   /**
-* Validate and store messages from the payments-antifraud queue
-*
-* @param array $message
-* @throws WmfException
-*/
-   function processMessage( $message ) {
-   $id = "{$message['gateway']}-{$message['order_id']}";
-   watchdog(
-   'fredge',
-   "Beginning processing of payments-antifraud message for 
$id: " .
-   json_encode( $message ),
-   array(),
-   WATCHDOG_INFO
-   );
+  /**
+   * Validate and store messages from the payments-antifraud queue
+   *
+   * @param array $message
+   *
+   * @throws WmfException
+   */
+  function processMessage($message) {
+$id = "{$message['gateway']}-{$message['order_id']}";
+watchdog(
+  'fredge',
+  "Beginning processing of payments-antifraud message for $id: " .
+  json_encode($message),
+  array(),
+  WATCHDOG_INFO
+);
 
-   // handle the IP address conversion to binary so we can do 
database voodoo later.
-   if ( array_key_exists( 'user_ip', $message ) ) {
-   // check for IPv6
-   if ( strpos( ':', $message['user_ip'] ) !== false ) {
-   /**
-* despite a load of documentation to the 
contrary, the following line
-* ***doesn't work at all***.
-* Which is okay for now: We force IPv4 on 
payments.
-* @TODO eventually: Actually handle IPv6 here.
-*/
-   // $message['user_ip'] = 
inet_pton($message['user_ip']);
+// handle the IP address conversion to binary so we can do database voodoo 
later.
+if (array_key_exists('user_ip', $message)) {
+  // check for IPv6
+  if (strpos(':', $message['user_ip']) !== FALSE) {
+/**
+ * despite a load of documentation to the contrary, the following line
+ * ***doesn't work at all***.
+ * Which is okay for now: We force IPv4 on payments.
+ *
+ * @TODO eventually: Actually handle IPv6 here.
+ */
+// $message['user_ip'] = inet_pton($message['user_ip']);
 
-   watchdog(
-   'fredge',
-   'Weird. Somehow an ipv6 address got 
through on payments. ' .
-   "Caught in antifraud consumer. 
$id",
-   array(),
-   WATCHDOG_WARNING
-   );
-   $message['user_ip'] = 0;
-   } else {
-   $message['user_ip'] = ip2long( 
$message['user_ip'] );
-   }
-   }
+watchdog(
+  'fredge',
+  'Weird. Somehow an ipv6 address got through on payments. ' .
+  "Caught in antifraud consumer. $id",
+  array(),
+  WATCHDOG_WARNING
+);
+$message['user_ip'] = 0;
+  }
+  else {
+$message['user_ip'] = ip2long($message['user_ip']);
+  }
+}
 
-   $this->insertAntifraudData( $message, $id );
-   }
+$this->insertAntifraudData($message, $id);
+  }
 
-   /**
-* take a message and insert or update rows in payments_fraud and 
payments_fraud_breakdown.
-* If there is not yet an antifraud row for this ct_id and order_id, 
all fields
-* in the table must be present in the message.
-* @param array $msg the message that you want to upsert.
-* @param string $logIdentifier Some small string for the log that will 
help id
-* the message if something goes amiss and we have to log about it.
-* @throws FredgeDataValidationException
-*/
-   

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: jobcron: fix variable scope resolution

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398781 )

Change subject: jobcron: fix variable scope resolution
..


jobcron: fix variable scope resolution

The @dir variable is not being looked up correctly under Puppet4. Using
the `scope` resolution operator and the absolute variable name seems to
work correctly.

Change-Id: Ic5abb5d05daa789199ef538528747db7a9b24fcd
---
M puppet/modules/mediawiki/templates/systemd/jobchron.erb
M puppet/modules/mediawiki/templates/systemd/jobrunner.erb
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/puppet/modules/mediawiki/templates/systemd/jobchron.erb 
b/puppet/modules/mediawiki/templates/systemd/jobchron.erb
index ba1f0df..f1de5dc 100644
--- a/puppet/modules/mediawiki/templates/systemd/jobchron.erb
+++ b/puppet/modules/mediawiki/templates/systemd/jobchron.erb
@@ -8,7 +8,7 @@
 User=www-data
 Group=www-data
 SyslogIdentifier=jobchron
-ExecStart=/usr/bin/php7.0 <%= @dir %>/redisJobChronService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
+ExecStart=/usr/bin/php7.0 <%= scope['::mediawiki::jobrunner::dir'] 
%>/redisJobChronService --config-file=/etc/jobrunner.json ${DAEMON_OPTS}
 Restart=always
 
 [Install]
diff --git a/puppet/modules/mediawiki/templates/systemd/jobrunner.erb 
b/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
index 2e2c4b2..698d3f2 100644
--- a/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
+++ b/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
@@ -8,7 +8,7 @@
 User=www-data
 Group=www-data
 SyslogIdentifier=jobrunner
-ExecStart=/usr/bin/php7.0 <%= @dir %>/redisJobRunnerService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
+ExecStart=/usr/bin/php7.0 <%= scope['::mediawiki::jobrunner::dir'] 
%>/redisJobRunnerService --config-file=/etc/jobrunner.json ${DAEMON_OPTS}
 Restart=always
 
 [Install]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5abb5d05daa789199ef538528747db7a9b24fcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: Make PHP7 the default runtime

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398707 )

Change subject: Make PHP7 the default runtime
..


Make PHP7 the default runtime

Move HHVM runtime to a role and make PHP7 the default runtime for the
wikis.

Bug: T181915
Change-Id: Ib1f2473597ecdaf48eb830aafd2606f271e26b48
---
M puppet/hieradata/common.yaml
M puppet/modules/hhvm/manifests/init.pp
M puppet/modules/mediawiki/manifests/apache.pp
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/mwrepl.pp
M puppet/modules/mediawiki/manifests/ready_service.pp
M puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
D puppet/modules/mediawiki/templates/mediawiki-php7-site.erb
M puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb
M puppet/modules/mediawiki/templates/systemd/jobchron.erb
M puppet/modules/mediawiki/templates/systemd/jobrunner.erb
M puppet/modules/php/manifests/composer.pp
A puppet/modules/role/manifests/hhvm.pp
M puppet/modules/role/manifests/scribunto.pp
D puppet/modules/role/manifests/zend.pp
15 files changed, 21 insertions(+), 93 deletions(-)

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



diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index 3eb1b97..d0640d8 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -225,7 +225,6 @@
 mediawiki::branch: master
 
 mediawiki::apache::docroot: "%{hiera('apache::docroot')}"
-mediawiki::apache::php7_site_name: "php7%{hiera('mwv::tld')}"
 
 mediawiki::jobrunner::enable: true
 mediawiki::jobrunner::dir: "%{hiera('mwv::services_dir')}/jobrunner"
diff --git a/puppet/modules/hhvm/manifests/init.pp 
b/puppet/modules/hhvm/manifests/init.pp
index 52846ec..403c74a 100644
--- a/puppet/modules/hhvm/manifests/init.pp
+++ b/puppet/modules/hhvm/manifests/init.pp
@@ -63,12 +63,6 @@
 require => Package['hhvm'],
 }
 
-env::alternative { 'hhvm_as_default_php':
-alternative => 'php',
-target  => '/usr/bin/hhvm',
-priority=> 20,
-}
-
 file { '/etc/hhvm':
 ensure => directory,
 owner  => 'root',
@@ -82,7 +76,6 @@
 group   => 'root',
 mode=> '0444',
 content => php_ini($common_settings),
-before  => Env::Alternative['hhvm_as_default_php'],
 }
 
 file { '/etc/hhvm/server.ini':
@@ -121,7 +114,6 @@
 owner  => 'www-data',
 group  => 'www-data',
 mode   => '0666',
-before => Env::Alternative['hhvm_as_default_php'],
 }
 
 file { $fcgi_settings['hhvm']['repo']['central']['path']:
diff --git a/puppet/modules/mediawiki/manifests/apache.pp 
b/puppet/modules/mediawiki/manifests/apache.pp
index ad698b0..fa71bca 100644
--- a/puppet/modules/mediawiki/manifests/apache.pp
+++ b/puppet/modules/mediawiki/manifests/apache.pp
@@ -7,12 +7,8 @@
 # [*docroot*]
 #   Document root for Apache vhost serving MediaWiki.
 #
-# [*php7_site_name*]
-#   Hostname for php7 runtime Apache vhost
-#
 class mediawiki::apache(
 $docroot,
-$php7_site_name,
 ) {
 include ::mediawiki
 include ::mediawiki::multiwiki
@@ -35,15 +31,6 @@
 Class['::apache::mod::alias'],
 Class['::apache::mod::rewrite'],
 Class['::apache::mod::proxy_fcgi'],
-],
-}
-
-apache::site { "php7-${mediawiki::wiki_name}":
-ensure  => present,
-content => template('mediawiki/mediawiki-php7-site.erb'),
-require => [
-Class['::apache::mod::alias'],
-Class['::apache::mod::rewrite'],
 ],
 }
 
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 2dea2a3..3bb641c 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -69,8 +69,6 @@
 
 include ::mwv
 require ::php
-require ::hhvm
-include ::hhvm::fcgi
 
 require ::service
 
diff --git a/puppet/modules/mediawiki/manifests/mwrepl.pp 
b/puppet/modules/mediawiki/manifests/mwrepl.pp
index 8881a2a..caf416b 100644
--- a/puppet/modules/mediawiki/manifests/mwrepl.pp
+++ b/puppet/modules/mediawiki/manifests/mwrepl.pp
@@ -21,10 +21,4 @@
 group   => 'root',
 mode=> '0555',
 }
-
-# Backwards compatibility
-file { '/usr/local/bin/hhvmsh':
-ensure => 'link',
-target => '/usr/local/bin/mwrepl',
-}
 }
diff --git a/puppet/modules/mediawiki/manifests/ready_service.pp 
b/puppet/modules/mediawiki/manifests/ready_service.pp
index af64928..74bdcfd 100644
--- a/puppet/modules/mediawiki/manifests/ready_service.pp
+++ b/puppet/modules/mediawiki/manifests/ready_service.pp
@@ -16,7 +16,6 @@
 #
 class mediawiki::ready_service {
 include ::mediawiki
-include ::hhvm::fcgi
 
 file { '/usr/local/bin/wait-for-mediawiki.sh':
 ensure  => 'present',
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: jobcron: fix variable scope resolution

2017-12-17 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398781 )

Change subject: jobcron: fix variable scope resolution
..

jobcron: fix variable scope resolution

The @dir variable is not being looked up correctly under Puppet4. Using
the `scope` resolution operator and the absolute variable name seems to
work correctly.

Change-Id: Ic5abb5d05daa789199ef538528747db7a9b24fcd
---
M puppet/modules/mediawiki/templates/systemd/jobchron.erb
M puppet/modules/mediawiki/templates/systemd/jobrunner.erb
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/81/398781/1

diff --git a/puppet/modules/mediawiki/templates/systemd/jobchron.erb 
b/puppet/modules/mediawiki/templates/systemd/jobchron.erb
index ba1f0df..f1de5dc 100644
--- a/puppet/modules/mediawiki/templates/systemd/jobchron.erb
+++ b/puppet/modules/mediawiki/templates/systemd/jobchron.erb
@@ -8,7 +8,7 @@
 User=www-data
 Group=www-data
 SyslogIdentifier=jobchron
-ExecStart=/usr/bin/php7.0 <%= @dir %>/redisJobChronService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
+ExecStart=/usr/bin/php7.0 <%= scope['::mediawiki::jobrunner::dir'] 
%>/redisJobChronService --config-file=/etc/jobrunner.json ${DAEMON_OPTS}
 Restart=always
 
 [Install]
diff --git a/puppet/modules/mediawiki/templates/systemd/jobrunner.erb 
b/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
index 2e2c4b2..698d3f2 100644
--- a/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
+++ b/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
@@ -8,7 +8,7 @@
 User=www-data
 Group=www-data
 SyslogIdentifier=jobrunner
-ExecStart=/usr/bin/php7.0 <%= @dir %>/redisJobRunnerService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
+ExecStart=/usr/bin/php7.0 <%= scope['::mediawiki::jobrunner::dir'] 
%>/redisJobRunnerService --config-file=/etc/jobrunner.json ${DAEMON_OPTS}
 Restart=always
 
 [Install]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5abb5d05daa789199ef538528747db7a9b24fcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Extend risk score test to cover components

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398780 )

Change subject: Extend risk score test to cover components
..

Extend risk score test to cover components

Bug: T183102
Change-Id: I3c1b1a0d24bad9a27930d8246f9fdc448b7f1219
---
M sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/80/398780/1

diff --git 
a/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
index 91ce046..10eb556 100644
--- a/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
+++ b/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
@@ -9,7 +9,8 @@
"getScoreUtmCampaignMap": "0",
"getScoreEmailDomainMap": "0",
"minfraud_filter": "0.10",
-   "IPVelocityFilter": "0"
+   "IPVelocityFilter": "0",
+"SessionVelocity" : "4.6602755623854E+38"
},
"php-message-class": 
"SmashPig\\CrmLink\\Messages\\DonationInterfaceAntifraud",
"user_ip": "1.2.3.4",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add log4j to logstash plugin

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391638 )

Change subject: Add log4j to logstash plugin
..


Add log4j to logstash plugin

Change-Id: Ic891f936cfc60c1710a6a65f9f6272e4005bb500
---
A puppet/modules/logstash/manifests/input/log4j.pp
A puppet/modules/logstash/templates/input/log4j.erb
M puppet/modules/role/manifests/elk.pp
3 files changed, 42 insertions(+), 0 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified
  Gehel: Looks good to me, but someone else must approve



diff --git a/puppet/modules/logstash/manifests/input/log4j.pp 
b/puppet/modules/logstash/manifests/input/log4j.pp
new file mode 100644
index 000..dc06b12
--- /dev/null
+++ b/puppet/modules/logstash/manifests/input/log4j.pp
@@ -0,0 +1,31 @@
+# vim:sw=4 ts=4 sts=4 et:
+
+# = Define: logstash::input::log4j
+#
+# Configure logstash to collect input as a log4j listener
+#
+# == Parameters:
+# - $ensure: Whether the config should exist. Default present.
+# - $port: port to listen for json input on. Default 12202.
+# - $priority: Configuration loading priority. Default undef.
+#
+# == Sample usage:
+#
+#   logstash::input::log4j {
+#   port => 4560,
+#   }
+#
+define logstash::input::log4j(
+$ensure   = present,
+$port = 4560,
+$priority = 10,
+$mode = 'server',
+$host = '0.0.0.0',
+) {
+logstash::conf { "input_log4j_${title}":
+ensure   => $ensure,
+content  => template('logstash/input/log4j.erb'),
+priority => $priority,
+}
+}
+
diff --git a/puppet/modules/logstash/templates/input/log4j.erb 
b/puppet/modules/logstash/templates/input/log4j.erb
new file mode 100644
index 000..65e8470
--- /dev/null
+++ b/puppet/modules/logstash/templates/input/log4j.erb
@@ -0,0 +1,9 @@
+input {
+  # Log4j socket-based logger
+  log4j {
+type => "log4j"
+port => "<%= @port %>"
+mode => "<%= @mode %>"
+host => "<%= @host %>"
+  }
+}
\ No newline at end of file
diff --git a/puppet/modules/role/manifests/elk.pp 
b/puppet/modules/role/manifests/elk.pp
index 48825b3..7e7a7d4 100644
--- a/puppet/modules/role/manifests/elk.pp
+++ b/puppet/modules/role/manifests/elk.pp
@@ -34,6 +34,8 @@
 port => 12202,
 }
 
+logstash::input::log4j { 'log4j': }
+
 logstash::conf { 'filter_strip_ansi_color':
 source   => 'puppet:///modules/role/elk/filter-strip-ansi-color.conf',
 priority => 40,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic891f936cfc60c1710a6a65f9f6272e4005bb500
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Top out risk score at 100 million.

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398779 )

Change subject: Top out risk score at 100 million.
..


Top out risk score at 100 million.

100 million is effectively 'infinite risk' & the DB breaks somewhere above that 
point

Bug: T183102

Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 4dd223d..47de8e4 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -136,6 +136,11 @@
   if (array_key_exists('mysql_type', $definition) && 
$definition['mysql_type'] === 'DATETIME') {
 $msg[$field] = wmf_common_date_unix_to_sql($msg[$field]);
   }
+  // e.g. 3.5848273556811E+38 breaks the db - use 100 mill as 'infinitely 
dubious'
+  if (!empty($msg['risk_score']) && $msg['risk_score'] > 1) {
+$msg['risk_score'] = 1;
+  }
+
   $data[$field] = $msg[$field];
 }
   }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Top out risk score at 100 million.

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398779 )

Change subject: Top out risk score at 100 million.
..

Top out risk score at 100 million.

100 million is effectively 'infinite risk' & the DB breaks somewhere above that 
point

Bug: T183102

Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/79/398779/1

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 4dd223d..47de8e4 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -136,6 +136,11 @@
   if (array_key_exists('mysql_type', $definition) && 
$definition['mysql_type'] === 'DATETIME') {
 $msg[$field] = wmf_common_date_unix_to_sql($msg[$field]);
   }
+  // e.g. 3.5848273556811E+38 breaks the db - use 100 mill as 'infinitely 
dubious'
+  if (!empty($msg['risk_score']) && $msg['risk_score'] > 1) {
+$msg['risk_score'] = 1;
+  }
+
   $data[$field] = $msg[$field];
 }
   }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Reset deploy branch to match production

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398778 )

Change subject: Reset deploy branch to match production
..


Reset deploy branch to match production

Will need to redo commits between 798e2467 and this one next week

Change-Id: I5d830389ff5f2fa7ca76d01467adfd248dc784dd
---
M civicrm
M composer.json
M composer.lock
M sites/all/modules/queue2civicrm/DonationQueueConsumer.php
D sites/all/modules/queue2civicrm/DonationStats.php
M sites/all/modules/queue2civicrm/queue2civicrm.info
M sites/all/modules/queue2civicrm/queue2civicrm.module
D sites/all/modules/queue2civicrm/tests/phpunit/DonationStatsTest.php
M sites/all/modules/thank_you/make_thank_you.drush.inc
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
M vendor
11 files changed, 44 insertions(+), 521 deletions(-)

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



diff --git a/civicrm b/civicrm
index b2fab9d..a82f2e7 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit b2fab9d9d24b1187e845ec601f4165683278243c
+Subproject commit a82f2e7ea633af7477a2c8859b97dbe13ddda5d7
diff --git a/composer.json b/composer.json
index 81456c6..72a398e 100644
--- a/composer.json
+++ b/composer.json
@@ -25,8 +25,7 @@
 "phpseclib/phpseclib":  "~2.0",
 "predis/predis": "1.*",
 "twig/twig": "1.*",
-"wikimedia/composer-merge-plugin": "^1.4",
-"jackgleeson/stats-collector": "dev-master"
+"wikimedia/composer-merge-plugin": "^1.4"
 },
 "repositories": [
   {
diff --git a/composer.lock b/composer.lock
index 2ae68da..e06dee5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "f5b1e547c9865d17802925641c804265",
+"content-hash": "32a4c6d1dba52d233ae8892c1908badf",
 "packages": [
 {
 "name": "addshore/psr-6-mediawiki-bagostuff-adapter",
@@ -353,65 +353,6 @@
 "time": "2017-06-30T14:54:48+00:00"
 },
 {
-"name": "dflydev/dot-access-data",
-"version": "v1.1.0",
-"source": {
-"type": "git",
-"url": 
"https://github.com/dflydev/dflydev-dot-access-data.git;,
-"reference": "3fbd874921ab2c041e899d044585a2ab9795df8a"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a;,
-"reference": "3fbd874921ab2c041e899d044585a2ab9795df8a",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.2"
-},
-"type": "library",
-"extra": {
-"branch-alias": {
-"dev-master": "1.0-dev"
-}
-},
-"autoload": {
-"psr-0": {
-"Dflydev\\DotAccessData": "src"
-}
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Dragonfly Development Inc.",
-"email": "i...@dflydev.com",
-"homepage": "http://dflydev.com;
-},
-{
-"name": "Beau Simensen",
-"email": "b...@dflydev.com",
-"homepage": "http://beausimensen.com;
-},
-{
-"name": "Carlos Frutos",
-"email": "car...@kiwing.it",
-"homepage": "https://github.com/cfrutos;
-}
-],
-"description": "Given a deep data structure, access data by dot 
notation.",
-"homepage": "https://github.com/dflydev/dflydev-dot-access-data;,
-"keywords": [
-"access",
-"data",
-"dot",
-"notation"
-],
-"time": "2017-01-20T21:14:22+00:00"
-},
-{
 "name": "geoip2/geoip2",
 "version": "v2.6.0",
 "source": {
@@ -686,46 +627,6 @@
 "password"
 ],
 "time": "2014-11-20T16:49:30+00:00"
-},
-{
-"name": "jackgleeson/stats-collector",
-"version": "dev-master",
-"source": {
-"type": "git",
-"url": "https://github.com/jackgleeson/stats-collector.git;,
-"reference": "1c792bbeac77d4781fbb788f341b601636696df5"
-},
-"dist": {
-"type": "zip",
- 

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Reset deploy branch to match production

2017-12-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398778 )

Change subject: Reset deploy branch to match production
..

Reset deploy branch to match production

Will need to redo commits between 798e2467 and this one next week

Change-Id: I5d830389ff5f2fa7ca76d01467adfd248dc784dd
---
M civicrm
M composer.json
M composer.lock
M sites/all/modules/queue2civicrm/DonationQueueConsumer.php
D sites/all/modules/queue2civicrm/DonationStats.php
M sites/all/modules/queue2civicrm/queue2civicrm.info
M sites/all/modules/queue2civicrm/queue2civicrm.module
D sites/all/modules/queue2civicrm/tests/phpunit/DonationStatsTest.php
M sites/all/modules/thank_you/make_thank_you.drush.inc
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
M vendor
11 files changed, 44 insertions(+), 521 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/78/398778/1

diff --git a/civicrm b/civicrm
index b2fab9d..a82f2e7 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit b2fab9d9d24b1187e845ec601f4165683278243c
+Subproject commit a82f2e7ea633af7477a2c8859b97dbe13ddda5d7
diff --git a/composer.json b/composer.json
index 81456c6..72a398e 100644
--- a/composer.json
+++ b/composer.json
@@ -25,8 +25,7 @@
 "phpseclib/phpseclib":  "~2.0",
 "predis/predis": "1.*",
 "twig/twig": "1.*",
-"wikimedia/composer-merge-plugin": "^1.4",
-"jackgleeson/stats-collector": "dev-master"
+"wikimedia/composer-merge-plugin": "^1.4"
 },
 "repositories": [
   {
diff --git a/composer.lock b/composer.lock
index 2ae68da..e06dee5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "f5b1e547c9865d17802925641c804265",
+"content-hash": "32a4c6d1dba52d233ae8892c1908badf",
 "packages": [
 {
 "name": "addshore/psr-6-mediawiki-bagostuff-adapter",
@@ -353,65 +353,6 @@
 "time": "2017-06-30T14:54:48+00:00"
 },
 {
-"name": "dflydev/dot-access-data",
-"version": "v1.1.0",
-"source": {
-"type": "git",
-"url": 
"https://github.com/dflydev/dflydev-dot-access-data.git;,
-"reference": "3fbd874921ab2c041e899d044585a2ab9795df8a"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a;,
-"reference": "3fbd874921ab2c041e899d044585a2ab9795df8a",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.2"
-},
-"type": "library",
-"extra": {
-"branch-alias": {
-"dev-master": "1.0-dev"
-}
-},
-"autoload": {
-"psr-0": {
-"Dflydev\\DotAccessData": "src"
-}
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"authors": [
-{
-"name": "Dragonfly Development Inc.",
-"email": "i...@dflydev.com",
-"homepage": "http://dflydev.com;
-},
-{
-"name": "Beau Simensen",
-"email": "b...@dflydev.com",
-"homepage": "http://beausimensen.com;
-},
-{
-"name": "Carlos Frutos",
-"email": "car...@kiwing.it",
-"homepage": "https://github.com/cfrutos;
-}
-],
-"description": "Given a deep data structure, access data by dot 
notation.",
-"homepage": "https://github.com/dflydev/dflydev-dot-access-data;,
-"keywords": [
-"access",
-"data",
-"dot",
-"notation"
-],
-"time": "2017-01-20T21:14:22+00:00"
-},
-{
 "name": "geoip2/geoip2",
 "version": "v2.6.0",
 "source": {
@@ -686,46 +627,6 @@
 "password"
 ],
 "time": "2014-11-20T16:49:30+00:00"
-},
-{
-"name": "jackgleeson/stats-collector",
-"version": "dev-master",
-"source": {
-"type": "git",
-"url": "https://github.com/jackgleeson/stats-collector.git;,
-"reference": "1c792bbeac77d4781fbb788f341b601636696df5"
-},
-"dist": {
-"type": 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Top out risk score at 100 million.

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398777 )

Change subject: Top out risk score at 100 million.
..


Top out risk score at 100 million.

100 million is effectively 'infinite risk' & the DB breaks somewhere above that 
point

Bug: T183102

Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
A sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
M sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
3 files changed, 52 insertions(+), 1 deletion(-)

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 4dd223d..47de8e4 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -136,6 +136,11 @@
   if (array_key_exists('mysql_type', $definition) && 
$definition['mysql_type'] === 'DATETIME') {
 $msg[$field] = wmf_common_date_unix_to_sql($msg[$field]);
   }
+  // e.g. 3.5848273556811E+38 breaks the db - use 100 mill as 'infinitely 
dubious'
+  if (!empty($msg['risk_score']) && $msg['risk_score'] > 1) {
+$msg['risk_score'] = 1;
+  }
+
   $data[$field] = $msg[$field];
 }
   }
diff --git 
a/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json 
b/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
new file mode 100644
index 000..91ce046
--- /dev/null
+++ b/sites/all/modules/queue2civicrm/tests/data/payments-antifraud-high.json
@@ -0,0 +1,24 @@
+{
+   "validation_action": " reject",
+   "risk_score": "3.5848273556811E+38",
+   "score_breakdown": {
+   "initial": "0",
+   "getCVVResult": "0.2",
+   "getAVSResult": "0",
+   "getScoreCountryMap": "0",
+   "getScoreUtmCampaignMap": "0",
+   "getScoreEmailDomainMap": "0",
+   "minfraud_filter": "0.10",
+   "IPVelocityFilter": "0"
+   },
+   "php-message-class": 
"SmashPig\\CrmLink\\Messages\\DonationInterfaceAntifraud",
+   "user_ip": "1.2.3.4",
+   "freeform": "1",
+   "gateway_txn_id": "",
+   "date": "1445990975",
+   "server": "testpayments1001",
+   "gateway": "testgateway",
+   "contribution_tracking_id": "28713751",
+   "order_id": "28713751.0",
+   "payment_method": "cc"
+}
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
index ea63274..feffc91 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
@@ -32,7 +32,29 @@
$this->compareMessageWithDb( $message, 
$message['score_breakdown'] );
}
 
-   /**
+  /**
+   * If the risk score is more than 100 million it should be set to 100 mil.
+   *
+   * This is effectively 'infinite risk' and our db can't cope with
+   * real value! '3.5848273556811E+38'
+   */
+  public function testFraudMessageWithOutOfRangeScore() {
+$message = json_decode(
+  file_get_contents(__DIR__ . '/../data/payments-antifraud-high.json'),
+  TRUE
+);
+$ctId = mt_rand();
+$oId = $ctId . '.0';
+$message['contribution_tracking_id'] = $ctId;
+$message['order_id'] = $oId;
+$this->consumer->processMessage($message);
+
+$message['risk_score'] = 1;
+
+$this->compareMessageWithDb($message, $message['score_breakdown']);
+  }
+
+/**
 * The first message for a ct_id / order_id pair needs to be complete
 *
 * @expectedException FredgeDataValidationException

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Revert of 164d2d64ccf9 - DB_REPLICA was only added in MW 1.28

2017-12-17 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398776 )

Change subject: Revert of 164d2d64ccf9 - DB_REPLICA was only added in MW 1.28
..

Revert of 164d2d64ccf9 - DB_REPLICA was only added in MW 1.28

Change-Id: I571973d5aa595cb44c5008d1c71634249dec589e
---
M includes/PF_AutocompleteAPI.php
M includes/PF_FormEditAction.php
M includes/PF_FormLinker.php
M includes/PF_Utils.php
M includes/PF_ValuesUtils.php
M includes/forminputs/PF_Tree.php
M specials/PF_CreateForm.php
7 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/76/398776/2

diff --git a/includes/PF_AutocompleteAPI.php b/includes/PF_AutocompleteAPI.php
index ff5501a..b57bd77 100644
--- a/includes/PF_AutocompleteAPI.php
+++ b/includes/PF_AutocompleteAPI.php
@@ -187,7 +187,7 @@
global $smwgDefaultStore;
 
$values = array();
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$sqlOptions = array();
$sqlOptions['LIMIT'] = $wgPageFormsMaxAutocompleteValues;
 
diff --git a/includes/PF_FormEditAction.php b/includes/PF_FormEditAction.php
index c68d566..9d6f93e 100644
--- a/includes/PF_FormEditAction.php
+++ b/includes/PF_FormEditAction.php
@@ -225,7 +225,7 @@
 * (hopefully) pretty rare.
 */
static function getNumPagesPerForm() {
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select(
array( 'category', 'page', 'page_props' ),
array( 'pp_value', 'SUM(cat_pages) AS total_pages' ),
diff --git a/includes/PF_FormLinker.php b/includes/PF_FormLinker.php
index a25bb53..8f6a731 100644
--- a/includes/PF_FormLinker.php
+++ b/includes/PF_FormLinker.php
@@ -21,7 +21,7 @@
}
 
$pageID = $title->getArticleID();
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page_props',
array(
'pp_value'
diff --git a/includes/PF_Utils.php b/includes/PF_Utils.php
index 00574f7..81b6c5f 100644
--- a/includes/PF_Utils.php
+++ b/includes/PF_Utils.php
@@ -234,7 +234,7 @@
 * Returns an array of all form names on this wiki.
*/
public static function getAllForms() {
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page',
'page_title',
array( 'page_namespace' => PF_NS_FORM,
diff --git a/includes/PF_ValuesUtils.php b/includes/PF_ValuesUtils.php
index a6cb598..e806a4b 100644
--- a/includes/PF_ValuesUtils.php
+++ b/includes/PF_ValuesUtils.php
@@ -51,7 +51,7 @@
 */
public static function getCategoriesForPage( $title = null ) {
$categories = array();
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$conditions = null;
if ( !is_null( $title ) ) {
$titlekey = $title->getArticleID();
@@ -149,7 +149,7 @@
}
global $wgPageFormsMaxAutocompleteValues, 
$wgPageFormsUseDisplayTitle;
 
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$top_category = str_replace( ' ', '_', $top_category );
$categories = array( $top_category );
$checkcategories = array( $top_category );
@@ -392,7 +392,7 @@
return wfMessage( 'pf-missingnamespace', 
wfEscapeWikiText( $namespace_name ) );
}
 
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$tables = array( 'page' );
$columns = array( 'page_title' );
$conditions = array();
@@ -540,7 +540,7 @@
public static function getSQLConditionForAutocompleteInColumn( $column, 
$substring, $replaceSpaces = true ) {
global $wgDBtype, $wgPageFormsAutocompleteOnAllChars;
 
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
 
// CONVERT() is also supported in PostgreSQL, but it doesn't
// seem to work the same way.
diff --git a/includes/forminputs/PF_Tree.php b/includes/forminputs/PF_Tree.php
index 2802d49..b9efb29 100644
--- a/includes/forminputs/PF_Tree.php
+++ b/includes/forminputs/PF_Tree.php
@@ -86,7 +86,7 @@
 * @return array
 */
private static function getSubcategories( $categoryName ) {
-   $dbr = wfGetDb( DB_REPLICA );
+   $dbr = wfGetDb( DB_SLAVE );
 
$tables = array( 'page', 'categorylinks' );
$fields = array( 

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Revert of 164d2d64ccf9 - DB_REPLICA was only added in MW 1.28

2017-12-17 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398776 )

Change subject: Revert of 164d2d64ccf9 - DB_REPLICA was only added in MW 1.28
..


Revert of 164d2d64ccf9 - DB_REPLICA was only added in MW 1.28

Change-Id: I571973d5aa595cb44c5008d1c71634249dec589e
---
M includes/PF_AutocompleteAPI.php
M includes/PF_FormEditAction.php
M includes/PF_FormLinker.php
M includes/PF_Utils.php
M includes/PF_ValuesUtils.php
M includes/forminputs/PF_Tree.php
M specials/PF_CreateForm.php
7 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/includes/PF_AutocompleteAPI.php b/includes/PF_AutocompleteAPI.php
index ff5501a..b57bd77 100644
--- a/includes/PF_AutocompleteAPI.php
+++ b/includes/PF_AutocompleteAPI.php
@@ -187,7 +187,7 @@
global $smwgDefaultStore;
 
$values = array();
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$sqlOptions = array();
$sqlOptions['LIMIT'] = $wgPageFormsMaxAutocompleteValues;
 
diff --git a/includes/PF_FormEditAction.php b/includes/PF_FormEditAction.php
index c68d566..9d6f93e 100644
--- a/includes/PF_FormEditAction.php
+++ b/includes/PF_FormEditAction.php
@@ -225,7 +225,7 @@
 * (hopefully) pretty rare.
 */
static function getNumPagesPerForm() {
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select(
array( 'category', 'page', 'page_props' ),
array( 'pp_value', 'SUM(cat_pages) AS total_pages' ),
diff --git a/includes/PF_FormLinker.php b/includes/PF_FormLinker.php
index a25bb53..8f6a731 100644
--- a/includes/PF_FormLinker.php
+++ b/includes/PF_FormLinker.php
@@ -21,7 +21,7 @@
}
 
$pageID = $title->getArticleID();
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page_props',
array(
'pp_value'
diff --git a/includes/PF_Utils.php b/includes/PF_Utils.php
index 00574f7..81b6c5f 100644
--- a/includes/PF_Utils.php
+++ b/includes/PF_Utils.php
@@ -234,7 +234,7 @@
 * Returns an array of all form names on this wiki.
*/
public static function getAllForms() {
-   $dbr = wfGetDB( DB_REPLICA );
+   $dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page',
'page_title',
array( 'page_namespace' => PF_NS_FORM,
diff --git a/includes/PF_ValuesUtils.php b/includes/PF_ValuesUtils.php
index a6cb598..e806a4b 100644
--- a/includes/PF_ValuesUtils.php
+++ b/includes/PF_ValuesUtils.php
@@ -51,7 +51,7 @@
 */
public static function getCategoriesForPage( $title = null ) {
$categories = array();
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$conditions = null;
if ( !is_null( $title ) ) {
$titlekey = $title->getArticleID();
@@ -149,7 +149,7 @@
}
global $wgPageFormsMaxAutocompleteValues, 
$wgPageFormsUseDisplayTitle;
 
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$top_category = str_replace( ' ', '_', $top_category );
$categories = array( $top_category );
$checkcategories = array( $top_category );
@@ -392,7 +392,7 @@
return wfMessage( 'pf-missingnamespace', 
wfEscapeWikiText( $namespace_name ) );
}
 
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
$tables = array( 'page' );
$columns = array( 'page_title' );
$conditions = array();
@@ -540,7 +540,7 @@
public static function getSQLConditionForAutocompleteInColumn( $column, 
$substring, $replaceSpaces = true ) {
global $wgDBtype, $wgPageFormsAutocompleteOnAllChars;
 
-   $db = wfGetDB( DB_REPLICA );
+   $db = wfGetDB( DB_SLAVE );
 
// CONVERT() is also supported in PostgreSQL, but it doesn't
// seem to work the same way.
diff --git a/includes/forminputs/PF_Tree.php b/includes/forminputs/PF_Tree.php
index 2802d49..b9efb29 100644
--- a/includes/forminputs/PF_Tree.php
+++ b/includes/forminputs/PF_Tree.php
@@ -86,7 +86,7 @@
 * @return array
 */
private static function getSubcategories( $categoryName ) {
-   $dbr = wfGetDb( DB_REPLICA );
+   $dbr = wfGetDb( DB_SLAVE );
 
$tables = array( 'page', 'categorylinks' );
$fields = array( 'page_id', 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Top out risk score at 100 million.

2017-12-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398777 )

Change subject: Top out risk score at 100 million.
..

Top out risk score at 100 million.

100 million is effectively 'infinite risk' & the DB breaks somewhere above that 
point

Bug: T183102

Change-Id: I5529ff86abf082c41b9c5d075bdc9c164f762872
---
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
M sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
2 files changed, 29 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/77/398777/1

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 4dd223d..79f697a 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -136,6 +136,12 @@
   if (array_key_exists('mysql_type', $definition) && 
$definition['mysql_type'] === 'DATETIME') {
 $msg[$field] = wmf_common_date_unix_to_sql($msg[$field]);
   }
+  if (stristr($msg['risk_score'], 'E')) {
+// e.g. 3.5848273556811E+38 breaks the db - use 100 mill as 
'infinitely dubious'
+if ($msg['risk_score'] > 1) {
+  $msg['risk_score'] = 1;
+}
+  }
   $data[$field] = $msg[$field];
 }
   }
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
index ea63274..feffc91 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/AntifraudQueueTest.php
@@ -32,7 +32,29 @@
$this->compareMessageWithDb( $message, 
$message['score_breakdown'] );
}
 
-   /**
+  /**
+   * If the risk score is more than 100 million it should be set to 100 mil.
+   *
+   * This is effectively 'infinite risk' and our db can't cope with
+   * real value! '3.5848273556811E+38'
+   */
+  public function testFraudMessageWithOutOfRangeScore() {
+$message = json_decode(
+  file_get_contents(__DIR__ . '/../data/payments-antifraud-high.json'),
+  TRUE
+);
+$ctId = mt_rand();
+$oId = $ctId . '.0';
+$message['contribution_tracking_id'] = $ctId;
+$message['order_id'] = $oId;
+$this->consumer->processMessage($message);
+
+$message['risk_score'] = 1;
+
+$this->compareMessageWithDb($message, $message['score_breakdown']);
+  }
+
+/**
 * The first message for a ct_id / order_id pair needs to be complete
 *
 * @expectedException FredgeDataValidationException

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Fix escaping of 'mobile-frontend-diffview-comma' message

2017-12-17 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398775 )

Change subject: Fix escaping of 'mobile-frontend-diffview-comma' message
..

Fix escaping of 'mobile-frontend-diffview-comma' message

Using parse instead of text, as per the instructions on the phabricator task 
for cases
where the parameter is HTML.

Bug: T182213
Change-Id: I380fb51938ca343ec31330bc02ed793387b9ee44
---
M includes/specials/SpecialMobileDiff.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/75/398775/1

diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index fd73c13..eca275e 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -259,7 +259,7 @@
'span', [ 'class' => 'mw-mf-diff-date 
meta' ],

$this->getLanguage()->getHumanTimestamp( $ts )
)
-   )->text()
+   )->parse()
. Html::closeElement( 'div' );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I380fb51938ca343ec31330bc02ed793387b9ee44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Pppery 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM[master]: GeoEngine 18 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398774 )

Change subject: GeoEngine 18 Dec 2017
..


GeoEngine 18 Dec 2017

Change-Id: I2fbe58b2ef52f1d1ede0da3528600d34a06632dd
---
M WDCM_EngineGeo_goransm.R
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/WDCM_EngineGeo_goransm.R b/WDCM_EngineGeo_goransm.R
index 4a04518..9f54564 100644
--- a/WDCM_EngineGeo_goransm.R
+++ b/WDCM_EngineGeo_goransm.R
@@ -219,7 +219,6 @@
 
 ### --- read item categories:
 setwd(itemsDir)
-
 idFiles <- list.files()
 idFiles <- idFiles[grepl(".csv$", idFiles)]
 categories <- unname(sapply(idFiles, function(x) {
@@ -342,7 +341,9 @@
   # - write: back to dataDir
   setwd(dataDir)
   file.remove(lF[i])
-  write.csv(usage, file = gsub(".tsv", ".csv", lF[i], fixed = T))
+  write.csv(usage, file = gsub(".tsv", ".csv", 
+   gsub("_ItemIDs", "", paste("wdcm_geoitem_", 
rF[i], sep = ""), fixed = T)
+   ))
 }
 
 ### --- log ETL step:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fbe58b2ef52f1d1ede0da3528600d34a06632dd
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM[master]: GeoEngine 18 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398774 )

Change subject: GeoEngine 18 Dec 2017
..

GeoEngine 18 Dec 2017

Change-Id: I2fbe58b2ef52f1d1ede0da3528600d34a06632dd
---
M WDCM_EngineGeo_goransm.R
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM 
refs/changes/74/398774/1

diff --git a/WDCM_EngineGeo_goransm.R b/WDCM_EngineGeo_goransm.R
index 4a04518..9f54564 100644
--- a/WDCM_EngineGeo_goransm.R
+++ b/WDCM_EngineGeo_goransm.R
@@ -219,7 +219,6 @@
 
 ### --- read item categories:
 setwd(itemsDir)
-
 idFiles <- list.files()
 idFiles <- idFiles[grepl(".csv$", idFiles)]
 categories <- unname(sapply(idFiles, function(x) {
@@ -342,7 +341,9 @@
   # - write: back to dataDir
   setwd(dataDir)
   file.remove(lF[i])
-  write.csv(usage, file = gsub(".tsv", ".csv", lF[i], fixed = T))
+  write.csv(usage, file = gsub(".tsv", ".csv", 
+   gsub("_ItemIDs", "", paste("wdcm_geoitem_", 
rF[i], sep = ""), fixed = T)
+   ))
 }
 
 ### --- log ETL step:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fbe58b2ef52f1d1ede0da3528600d34a06632dd
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Fail gracefully if curl is not installed

2017-12-17 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398773 )

Change subject: Fail gracefully if curl is not installed
..

Fail gracefully if curl is not installed

Bug: T166355
Change-Id: Iaf4864dc76535efc3ccd09efe1b6c4f9178130c4
---
M includes/Version.php
1 file changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/includes/Version.php b/includes/Version.php
index c1868cb..457cd35 100644
--- a/includes/Version.php
+++ b/includes/Version.php
@@ -39,6 +39,20 @@
public function get() {
global $wgCirrusSearchClientSideSearchTimeout;
 
+   if ( !function_exists( 'curl_version' ) ) {
+   $phpVersionCheck = new \PHPVersionCheck();
+   $phpVersionCheck->triggerError(
+   null,
+   $phpVersionCheck->getIndexErrorOutput(
+   'Required dependency for CirrusSearch 
is missing',
+   'CirrusSearch extension requires 
cURL in order to operate, but it is not installed on this server.'
+   . ' Please install PHP 
cURL extension.',
+   null
+   ),
+   null, null
+   );
+   }
+
$cache = ObjectCache::getLocalClusterInstance();
$mcKey = $cache->makeKey( 'CirrusSearch', 'Elasticsearch', 
'version' );
$result = $cache->get( $mcKey );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf4864dc76535efc3ccd09efe1b6c4f9178130c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Phantom42 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make Gender normalize usernames

2017-12-17 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398772 )

Change subject: Make Gender normalize usernames
..

Make Gender normalize usernames

This ensures that if GENDER is fed wfEscapeWikitext()'d version
of a username, it will normalize it.

See discussion on T182800.

Note, we do not need to worry about the case of a user named
"Project:*foo" as such namespace prefixes are illegal in
usernames.

Change-Id: Ic5a8fc76c28dca43ce8e334ef1874c2673433f00
---
M includes/parser/CoreParserFunctions.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/398772/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 07944d4..ad56afc 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -337,8 +337,8 @@
// default
$gender = User::getDefaultOption( 'gender' );
 
-   // allow prefix.
-   $title = Title::newFromText( $username );
+   // allow prefix and normalize (e.g. "foo" -> "*foo" ).
+   $title = Title::newFromText( $username, NS_USER );
 
if ( $title && $title->inNamespace( NS_USER ) ) {
$username = $title->getText();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5a8fc76c28dca43ce8e334ef1874c2673433f00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Don't throw an exception when passed a bogus feed type

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398409 )

Change subject: Don't throw an exception when passed a bogus feed type
..


Don't throw an exception when passed a bogus feed type

Just assume they meant all, or something. They're already getting
the  in the response for a bogus value, no need to make
it act like there's some real error here we can't handle.

Bug: T24510
Change-Id: I92b059caea87e82f38bc5184b9c74b12d9abc421
---
M api/ApiFeedLQTThreads.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index d29e4c3..6ad3db3 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -131,14 +131,13 @@
// What's included?
$types = (array)$params['type'];
 
+   $msg = 'lqt-feed-title-all';
if ( !count( array_diff( [ 'replies', 'newthreads' ], $types ) 
) ) {
$msg = 'lqt-feed-title-all';
} elseif ( in_array( 'replies', $types ) ) {
$msg = 'lqt-feed-title-replies';
} elseif ( in_array( 'newthreads', $types ) ) {
$msg = 'lqt-feed-title-new-threads';
-   } else {
-   throw new Exception( "Unable to determine appropriate 
display type" );
}
 
if ( $fromCount ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92b059caea87e82f38bc5184b9c74b12d9abc421
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
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] mediawiki...RegexBlock[master]: Replace deprecated use of IP::isValidBlock with isValidRange

2017-12-17 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398771 )

Change subject: Replace deprecated use of IP::isValidBlock with isValidRange
..

Replace deprecated use of IP::isValidBlock with isValidRange

`IP::isValidBlock` has been deprecated since 1.30.0.

Change-Id: Ic1e80a76cba77fca0ecafcab25f9ef09ef210781
---
M extension.json
M includes/specials/SpecialRegexBlock.php
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RegexBlock 
refs/changes/71/398771/1

diff --git a/extension.json b/extension.json
index bc52e69..8c703ce 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "RegexBlock",
-   "version": "1.4.4",
+   "version": "1.4.5",
"author": [
"Bartek Łapiński",
"Tomasz Klim",
@@ -13,6 +13,9 @@
"url": "https://www.mediawiki.org/wiki/Extension:RegexBlock;,
"descriptionmsg": "regexblock-desc",
"type": "antispam",
+   "requires": {
+   "MediaWiki": ">= 1.30.0"
+   },
"config": {
"ContactLink": "Special:Contact",
"RegexBlockDatabase": false
diff --git a/includes/specials/SpecialRegexBlock.php 
b/includes/specials/SpecialRegexBlock.php
index 4e42432..75bc7c2 100644
--- a/includes/specials/SpecialRegexBlock.php
+++ b/includes/specials/SpecialRegexBlock.php
@@ -676,7 +676,7 @@
Block::TYPE_IP
];
 
-   } elseif ( IP::isValidBlock( $target ) ) {
+   } elseif ( IP::isValidRange( $target ) ) {
# Can't create a User from an IP range
return [ IP::sanitizeRange( $target ), 
Block::TYPE_RANGE ];
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1e80a76cba77fca0ecafcab25f9ef09ef210781
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexBlock
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Add protocol in Page.permalink()

2017-12-17 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398770 )

Change subject: [bugfix] Add protocol in Page.permalink()
..

[bugfix] Add protocol in Page.permalink()

Bug: T182854
Change-Id: I2c0d73274f7490c5afe53101e063e6d136984de5
---
M pywikibot/page.py
M tests/page_tests.py
2 files changed, 29 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/70/398770/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index d9580b6..54a6c74 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -541,7 +541,7 @@
 # TODO: what about redirects, errors?
 return self._revisions[oldid].text
 
-def permalink(self, oldid=None, percent_encoded=True):
+def permalink(self, oldid=None, percent_encoded=True, show_protocol=False):
 """Return the permalink URL of an old revision of this page.
 
 @param oldid: The revid of the revision desired.
@@ -551,8 +551,9 @@
 title = self.title(asUrl=True)
 else:
 title = self.title(asUrl=False).replace(' ', '_')
-return "//%s%s/index.php?title=%s=%s" \
-   % (self.site.hostname(),
+return "%s//%s%s/index.php?title=%s=%s" \
+   % (self.site.protocol() + ':' if show_protocol else '',
+  self.site.hostname(),
   self.site.scriptpath(),
   title,
   (oldid if oldid is not None else self.latest_revision_id))
diff --git a/tests/page_tests.py b/tests/page_tests.py
index 10aa170..8b9a494 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -1094,6 +1094,31 @@
 self.assertEqual(pywikibot.page.html2unicode(''), 'y')
 
 
+class TestPermalink(DefaultSiteTestCase):
+"""
+Test permalink function
+"""
+
+family = 'test'
+code = 'test'
+
+def test_permalink(self):
+site = self.get_site()
+p1 = pywikibot.Page(site, 'User:Framawiki/pwb_tests/permalink')
+self.assertEqual(p1.permalink(),
+ '//test.wikipedia.org/w/index.php?title=User%3A'
+ 'Framawiki/pwb_tests/permalink=340685')
+self.assertEqual(p1.permalink(oldid='340684'),
+ '//test.wikipedia.org/w/index.php?title=User%3A'
+ 'Framawiki/pwb_tests/permalink=340684')
+self.assertEqual(p1.permalink(percent_encoded=False),
+ '//test.wikipedia.org/w/index.php?title=User:'
+ 'Framawiki/pwb_tests/permalink=340685')
+self.assertEqual(p1.permalink(show_protocol=True),
+ 'https://test.wikipedia.org/w/index.php?title=User%3A'
+ 'Framawiki/pwb_tests/permalink=340685')
+
+
 if __name__ == '__main__':  # pragma: no cover
 try:
 unittest.main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c0d73274f7490c5afe53101e063e6d136984de5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 

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


[MediaWiki-commits] [Gerrit] mediawiki...VoteNY[master]: Access ParserCache through MediaWikiServices instead

2017-12-17 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398769 )

Change subject: Access ParserCache through MediaWikiServices instead
..

Access ParserCache through MediaWikiServices instead

Replaces deprecated use of ParserCache::singleton()

Change-Id: I1fab86b6186c6b1c9e31c8ce58969e3dd06b32a5
---
M extension.json
M includes/Vote.class.php
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VoteNY 
refs/changes/69/398769/1

diff --git a/extension.json b/extension.json
index eb3b560..f81aa4a 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "VoteNY",
-   "version": "2.9.2",
+   "version": "2.9.3",
"author": [
"Aaron Wright",
"David Pean",
@@ -10,6 +10,9 @@
"url": "https://www.mediawiki.org/wiki/Extension:VoteNY;,
"descriptionmsg": "voteny-desc",
"type": "parserhook",
+   "requires": {
+   "MediaWiki": ">= 1.30.0"
+   },
"SpecialPages": {
"TopRatings": "SpecialTopRatings"
},
diff --git a/includes/Vote.class.php b/includes/Vote.class.php
index ef144fd..dcd6aaa 100644
--- a/includes/Vote.class.php
+++ b/includes/Vote.class.php
@@ -6,6 +6,9 @@
  * @file
  * @ingroup Extensions
  */
+
+use MediaWiki\MediaWikiServices;
+
 class Vote {
public $PageID = 0;
public $Userid = 0;
@@ -109,7 +112,7 @@
 
// Kill parser cache
$article = new Article( $pageTitle, /* oldid */0 );
-   $parserCache = ParserCache::singleton();
+   $parserCache = 
MediaWikiServices::getInstance()->getParserCache();
$parserKey = $parserCache->getKey( $article, $wgUser );
$wgMemc->delete( $parserKey );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fab86b6186c6b1c9e31c8ce58969e3dd06b32a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VoteNY
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Better requeue on db locks

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/396422 )

Change subject: Better requeue on db locks
..


Better requeue on db locks

Look in the whole 'extra' array, not just the trace.

Change-Id: Ia7d55d7451fd5d6064789c6f4205025aaa504eb5
---
M sites/all/modules/wmf_common/WmfException.php
1 file changed, 13 insertions(+), 9 deletions(-)

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



diff --git a/sites/all/modules/wmf_common/WmfException.php 
b/sites/all/modules/wmf_common/WmfException.php
index 1ab193d..9cb6e4b 100644
--- a/sites/all/modules/wmf_common/WmfException.php
+++ b/sites/all/modules/wmf_common/WmfException.php
@@ -189,15 +189,19 @@
 
 function isRequeue()
 {
-   if ( $this->extra && !empty( $this->extra['trace'] ) ) {
-   // We want to retry later if the problem was a lock wait timeout
-   // or a deadlock. Unfortunately we have to do string 
parsing to
-   // figure that out.
-   if ( preg_match( '/\'12(05|13) \*\* /', $this->extra['trace'] ) 
) {
-   return TRUE;
-   }
-   }
-return $this->getErrorCharacteristic('requeue', FALSE);
+  if ($this->extra) {
+// We want to retry later if the problem was a lock wait timeout
+// or a deadlock. Unfortunately we have to do string parsing to
+// figure that out.
+$flattened = print_r($this->extra, TRUE);
+if (
+  preg_match('/\'12(05|13) \*\* /', $flattened) ||
+  preg_match('/Database lock encountered/', $flattened)
+) {
+  return TRUE;
+}
+  }
+  return $this->getErrorCharacteristic('requeue', FALSE);
 }
 
 function isFatal()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7d55d7451fd5d6064789c6f4205025aaa504eb5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Jgleeson 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CologneBlue[master]: Add minus-x to composer test and fix

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398700 )

Change subject: Add minus-x to composer test and fix
..


Add minus-x to composer test and fix

Bug: T175794
Change-Id: I69cdb2e8c633b20022d5f94245ad9acbbe89b66c
---
M composer.json
1 file changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  D3r1ck01: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 32efa41..09e8b02 100644
--- a/composer.json
+++ b/composer.json
@@ -2,13 +2,18 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "14.1.0"
+   "mediawiki/mediawiki-codesniffer": "14.1.0",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
-   "fix": "phpcbf",
"test": [
"parallel-lint . --exclude node_modules --exclude 
vendor",
-   "phpcs -p -s"
+   "phpcs -p -s",
+   "minus-x check ."
+   ],
+   "fix": [
+   "phpcbf",
+   "minus-x fix ."
]
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69cdb2e8c633b20022d5f94245ad9acbbe89b66c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/CologneBlue
Gerrit-Branch: master
Gerrit-Owner: Albert221 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UserPageViewTracker[master]: Add minus-x to composer test and fix

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398699 )

Change subject: Add minus-x to composer test and fix
..


Add minus-x to composer test and fix

Bug: T175794
Change-Id: I147dd43011820835c8a292a1acac1052912393ee
---
M SpecialUserPageViewTracker.php
M UserPageViewTracker.php
M UserPageViewTracker.sql
M composer.json
4 files changed, 9 insertions(+), 4 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  D3r1ck01: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/SpecialUserPageViewTracker.php b/SpecialUserPageViewTracker.php
old mode 100755
new mode 100644
diff --git a/UserPageViewTracker.php b/UserPageViewTracker.php
old mode 100755
new mode 100644
diff --git a/UserPageViewTracker.sql b/UserPageViewTracker.sql
old mode 100755
new mode 100644
index a91d272..be185c6
--- a/UserPageViewTracker.sql
+++ b/UserPageViewTracker.sql
@@ -13,6 +13,6 @@
p.page_title AS page_title,
v.hits AS hits,
v.last AS last
-FROM (/*_*/user u JOIN /*_*/page p) JOIN /*_*/user_page_views v 
+FROM (/*_*/user u JOIN /*_*/page p) JOIN /*_*/user_page_views v
 WHERE u.user_id = v.user_id AND p.page_id = v.page_id
-ORDER BY u.user_id, v.hits DESC;
\ No newline at end of file
+ORDER BY u.user_id, v.hits DESC;
diff --git a/composer.json b/composer.json
index aebd773..7d306d5 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,16 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "0.2.1"
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
+   ],
+   "fix": [
+   "minus-x fix ."
]
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I147dd43011820835c8a292a1acac1052912393ee
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/UserPageViewTracker
Gerrit-Branch: master
Gerrit-Owner: Albert221 
Gerrit-Reviewer: Albert221 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...web[master]: Update username in database when a renamed user logins.

2017-12-17 Thread Zhuyifei1999 (Code Review)
Zhuyifei1999 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398711 )

Change subject: Update username in database when a renamed user logins.
..

Update username in database when a renamed user logins.

Identification is done via user ID, so login-into-someone-elses-account
should be theoretically not possible.

Issues:
* Old user pages will be a 404 and not a redirect to the new user.
* Due to a long session expiry (T164390) login is infrequent, and
  the user will still see the old name until they manually relogin :(

Bug: T73064
Change-Id: I7342c693d0f076864ea9e329b42fee7d29a85d8e
---
M quarry/web/login.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/quarry/web 
refs/changes/11/398711/1

diff --git a/quarry/web/login.py b/quarry/web/login.py
index f35f895..604afdf 100644
--- a/quarry/web/login.py
+++ b/quarry/web/login.py
@@ -43,6 +43,10 @@
 user = User(username=identity['username'], wiki_uid=wiki_uid)
 g.conn.session.add(user)
 g.conn.session.commit()
+elif user.username != identity['username']:
+user.username = identity['username']
+g.conn.session.add(user)
+g.conn.session.commit()
 session['user_id'] = user.id
 return_to_url = session.get('return_to_url')
 del session['request_token']

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7342c693d0f076864ea9e329b42fee7d29a85d8e
Gerrit-PatchSet: 1
Gerrit-Project: analytics/quarry/web
Gerrit-Branch: master
Gerrit-Owner: Zhuyifei1999 

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Abstract profile header out of UserProfilePage into its own ...

2017-12-17 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398710 )

Change subject: Abstract profile header out of UserProfilePage into its own 
class
..

Abstract profile header out of UserProfilePage into its own class

The header component of UserProfilePage is now more contained by
representing as an object constructor.

This abstraction refactor will help start the initial refactor of the
UserProfilePage class, so components are object-oriented. This refactor
also aims to make this header easier to maintain for the future, and allow
for faster improvements.

The next follow-up patch will be making the links in the UserProfileHeader
object-oriented (UserProfileHeaderLinks object).

Change-Id: I9941b21c8f90cb670b80b82f62c96741b0d74428
---
M SocialProfile.php
A UserProfile/UserProfileHeader.php
M UserProfile/UserProfilePage.php
3 files changed, 360 insertions(+), 148 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/10/398710/1

diff --git a/SocialProfile.php b/SocialProfile.php
index 92d2498..e0e03df 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -41,6 +41,7 @@
 $wgAutoloadClasses['UploadAvatar'] = __DIR__ . 
'/UserProfile/SpecialUploadAvatar.php';
 $wgAutoloadClasses['RemoveAvatar'] = __DIR__ . 
'/UserProfile/SpecialRemoveAvatar.php';
 $wgAutoloadClasses['UserProfile'] = __DIR__ . 
'/UserProfile/UserProfileClass.php';
+$wgAutoloadClasses['UserProfileHeader'] = __DIR__ . 
'/UserProfile/UserProfileHeader.php';
 $wgAutoloadClasses['UserProfileHooks'] = __DIR__ . 
'/UserProfile/UserProfileHooks.php';
 $wgAutoloadClasses['UserProfilePage'] = __DIR__ . 
'/UserProfile/UserProfilePage.php';
 $wgAutoloadClasses['UserSystemMessage'] = __DIR__ . 
'/UserSystemMessages/UserSystemMessagesClass.php';
diff --git a/UserProfile/UserProfileHeader.php 
b/UserProfile/UserProfileHeader.php
new file mode 100644
index 000..bb67f0e
--- /dev/null
+++ b/UserProfile/UserProfileHeader.php
@@ -0,0 +1,344 @@
+user_id = $user_id;
+   $this->user_name = $user_name;
+   $this->profile_data = $profile_data;
+   $this->title = $title;
+   $this->is_owner = $is_owner;
+   }
+
+   public function __toString() {
+   return $this->getProfileHeader(
+   $this->user_id,
+   $this->user_name,
+   $this->profile_data,
+   $this->title,
+   $this->is_owner
+   );
+   }
+
+   /**
+* @todo Rewrite to access LinkRenderer service instead
+*
+* @param string $url Url (auto-escaped through htmlspecialchars)
+* @param $label i18n message representing the label of the link
+* @return string Html
+*/
+   static function getLink( $url, $label ) {
+   return '' . $label . '';
+   }
+
+   static function getProfileToggleButton( $profile_data ) {
+   $toggle_title = SpecialPage::getTitleFor( 'ToggleUserPage' );
+
+   // Cast it to an int because PHP is stupid.
+   if (
+   (int) $profile_data['user_page_type'] == 1 ||
+   $profile_data['user_page_type'] === ''
+   ) {
+   $toggleMessage = wfMessage( 'user-type-toggle-old' 
)->escaped();
+   } else {
+   $toggleMessage = wfMessage( 'user-type-toggle-new' 
)->escaped();
+   }
+
+   return '
+   ' .
+   $toggleMessage . '
+   ';
+   }
+
+   /**
+* get the avatar of the user
+*
+* @param int $user_id
+* @return string Html
+*/
+   static function getAvatar( $user_id ) {
+   $avatar = new wAvatar( $user_id, 'l' );
+
+   return '' . $avatar->getAvatarURL() . 
'';
+   }
+
+   /**
+* Gets the user's level and points
+*
+* @param int $user_id
+* @param string $user_name
+* @return string Html
+*/
+   static function getUserLevelAndPoints( $user_id, $user_name ) {
+   global $wgLang, $wgUserLevels;
+
+   $stats = new UserStats( $user_id, $user_name );
+   $stats_data = $stats->getUserStats();
+   $user_level = new UserLevel( $stats_data['points'] );
+   $level_link = Title::makeTitle( NS_HELP, wfMessage( 
'user-profile-userlevels-link' )->inContentLanguage()->text() );
+
+   return '' .
+   self::getLink( 
+   $level_link->getFullURL(),
+   wfMessage(
+   'user-profile-points',
+  

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: bash-completion: Fix for modern deploys

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398706 )

Change subject: bash-completion: Fix for modern deploys
..


bash-completion: Fix for modern deploys

Stub out Vagrant provided code that is not loaded by the bash-completion
script.

Change-Id: Ibe0bc3c463ad601ba361584b2e29d98893b3264b
---
M lib/mediawiki-vagrant/settings/definitions.rb
1 file changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/lib/mediawiki-vagrant/settings/definitions.rb 
b/lib/mediawiki-vagrant/settings/definitions.rb
index db8a2a7..687d33c 100644
--- a/lib/mediawiki-vagrant/settings/definitions.rb
+++ b/lib/mediawiki-vagrant/settings/definitions.rb
@@ -1,5 +1,19 @@
 require 'mediawiki-vagrant/settings'
-require 'vagrant/util'
+begin
+  require 'vagrant/util'
+rescue LoadError
+  # This stub module keeps settings :nfs_shares from blowing up when loaded
+  # outside of Vagrant (e.g. the bash-completion helper script)
+  module Vagrant
+module Util
+  class Platform
+def self.platform
+  RUBY_PLATFORM
+end
+  end
+end
+  end
+end
 
 module MediaWikiVagrant
   Settings.define do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe0bc3c463ad601ba361584b2e29d98893b3264b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use another pageid in WikiPageDbTestBase::testInsertOn_idSpe...

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398545 )

Change subject: Use another pageid in 
WikiPageDbTestBase::testInsertOn_idSpecified
..


Use another pageid in WikiPageDbTestBase::testInsertOn_idSpecified

integer bigger than 2147483648 is bad on 32-bit php

1) WikiPageContentHandlerDbTest::testInsertOn_idSpecified
Failed asserting that -816015107 is identical to 3478952189.

> echo intval( 3478952189 );
-816015107

Change-Id: Ia2ab870dfe53bef873def3905ae93ea52d4ab2ad
---
M tests/phpunit/includes/page/WikiPageDbTestBase.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/tests/phpunit/includes/page/WikiPageDbTestBase.php 
b/tests/phpunit/includes/page/WikiPageDbTestBase.php
index b8480dd..2b803ae 100644
--- a/tests/phpunit/includes/page/WikiPageDbTestBase.php
+++ b/tests/phpunit/includes/page/WikiPageDbTestBase.php
@@ -1678,7 +1678,7 @@
public function testInsertOn_idSpecified() {
$title = Title::newFromText( __METHOD__ );
$page = new WikiPage( $title );
-   $id = 3478952189;
+   $id = 1478952189;
 
$result = $page->insertOn( $this->db, $id );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2ab870dfe53bef873def3905ae93ea52d4ab2ad
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Fix case of class TreeRepositoryDbTest

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398614 )

Change subject: Fix case of class TreeRepositoryDbTest
..


Fix case of class TreeRepositoryDbTest

Makes MediaWiki.Files.ClassMatchesFilename.WrongCase pass

Change-Id: I1ecea7e84c379b31dc1164d566e8217a57b1eaf1
---
M .phpcs.xml
M extension.json
M tests/phpunit/Repository/TreeRepositoryDbTest.php
3 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/.phpcs.xml b/.phpcs.xml
index 367d4ae..6cc6593 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -11,12 +11,14 @@



-   





+   
+   */maintenance/*
+   



diff --git a/extension.json b/extension.json
index e238aa4..429fe21 100644
--- a/extension.json
+++ b/extension.json
@@ -1366,7 +1366,7 @@
"Flow\\Tests\\PermissionsTest": 
"tests/phpunit/PermissionsTest.php",
"Flow\\Tests\\PostRevisionTestCase": 
"tests/phpunit/PostRevisionTestCase.php",
"Flow\\Tests\\Repository\\TreeRepositoryTest": 
"tests/phpunit/Repository/TreeRepositoryTest.php",
-   "Flow\\Tests\\Repository\\TreeRepositorydbTest": 
"tests/phpunit/Repository/TreeRepositoryDbTest.php",
+   "Flow\\Tests\\Repository\\TreeRepositoryDbTest": 
"tests/phpunit/Repository/TreeRepositoryDbTest.php",
"Flow\\Tests\\SpamFilter\\AbuseFilterTest": 
"tests/phpunit/SpamFilter/AbuseFilterTest.php",
"Flow\\Tests\\SpamFilter\\ConfirmEditTest": 
"tests/phpunit/SpamFilter/ConfirmEditTest.php",
"Flow\\Tests\\SpamFilter\\ContentLengthFilterTest": 
"tests/phpunit/SpamFilter/ContentLengthFilterTest.php",
diff --git a/tests/phpunit/Repository/TreeRepositoryDbTest.php 
b/tests/phpunit/Repository/TreeRepositoryDbTest.php
index 224651e..cb34482 100644
--- a/tests/phpunit/Repository/TreeRepositoryDbTest.php
+++ b/tests/phpunit/Repository/TreeRepositoryDbTest.php
@@ -10,7 +10,7 @@
  * @group Flow
  * @group Database
  */
-class TreeRepositorydbTest extends FlowTestCase {
+class TreeRepositoryDbTest extends FlowTestCase {
protected $tablesUsed = [ 'flow_tree_node' ];
 
public function testSomething() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ecea7e84c379b31dc1164d566e8217a57b1eaf1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: bash-completion: Fix for modern deploys

2017-12-17 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398709 )

Change subject: bash-completion: Fix for modern deploys
..

bash-completion: Fix for modern deploys

Change-Id: Ibe0bc3c463ad601ba361584b2e29d98893b3264b
---
M lib/mediawiki-vagrant/settings/definitions.rb
1 file changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/09/398709/1

diff --git a/lib/mediawiki-vagrant/settings/definitions.rb 
b/lib/mediawiki-vagrant/settings/definitions.rb
index db8a2a7..687d33c 100644
--- a/lib/mediawiki-vagrant/settings/definitions.rb
+++ b/lib/mediawiki-vagrant/settings/definitions.rb
@@ -1,5 +1,19 @@
 require 'mediawiki-vagrant/settings'
-require 'vagrant/util'
+begin
+  require 'vagrant/util'
+rescue LoadError
+  # This stub module keeps settings :nfs_shares from blowing up when loaded
+  # outside of Vagrant (e.g. the bash-completion helper script)
+  module Vagrant
+module Util
+  class Platform
+def self.platform
+  RUBY_PLATFORM
+end
+  end
+end
+  end
+end
 
 module MediaWikiVagrant
   Settings.define do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe0bc3c463ad601ba361584b2e29d98893b3264b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add myself as travis notification recipients

2017-12-17 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398708 )

Change subject: Add myself as travis notification recipients
..

Add myself as travis notification recipients

Change-Id: I35c26301af7787c5223bdc0bfb13817d575cab44
---
M .travis.yml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/.travis.yml b/.travis.yml
index bbecc60..4f426be 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,6 +29,7 @@
 recipients:
   - wikidata-ci-sta...@wikimedia.de
   - leszek.mani...@wikimedia.de
+  - ladsgr...@gmail.com
 on_success: change
 on_failure: always
   irc:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35c26301af7787c5223bdc0bfb13817d575cab44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: [WIP] Make PHP7 the default runtime

2017-12-17 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398707 )

Change subject: [WIP] Make PHP7 the default runtime
..

[WIP] Make PHP7 the default runtime

Move HHVM runtime to a role and make PHP7 the default runtime for the
wikis.

Bug: T181915
Change-Id: Ib1f2473597ecdaf48eb830aafd2606f271e26b48
---
M puppet/hieradata/common.yaml
M puppet/modules/hhvm/manifests/init.pp
M puppet/modules/mediawiki/manifests/apache.pp
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/mwrepl.pp
M puppet/modules/mediawiki/manifests/ready_service.pp
M puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
D puppet/modules/mediawiki/templates/mediawiki-php7-site.erb
M puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb
M puppet/modules/mediawiki/templates/systemd/jobchron.erb
M puppet/modules/mediawiki/templates/systemd/jobrunner.erb
M puppet/modules/php/manifests/composer.pp
A puppet/modules/role/manifests/hhvm.pp
M puppet/modules/role/manifests/scribunto.pp
D puppet/modules/role/manifests/zend.pp
15 files changed, 21 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/07/398707/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index 3eb1b97..d0640d8 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -225,7 +225,6 @@
 mediawiki::branch: master
 
 mediawiki::apache::docroot: "%{hiera('apache::docroot')}"
-mediawiki::apache::php7_site_name: "php7%{hiera('mwv::tld')}"
 
 mediawiki::jobrunner::enable: true
 mediawiki::jobrunner::dir: "%{hiera('mwv::services_dir')}/jobrunner"
diff --git a/puppet/modules/hhvm/manifests/init.pp 
b/puppet/modules/hhvm/manifests/init.pp
index 52846ec..403c74a 100644
--- a/puppet/modules/hhvm/manifests/init.pp
+++ b/puppet/modules/hhvm/manifests/init.pp
@@ -63,12 +63,6 @@
 require => Package['hhvm'],
 }
 
-env::alternative { 'hhvm_as_default_php':
-alternative => 'php',
-target  => '/usr/bin/hhvm',
-priority=> 20,
-}
-
 file { '/etc/hhvm':
 ensure => directory,
 owner  => 'root',
@@ -82,7 +76,6 @@
 group   => 'root',
 mode=> '0444',
 content => php_ini($common_settings),
-before  => Env::Alternative['hhvm_as_default_php'],
 }
 
 file { '/etc/hhvm/server.ini':
@@ -121,7 +114,6 @@
 owner  => 'www-data',
 group  => 'www-data',
 mode   => '0666',
-before => Env::Alternative['hhvm_as_default_php'],
 }
 
 file { $fcgi_settings['hhvm']['repo']['central']['path']:
diff --git a/puppet/modules/mediawiki/manifests/apache.pp 
b/puppet/modules/mediawiki/manifests/apache.pp
index ad698b0..fa71bca 100644
--- a/puppet/modules/mediawiki/manifests/apache.pp
+++ b/puppet/modules/mediawiki/manifests/apache.pp
@@ -7,12 +7,8 @@
 # [*docroot*]
 #   Document root for Apache vhost serving MediaWiki.
 #
-# [*php7_site_name*]
-#   Hostname for php7 runtime Apache vhost
-#
 class mediawiki::apache(
 $docroot,
-$php7_site_name,
 ) {
 include ::mediawiki
 include ::mediawiki::multiwiki
@@ -35,15 +31,6 @@
 Class['::apache::mod::alias'],
 Class['::apache::mod::rewrite'],
 Class['::apache::mod::proxy_fcgi'],
-],
-}
-
-apache::site { "php7-${mediawiki::wiki_name}":
-ensure  => present,
-content => template('mediawiki/mediawiki-php7-site.erb'),
-require => [
-Class['::apache::mod::alias'],
-Class['::apache::mod::rewrite'],
 ],
 }
 
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 2dea2a3..3bb641c 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -69,8 +69,6 @@
 
 include ::mwv
 require ::php
-require ::hhvm
-include ::hhvm::fcgi
 
 require ::service
 
diff --git a/puppet/modules/mediawiki/manifests/mwrepl.pp 
b/puppet/modules/mediawiki/manifests/mwrepl.pp
index 8881a2a..caf416b 100644
--- a/puppet/modules/mediawiki/manifests/mwrepl.pp
+++ b/puppet/modules/mediawiki/manifests/mwrepl.pp
@@ -21,10 +21,4 @@
 group   => 'root',
 mode=> '0555',
 }
-
-# Backwards compatibility
-file { '/usr/local/bin/hhvmsh':
-ensure => 'link',
-target => '/usr/local/bin/mwrepl',
-}
 }
diff --git a/puppet/modules/mediawiki/manifests/ready_service.pp 
b/puppet/modules/mediawiki/manifests/ready_service.pp
index af64928..74bdcfd 100644
--- a/puppet/modules/mediawiki/manifests/ready_service.pp
+++ b/puppet/modules/mediawiki/manifests/ready_service.pp
@@ -16,7 +16,6 @@
 #
 class mediawiki::ready_service {
 include ::mediawiki
-include ::hhvm::fcgi
 
 file { '/usr/local/bin/wait-for-mediawiki.sh':
 ensure  => 'present',
diff --git 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: bash-completion: Fix for modern deploys

2017-12-17 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398706 )

Change subject: bash-completion: Fix for modern deploys
..

bash-completion: Fix for modern deploys

Change-Id: Ibe0bc3c463ad601ba361584b2e29d98893b3264b
---
M lib/mediawiki-vagrant/settings/definitions.rb
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/06/398706/1

diff --git a/lib/mediawiki-vagrant/settings/definitions.rb 
b/lib/mediawiki-vagrant/settings/definitions.rb
index db8a2a7..6228ec4 100644
--- a/lib/mediawiki-vagrant/settings/definitions.rb
+++ b/lib/mediawiki-vagrant/settings/definitions.rb
@@ -1,5 +1,18 @@
 require 'mediawiki-vagrant/settings'
-require 'vagrant/util'
+begin
+require 'vagrant/util'
+rescue LoadError
+# Hack for bash-completion usage
+module Vagrant
+module Util
+class Platform
+def self.platform
+return RUBY_PLATFORM
+end
+end
+end
+end
+end
 
 module MediaWikiVagrant
   Settings.define do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe0bc3c463ad601ba361584b2e29d98893b3264b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: logstash: Fix puppet 4 support

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398665 )

Change subject: logstash: Fix puppet 4 support
..


logstash: Fix puppet 4 support

Bug: T181354
Change-Id: I3c422396ebb55b87e085ce27ac454bd04785
---
M puppet/modules/logstash/manifests/conf.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/logstash/manifests/conf.pp 
b/puppet/modules/logstash/manifests/conf.pp
index 9f6aedd..a5d659c 100644
--- a/puppet/modules/logstash/manifests/conf.pp
+++ b/puppet/modules/logstash/manifests/conf.pp
@@ -26,7 +26,7 @@
 $source   = undef,
 $priority = 10,
 ) {
-if $priority !~ /^\d?\d$/ {
+if $priority !~ Integer[0, 99] {
 fail('"priority" must be between 0 - 99')
 }
 $safe_name   = regsubst($title, '[\W_]', '-', 'G')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c422396ebb55b87e085ce27ac454bd04785
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Paladox 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: logstash: Install python-setuptools and python-wheel

2017-12-17 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398705 )

Change subject: logstash: Install python-setuptools and python-wheel
..

logstash: Install python-setuptools and python-wheel

Change-Id: I9b88f88633271c19ae690b2d9ad4c8ebb07a5603
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/05/398705/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b88f88633271c19ae690b2d9ad4c8ebb07a5603
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Move testwiki2 from group0 to group1

2017-12-17 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398704 )

Change subject: Move testwiki2 from group0 to group1
..

Move testwiki2 from group0 to group1

Per the discussion in bug

Bug: T182326
Change-Id: I7bc0c001758a1d24e404057422369cb28259772b
---
M dblists/group0.dblist
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/dblists/group0.dblist b/dblists/group0.dblist
index 9ac731a..1e646d6 100644
--- a/dblists/group0.dblist
+++ b/dblists/group0.dblist
@@ -94,7 +94,6 @@
 suwikibooks
 swwikibooks
 tenwiki
-test2wiki
 testwiki
 testwikidatawiki
 thwikinews

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bc0c001758a1d24e404057422369cb28259772b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Puppetize certbot

2017-12-17 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398703 )

Change subject: Puppetize certbot
..

Puppetize certbot

Change-Id: I02965dc636f28609c670c3e5bb6efd0c70626a15
---
M puppet/Puppetfile
M puppet/Puppetfile.lock
D puppet/modules/nginx/files/rapidssl.pem
D puppet/modules/nginx/files/ssl.conf
M puppet/modules/nginx/files/translatewiki.net
M puppet/modules/nginx/manifests/ssl.pp
6 files changed, 36 insertions(+), 79 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/03/398703/1

diff --git a/puppet/Puppetfile b/puppet/Puppetfile
index 017ca1b..413f02d 100644
--- a/puppet/Puppetfile
+++ b/puppet/Puppetfile
@@ -4,3 +4,4 @@
 mod 'elastic-elasticsearch', '6.0.0'
 mod 'thias-sysctl', '1.0.6'
 mod 'puppetlabs-java', '2.3.0'
+mod 'puppet-letsencrypt', '2.1.0'
diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock
index f9c7986..b10f3f5 100644
--- a/puppet/Puppetfile.lock
+++ b/puppet/Puppetfile.lock
@@ -8,10 +8,16 @@
   richardc-datacat (< 1.0.0, >= 0.6.2)
 puppet-archive (2.2.0)
   puppetlabs-stdlib (< 5.0.0, >= 4.13.1)
+puppet-letsencrypt (2.1.0)
+  puppetlabs-inifile (< 2.0.0, >= 1.4.1)
+  puppetlabs-stdlib (< 5.0.0, >= 4.13.1)
+  puppetlabs-vcsrepo (< 2.0.0, >= 1.3.1)
+  stahnma-epel (< 2.0.0, >= 1.0.0)
 puppet-staging (2.2.0)
 puppet-tea (0.2.0)
 puppetlabs-apt (4.4.1)
   puppetlabs-stdlib (< 5.0.0, >= 4.16.0)
+puppetlabs-inifile (1.6.0)
 puppetlabs-java (2.3.0)
   puppet-archive (< 3.0.0, >= 1.1.0)
   puppetlabs-stdlib (< 5.0.0, >= 4.13.1)
@@ -21,11 +27,15 @@
   puppetlabs-translate (< 2.0.0, >= 1.0.0)
 puppetlabs-stdlib (4.24.0)
 puppetlabs-translate (1.1.0)
+puppetlabs-vcsrepo (1.5.0)
 richardc-datacat (0.6.2)
+stahnma-epel (1.3.0)
+  puppetlabs-stdlib (>= 3.0.0)
 thias-sysctl (1.0.6)
 
 DEPENDENCIES
   elastic-elasticsearch (= 6.0.0)
+  puppet-letsencrypt (= 2.1.0)
   puppetlabs-java (= 2.3.0)
   puppetlabs-mysql (= 5.1.0)
   thias-sysctl (= 1.0.6)
diff --git a/puppet/modules/nginx/files/rapidssl.pem 
b/puppet/modules/nginx/files/rapidssl.pem
deleted file mode 100644
index 8149c78..000
--- a/puppet/modules/nginx/files/rapidssl.pem
+++ /dev/null
@@ -1,45 +0,0 @@
--BEGIN CERTIFICATE-
-MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
-MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
-YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
-R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
-9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
-fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
-iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
-1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
-bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
-MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
-ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
-uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
-Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
-tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
-PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
-hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
-5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
--END CERTIFICATE-
--BEGIN CERTIFICATE-
-MIIEJTCCAw2gAwIBAgIDAjp3MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
-MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
-YWwgQ0EwHhcNMTQwODI5MjEzOTMyWhcNMjIwNTIwMjEzOTMyWjBHMQswCQYDVQQG
-EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXUmFwaWRTU0wg
-U0hBMjU2IENBIC0gRzMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCv
-VJvZWF0eLFbG1eh/9H0WA//Qi1rkjqfdVC7UBMBdmJyNkA+8EGVf2prWRHzAn7Xp
-SowLBkMEu/SW4ib2YQGRZjEiwzQ0Xz8/kS9EX9zHFLYDn4ZLDqP/oIACg8PTH2lS
-1p1kD8mD5xvEcKyU58Okaiy9uJ5p2L4KjxZjWmhxgHsw3hUEv8zTvz5IBVV6s9cQ
-DAP8m/0Ip4yM26eO8R5j3LMBL3+vV8M8SKeDaCGnL+enP/C1DPz1hNFTvA5yT2AM
-QriYrRmIV9cE7Ie/fodOoyH5U/02mEiN1vi7SPIpyGTRzFRIU4uvt2UevykzKdkp
-YEj4/5G8V1jlNS67abZZAgMBAAGjggEdMIIBGTAfBgNVHSMEGDAWgBTAephojYn7
-qwVkDBF9qn1luMrMTjAdBgNVHQ4EFgQUw5zz/NNGCDS7zkZ/oHxb8+IIy1kwEgYD
-VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYwNQYDVR0fBC4wLDAqoCig
-JoYkaHR0cDovL2cuc3ltY2IuY29tL2NybHMvZ3RnbG9iYWwuY3JsMC4GCCsGAQUF
-BwEBBCIwIDAeBggrBgEFBQcwAYYSaHR0cDovL2cuc3ltY2QuY29tMEwGA1UdIARF
-MEMwQQYKYIZIAYb4RQEHNjAzMDEGCCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3Ry
-dXN0LmNvbS9yZXNvdXJjZXMvY3BzMA0GCSqGSIb3DQEBCwUAA4IBAQCjWB7GQzKs
-rC+TeLfqrlRARy1+eI1Q9vhmrNZPc9ZE768LzFvB9E+aj0l+YK/CJ8cW8fuTgZCp
-fO9vfm5FlBaEvexJ8cQO9K8EWYOHDyw7l8NaEpt7BDV7o5UzCHuTcSJCs6nZb0+B
-kvwHtnm8hEqddwnxxYny8LScVKoSew26T++TGezvfU5ho452nFnPjJSxhJf3GrkH
-uLLGTxN5279PURt/aQ1RKsHWFf83UTRlUfQevjhq7A6rvz17OQV79PP7GqHQyH5O

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add xpda.com to $wgCopyUploadDomains

2017-12-17 Thread Zoranzoki21 (Code Review)
Zoranzoki21 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398702 )

Change subject: Add xpda.com to $wgCopyUploadDomains
..

Add xpda.com to $wgCopyUploadDomains

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index be51346..087fe05 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13325,6 +13325,7 @@
'images.collection.cooperhewitt.org', // Cooper Hewitt - T180241
'*.nli.org.il', // National Library of 
Israel - T1881179
'studiezaal.nijmegen.nl'// Regionaal Archief 
Nijmegen, NL - T181713
+'xpda.com', // T183073
],
 ],
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07eaaa8aa1fcea4f594da6e3f95ecdcfe0c49e4c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Zoranzoki21 

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add score count to 'score' page property

2017-12-17 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398701 )

Change subject: Add score count to 'score' page property
..

Add score count to 'score' page property

This change removes the value of 1 listed after each page with a
score, replacing it by a useful number, that of the amount of
scores on the page.

Bug: T183078
Change-Id: I2977e19388479d64b877c631cfaade9f4abf05a6
---
M includes/Score.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score 
refs/changes/01/398701/1

diff --git a/includes/Score.php b/includes/Score.php
index bede431..e3b76c8 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -298,7 +298,8 @@
 
// Mark the page as using the score extension, it makes easier
// to track all those pages.
-   $parser->getOutput()->setProperty( 'score', true );
+   $scoreNum = $parser->getOutput()->getProperty( 'score' );
+   $parser->getOutput()->setProperty( 'score', $scoreNum += 1 );
 
return $html;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2977e19388479d64b877c631cfaade9f4abf05a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Ebe123 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix pywikibot.userinterfaces.gui (idlelib) in Python 3.6

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398669 )

Change subject: Fix pywikibot.userinterfaces.gui (idlelib) in Python 3.6
..


Fix pywikibot.userinterfaces.gui (idlelib) in Python 3.6

Credit to T164164#3385548

Bug: T164164
Change-Id: Idc1a1d990e9646862dd831607bba88743f91f6d2
---
M pywikibot/userinterfaces/gui.py
1 file changed, 13 insertions(+), 3 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py
index c57acb9..7eb6e3b 100644
--- a/pywikibot/userinterfaces/gui.py
+++ b/pywikibot/userinterfaces/gui.py
@@ -29,9 +29,19 @@
 
 from ScrolledText import ScrolledText
 
-from idlelib import SearchDialog, ReplaceDialog, configDialog
-from idlelib.configHandler import idleConf
-from idlelib.MultiCall import MultiCallCreator
+# T164163: Fix idlelib import in Python 3.6
+if sys.version_info > (3, 5):
+from idlelib import (
+search as SearchDialog,
+replace as ReplaceDialog,
+configdialog as configDialog
+)
+from idlelib.config import idleConf
+from idlelib.multicall import MultiCallCreator
+else:
+from idlelib import SearchDialog, ReplaceDialog, configDialog
+from idlelib.configHandler import idleConf
+from idlelib.MultiCall import MultiCallCreator
 
 import pywikibot
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc1a1d990e9646862dd831607bba88743f91f6d2
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Eflyjason 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Eflyjason 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [tests] Ignore N812 naming rules for pywikibot/userinterface...

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398688 )

Change subject: [tests] Ignore N812 naming rules for 
pywikibot/userinterfaces/gui.py
..


[tests] Ignore N812 naming rules for pywikibot/userinterfaces/gui.py

Change-Id: I93f264c632d256faa1b04f47d76a1485a1b6c5b4
---
M pywikibot/userinterfaces/gui.py
M tox.ini
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved
  Eflyjason: Looks good to me, but someone else must approve
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py
index 21f866b..c57acb9 100644
--- a/pywikibot/userinterfaces/gui.py
+++ b/pywikibot/userinterfaces/gui.py
@@ -22,7 +22,7 @@
 if sys.version_info[0] > 2:
 import tkinter as Tkinter
 from tkinter.scrolledtext import ScrolledText
-from tkinter import simpledialog as tkSimpleDialog  # noqa: N812
+from tkinter import simpledialog as tkSimpleDialog
 else:
 import Tkinter
 import tkSimpleDialog
diff --git a/tox.ini b/tox.ini
index 906911d..47a294e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -180,6 +180,7 @@
 pywikibot/family.py : E241
 pywikibot/fixes.py : E241
 pywikibot/textlib.py : E241
+pywikibot/userinterfaces/gui.py : N812
 pywikibot/userinterfaces/terminal_interface_unix.py : E241
 pywikibot/userinterfaces/terminal_interface_win32.py : E241
 pywikibot/textlib.py : N801

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93f264c632d256faa1b04f47d76a1485a1b6c5b4
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Eflyjason 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CologneBlue[master]: Add minus-x to composer test and fix

2017-12-17 Thread Albert221 (Code Review)
Albert221 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398700 )

Change subject: Add minus-x to composer test and fix
..

Add minus-x to composer test and fix

Bug: T175794
Change-Id: I69cdb2e8c633b20022d5f94245ad9acbbe89b66c
---
M composer.json
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/CologneBlue 
refs/changes/00/398700/1

diff --git a/composer.json b/composer.json
index 32efa41..957a544 100644
--- a/composer.json
+++ b/composer.json
@@ -2,13 +2,18 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "14.1.0"
+   "mediawiki/mediawiki-codesniffer": "14.1.0",
+   "mediawiki/minus-x": "^0.2.1"
},
"scripts": {
-   "fix": "phpcbf",
"test": [
"parallel-lint . --exclude node_modules --exclude 
vendor",
-   "phpcs -p -s"
+   "phpcs -p -s",
+   "minus-x check ."
+   ],
+   "fix": [
+   "phpcbf",
+   "minus-x fix ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69cdb2e8c633b20022d5f94245ad9acbbe89b66c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/CologneBlue
Gerrit-Branch: master
Gerrit-Owner: Albert221 

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


[MediaWiki-commits] [Gerrit] mediawiki...UserPageViewTracker[master]: Add minus-x to composer test and fix

2017-12-17 Thread Albert221 (Code Review)
Albert221 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398699 )

Change subject: Add minus-x to composer test and fix
..

Add minus-x to composer test and fix

Bug: T175794
Change-Id: I147dd43011820835c8a292a1acac1052912393ee
---
M composer.json
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UserPageViewTracker 
refs/changes/99/398699/1

diff --git a/composer.json b/composer.json
index aebd773..2494086 100644
--- a/composer.json
+++ b/composer.json
@@ -1,11 +1,16 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "jakub-onderka/php-console-highlighter": "0.3.2"
+   "jakub-onderka/php-console-highlighter": "0.3.2",
+   "mediawiki/minus-x": "^0.2.1"
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   "parallel-lint . --exclude vendor --exclude 
node_modules",
+   "minus-x check ."
+   ],
+   "fix": [
+   "minus-x fix ."
]
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I147dd43011820835c8a292a1acac1052912393ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserPageViewTracker
Gerrit-Branch: master
Gerrit-Owner: Albert221 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Usage-Dashboard[master]: Usage Dashboard ignore 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398698 )

Change subject: Usage Dashboard ignore 17 Dec 2017
..


Usage Dashboard ignore 17 Dec 2017

Change-Id: Ie942db5bcfe8d5af4fc9d0847f42e22ad9beac51
---
A .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..515e514
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+www/
+update/
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie942db5bcfe8d5af4fc9d0847f42e22ad9beac51
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Usage-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Usage-Dashboard[master]: Usage Dashboard ignore 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398698 )

Change subject: Usage Dashboard ignore 17 Dec 2017
..

Usage Dashboard ignore 17 Dec 2017

Change-Id: Ie942db5bcfe8d5af4fc9d0847f42e22ad9beac51
---
A .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Usage-Dashboard 
refs/changes/98/398698/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..515e514
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+www/
+update/
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie942db5bcfe8d5af4fc9d0847f42e22ad9beac51
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Usage-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Overview-Dashboard[master]: Usage Dashboard ignore 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398697 )

Change subject: Usage Dashboard ignore 17 Dec 2017
..


Usage Dashboard ignore 17 Dec 2017

Change-Id: I11b522022fa4b4a0601c427f7e40522d443d8d6a
---
A .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..3159b93
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+update/
+www/
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11b522022fa4b4a0601c427f7e40522d443d8d6a
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Overview-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Overview-Dashboard[master]: Usage Dashboard ignore 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398697 )

Change subject: Usage Dashboard ignore 17 Dec 2017
..

Usage Dashboard ignore 17 Dec 2017

Change-Id: I11b522022fa4b4a0601c427f7e40522d443d8d6a
---
A .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Overview-Dashboard 
refs/changes/97/398697/1

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..3159b93
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+update/
+www/
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11b522022fa4b4a0601c427f7e40522d443d8d6a
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Overview-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Semantics-Dashboard[master]: Semantics ignore 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398696 )

Change subject: Semantics ignore 17 Dec 2017
..


Semantics ignore 17 Dec 2017

Change-Id: Ie38b02a6f9831fefe8c3b655980f5702b1b30f9d
---
A .gitignore
M data/wdcm2_projecttopic_ArchitecturalStructure.csv
M data/wdcm2_projecttopic_AstronomicalObject.csv
M data/wdcm2_projecttopic_Book.csv
M data/wdcm2_projecttopic_ChemicalEntities.csv
M data/wdcm2_projecttopic_Event.csv
M data/wdcm2_projecttopic_Gene.csv
M data/wdcm2_projecttopic_GeographicalObject.csv
M data/wdcm2_projecttopic_Human.csv
M data/wdcm2_projecttopic_Organization.csv
M data/wdcm2_projecttopic_ScientificArticle.csv
M data/wdcm2_projecttopic_Taxon.csv
M data/wdcm2_projecttopic_Thoroughfare.csv
M data/wdcm2_projecttopic_Wikimedia.csv
M data/wdcm2_visNetworkEdges_project_ArchitecturalStructure.csv
M data/wdcm2_visNetworkEdges_project_AstronomicalObject.csv
M data/wdcm2_visNetworkEdges_project_Book.csv
M data/wdcm2_visNetworkEdges_project_ChemicalEntities.csv
M data/wdcm2_visNetworkEdges_project_Event.csv
M data/wdcm2_visNetworkEdges_project_Gene.csv
M data/wdcm2_visNetworkEdges_project_GeographicalObject.csv
M data/wdcm2_visNetworkEdges_project_Human.csv
M data/wdcm2_visNetworkEdges_project_Organization.csv
M data/wdcm2_visNetworkEdges_project_ScientificArticle.csv
M data/wdcm2_visNetworkEdges_project_Taxon.csv
M data/wdcm2_visNetworkEdges_project_Thoroughfare.csv
M data/wdcm2_visNetworkEdges_project_Wikimedia.csv
M data/wdcm2_visNetworkNodes_project_ArchitecturalStructure.csv
M data/wdcm2_visNetworkNodes_project_AstronomicalObject.csv
M data/wdcm2_visNetworkNodes_project_Book.csv
M data/wdcm2_visNetworkNodes_project_ChemicalEntities.csv
M data/wdcm2_visNetworkNodes_project_Event.csv
M data/wdcm2_visNetworkNodes_project_Gene.csv
M data/wdcm2_visNetworkNodes_project_GeographicalObject.csv
M data/wdcm2_visNetworkNodes_project_Human.csv
M data/wdcm2_visNetworkNodes_project_Organization.csv
M data/wdcm2_visNetworkNodes_project_ScientificArticle.csv
M data/wdcm2_visNetworkNodes_project_Taxon.csv
M data/wdcm2_visNetworkNodes_project_Thoroughfare.csv
M data/wdcm2_visNetworkNodes_project_Wikimedia.csv
40 files changed, 13,867 insertions(+), 13,884 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie38b02a6f9831fefe8c3b655980f5702b1b30f9d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Semantics-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Semantics-Dashboard[master]: Semantics ignore 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398696 )

Change subject: Semantics ignore 17 Dec 2017
..

Semantics ignore 17 Dec 2017

Change-Id: Ie38b02a6f9831fefe8c3b655980f5702b1b30f9d
---
A .gitignore
M data/wdcm2_projecttopic_ArchitecturalStructure.csv
M data/wdcm2_projecttopic_AstronomicalObject.csv
M data/wdcm2_projecttopic_Book.csv
M data/wdcm2_projecttopic_ChemicalEntities.csv
M data/wdcm2_projecttopic_Event.csv
M data/wdcm2_projecttopic_Gene.csv
M data/wdcm2_projecttopic_GeographicalObject.csv
M data/wdcm2_projecttopic_Human.csv
M data/wdcm2_projecttopic_Organization.csv
M data/wdcm2_projecttopic_ScientificArticle.csv
M data/wdcm2_projecttopic_Taxon.csv
M data/wdcm2_projecttopic_Thoroughfare.csv
M data/wdcm2_projecttopic_Wikimedia.csv
M data/wdcm2_visNetworkEdges_project_ArchitecturalStructure.csv
M data/wdcm2_visNetworkEdges_project_AstronomicalObject.csv
M data/wdcm2_visNetworkEdges_project_Book.csv
M data/wdcm2_visNetworkEdges_project_ChemicalEntities.csv
M data/wdcm2_visNetworkEdges_project_Event.csv
M data/wdcm2_visNetworkEdges_project_Gene.csv
M data/wdcm2_visNetworkEdges_project_GeographicalObject.csv
M data/wdcm2_visNetworkEdges_project_Human.csv
M data/wdcm2_visNetworkEdges_project_Organization.csv
M data/wdcm2_visNetworkEdges_project_ScientificArticle.csv
M data/wdcm2_visNetworkEdges_project_Taxon.csv
M data/wdcm2_visNetworkEdges_project_Thoroughfare.csv
M data/wdcm2_visNetworkEdges_project_Wikimedia.csv
M data/wdcm2_visNetworkNodes_project_ArchitecturalStructure.csv
M data/wdcm2_visNetworkNodes_project_AstronomicalObject.csv
M data/wdcm2_visNetworkNodes_project_Book.csv
M data/wdcm2_visNetworkNodes_project_ChemicalEntities.csv
M data/wdcm2_visNetworkNodes_project_Event.csv
M data/wdcm2_visNetworkNodes_project_Gene.csv
M data/wdcm2_visNetworkNodes_project_GeographicalObject.csv
M data/wdcm2_visNetworkNodes_project_Human.csv
M data/wdcm2_visNetworkNodes_project_Organization.csv
M data/wdcm2_visNetworkNodes_project_ScientificArticle.csv
M data/wdcm2_visNetworkNodes_project_Taxon.csv
M data/wdcm2_visNetworkNodes_project_Thoroughfare.csv
M data/wdcm2_visNetworkNodes_project_Wikimedia.csv
40 files changed, 13,867 insertions(+), 13,884 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Semantics-Dashboard 
refs/changes/96/398696/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie38b02a6f9831fefe8c3b655980f5702b1b30f9d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Semantics-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Usage-Dashboard[master]: Usage Dashboard Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398695 )

Change subject: Usage Dashboard Dec 2017
..


Usage Dashboard Dec 2017

Change-Id: I229d45fc96e581da487effce6497720b319b0234
---
M server.R
M ui.R
2 files changed, 37 insertions(+), 12 deletions(-)

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



diff --git a/server.R b/server.R
index 5bdfdd6..a57f449 100644
--- a/server.R
+++ b/server.R
@@ -159,9 +159,27 @@
 })
 names(unzip_projectTypes) <- search_projectTypes
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_UsageDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### --- shinyServer
 shinyServer(function(input, output, session) {
   
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
+  
   ### --
   ### --- BASIC FACTS
   ### --
diff --git a/ui.R b/ui.R
index 8a8221b..0caf258 100644
--- a/ui.R
+++ b/ui.R
@@ -25,20 +25,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Usage Dashboard'),
- HTML('Wikidata Concepts 
Monitor')
- 
+  column(width = 5,
+ fluidRow(
+   column(width = 3,
+  img(src = 'Wikidata-logo-en.png',
+  align = "left")
+   ),
+   column(width = 1),
+   column(width = 8,
+  h1('WDCM Usage Dashboard'),
+  HTML('Wikidata Concepts 
Monitor')
+   )
  )
+  ),
+  column(width = 7,
+ br(),
+ HTML('Interactive visualizations of 
Wikidata use by other Wikimedia projects.'),
+ HTML('https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor; 
target="_blank">Visit the WDCM wiki page'),
+ HTML('Did you spot a bug, a missing 
label, or wrong data? https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor/UserFeedback; 
target="_blank">Give us feedback here'),
+ htmlOutput('updateInfo')
+  )
 ), # - fluidRow Title END
-
-# - fluidRow Logo
-fluidRow(
-  column(width = 12,
- img(src='Wikidata-logo-en.png', 
- align = "left")
- )
-), # - fluidRow END
 
 # - hr()
 fluidRow(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I229d45fc96e581da487effce6497720b319b0234
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Usage-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Semantics-Dashboard[master]: Semantics Dashboard 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398694 )

Change subject: Semantics Dashboard 17 Dec 2017
..


Semantics Dashboard 17 Dec 2017

Change-Id: I294b0bbf46dc333c8aa48158f8acf47bb7b46718
---
M server.R
M ui.R
2 files changed, 52 insertions(+), 22 deletions(-)

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



diff --git a/server.R b/server.R
index 6954581..fcc3215 100644
--- a/server.R
+++ b/server.R
@@ -4,7 +4,7 @@
 ### ---
 
 ### --- Setup
-rm(list = ls())
+
 ### 
 ### --- general
 library(shiny)
@@ -92,7 +92,7 @@
 dbDisconnect(con)
 
 ### --- Fetch local files
-setwd('/home/goransm/WMDE/WDCM/WDCM_SemanticsDashboard/data/')
+setwd('/srv/shiny-server/WDCM_SemanticsDashboard/data/')
 
 ### --- fetch projecttopic tables
 lF <- list.files()
@@ -133,6 +133,14 @@
fixed = T)[[1]][4]
 })
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_SemanticsDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### - Determine Constants
 # - determine Projects
 projects <- wdcmProject$Project
@@ -159,6 +167,16 @@
 
 ### --- shinyServer
 shinyServer(function(input, output, session) {
+  
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
   
   ### --
   ### --- TAB: tabPanel Semantic Models
@@ -215,7 +233,7 @@
   sC <- gsub(" ", "", input$selectCategory, fixed = T)
   sTable <- itemTopicTables[which(grepl(sC, itemTopicTables, fixed = T))]
   cTopic <- tolower(gsub(" ", "", input$selectCategoryTopic))
-  if (!length(cTopic) == 0) {
+  if (!(length(cTopic) == 0)) {
 ### -- Connect
 con <- dbConnect(MySQL(),
  host = "tools.labsdb",
@@ -274,8 +292,8 @@
 
 if (!is.null(itemTopic())) {
   # - normalization: Luce's choice axiom
-  itemNames <- itemTopic()$eu_label
-  root <- select(itemTopic(), starts_with('topic'))
+  itemNames <- itemTopic()$eu_entity_id
+  root <- dplyr::select(itemTopic(), starts_with('topic'))
   root <- as.matrix(parDist(as.matrix(root), method = "euclidean"))
   rownames(root) <- itemNames
   colnames(root) <- itemNames
@@ -299,6 +317,9 @@
 nodes$id[which(nodes$label %in% x)]
   })
   conceptsStruct$arrows <- rep("to", length(conceptsStruct$to))
+  nodes$label <- sapply(nodes$label, function(x) {
+itemTopic()$eu_label[itemTopic()$eu_entity_id == x]
+  })
   visNetwork(nodes = nodes,
  edges = conceptsStruct,
  width = "100%",
@@ -376,7 +397,7 @@
 if (!is.null(input$selectProject)) {
   wUnzip <- which(names(unzip_projectTypes) %in% input$selectProject)
   if (length(wUnzip > 0)) {
-selectedProjects <- unname(do.call(c, unzip_projectTypes[wUnzip]))
+selectedProjects <- unname(do.call('c', unzip_projectTypes[wUnzip]))
   }
   wSel <- which(projects %in% input$selectProject)
   if (length(wSel > 0)) {
@@ -407,7 +428,6 @@
starts_with('topic'))
   catName <- gsub("([[:lower:]])([[:upper:]])", "\\1 \\2", 
names(projectTopic)[cCategory])
   # - FIX THIS:
-  catName <- gsub("Workof Art", "Work of Art", catName, fixed = T) 
   cProj$Category <- catName
   cProj <- cProj %>% 
 select(Topic, Probability, Category) %>% 
@@ -423,7 +443,10 @@
   projList <- as.data.frame(rbindlist(projList[wEl]))
   # - factor projList$Topic:
   projList$Topic <- str_to_title(gsub("([[:alpha:]]+)", "\\1 ", 
projList$Topic))
-  projList$Topic <- factor(projList$Topic, levels = unique(projList$Topic))
+  topicLevels <- unique(projList$Topic)
+  topicLevelsOrd <- as.numeric(str_extract(topicLevels, "[[:digit:]]+"))
+  topicLevels <- topicLevels[order(topicLevelsOrd)]
+  projList$Topic <- factor(projList$Topic, levels = topicLevels)
   # - visualize w. ggplot2
   ggplot(projList,
  aes(x = Topic, 
diff --git a/ui.R b/ui.R
index 6ddb88d..0f75409 100644
--- a/ui.R
+++ b/ui.R
@@ -25,20 +25,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Semantics Dashboard'),
- HTML('Wikidata 

[MediaWiki-commits] [Gerrit] analytics...WDCM-Overview-Dashboard[master]: Overview Dashboard 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398693 )

Change subject: Overview Dashboard 17 Dec 2017
..


Overview Dashboard 17 Dec 2017

Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
---
M server.R
M ui.R
2 files changed, 37 insertions(+), 11 deletions(-)

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



diff --git a/server.R b/server.R
index 86149ee..a2ddf2d 100644
--- a/server.R
+++ b/server.R
@@ -129,9 +129,27 @@
 ### --- Disconnect
 dbDisconnect(con)
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_OverviewDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### --- shinyServer
 shinyServer(function(input, output, session) {
   
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
+  
   ### --
   ### --- TAB: Overview
   ### --
diff --git a/ui.R b/ui.R
index 33bbfc8..fa722ef 100644
--- a/ui.R
+++ b/ui.R
@@ -26,19 +26,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Overview Dashboard'),
- HTML('Wikidata Concepts 
Monitor')
+  column(width = 5,
+ fluidRow(
+   column(width = 3,
+  img(src = 'Wikidata-logo-en.png',
+  align = "left")
+   ),
+   column(width = 1),
+   column(width = 8,
+  h1('WDCM Overview Dashboard'),
+  HTML('Wikidata Concepts 
Monitor')
+   )
  )
-), # - fluidRow Title END
-
-# - fluidRow Logo
-fluidRow(
-  column(width = 12,
- img(src='Wikidata-logo-en.png', 
- align = "left")
+  ),
+  column(width = 7,
+ br(),
+ HTML('Interactive visualizations of 
Wikidata use by other Wikimedia projects.'),
+ HTML('https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor; 
target="_blank">Visit the WDCM wiki page'),
+ HTML('Did you spot a bug, a missing 
label, or wrong data? https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor/UserFeedback; 
target="_blank">Give us feedback here'),
+ htmlOutput('updateInfo')
   )
-), # - fluidRow END
+), # - fluidRow Title END
 
 # - hr()
 fluidRow(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Overview-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 
Gerrit-Reviewer: GoranSMilovanovic 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Usage-Dashboard[master]: Usage Dashboard Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398695 )

Change subject: Usage Dashboard Dec 2017
..

Usage Dashboard Dec 2017

Change-Id: I229d45fc96e581da487effce6497720b319b0234
---
M server.R
M ui.R
2 files changed, 37 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Usage-Dashboard 
refs/changes/95/398695/1

diff --git a/server.R b/server.R
index 5bdfdd6..a57f449 100644
--- a/server.R
+++ b/server.R
@@ -159,9 +159,27 @@
 })
 names(unzip_projectTypes) <- search_projectTypes
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_UsageDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### --- shinyServer
 shinyServer(function(input, output, session) {
   
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
+  
   ### --
   ### --- BASIC FACTS
   ### --
diff --git a/ui.R b/ui.R
index 8a8221b..0caf258 100644
--- a/ui.R
+++ b/ui.R
@@ -25,20 +25,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Usage Dashboard'),
- HTML('Wikidata Concepts 
Monitor')
- 
+  column(width = 5,
+ fluidRow(
+   column(width = 3,
+  img(src = 'Wikidata-logo-en.png',
+  align = "left")
+   ),
+   column(width = 1),
+   column(width = 8,
+  h1('WDCM Usage Dashboard'),
+  HTML('Wikidata Concepts 
Monitor')
+   )
  )
+  ),
+  column(width = 7,
+ br(),
+ HTML('Interactive visualizations of 
Wikidata use by other Wikimedia projects.'),
+ HTML('https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor; 
target="_blank">Visit the WDCM wiki page'),
+ HTML('Did you spot a bug, a missing 
label, or wrong data? https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor/UserFeedback; 
target="_blank">Give us feedback here'),
+ htmlOutput('updateInfo')
+  )
 ), # - fluidRow Title END
-
-# - fluidRow Logo
-fluidRow(
-  column(width = 12,
- img(src='Wikidata-logo-en.png', 
- align = "left")
- )
-), # - fluidRow END
 
 # - hr()
 fluidRow(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I229d45fc96e581da487effce6497720b319b0234
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Usage-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM-Semantics-Dashboard[master]: Semantics Dashboard 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398694 )

Change subject: Semantics Dashboard 17 Dec 2017
..

Semantics Dashboard 17 Dec 2017

Change-Id: I294b0bbf46dc333c8aa48158f8acf47bb7b46718
---
M server.R
M ui.R
2 files changed, 52 insertions(+), 22 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Semantics-Dashboard 
refs/changes/94/398694/1

diff --git a/server.R b/server.R
index 6954581..fcc3215 100644
--- a/server.R
+++ b/server.R
@@ -4,7 +4,7 @@
 ### ---
 
 ### --- Setup
-rm(list = ls())
+
 ### 
 ### --- general
 library(shiny)
@@ -92,7 +92,7 @@
 dbDisconnect(con)
 
 ### --- Fetch local files
-setwd('/home/goransm/WMDE/WDCM/WDCM_SemanticsDashboard/data/')
+setwd('/srv/shiny-server/WDCM_SemanticsDashboard/data/')
 
 ### --- fetch projecttopic tables
 lF <- list.files()
@@ -133,6 +133,14 @@
fixed = T)[[1]][4]
 })
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_SemanticsDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### - Determine Constants
 # - determine Projects
 projects <- wdcmProject$Project
@@ -159,6 +167,16 @@
 
 ### --- shinyServer
 shinyServer(function(input, output, session) {
+  
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
   
   ### --
   ### --- TAB: tabPanel Semantic Models
@@ -215,7 +233,7 @@
   sC <- gsub(" ", "", input$selectCategory, fixed = T)
   sTable <- itemTopicTables[which(grepl(sC, itemTopicTables, fixed = T))]
   cTopic <- tolower(gsub(" ", "", input$selectCategoryTopic))
-  if (!length(cTopic) == 0) {
+  if (!(length(cTopic) == 0)) {
 ### -- Connect
 con <- dbConnect(MySQL(),
  host = "tools.labsdb",
@@ -274,8 +292,8 @@
 
 if (!is.null(itemTopic())) {
   # - normalization: Luce's choice axiom
-  itemNames <- itemTopic()$eu_label
-  root <- select(itemTopic(), starts_with('topic'))
+  itemNames <- itemTopic()$eu_entity_id
+  root <- dplyr::select(itemTopic(), starts_with('topic'))
   root <- as.matrix(parDist(as.matrix(root), method = "euclidean"))
   rownames(root) <- itemNames
   colnames(root) <- itemNames
@@ -299,6 +317,9 @@
 nodes$id[which(nodes$label %in% x)]
   })
   conceptsStruct$arrows <- rep("to", length(conceptsStruct$to))
+  nodes$label <- sapply(nodes$label, function(x) {
+itemTopic()$eu_label[itemTopic()$eu_entity_id == x]
+  })
   visNetwork(nodes = nodes,
  edges = conceptsStruct,
  width = "100%",
@@ -376,7 +397,7 @@
 if (!is.null(input$selectProject)) {
   wUnzip <- which(names(unzip_projectTypes) %in% input$selectProject)
   if (length(wUnzip > 0)) {
-selectedProjects <- unname(do.call(c, unzip_projectTypes[wUnzip]))
+selectedProjects <- unname(do.call('c', unzip_projectTypes[wUnzip]))
   }
   wSel <- which(projects %in% input$selectProject)
   if (length(wSel > 0)) {
@@ -407,7 +428,6 @@
starts_with('topic'))
   catName <- gsub("([[:lower:]])([[:upper:]])", "\\1 \\2", 
names(projectTopic)[cCategory])
   # - FIX THIS:
-  catName <- gsub("Workof Art", "Work of Art", catName, fixed = T) 
   cProj$Category <- catName
   cProj <- cProj %>% 
 select(Topic, Probability, Category) %>% 
@@ -423,7 +443,10 @@
   projList <- as.data.frame(rbindlist(projList[wEl]))
   # - factor projList$Topic:
   projList$Topic <- str_to_title(gsub("([[:alpha:]]+)", "\\1 ", 
projList$Topic))
-  projList$Topic <- factor(projList$Topic, levels = unique(projList$Topic))
+  topicLevels <- unique(projList$Topic)
+  topicLevelsOrd <- as.numeric(str_extract(topicLevels, "[[:digit:]]+"))
+  topicLevels <- topicLevels[order(topicLevelsOrd)]
+  projList$Topic <- factor(projList$Topic, levels = topicLevels)
   # - visualize w. ggplot2
   ggplot(projList,
  aes(x = Topic, 
diff --git a/ui.R b/ui.R
index 6ddb88d..0f75409 100644
--- a/ui.R
+++ b/ui.R
@@ -25,20 +25,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Semantics Dashboard'),
- 

[MediaWiki-commits] [Gerrit] analytics...WDCM-Overview-Dashboard[master]: Overview Dashboard 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398693 )

Change subject: Overview Dashboard 17 Dec 2017
..

Overview Dashboard 17 Dec 2017

Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
---
M server.R
M ui.R
2 files changed, 37 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM-Overview-Dashboard 
refs/changes/93/398693/1

diff --git a/server.R b/server.R
index 86149ee..a2ddf2d 100644
--- a/server.R
+++ b/server.R
@@ -129,9 +129,27 @@
 ### --- Disconnect
 dbDisconnect(con)
 
+### --- Fetch update info
+setwd('/srv/shiny-server/WDCM_OverviewDashboard/update/')
+update <- read.csv('toLabsReport.csv', 
+   header = T,
+   check.names = F,
+   stringsAsFactors = F,
+   row.names = 1)
+
 ### --- shinyServer
 shinyServer(function(input, output, session) {
   
+  ### --- output: updateInfo
+  output$updateInfo <- renderText({
+date <- update$timeStamp[dim(update)[1]]
+date <- strsplit(as.character(date), split = " ", fixed = T)[[1]][1]
+date <- strsplit(date, split = "-", fixed = T)
+date[[1]][2] <- month.name[as.numeric(date[[1]][2])]
+date <- paste(unlist(date), collapse = " ")
+return(paste("Last update: ", date, "", sep = 
""))
+  })
+  
   ### --
   ### --- TAB: Overview
   ### --
diff --git a/ui.R b/ui.R
index 33bbfc8..fa722ef 100644
--- a/ui.R
+++ b/ui.R
@@ -26,19 +26,27 @@
 
 # - fluidRow Title
 fluidRow(
-  column(width = 12,
- h2('WDCM Overview Dashboard'),
- HTML('Wikidata Concepts 
Monitor')
+  column(width = 5,
+ fluidRow(
+   column(width = 3,
+  img(src = 'Wikidata-logo-en.png',
+  align = "left")
+   ),
+   column(width = 1),
+   column(width = 8,
+  h1('WDCM Overview Dashboard'),
+  HTML('Wikidata Concepts 
Monitor')
+   )
  )
-), # - fluidRow Title END
-
-# - fluidRow Logo
-fluidRow(
-  column(width = 12,
- img(src='Wikidata-logo-en.png', 
- align = "left")
+  ),
+  column(width = 7,
+ br(),
+ HTML('Interactive visualizations of 
Wikidata use by other Wikimedia projects.'),
+ HTML('https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor; 
target="_blank">Visit the WDCM wiki page'),
+ HTML('Did you spot a bug, a missing 
label, or wrong data? https://www.wikidata.org/wiki/Wikidata:Wikidata_Concepts_Monitor/UserFeedback; 
target="_blank">Give us feedback here'),
+ htmlOutput('updateInfo')
   )
-), # - fluidRow END
+), # - fluidRow Title END
 
 # - hr()
 fluidRow(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fc52a454f172c578e650a1ea8ce56face3b7c3d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wmde/WDCM-Overview-Dashboard
Gerrit-Branch: master
Gerrit-Owner: GoranSMilovanovic 

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


[MediaWiki-commits] [Gerrit] analytics...WDCM[master]: Labs processing 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398692 )

Change subject: Labs processing 17 Dec 2017
..


Labs processing 17 Dec 2017

Change-Id: I1cfad83ed71be0e046205a5cff09987df0a8ab7f
---
M WDCM_EngineGeo_goransm.R
A WDCM_Process.R
A WDCM_Update_Labs.R
3 files changed, 1,159 insertions(+), 2 deletions(-)

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



diff --git a/WDCM_EngineGeo_goransm.R b/WDCM_EngineGeo_goransm.R
index 635606b..4a04518 100644
--- a/WDCM_EngineGeo_goransm.R
+++ b/WDCM_EngineGeo_goransm.R
@@ -288,14 +288,14 @@
 ### --- join coordinates, items, labels, and usage
 setwd(dataDir)
 
-# - list .tsv files
+# - list .tsv files from dataDir
 lF <- list.files()
 w <- which(grepl("^wdcm_geoitem", lF))
 lF <- lF[w]
 w <- which(grepl(".tsv", lF, fixed = T))
 lF <- lF[w]
 
-# - remove old .csv files:
+# - remove old .csv files from dataDir
 rmF <- list.files()
 w <- which(grepl("^wdcm_geoitem", rmF))
 rmF <- rmF[w]
diff --git a/WDCM_Process.R b/WDCM_Process.R
new file mode 100644
index 000..467892d
--- /dev/null
+++ b/WDCM_Process.R
@@ -0,0 +1,910 @@
+
+### ---
+### --- WDCM Process Module, v. Beta 0.1
+### --- Script: WDCM_Process_v2.R, v. Beta 0.1
+### ---
+### --- DESCRIPTION:
+### --- WDCM_Process_v2.R takes a list of .tsv files that present
+### --- the data from wbc_entity_usage tables accross the client projects
+### --- fetched from production (stat1005) by WDCM_Search_Clients.R and 
+### --- further pre-processed by WDCM_Pre-Process.R (also on production).
+### --- The goal of this WDCM module/script is to produce (or update) 
+### --- the WDCM Stats Dashboard database.
+### ---
+### --- INPUT: 
+### --- the WDCM_Process_v2.R reads the .tsv input files from:
+### --- /home/goransm/WMDE/WDCM/WDCM_DataIN/WDCM_DataIN_ClientUsage_v2/
+### --- on the wikidataconcepts.eqiad.wmflabs Cloud VPS instance
+### --- These files are brought to Labs directly from productio
+### --- (currently the stat1005.eqiad.wmnet statbox)
+### ---
+### --- OUTPUT: the WDCM Dashboards MariaDB database is update
+### ---
+
+### ---
+### --- LICENSE:
+### ---
+### --- GPL v2
+### --- This file is part of Wikidata Concepts Monitor (WDCM)
+### ---
+### --- WDCM is free software: you can redistribute it and/or modify
+### --- it under the terms of the GNU General Public License as published by
+### --- the Free Software Foundation, either version 2 of the License, or
+### --- (at your option) any later version.
+### ---
+### --- WDCM is distributed in the hope that it will be useful,
+### --- but WITHOUT ANY WARRANTY; without even the implied warranty of
+### --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### --- GNU General Public License for more details.
+### ---
+### --- You should have received a copy of the GNU General Public License
+### --- along with WDCM. If not, see .
+### ---
+
+### --- Setup
+library(RMySQL)
+library(httr)
+library(XML)
+library(data.table)
+library(dplyr)
+library(tidyr)
+library(readr)
+library(htmltab)
+library(snowfall)
+library(maptpx)
+library(Rtsne)
+
+# - mysql --defaults-file=/home/goransm/mySQL_Credentials/replica.my.cnf -h 
tools.labsdb u16664__wdcm_p
+# - database: u16664__wdcm_p
+
+### --- functions
+
+# - projectType() to determine project type
+projectType <- function(projectName) {
+  unname(sapply(projectName, function(x) {
+if (grepl("commons", x, fixed = T)) {"Commons"
+} else if (grepl("mediawiki|meta|species|wikidata", x)) {"Other"
+} else if (grepl("wiki$", x)) {"Wikipedia"
+} else if (grepl("quote$", x)) {"Wikiquote"
+} else if (grepl("voyage$", x)) {"Wikivoyage"
+} else if (grepl("news$", x)) {"Wikinews"
+} else if (grepl("source$", x)) {"Wikisource"
+} else if (grepl("wiktionary$", x)) {"Wiktionary"
+} else if (grepl("versity$", x)) {"Wikiversity"
+} else if (grepl("books$", x)) {"Wikibooks"
+} else {"Other"}
+  }))
+}
+
+### ---
+### --- NOTE:
+### --- TABLE NAMING CONVENTION FOR v2 (WDCM Stats Dashboard)
+### --- wdcm2_something
+### ---
+
+# - to nohup.out
+print(paste("WDCM Process.R update started at: ", Sys.time(), sep 

[MediaWiki-commits] [Gerrit] analytics...WDCM[master]: Labs processing 17 Dec 2017

2017-12-17 Thread GoranSMilovanovic (Code Review)
GoranSMilovanovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398692 )

Change subject: Labs processing 17 Dec 2017
..

Labs processing 17 Dec 2017

Change-Id: I1cfad83ed71be0e046205a5cff09987df0a8ab7f
---
M WDCM_EngineGeo_goransm.R
A WDCM_Process.R
A WDCM_Update_Labs.R
3 files changed, 1,159 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wmde/WDCM 
refs/changes/92/398692/1

diff --git a/WDCM_EngineGeo_goransm.R b/WDCM_EngineGeo_goransm.R
index 635606b..4a04518 100644
--- a/WDCM_EngineGeo_goransm.R
+++ b/WDCM_EngineGeo_goransm.R
@@ -288,14 +288,14 @@
 ### --- join coordinates, items, labels, and usage
 setwd(dataDir)
 
-# - list .tsv files
+# - list .tsv files from dataDir
 lF <- list.files()
 w <- which(grepl("^wdcm_geoitem", lF))
 lF <- lF[w]
 w <- which(grepl(".tsv", lF, fixed = T))
 lF <- lF[w]
 
-# - remove old .csv files:
+# - remove old .csv files from dataDir
 rmF <- list.files()
 w <- which(grepl("^wdcm_geoitem", rmF))
 rmF <- rmF[w]
diff --git a/WDCM_Process.R b/WDCM_Process.R
new file mode 100644
index 000..467892d
--- /dev/null
+++ b/WDCM_Process.R
@@ -0,0 +1,910 @@
+
+### ---
+### --- WDCM Process Module, v. Beta 0.1
+### --- Script: WDCM_Process_v2.R, v. Beta 0.1
+### ---
+### --- DESCRIPTION:
+### --- WDCM_Process_v2.R takes a list of .tsv files that present
+### --- the data from wbc_entity_usage tables accross the client projects
+### --- fetched from production (stat1005) by WDCM_Search_Clients.R and 
+### --- further pre-processed by WDCM_Pre-Process.R (also on production).
+### --- The goal of this WDCM module/script is to produce (or update) 
+### --- the WDCM Stats Dashboard database.
+### ---
+### --- INPUT: 
+### --- the WDCM_Process_v2.R reads the .tsv input files from:
+### --- /home/goransm/WMDE/WDCM/WDCM_DataIN/WDCM_DataIN_ClientUsage_v2/
+### --- on the wikidataconcepts.eqiad.wmflabs Cloud VPS instance
+### --- These files are brought to Labs directly from productio
+### --- (currently the stat1005.eqiad.wmnet statbox)
+### ---
+### --- OUTPUT: the WDCM Dashboards MariaDB database is update
+### ---
+
+### ---
+### --- LICENSE:
+### ---
+### --- GPL v2
+### --- This file is part of Wikidata Concepts Monitor (WDCM)
+### ---
+### --- WDCM is free software: you can redistribute it and/or modify
+### --- it under the terms of the GNU General Public License as published by
+### --- the Free Software Foundation, either version 2 of the License, or
+### --- (at your option) any later version.
+### ---
+### --- WDCM is distributed in the hope that it will be useful,
+### --- but WITHOUT ANY WARRANTY; without even the implied warranty of
+### --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### --- GNU General Public License for more details.
+### ---
+### --- You should have received a copy of the GNU General Public License
+### --- along with WDCM. If not, see .
+### ---
+
+### --- Setup
+library(RMySQL)
+library(httr)
+library(XML)
+library(data.table)
+library(dplyr)
+library(tidyr)
+library(readr)
+library(htmltab)
+library(snowfall)
+library(maptpx)
+library(Rtsne)
+
+# - mysql --defaults-file=/home/goransm/mySQL_Credentials/replica.my.cnf -h 
tools.labsdb u16664__wdcm_p
+# - database: u16664__wdcm_p
+
+### --- functions
+
+# - projectType() to determine project type
+projectType <- function(projectName) {
+  unname(sapply(projectName, function(x) {
+if (grepl("commons", x, fixed = T)) {"Commons"
+} else if (grepl("mediawiki|meta|species|wikidata", x)) {"Other"
+} else if (grepl("wiki$", x)) {"Wikipedia"
+} else if (grepl("quote$", x)) {"Wikiquote"
+} else if (grepl("voyage$", x)) {"Wikivoyage"
+} else if (grepl("news$", x)) {"Wikinews"
+} else if (grepl("source$", x)) {"Wikisource"
+} else if (grepl("wiktionary$", x)) {"Wiktionary"
+} else if (grepl("versity$", x)) {"Wikiversity"
+} else if (grepl("books$", x)) {"Wikibooks"
+} else {"Other"}
+  }))
+}
+
+### ---
+### --- NOTE:
+### --- TABLE NAMING CONVENTION FOR v2 (WDCM Stats Dashboard)
+### --- wdcm2_something
+### ---
+
+# - to nohup.out
+print(paste("WDCM Process.R update started at: ", 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix gap between header and content

2017-12-17 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398691 )

Change subject: Fix gap between header and content
..

Fix gap between header and content

After a long analysis on IRC I've found out that the cause isn't
the fieldset as described in the bug report,
but a margin-top rule which had a wrong value.

Bug: T174139
Change-Id: Ifde1a944ca19e424ff5499c5f2cd1c362dc6e23b
---
M modules/ui/legacy/styles/mw.cx.ui.Columns.less
M modules/ui/styles/mw.cx.ui.Columns.less
M modules/widgets/common/ext.cx.column.less
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/91/398691/1

diff --git a/modules/ui/legacy/styles/mw.cx.ui.Columns.less 
b/modules/ui/legacy/styles/mw.cx.ui.Columns.less
index 960286e..1435014 100644
--- a/modules/ui/legacy/styles/mw.cx.ui.Columns.less
+++ b/modules/ui/legacy/styles/mw.cx.ui.Columns.less
@@ -2,7 +2,7 @@
 @import '../../../widgets/common/ext.cx.common.less';
 
 .cx-widget__columns {
-   margin-top: 100px;
+   margin-top: 80px;
min-height: 100vh;
 
&.disabled {
diff --git a/modules/ui/styles/mw.cx.ui.Columns.less 
b/modules/ui/styles/mw.cx.ui.Columns.less
index b83874f..8900364 100644
--- a/modules/ui/styles/mw.cx.ui.Columns.less
+++ b/modules/ui/styles/mw.cx.ui.Columns.less
@@ -2,7 +2,7 @@
 @import '../../widgets/common/ext.cx.common.less';
 
 .cx-widget__columns {
-   margin-top: 100px;
+   margin-top: 80px;
min-height: 100vh;
 
&.disabled {
diff --git a/modules/widgets/common/ext.cx.column.less 
b/modules/widgets/common/ext.cx.column.less
index 634caf7..d3b18fc 100644
--- a/modules/widgets/common/ext.cx.column.less
+++ b/modules/widgets/common/ext.cx.column.less
@@ -2,7 +2,7 @@
 @import 'ext.cx.common.less';
 
 .cx-widget__columns {
-   margin-top: 100px;
+   margin-top: 80px;
min-height: 100vh;
 
&.disabled {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifde1a944ca19e424ff5499c5f2cd1c362dc6e23b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Divadsn 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Create family file for Wikimania wikis

2017-12-17 Thread Zoranzoki21 (Code Review)
Zoranzoki21 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398690 )

Change subject: Create family file for Wikimania wikis
..

Create family file for Wikimania wikis

Bug: T182982
Change-Id: Idefa0f9c8ca91dbe9b2f350c0db68062eab17746
---
A pywikibot/families/wikimania_family.py
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/90/398690/1

diff --git a/pywikibot/families/wikimania_family.py 
b/pywikibot/families/wikimania_family.py
new file mode 100644
index 000..58185c4
--- /dev/null
+++ b/pywikibot/families/wikimania_family.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+"""Family module for Wikimania wikis."""
+#
+# (C) Pywikibot team, 2012-2015
+#
+# Distributed under the terms of the MIT license.
+#
+from __future__ import absolute_import, unicode_literals
+
+from pywikibot import family
+from pywikibot.tools import deprecated
+
+
+class Family(family.SubdomainFamily, family.WikimediaFamily):
+
+"""Family for Wikimania wikis hosted on wikimedia.org."""
+
+name = 'wikimania2018'
+code = 'en'
+
+def protocol(self, code):
+"""Return the protocol for this family."""
+return 'https'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idefa0f9c8ca91dbe9b2f350c0db68062eab17746
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Zoranzoki21 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Revert "[BlueSpice] Remove Smartlist"

2017-12-17 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398689 )

Change subject: Revert "[BlueSpice] Remove Smartlist"
..


Revert "[BlueSpice] Remove Smartlist"

Nonsense :-(

This reverts commit 5e2febfae44d0f1b2377db7644c2858a1666cdba.

Change-Id: I0c29d48cb722fc27cfb478d90a25ffc69af7a5a3
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 7f61b74..cb2c3d6 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -310,6 +310,9 @@
 Blue Spice Readers
 descmsg = bs-readers-desc
 
+Blue Spice Smartlist
+descmsg = bs-smartlist-desc
+
 Blue Spice SMW Connector
 descmsg = bs-bssmwconnector-desc
 optional = bs-bssmwconnector-nmmngr-label-smw

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c29d48cb722fc27cfb478d90a25ffc69af7a5a3
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Revert "[BlueSpice] Remove Smartlist"

2017-12-17 Thread Raimond Spekking (Code Review)
Hello jenkins-bot,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "[BlueSpice] Remove Smartlist"
..

Revert "[BlueSpice] Remove Smartlist"

Nonsense :-(

This reverts commit 5e2febfae44d0f1b2377db7644c2858a1666cdba.

Change-Id: I0c29d48cb722fc27cfb478d90a25ffc69af7a5a3
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/89/398689/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 7f61b74..cb2c3d6 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -310,6 +310,9 @@
 Blue Spice Readers
 descmsg = bs-readers-desc
 
+Blue Spice Smartlist
+descmsg = bs-smartlist-desc
+
 Blue Spice SMW Connector
 descmsg = bs-bssmwconnector-desc
 optional = bs-bssmwconnector-nmmngr-label-smw

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c29d48cb722fc27cfb478d90a25ffc69af7a5a3
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [tests] Ignore N812 naming rules for pywikibot/userinterface...

2017-12-17 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398688 )

Change subject: [tests] Ignore N812 naming rules for 
pywikibot/userinterfaces/gui.py
..

[tests] Ignore N812 naming rules for pywikibot/userinterfaces/gui.py

Change-Id: I93f264c632d256faa1b04f47d76a1485a1b6c5b4
---
M pywikibot/userinterfaces/gui.py
M tox.ini
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/88/398688/1

diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py
index 21f866b..c57acb9 100644
--- a/pywikibot/userinterfaces/gui.py
+++ b/pywikibot/userinterfaces/gui.py
@@ -22,7 +22,7 @@
 if sys.version_info[0] > 2:
 import tkinter as Tkinter
 from tkinter.scrolledtext import ScrolledText
-from tkinter import simpledialog as tkSimpleDialog  # noqa: N812
+from tkinter import simpledialog as tkSimpleDialog
 else:
 import Tkinter
 import tkSimpleDialog
diff --git a/tox.ini b/tox.ini
index 906911d..dd784dd 100644
--- a/tox.ini
+++ b/tox.ini
@@ -180,6 +180,7 @@
 pywikibot/family.py : E241
 pywikibot/fixes.py : E241
 pywikibot/textlib.py : E241
+pywikibot/userinterfaces/gui.py : N801
 pywikibot/userinterfaces/terminal_interface_unix.py : E241
 pywikibot/userinterfaces/terminal_interface_win32.py : E241
 pywikibot/textlib.py : N801

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93f264c632d256faa1b04f47d76a1485a1b6c5b4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [BlueSpice] Remove Smartlist

2017-12-17 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398687 )

Change subject: [BlueSpice] Remove Smartlist
..


[BlueSpice] Remove Smartlist

Change-Id: Iebc3f8810367e2dbcfd7e1c96b0483e43f5c1854
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index cb2c3d6..7f61b74 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -310,9 +310,6 @@
 Blue Spice Readers
 descmsg = bs-readers-desc
 
-Blue Spice Smartlist
-descmsg = bs-smartlist-desc
-
 Blue Spice SMW Connector
 descmsg = bs-bssmwconnector-desc
 optional = bs-bssmwconnector-nmmngr-label-smw

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebc3f8810367e2dbcfd7e1c96b0483e43f5c1854
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] translatewiki[master]: [BlueSpice] Remove Smartlist

2017-12-17 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398687 )

Change subject: [BlueSpice] Remove Smartlist
..

[BlueSpice] Remove Smartlist

Change-Id: Iebc3f8810367e2dbcfd7e1c96b0483e43f5c1854
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/87/398687/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index cb2c3d6..7f61b74 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -310,9 +310,6 @@
 Blue Spice Readers
 descmsg = bs-readers-desc
 
-Blue Spice Smartlist
-descmsg = bs-smartlist-desc
-
 Blue Spice SMW Connector
 descmsg = bs-bssmwconnector-desc
 optional = bs-bssmwconnector-nmmngr-label-smw

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebc3f8810367e2dbcfd7e1c96b0483e43f5c1854
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] mediawiki...codesniffer[master]: Ignore maintenance scripts in ClassMatchesFilenameSniff

2017-12-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398621 )

Change subject: Ignore maintenance scripts in ClassMatchesFilenameSniff
..


Ignore maintenance scripts in ClassMatchesFilenameSniff

Bug: T178725
Change-Id: I78f03a028539e0313f96534490bf4fcda19160a8
---
M MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
1 file changed, 28 insertions(+), 0 deletions(-)

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



diff --git a/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php 
b/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
index dea4edf..3ca3a2d 100644
--- a/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
+++ b/MediaWiki/Sniffs/Files/ClassMatchesFilenameSniff.php
@@ -50,6 +50,15 @@
$name = $phpcsFile->getDeclarationName( $stackPtr );
if ( $base !== "$name.php" ) {
$wrongCase = strtolower( $base ) === strtolower( 
"$name.php" );
+   if ( $wrongCase && $this->isMaintenanceScript( 
$phpcsFile ) ) {
+   // Maintenance scripts follow the class name, 
but the first
+   // letter is lowercase.
+   $expected = lcfirst( $name );
+   if ( $base === "$expected.php" ) {
+   // OK!
+   return;
+   }
+   }
$phpcsFile->addError(
"Class name '$name' does not match filename 
'$base'",
$stackPtr,
@@ -58,4 +67,23 @@
}
}
 
+   /**
+* Figure out whether the file is a MediaWiki maintenance script
+*
+* @param File $phpcsFile File being checked
+*
+* @return bool
+*/
+   private function isMaintenanceScript( File $phpcsFile ) {
+   foreach ( $phpcsFile->getTokens() as $token ) {
+   if ( $token['code'] === T_STRING
+   && $token['content'] === 
'RUN_MAINTENANCE_IF_MAIN'
+   ) {
+   return true;
+   }
+   }
+
+   return false;
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78f03a028539e0313f96534490bf4fcda19160a8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: [DO NOT MERGE] Test change

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398686 )

Change subject: [DO NOT MERGE] Test change
..

[DO NOT MERGE] Test change

Change-Id: I0ecbef0a76f43e18938249b022b3910f00fe32e6
---
M client/includes/Changes/AffectedPagesFinder.php
M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
M client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php
M client/tests/phpunit/includes/Changes/InjectRCRecordsJobTest.php
M client/tests/phpunit/includes/RecentChanges/RecentChangeFactoryTest.php
M lib/includes/Changes/DiffChange.php
M lib/includes/Changes/EntityChange.php
M lib/includes/Changes/EntityChangeFactory.php
M lib/includes/Changes/EntityDiffChangedAspects.php
M lib/includes/Changes/EntityDiffChangedAspectsFactory.php
M lib/includes/Changes/ItemChange.php
M lib/tests/phpunit/Changes/EntityChangeTest.php
M lib/tests/phpunit/Changes/EntityDiffChangedAspectsFactoryTest.php
M lib/tests/phpunit/Changes/ItemChangeTest.php
M repo/tests/phpunit/includes/Store/Sql/SqlChangeStoreTest.php
15 files changed, 69 insertions(+), 289 deletions(-)


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

diff --git a/client/includes/Changes/AffectedPagesFinder.php 
b/client/includes/Changes/AffectedPagesFinder.php
index a5450e2..8c2d502 100644
--- a/client/includes/Changes/AffectedPagesFinder.php
+++ b/client/includes/Changes/AffectedPagesFinder.php
@@ -16,7 +16,6 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\EntityChange;
 use Wikibase\ItemChange;
-use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory;
 use Wikibase\Lib\Store\StorageException;
 
 /**
@@ -120,16 +119,7 @@
 */
public function getChangedAspects( EntityChange $change ) {
$aspects = [];
-
-   $info = $change->getInfo();
-   // We might unserialize old EntityChange which doesn't have 
getCompactDiff method
-   if ( array_key_exists( 'compactDiff', $info ) ) {
-   $diffAspects = $info['compactDiff'];
-   } else {
-   $diffAspects = ( new EntityDiffChangedAspectsFactory() 
)->newFromEntityDiff(
-   $change->getDiff()
-   );
-   }
+   $diffAspects = $change->getCompactDiff();
 
if ( $diffAspects->getSiteLinkChanges() !== [] ) {
$sitelinkChanges = $diffAspects->getSiteLinkChanges();
@@ -239,15 +229,7 @@
$usages = $this->transformAllPageEntityUsages( $usages, 
$entityId, $changedAspects );
 
if ( $change instanceof ItemChange && in_array( 
EntityUsage::TITLE_USAGE, $changedAspects ) ) {
-   $info = $change->getInfo();
-   // We might unserialize old EntityChange which doesn't 
have getCompactDiff method
-   if ( array_key_exists( 'compactDiff', $info ) ) {
-   $diffChangedAspects = $info['compactDiff'];
-   } else {
-   $diffChangedAspects = ( new 
EntityDiffChangedAspectsFactory() )->newFromEntityDiff(
-   $change->getDiff()
-   );
-   }
+   $diffChangedAspects = $change->getCompactDiff();
$namesFromDiff = $this->getPagesReferencedInDiff(
$diffChangedAspects->getSiteLinkChanges()
);
diff --git a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php 
b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
index 5ce984d..4106fc6 100644
--- a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
+++ b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
@@ -18,7 +18,6 @@
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\EntityChange;
-use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use Wikibase\Lib\Store\StorageException;
 use Wikibase\Lib\Tests\Changes\TestChanges;
@@ -218,32 +217,6 @@
 
$actual = $referencedPagesFinder->getChangedAspects( $change );
 
-   sort( $expected );
-   sort( $actual );
-   $this->assertEquals( $expected, $actual );
-   }
-
-   /**
-* @dataProvider getChangedAspectsProvider
-*/
-   public function testGetChangedAspectsUsingEntityChangeAspects(
-   array $expected,
-   EntityChange $change,
-   $trackUsagesInAllLanguages = false
-   ) {
-   $referencedPagesFinder = $this->getAffectedPagesFinder( [], [], 
$trackUsagesInAllLanguages );
-   $info = $change->getInfo();
-   if ( 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Follow-up ca5587c2992: unbreak unit tests

2017-12-17 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398685 )

Change subject: Follow-up ca5587c2992: unbreak unit tests
..


Follow-up ca5587c2992: unbreak unit tests

Change-Id: I490b1e42fbda61ee248c076fc46ef15588db6847
---
M lib/tests/phpunit/Changes/ItemChangeTest.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/lib/tests/phpunit/Changes/ItemChangeTest.php 
b/lib/tests/phpunit/Changes/ItemChangeTest.php
index 2fce9bb..67b2e7f 100644
--- a/lib/tests/phpunit/Changes/ItemChangeTest.php
+++ b/lib/tests/phpunit/Changes/ItemChangeTest.php
@@ -8,6 +8,7 @@
 use Wikibase\DataModel\Services\Diff\ItemDiff;
 use Wikibase\EntityChange;
 use Wikibase\ItemChange;
+use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory;
 
 /**
  * @covers Wikibase\ItemChange

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I490b1e42fbda61ee248c076fc46ef15588db6847
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Follow-up ca5587c2992: unbreak unit tests

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398685 )

Change subject: Follow-up ca5587c2992: unbreak unit tests
..

Follow-up ca5587c2992: unbreak unit tests

Change-Id: I490b1e42fbda61ee248c076fc46ef15588db6847
---
M lib/tests/phpunit/Changes/ItemChangeTest.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/lib/tests/phpunit/Changes/ItemChangeTest.php 
b/lib/tests/phpunit/Changes/ItemChangeTest.php
index 2fce9bb..67b2e7f 100644
--- a/lib/tests/phpunit/Changes/ItemChangeTest.php
+++ b/lib/tests/phpunit/Changes/ItemChangeTest.php
@@ -8,6 +8,7 @@
 use Wikibase\DataModel\Services\Diff\ItemDiff;
 use Wikibase\EntityChange;
 use Wikibase\ItemChange;
+use Wikibase\Lib\Changes\EntityDiffChangedAspectsFactory;
 
 /**
  * @covers Wikibase\ItemChange

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I490b1e42fbda61ee248c076fc46ef15588db6847
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Don't ship unused templates to the client

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398684 )

Change subject: Don't ship unused templates to the client
..

Don't ship unused templates to the client

Rerendering the header (description) doesn't use templates anymore, so
don't ship those. Also don't ship templates for actions that are never
rendered on the client, like diffs and history.

This reduces the size of the ext.flow.templating module by 14KB.

Bonus: Remove unused form_element partial.

Change-Id: Ie5b8797b55d474fadc7a0e52c838465abafb8a61
---
M extension.json
D handlebars/form_element.partial.handlebars
2 files changed, 0 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/84/398684/1

diff --git a/extension.json b/extension.json
index 89d4b9f..f4c81b6 100644
--- a/extension.json
+++ b/extension.json
@@ -137,31 +137,12 @@
],
"templates": [

"handlebars/flow_anon_warning.partial.handlebars",
-   
"handlebars/flow_block_board-history.handlebars",
-   "handlebars/flow_block_header.handlebars",
-   
"handlebars/flow_block_header_diff_view.handlebars",
-   "handlebars/flow_block_header_edit.handlebars",
-   
"handlebars/flow_block_header_single_view.handlebars",
"handlebars/flow_block_loop.handlebars",
"handlebars/flow_block_topic.handlebars",
-   
"handlebars/flow_block_topic_diff_view.handlebars",
-   
"handlebars/flow_block_topic_edit_title.handlebars",
-   
"handlebars/flow_block_topic_history.handlebars",
-   
"handlebars/flow_block_topic_moderate_post.handlebars",
-   
"handlebars/flow_block_topic_moderate_topic.handlebars",
-   
"handlebars/flow_block_topic_single_view.handlebars",
"handlebars/flow_block_topiclist.handlebars",
-   
"handlebars/flow_block_topicsummary_diff_view.handlebars",
-   
"handlebars/flow_block_topicsummary_edit.handlebars",
-   
"handlebars/flow_block_topicsummary_single_view.handlebars",

"handlebars/flow_board_navigation.partial.handlebars",
"handlebars/flow_edit_post.partial.handlebars",
-   
"handlebars/flow_edit_topic_title.partial.handlebars",
"handlebars/flow_errors.partial.handlebars",
-   
"handlebars/flow_header_title.partial.handlebars",
-   
"handlebars/flow_header_detail.partial.handlebars",
-   
"handlebars/flow_header_categories.partial.handlebars",
-   
"handlebars/flow_header_footer.partial.handlebars",
"handlebars/flow_load_more.partial.handlebars",

"handlebars/flow_moderate_post_confirmation.partial.handlebars",

"handlebars/flow_moderate_post.partial.handlebars",
@@ -189,7 +170,6 @@

"handlebars/flow_topic_titlebar.partial.handlebars",

"handlebars/flow_topic_moderation_flag.partial.handlebars",

"handlebars/flow_topiclist_loop.partial.handlebars",
-   "handlebars/form_element.partial.handlebars",
"handlebars/timestamp.handlebars"
],
"messages": [
diff --git a/handlebars/form_element.partial.handlebars 
b/handlebars/form_element.partial.handlebars
deleted file mode 100644
index 0c01b1c..000
--- a/handlebars/form_element.partial.handlebars
+++ /dev/null
@@ -1,23 +0,0 @@
-{{!
-   }}<{{tag}}
-   {{#if class}}class="{{class}}"{{/if}}
-   {{#if type}}type="{{type}}"{{/if}}
-   {{#if name}}name="{{name}}"{{/if}}
-   {{#if placeholder}}placeholder="{{placeholder}}"{{/if}}
-   {{#if value}}value="{{value}}"{{/if}}
-   {{#if role}}data-role="{{role}}"{{/if}}
-   {{#if min}}min="{{min}}"{{/if}}
-   {{#if max}}max="{{max}}"{{/if}}
-   {{#if maxlength}}maxlength="{{maxlength}}"{{/if}}
-   {{#if pattern}}pattern="{{pattern}}"{{/if}}
-{{!--
-   {{#if required}}required="required"{{/if}}
---}}
-   {{#if closing_tag}}>{{else}}/>{{/if}}{{!
-   }}{{#if radio}}{{/if}}{{!
-   }}{{#if checkbox}}{{/if}}{{!
-   }}{{content}}{{!
-   }}{{#if closing_tag}}{{/if}}{{!
-}}{{#if validation}}{{/if}}{{!

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove unused cancel buttons and some other things

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398683 )

Change subject: Remove unused cancel buttons and some other things
..

Remove unused cancel buttons and some other things

* Remove cancel buttons in the handlebars templates for edit/create
  forms, they were broken because these templates are only used for
  no-JS interfaces, but the buttons were being hidden using .client-nojs
  (which made them visible but nonfunctional when viewing a no-JS page
  with JS enabled)
* Remove data-flow-* attributes from no-JS templates
* Remove data-flow-expandable from inputs (only works on textareas)
* Remove supporting infrastructure for data-flow-expandable and
  data-flow-initial-state, they are now unused

Change-Id: Ia3e5493acc34ba0f0be4a3b9d41288851d232bcb
---
M extension.json
M handlebars/compiled/flow_block_header_edit.handlebars.php
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_lock.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_block_topiclist_newtopic.handlebars.php
M handlebars/compiled/flow_block_topicsummary_edit.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_block_header_edit.handlebars
M handlebars/flow_block_topicsummary_edit.handlebars
M handlebars/flow_edit_post.partial.handlebars
D handlebars/flow_form_cancel_button.partial.handlebars
M handlebars/flow_moderate_post.partial.handlebars
M handlebars/flow_moderate_topic.partial.handlebars
M handlebars/flow_newtopic_form.partial.handlebars
M handlebars/flow_reply_form.partial.handlebars
M handlebars/flow_topic_titlebar_lock.partial.handlebars
M handlebars/form_element.partial.handlebars
M modules/engine/components/common/flow-component-events.js
M modules/styles/board/form-actions.less
22 files changed, 38 insertions(+), 222 deletions(-)


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

diff --git a/extension.json b/extension.json
index f088f95..89d4b9f 100644
--- a/extension.json
+++ b/extension.json
@@ -158,7 +158,6 @@
"handlebars/flow_edit_post.partial.handlebars",

"handlebars/flow_edit_topic_title.partial.handlebars",
"handlebars/flow_errors.partial.handlebars",
-   
"handlebars/flow_form_cancel_button.partial.handlebars",

"handlebars/flow_header_title.partial.handlebars",

"handlebars/flow_header_detail.partial.handlebars",

"handlebars/flow_header_categories.partial.handlebars",
diff --git a/handlebars/compiled/flow_block_header_edit.handlebars.php 
b/handlebars/compiled/flow_block_header_edit.handlebars.php
index b09ce5b..31e569e 100644
--- a/handlebars/compiled/flow_block_header_edit.handlebars.php
+++ b/handlebars/compiled/flow_block_header_edit.handlebars.php
@@ -28,13 +28,6 @@
 '.$sp.'';}).'  
 '.$sp.'
 '.$sp.'' : '').'
-';},'flow_form_cancel_button' => function ($cx, $in, $sp) {return 
''.$sp.'
-'.$sp.''.((LCRun3::ifvar($cx, ((isset($in['msg']) && is_array($in)) ? 
$in['msg'] : null))) ? ''.LCRun3::ch($cx, 'l10n', 
array(array(((isset($in['msg']) && is_array($in)) ? $in['msg'] : 
null)),array()), 'encq').'' : ''.LCRun3::ch($cx, 'l10n', 
array(array('flow-cancel'),array()), 'encq').'').'
 ';},),
 'scopes' => array(),
 'sp_vars' => array('root' => $in),
@@ -59,7 +52,7 @@

'.LCRun3::ch($cx, 'l10n', 
array(array('flow-edit-header-submit'),array()), 'encq').'
-'.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), '   
').''.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-edit'),array()), 'encq').'
+   '.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-edit'),array()), 'encq').'



diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index 309121f..d4bea2b 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -153,19 +153,11 @@
 '.$sp.''.LCRun3::hbch($cx, 'progressiveEnhancement', array(array(),array()), 
$in, false, function($cx, $in)use($sp){return '   
 '.$sp.''.LCRun3::hbch($cx, 'tooltip', 
array(array(),array('positionClass'=>'left','contextClass'=>'progressive','extraClass'=>'flow-form-collapsible','isBlock'=>true)),
 $in, false, function($cx, $in)use($sp){return ''.LCRun3::ch($cx, 'l10nParse', 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove the old editor system

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398682 )

Change subject: Remove the old editor system
..

Remove the old editor system

It was no longer used anywhere. This is a relatively minimal removal:
there are more pieces of the old UI code that are now unused, but I
haven't removed them yet. It's not trivial to figure out which parts of
the form handling/enhancement code are now unused, and which are still
used by the moderation dialog, so I'll deal with that in a separate
commit to avoid muddying the waters here.

Change-Id: I95eee414de14c4f48c7773d7dc36698e3a939350
---
M FlowActions.php
M extension.json
D handlebars/flow_editor_switcher.partial.handlebars
M i18n/en.json
M i18n/qqq.json
D modules/editor/editors/ext.flow.editors.AbstractEditor.js
D modules/editor/editors/ext.flow.editors.none.js
D modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
D modules/editor/ext.flow.editor.js
M modules/engine/components/board/base/flow-board-api-events.js
D modules/engine/components/board/features/flow-board-switcheditor.js
M modules/engine/components/board/flow-board.js
M modules/engine/components/common/flow-component-events.js
D modules/engine/components/flow-undo-page.js
M modules/engine/misc/mw-ui.enhance.js
M modules/flow/ui/tools/mw.flow.ui.MWEditModeTool.js
D modules/styles/board/editor-switcher.less
M modules/styles/common.less
M modules/styles/flow/widgets/editor/mw.flow.ui.editor-apextheme.less
M modules/styles/flow/widgets/editor/mw.flow.ui.editor-wikimediauitheme.less
M modules/styles/flow/widgets/mw.flow.ui.NewTopicWidget.less
21 files changed, 16 insertions(+), 1,105 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/82/398682/1

diff --git a/FlowActions.php b/FlowActions.php
index 7543299..e05c14c 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -110,10 +110,8 @@
'class' => 'flow-history-edit-header',
],
'handler-class' => 'Flow\Actions\FlowAction',
-   'modules' => [],
'editcount' => true,
// theis modules/moduleStyles is repeated in all the undo-* 
actions. Find a way to share.
-   'modules' => [ 'ext.flow.undo' ],
'moduleStyles' => [
'mediawiki.ui.button',
'mediawiki.ui.input',
@@ -213,9 +211,7 @@
'class' => 'flow-history-edit-topic-summary',
],
'handler-class' => 'Flow\Actions\FlowAction',
-   'modules' => [],
'editcount' => true,
-   'modules' => [ 'ext.flow.undo' ],
'moduleStyles' => [
'mediawiki.ui.button',
'mediawiki.ui.input',
@@ -352,12 +348,10 @@
'class' => 'flow-history-edit-post',
],
'handler-class' => 'Flow\Actions\FlowAction',
-   'modules' => [],
'watch' => [
'immediate' => [ 
'Flow\\Data\\Listener\\ImmediateWatchTopicListener', 'getCurrentUser' ],
],
'editcount' => true,
-   'modules' => [ 'ext.flow.undo' ],
'moduleStyles' => [
'mediawiki.ui.button',
'mediawiki.ui.input',
diff --git a/extension.json b/extension.json
index d62d04a..f088f95 100644
--- a/extension.json
+++ b/extension.json
@@ -157,7 +157,6 @@

"handlebars/flow_board_navigation.partial.handlebars",
"handlebars/flow_edit_post.partial.handlebars",

"handlebars/flow_edit_topic_title.partial.handlebars",
-   
"handlebars/flow_editor_switcher.partial.handlebars",
"handlebars/flow_errors.partial.handlebars",

"handlebars/flow_form_cancel_button.partial.handlebars",

"handlebars/flow_header_title.partial.handlebars",
@@ -397,8 +396,7 @@
"styles/nojs.less",
"styles/js.less",
"styles/board/form-actions.less",
-   "styles/board/terms-of-use.less",
-   "styles/board/editor-switcher.less"
+   "styles/board/terms-of-use.less"
],
"targets": [
"desktop",
@@ -554,7 +552,6 @@
"flow-dialog-cancelconfirm-keep",
"flow-dialog-cancelconfirm-discard",
"flow-spam-confirmedit-using-failure",
-   "flow-wikitext-switch-editor-tooltip",
  

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Initializer: Simplify and deduplicate setupUndoPage()

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398681 )

Change subject: Initializer: Simplify and deduplicate setupUndoPage()
..

Initializer: Simplify and deduplicate setupUndoPage()

It used to delegate to three different functions (depending on what was
being undone) that were almost identical. Merge them into one and deal
with the (few) differences where relevant.

Bonus: After undoing a post edit, redirect to the post (topic URL +
parameter + fragment) rather than just to the topic.

Change-Id: I49499e25787ba5bb32826394bc4989010789cedf
---
M modules/mw.flow.Initializer.js
1 file changed, 43 insertions(+), 155 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/81/398681/1

diff --git a/modules/mw.flow.Initializer.js b/modules/mw.flow.Initializer.js
index 4d52250..f070a85 100644
--- a/modules/mw.flow.Initializer.js
+++ b/modules/mw.flow.Initializer.js
@@ -858,65 +858,59 @@
 * @return {boolean} The page is an in-progress undo form
 */
mw.flow.Initializer.prototype.isUndoForm = function () {
-   return !!( $( 'form[data-module="topic"]' ).length ||
-   $( 'form[data-module="header"]' ).length ) ||
-   $( 'form[data-module="topicsummary"]' ).length;
+   return !!$( 'form[data-module="topic"], 
form[data-module="header"], form[data-module="topicsummary"]' ).length;
};
 
-   /**
-* Set up editors in undo pages
-*/
mw.flow.Initializer.prototype.setupUndoPage = function () {
-   if ( $( 'form[data-module="topic"]' ).length ) {
-   this.replaceEditorInUndoEditPost( $( 
'form[data-module="topic"]' ) );
-   } else if ( $( 'form[data-module="header"]' ).length ) {
-   this.replaceEditorInUndoHeader( $( 
'form[data-module="header"]' ) );
-   } else if ( $( 'form[data-module="topicsummary"]' ).length ) {
-   this.replaceEditorInUndoSummary( $( 
'form[data-module="topicsummary"]' ) );
-   }
-   };
-
-   /**
-* Replace the editor in undo edit post pages
-*
-* @param {jQuery} $form The form where the no-js editor exists to be 
replaced
-*/
-   mw.flow.Initializer.prototype.replaceEditorInUndoEditPost = function ( 
$form ) {
-   var apiHandler, content, postId, editor, prevRevId,
+   var $undoForm = $( 'form[data-module="topic"], 
form[data-module="header"], form[data-module="topicsummary"]' ),
+   undoType = $undoForm.attr( 'data-module' ),
pageName = mw.config.get( 'wgPageName' ),
title = mw.Title.newFromText( pageName ),
topicId = title.getNameText(),
+   postId = $undoForm.find( 'input[name="topic_postId"]' 
).val(),
+   prevRevId = $undoForm.find( 'input[name="' + undoType + 
'_prev_revision"]' ).val(),
+   content = $undoForm.find( 'textarea' ).val(),
returnToTitle = function () {
-   // HACK: redirect to topic view
-   window.location.href = title.getUrl();
-   };
+   var url;
+   if ( undoType === 'topic' ) {
+   // If we're undoing a post edit, 
redirect to the topic page with the right parameter
+   // and fragment to highlight the post
+   url = title.getUrl( { topic_showPostId: 
postId } ) + '#flow-post-' + postId;
+   } else {
+   // When undoing a topic summary edit, 
redirect to the topic;
+   // when undoing a board description 
edit, redirect to the board
+   url = title.getUrl();
+   }
+   window.location.href = url;
+   },
+   apiHandler = new mw.flow.dm.APIHandler(
+   title.getPrefixedDb(),
+   { currentRevision: prevRevId }
+   ),
+   save = ( {
+   topic: apiHandler.savePost.bind( 
apiHandler, topicId, postId ),
+   header: 
apiHandler.saveDescription.bind( apiHandler ),
+   topicsummary: 
apiHandler.saveTopicSummary.bind( apiHandler, topicId ),
+   } )[ undoType ],
+   saveMsgKey = ( {
+   topic: [
+  

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Use new editor instead of old editor for undoing topic summa...

2017-12-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398680 )

Change subject: Use new editor instead of old editor for undoing topic summary 
edits
..

Use new editor instead of old editor for undoing topic summary edits

setupUndoPage() and replaceNoJSEditor() between them already handled
evey other case where the old editor system was used, this was the last
unhandled case.

Change-Id: I5b129047630bfaea04d361322701d7020287c8c2
---
M modules/mw.flow.Initializer.js
1 file changed, 60 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/80/398680/1

diff --git a/modules/mw.flow.Initializer.js b/modules/mw.flow.Initializer.js
index d5e37f4..4d52250 100644
--- a/modules/mw.flow.Initializer.js
+++ b/modules/mw.flow.Initializer.js
@@ -859,7 +859,8 @@
 */
mw.flow.Initializer.prototype.isUndoForm = function () {
return !!( $( 'form[data-module="topic"]' ).length ||
-   $( 'form[data-module="header"]' ).length );
+   $( 'form[data-module="header"]' ).length ) ||
+   $( 'form[data-module="topicsummary"]' ).length;
};
 
/**
@@ -869,7 +870,9 @@
if ( $( 'form[data-module="topic"]' ).length ) {
this.replaceEditorInUndoEditPost( $( 
'form[data-module="topic"]' ) );
} else if ( $( 'form[data-module="header"]' ).length ) {
-   this.replaceEditorInUndoHeaderPost( $( 
'form[data-module="header"]' ) );
+   this.replaceEditorInUndoHeader( $( 
'form[data-module="header"]' ) );
+   } else if ( $( 'form[data-module="topicsummary"]' ).length ) {
+   this.replaceEditorInUndoSummary( $( 
'form[data-module="topicsummary"]' ) );
}
};
 
@@ -930,7 +933,7 @@
 *
 * @param {jQuery} $form The form where the no-js editor exists to be 
replaced
 */
-   mw.flow.Initializer.prototype.replaceEditorInUndoHeaderPost = function 
( $form ) {
+   mw.flow.Initializer.prototype.replaceEditorInUndoHeader = function ( 
$form ) {
var prevRevId, editor, content,
apiHandler,
pageName = mw.config.get( 'wgPageName' ),
@@ -978,6 +981,60 @@
};
 
/**
+* Replace the editor in undo edit topic summary pages
+*
+* @param {jQuery} $form The form where the no-js editor exists to be 
replaced
+*/
+   mw.flow.Initializer.prototype.replaceEditorInUndoSummary = function ( 
$form ) {
+   var prevRevId, editor, content,
+   apiHandler,
+   pageName = mw.config.get( 'wgPageName' ),
+   title = mw.Title.newFromText( pageName ),
+   topicId = title.getNameText(),
+   returnToTitle = function () {
+   // HACK: redirect to topic view
+   window.location.href = title.getUrl();
+   };
+
+   if ( !$form.length ) {
+   return;
+   }
+
+   prevRevId = $form.find( 
'input[name="topicsummary_prev_revision"]' ).val();
+   content = $form.find( 'textarea' ).val();
+
+   apiHandler = new mw.flow.dm.APIHandler(
+   'Topic:' + topicId,
+   {
+   currentRevision: prevRevId
+   }
+   );
+
+   // Create the editor
+   editor = this.createEditorWidget(
+   $form,
+   content,
+   'flow-topic-action-update-topic-summary'
+   );
+
+   // Events
+   editor
+   .on( 'afterSaveContent', function ( content, 
contentFormat, captcha, handleFailure ) {
+   apiHandler.saveTopicSummary( topicId, content, 
contentFormat, captcha )
+   .then(
+   // Success
+   returnToTitle,
+
+   // Failure
+   handleFailure
+   );
+   } )
+   .on( 'afterCancel', function () {
+   returnToTitle();
+   } );
+   };
+
+   /**
 * Finish the loading process
 */
mw.flow.Initializer.prototype.finishLoading = function () {

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

Gerrit-MessageType: newchange