[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Define used messages in extension.js

2016-08-30 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review.

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

Change subject: Define used messages in extension.js
..

Define used messages in extension.js

ext.toctree.js uses the messages 'hidetoc' and 'showtoc' from core.
This definition ensures that the messages are loaded even when 'mediawiki.toc'
is not loaded.

Change-Id: I655a0ca5ef232d47f01c53ea670992f258233c6c
---
M extension.json
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TocTree 
refs/changes/90/307690/1

diff --git a/extension.json b/extension.json
index c3dc5fd..4ded842 100644
--- a/extension.json
+++ b/extension.json
@@ -28,7 +28,11 @@
"localBasePath": "modules",
"remoteExtPath": "TocTree/modules",
"styles": "ext.toctree.css",
-   "scripts": "ext.toctree.js"
+   "scripts": "ext.toctree.js",
+   "messages": [
+   "hidetoc",
+   "showtoc"
+   ]
}
},
"Hooks": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I655a0ca5ef232d47f01c53ea670992f258233c6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update preferred language based on contribution_tracking.

2016-08-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Update preferred language based on contribution_tracking.
..

Update preferred language based on contribution_tracking.

This is done with the intent that afterwards only preferred language should be 
used to calculate
silverpop language exports. We need to co-ordinate deployment with updating
silverpop and ensuring no more data is being nulled out.

Bug: T96410
Change-Id: I141db0c19ddb3ebe8ab1692c082a2c64e9809e17
---
A sites/all/modules/wmf_civicrm/update_7240.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
2 files changed, 190 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/89/307689/1

diff --git a/sites/all/modules/wmf_civicrm/update_7240.php 
b/sites/all/modules/wmf_civicrm/update_7240.php
new file mode 100644
index 000..3f43180
--- /dev/null
+++ b/sites/all/modules/wmf_civicrm/update_7240.php
@@ -0,0 +1,180 @@
+ ''
+  AND language NOT LIKE '?%'
+  AND language NOT LIKE '\"% '
+  AND language NOT LIKE '\'%'
+  AND language NOT LIKE '!%'
+  AND language NOT LIKE '\%%'
+  AND language NOT LIKE '(%'
+  AND language NOT LIKE '*%'
+  AND language NOT LIKE '.%'
+  AND language NOT LIKE '-%'
+  AND language NOT LIKE '0%'
+  AND language NOT LIKE '1%'
+  AND language NOT LIKE '2%'
+  AND language NOT LIKE '3%'
+  AND language NOT LIKE '4%'
+  AND language NOT LIKE '5%'
+  AND language NOT LIKE '6%'
+  AND language NOT LIKE '7%'
+  AND language NOT LIKE '8%'
+  AND language NOT LIKE '9%'
+  AND language NOT LIKE 'Donat%'
+  AND contribution_id IS NOT NULL;
+  ";
+
+  /**
+   * Create a table of latest contributions.
+   *
+   * We need to do 2 queries to get the id of the latest contribution
+   * 1 to get the latest receive_date per contact, then one to match it with 
the
+   * id. It would be unusual but not impossible for the latest receive_date not
+   * to be the same as the highest id.
+   * we could use a sub-query instead of a 2 step query. No strong reason not
+   * to except simple queries can be easier to read
+   */
+  $queries[] = "
+CREATE TABLE `temp_contribution` (
+`contact_id` int(10) unsigned NOT NULL COMMENT 'FK to Contact ID',
+`id` int(10) DEFAULT NULL,
+`latest_receive_date` datetime DEFAULT NULL COMMENT 'when was gift 
received',
+KEY `index_contact_id` (`contact_id`),
+KEY `index_id` (`id`),
+KEY `index_lates_receive_date` (`latest_receive_date`)
+  ) ENGINE=InnoDB DEFAULT  CHARSET=utf8
+  ";
+
+  /**
+   * The inner join means we only get contributions with useful language info
+   *  we are thus getting 'the most recent contribution with seemingly valid 
language info'
+   * Query OK, 15302963 rows affected (5 min 42.88 sec)
+   */
+  $queries[] = "
+INSERT INTO temp_contribution (contact_id, latest_receive_date)
+SELECT contact_id, max(receive_date)
+FROM civicrm_contribution contrib
+INNER JOIN temp_contribution_tracking ct ON ct.contribution_id = contrib.id
+GROUP BY contact_id
+  ";
+
+  // Query OK, 15302963 rows affected (17 min 33.77 sec)
+  $queries[] = "
+UPDATE temp_contribution t
+LEFT JOIN civicrm_contribution c ON c.contact_id = t.contact_id AND
+c.receive_date = t.latest_receive_date
+SET t.id = c.id
+  ";
+
+  // Calculate language from contribution where possible.
+  // (seems surprisingly low).
+  // Query OK, 169014 rows affected, 35608 warnings (8 min 16.97 sec)
+
+  $queries[] = '
+UPDATE temp_civicrm_contact c
+INNER JOIN temp_contribution contribution ON contribution.contact_id = c.id
+INNER JOIN temp_contribution_tracking ct ON ct.contribution_id = 
contribution.id
+SET calculated_preferred_language = ct.language
+  ';
+
+  /**
+   * There are only 423 of these - they have come in off recurring paypal & 
global collect.
+   */
+  $queries[] = '
+UPDATE civicrm_contact c
+LEFT JOIN temp_civicrm_contact t
+SET c.preferred_language = t.calculated_preferred_language 
+WHERE c.preferred_language IS NULL 
+AND calculated_preferred_language IS NOT NULL
+
+  ';
+
+  $queries[] = '
+UPDATE civicrm_contact c
+LEFT JOIN temp_civicrm_contact t
+SET c.preferred_language = t.calculated_preferred_language 
+WHERE c.preferred_language <> calculated_preferred_language
+AND calculated_preferred_language IS NOT NULL
+
+  ';
+
+  foreach ($queries as $query) {
+CRM_Core_DAO::executeQuery($query);
+  }
+}
+
+/**
+ * The following queries are useful for analysis
+ *
+SELECT contact_id, trxn_id, receive_date, source , language
+FROM civicrm_contribution contrib
+LEFT JOIN temp_contribution_tracking ct ON ct.contribution_id = contrib.id
+WHERE contact_id IN (SELECT id FROM temp_civicrm_contact WHERE 

[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Adapt to changes in TOC in core

2016-08-30 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review.

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

Change subject: Adapt to changes in TOC in core
..

Adapt to changes in TOC in core

* Use .toc instead of #toc in JavaScript to allow multiple TOCs.
* Use .toc and #toc in CSS as in core.
* Remove cellpadding because the TOC is no  anymore.

Change-Id: I32844d5cefb2ee7b03676fc3f0acef5bb543b54c
---
M modules/ext.toctree.css
M modules/ext.toctree.js
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TocTree 
refs/changes/88/307688/1

diff --git a/modules/ext.toctree.css b/modules/ext.toctree.css
index 5c2562c..609dd33 100644
--- a/modules/ext.toctree.css
+++ b/modules/ext.toctree.css
@@ -9,10 +9,12 @@
  * @licence GNU General Public Licence 2.0 or later
  */
 
+.toc .tocUl,
 #toc .tocUl {
padding-left: 2em;
 }
 
+.toc.tocFloat,
 #toc.tocFloat {
float: left;
margin: 0 2em 1em 0;
@@ -30,6 +32,7 @@
left: -2em;
 }
 
+.noFloat .toc.tocFloat,
 .noFloat #toc.tocFloat {
float: none;
margin: 0;
@@ -37,12 +40,14 @@
 }
 
 /* toc-floated CSS */
+.toc.tocFloat,
 #toc.tocFloat {
float: left;
margin: 0 2em 1em 0;
max-width: 20em;
 }
 
+.noFloat .toc.tocFloat,
 .noFloat #toc.tocFloat {
float: none;
margin: 0;
@@ -50,6 +55,7 @@
 }
 
 @media print {
+   .toc.tocFloat,
#toc.tocFloat {
background: #ff;
}
@@ -58,6 +64,7 @@
display: none;
}
 
+   .toc .tocUl,
#toc .tocUl {
padding-left: 0;
}
diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js
index 6f6c4d1..00a9c90 100644
--- a/modules/ext.toctree.js
+++ b/modules/ext.toctree.js
@@ -28,13 +28,12 @@
}
 
function init( $content ) {
-   var $toc = $content.find( '#toc' );
+   var $toc = $content.find( '.toc' );
 
if ( $toc.length > 0 ) {
if ( mw.user.options.get( 'toc-floated' ) ) {
$toc.addClass( 'tocFloat' );
}
-   $toc.attr( 'cellspacing', 0 );
 
var $mainUl = $toc.find( 'ul:first' );
var $mainList = $toc.find( 'li' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32844d5cefb2ee7b03676fc3f0acef5bb543b54c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Support live preview

2016-08-30 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review.

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

Change subject: Support live preview
..

Support live preview

Use mw.hook( 'wikipage.content' ).add( ... ) to support live preview.

Change-Id: Icd3a2f69dd8ae93e4730d8c6e17d0daee2967a87
---
M modules/ext.toctree.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js
index 097a363..6f6c4d1 100644
--- a/modules/ext.toctree.js
+++ b/modules/ext.toctree.js
@@ -27,8 +27,8 @@
}
}
 
-   function init() {
-   var $toc = $( '#toc' );
+   function init( $content ) {
+   var $toc = $content.find( '#toc' );
 
if ( $toc.length > 0 ) {
if ( mw.user.options.get( 'toc-floated' ) ) {
@@ -76,5 +76,5 @@
}
}
 
-   $( init );
+   mw.hook( 'wikipage.content' ).add( init );
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd3a2f69dd8ae93e4730d8c6e17d0daee2967a87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Apply MediaWiki coding conventions for JavaScript

2016-08-30 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review.

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

Change subject: Apply MediaWiki coding conventions for JavaScript
..

Apply MediaWiki coding conventions for JavaScript

* Add closure.
* Use $foo.find( '...' ) instead of $( '...', $foo ).
* Use $( '' ) instead of $( '' ).
* Remove not necessary public object mw.tocTree.
* Remove not necessary return true.

Change-Id: I99f9a11154b5e49cdb60e0d079f4d86070cc2666
---
M modules/ext.toctree.js
1 file changed, 14 insertions(+), 18 deletions(-)


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

diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js
index b091e10..097a363 100644
--- a/modules/ext.toctree.js
+++ b/modules/ext.toctree.js
@@ -11,9 +11,9 @@
  * @licence GNU General Public Licence 2.0 or later
  */
 
-mw.tocTree = {
-   processClickEvent: function ( event ) {
-   var $ul = $( 'ul', $( this ).parent().parent() );
+( function ( mw, $ ) {
+   function processClickEvent( event ) {
+   var $ul = $( this ).parent().parent().find( 'ul' );
$ul.toggle();
 
if ( $ul.is( ':visible' ) ) {
@@ -25,9 +25,9 @@
.text( '+' )
.attr( 'title', mw.msg( 'showtoc' ) );
}
-   },
+   }
 
-   init: function() {
+   function init() {
var $toc = $( '#toc' );
 
if ( $toc.length > 0 ) {
@@ -36,20 +36,20 @@
}
$toc.attr( 'cellspacing', 0 );
 
-   var $mainUl = $( 'ul:first', $toc );
-   var $mainList = $( 'li', $toc );
+   var $mainUl = $toc.find( 'ul:first' );
+   var $mainList = $toc.find( 'li' );
 
-   $mainList.each( function( i ) {
+   $mainList.each( function ( i ) {
if ( $( this ).hasClass( 'toclevel-1' ) ) {
$( this ).css( 'position', 'relative' );
-   var $subList = $( 'ul', $( this ) );
+   var $subList = $( this ).find( 'ul' );
 
if ( $subList.length > 0 ) {
if ( $mainUl.length > 0 ) {
$mainUl.addClass( 
'tocUl' );
}
 
-   var $toggleLink = $( '' 
).addClass( 'toggleSymbol' );
+   var $toggleLink = $( '' 
).addClass( 'toggleSymbol' );
 
if ( mw.user.options.get( 
'toc-expand' ) ) {
$toggleLink
@@ -64,9 +64,9 @@
 
$subList.hide();
}
-   $toggleLink.click( 
mw.tocTree.processClickEvent );
+   $toggleLink.click( 
processClickEvent );
 
-   var $toggleSpan = $( '' 
).addClass( 'toggleNode' );
+   var $toggleSpan = $( '' 
).addClass( 'toggleNode' );
$toggleSpan.append( '[', 
$toggleLink, ']' );
 
$( this ).prepend( $toggleSpan 
);
@@ -74,11 +74,7 @@
}
} );
}
-
-   return true;
}
-};
 
-jQuery( function( $ ) {
-   mw.tocTree.init();
-} );
+   $( init );
+}( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99f9a11154b5e49cdb60e0d079f4d86070cc2666
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add docs for the "pagePropertiesRdf" setting

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

Change subject: Add docs for the "pagePropertiesRdf" setting
..


Add docs for the "pagePropertiesRdf" setting

Text mostly taken from Stas, per 0f9a06dee8.

Change-Id: I2afd611a8ba5840bdb4c4fa14a2c0888ef21df69
---
M docs/options.wiki
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/docs/options.wiki b/docs/options.wiki
index 56ccc28..46ae251 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -50,6 +50,7 @@
 ;formatterUrlProperty: Property to be used on properties that defines a 
formatter URL which is used to link identifiers. The placeholder 
$1 will be replaced by the identifier. Example: 
https://www.wikidata.org/entity/$1
 ;transformLegacyFormatOnExport: Whether entity revisions stored in a legacy 
format should be converted on the fly while exporting. Enabled per default.
 ;allowEntityImport: allow importing entities via Special:Import and 
importDump.php. Per default, imports are forbidden, since entities defined in 
another wiki would have or use IDs that conflict with entities defined locally.
+;pagePropertiesRdf: array that maps between page properties and Wikibase 
predicates for RDF dumps. Maps from database property name to an array that 
contains a key 'name' (RDF property name, which will be prefixed by wikibase:) 
and an optional key 'type'.
 
 == Client Settings ==
 
@@ -98,4 +99,4 @@
 ;injectRecentChanges: whether changes on the repository should be injected 
into this wiki's recent changes table, so they show up on watchlists, etc. 
Requires the dispatchChanges.php script to run, and this wiki to 
be listed in the localClientDatabases setting on the repository.
 ;showExternalRecentChanges: whether changes on the repository should be 
displayed on Special:RecentChanges, Special:Watchlist, etc on the client wiki. 
In contrast to injectRecentChanges, this setting just removes the 
changes from the user interface. The default is false. This is 
intended to temporarily prevent external changes from showing in order to find 
or fix some issue on a live site.
 ;sendEchoNotification: if true, allows users on the client wiki to get a 
notification when a page they created is connected to a repo item. This 
requires the Echo extension.
-;repoIcon: if sendEchoNotification is set to true, you 
can also provide what icon the user will see. The correct syntax is 
array( 'url' => '...' ) or array( 'path' => '...' ) 
where path is relative to $wgExtensionAssetsPath. 
Defaults to false which means that there will be the default Echo icon.
\ No newline at end of file
+;repoIcon: if sendEchoNotification is set to true, you 
can also provide what icon the user will see. The correct syntax is 
array( 'url' => '...' ) or array( 'path' => '...' ) 
where path is relative to $wgExtensionAssetsPath. 
Defaults to false which means that there will be the default Echo icon.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2afd611a8ba5840bdb4c4fa14a2c0888ef21df69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Smalyshev 
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/puppet[production]: logging: remove reference to deployment-fluoride

2016-08-30 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: logging: remove reference to deployment-fluoride
..


logging: remove reference to deployment-fluoride

Hasn't existed for a while. not quite sure where it went, but I don't think
that we really need it.

Change-Id: I54eeebb5f2c2b29388e2b41d1be6c147cd9e027f
---
M manifests/role/logging.pp
M templates/udp2log/filters.mw.erb
2 files changed, 3 insertions(+), 6 deletions(-)

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



diff --git a/manifests/role/logging.pp b/manifests/role/logging.pp
index 6938d4d..15aba2a 100644
--- a/manifests/role/logging.pp
+++ b/manifests/role/logging.pp
@@ -43,11 +43,6 @@
 source => 'puppet:///modules/udp2log/demux.py',
 }
 
-$error_processor_host = $::realm ? {
-production => 'eventlog1001.eqiad.wmnet',
-labs   => "deployment-fluoride.${::site}.wmflabs",
-}
-
 $logstash_host = $::realm ? {
 # TODO: Find a way to use multicast that doesn't cause duplicate
 # messages to be stored in logstash. This is a SPOF.
@@ -64,7 +59,7 @@
 monitor_packet_loss =>false,
 rotate  =>$rotate,
 template_variables  => {
-error_processor_host => $error_processor_host,
+error_processor_host => 'eventlog1001.eqiad.wmnet',
 error_processor_port => 8423,
 
 # forwarding to logstash
diff --git a/templates/udp2log/filters.mw.erb b/templates/udp2log/filters.mw.erb
index d83516f..f0141ba 100644
--- a/templates/udp2log/filters.mw.erb
+++ b/templates/udp2log/filters.mw.erb
@@ -1,10 +1,12 @@
 flush pipe 1 python /usr/local/bin/demux.py<% if 
has_variable?("log_directory") then %> --basedir <%= @log_directory %><% end %>
 
+<% if @realm == "production" -%>
 # Relay MediaWiki exceptions and fatals to eventlog1001 for generating reports.
 # The trailing space in the egrep regex expression, make sure we only catch
 # groups explicitly. We dont want to double count exceptions via exception and
 # exception-json
 pipe 1 egrep '^(fatal|exception) ' | /usr/bin/log2udp -h <%= 
@template_variables['error_processor_host'] %> -p <%= 
@template_variables['error_processor_port'] %>
+<% end -%>
 
 # Forward some messages to Logstash's udp2log collector.
 # Udp2log messages that originate from rsyslog and MediaWiki are already

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54eeebb5f2c2b29388e2b41d1be6c147cd9e027f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Filippo Giunchedi 
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]: Initialize SmashPig logger in fredge qc

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

Change subject: Initialize SmashPig logger in fredge qc
..


Initialize SmashPig logger in fredge qc

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

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 0b126b7..3e65c0b 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -1,5 +1,7 @@
 https://gerrit.wikimedia.org/r/307685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4359576fd9d3515607a2f1daf84324686d42b765
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
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] VisualEditor/VisualEditor[master]: ve.init.Target: Unset this.surface when destroying it

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

Change subject: ve.init.Target: Unset this.surface when destroying it
..


ve.init.Target: Unset this.surface when destroying it

So that getSurface() won't return a destroyed surface.

Bug: T139972
Change-Id: I5510bbe3883e84069ff08c789e378428d0b94572
---
M src/init/ve.init.Target.js
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 41904fc..3aa6416 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -354,6 +354,11 @@
  * Destroy and remove all surfaces from the target
  */
 ve.init.Target.prototype.clearSurfaces = function () {
+   if ( this.surfaces.indexOf( this.surface ) !== -1 ) {
+   // We're about to destroy this.surface, so unset it for sanity
+   // Otherwise, getSurface() could return a destroyed surface
+   this.surface = null;
+   }
while ( this.surfaces.length ) {
this.surfaces.pop().destroy();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5510bbe3883e84069ff08c789e378428d0b94572
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Divec 
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]: Initialize SmashPig logger in fredge qc

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

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

Change subject: Initialize SmashPig logger in fredge qc
..

Initialize SmashPig logger in fredge qc

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/85/307685/1

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 0b126b7..3e65c0b 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -1,5 +1,7 @@
 https://gerrit.wikimedia.org/r/307685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Initialize SmashPig logger in fredge qc

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

Change subject: Initialize SmashPig logger in fredge qc
..


Initialize SmashPig logger in fredge qc

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

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 9ec3bdc..d79537f 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -1,6 +1,8 @@
 https://gerrit.wikimedia.org/r/307684
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4359576fd9d3515607a2f1daf84324686d42b765
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
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]: Initialize SmashPig logger in fredge qc

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

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

Change subject: Initialize SmashPig logger in fredge qc
..

Initialize SmashPig logger in fredge qc

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/84/307684/1

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 9ec3bdc..d79537f 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -1,6 +1,8 @@
 https://gerrit.wikimedia.org/r/307684
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] labs...guc[master]: readme: Add 'composer install' to set up

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

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

Change subject: readme: Add 'composer install' to set up
..

readme: Add 'composer install' to set up

Needed as of fa26c1d0 and d5314cb3.

Change-Id: Ib676620b3c7da502fe1ac91e60f8c8cb8022a914
---
M README.md
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc 
refs/changes/83/307683/1

diff --git a/README.md b/README.md
index 3634543..9fdb488 100644
--- a/README.md
+++ b/README.md
@@ -2,5 +2,8 @@
 
 ## Set up
 
-* `chmod 775 cache/`
-* `ln -s path/to/guc public_html`
+Requires [Composer](https://getcomposer.org/) (available in Tool Labs).
+
+* `tool-labs in ~/guc$ chmod 775 cache/`
+* `tool-labs in ~/guc$ composer install --no-dev`
+* `tool-labs in ~/$ ln -s path/to/guc public_html`

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib676620b3c7da502fe1ac91e60f8c8cb8022a914
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] labs...guc[master]: readme: Add 'composer install' to set up

2016-08-30 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: readme: Add 'composer install' to set up
..


readme: Add 'composer install' to set up

Needed as of fa26c1d0 and d5314cb3.

Change-Id: Ib676620b3c7da502fe1ac91e60f8c8cb8022a914
---
M README.md
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/README.md b/README.md
index 3634543..9fdb488 100644
--- a/README.md
+++ b/README.md
@@ -2,5 +2,8 @@
 
 ## Set up
 
-* `chmod 775 cache/`
-* `ln -s path/to/guc public_html`
+Requires [Composer](https://getcomposer.org/) (available in Tool Labs).
+
+* `tool-labs in ~/guc$ chmod 775 cache/`
+* `tool-labs in ~/guc$ composer install --no-dev`
+* `tool-labs in ~/$ ln -s path/to/guc public_html`

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib676620b3c7da502fe1ac91e60f8c8cb8022a914
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: add and use adaptiveTTL() method

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

Change subject: objectcache: add and use adaptiveTTL() method
..


objectcache: add and use adaptiveTTL() method

* This better handles delayed/lost cache purges by
  having lower TTLs for entries that often changes.
* Use this for foreign upload description page caches,
  we purges are never received from the source wiki.
* Also use this for User and LocalFile cache TTLs.
* Also move the Database::getCacheSetOptions() call in
  User *before* doing the queries, which is preferred.
* Fixed some IDEA errors too, like the undeclared
  mApiBase field.

Change-Id: I70f8ebb29ac853c2a530d9eedb9e7facc1b7b710
---
M includes/HttpFunctions.php
M includes/filerepo/ForeignAPIRepo.php
M includes/filerepo/file/LocalFile.php
M includes/libs/objectcache/WANObjectCache.php
M includes/user/User.php
M tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
6 files changed, 109 insertions(+), 33 deletions(-)

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



diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index 54b057a..2ca5e1b 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -599,7 +599,7 @@
 * Returns the value of the given response header.
 *
 * @param string $header
-* @return string
+* @return string|null
 */
public function getResponseHeader( $header ) {
if ( !$this->respHeaders ) {
diff --git a/includes/filerepo/ForeignAPIRepo.php 
b/includes/filerepo/ForeignAPIRepo.php
index b48191f..8619ba6 100644
--- a/includes/filerepo/ForeignAPIRepo.php
+++ b/includes/filerepo/ForeignAPIRepo.php
@@ -63,8 +63,8 @@
/** @var array */
protected $mFileExists = [];
 
-   /** @var array */
-   private $mQueryCache = [];
+   /** @var string */
+   private $mApiBase;
 
/**
 * @param array|null $info
@@ -397,7 +397,8 @@
}
/* There is a new Commons file, or existing thumbnail 
older than a month */
}
-   $thumb = self::httpGet( $foreignUrl );
+
+   $thumb = self::httpGet( $foreignUrl, 'default', [], $mtime );
if ( !$thumb ) {
wfDebug( __METHOD__ . " Could not download thumb\n" );
 
@@ -413,7 +414,11 @@
return $foreignUrl;
}
$knownThumbUrls[$sizekey] = $localUrl;
-   $cache->set( $key, $knownThumbUrls, $this->apiThumbCacheExpiry 
);
+
+   $ttl = $mtime
+   ? $cache->adaptiveTTL( $mtime, 
$this->apiThumbCacheExpiry )
+   : $this->apiThumbCacheExpiry;
+   $cache->set( $key, $knownThumbUrls, $ttl );
wfDebug( __METHOD__ . " got local thumb $localUrl, saving to 
cache \n" );
 
return $localUrl;
@@ -506,9 +511,12 @@
 * @param string $url
 * @param string $timeout
 * @param array $options
+* @param integer|bool &$mtime Resulting Last-Modified UNIX timestamp 
if received
 * @return bool|string
 */
-   public static function httpGet( $url, $timeout = 'default', $options = 
[] ) {
+   public static function httpGet(
+   $url, $timeout = 'default', $options = [], &$mtime = false
+   ) {
$options['timeout'] = $timeout;
/* Http::get */
$url = wfExpandUrl( $url, PROTO_HTTP );
@@ -524,6 +532,9 @@
$status = $req->execute();
 
if ( $status->isOK() ) {
+   $mtime = wfTimestampOrNull( TS_UNIX, 
$req->getResponseHeader( 'Last-Modified' ) );
+   $mtime = $mtime ?: false;
+
return $req->getContent();
} else {
$logger = LoggerFactory::getInstance( 'http' );
@@ -531,6 +542,7 @@
$status->getWikiText( false, false, 'en' ),
[ 'caller' => 'ForeignAPIRepo::httpGet' ]
);
+
return false;
}
}
@@ -548,7 +560,7 @@
 * @param string $target Used in cache key creation, mostly
 * @param array $query The query parameters for the API request
 * @param int $cacheTTL Time to live for the memcached caching
-* @return null
+* @return string|null
 */
public function httpGetCached( $target, $query, $cacheTTL = 3600 ) {
if ( $this->mApiBase ) {
@@ -557,28 +569,23 @@
$url = $this->makeUrl( $query, 'api' );
}
 
-   if ( !isset( $this->mQueryCache[$url] ) ) {
-   $data = 
ObjectCache::getMainWANInstance()->getWithSetCallback(
-   

[MediaWiki-commits] [Gerrit] labs...guc[master]: Clean up in preparation for the "Recent only" feature

2016-08-30 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: Clean up in preparation for the "Recent only" feature
..


Clean up in preparation for the "Recent only" feature

* Remove traces of old justLastHour/onlyRecent implementation.

* Simplify hasContribs() implementation.

* Rename getRecentChanges() to getContribs() to avoid confusion
  with the recent changes table, since they actually come from
  the revision table right now.

* Document the data structure so that we can add alternate
  fetch sources in addition to 'revision' (all contributions).

* Move revision query to a separate method.

* Prefix custom result fields with 'guc_'.

Bug: T64914
Change-Id: I2e264ef3b41e991f08abab6dbf6d92671ed839b2
---
M composer.json
M index.php
M lb/guc.php
M lb/wikicontribs.php
M resources/frontend.js
5 files changed, 109 insertions(+), 71 deletions(-)

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



diff --git a/composer.json b/composer.json
index b4ef744..63d3d99 100644
--- a/composer.json
+++ b/composer.json
@@ -4,5 +4,8 @@
},
"scripts": {
"test": "phpcs . --standard=phpcs.xml --ignore=vendor/* 
--extensions=php"
+   },
+   "require": {
+   "Krinkle/toollabs-base": "^0.8.0"
}
 }
diff --git a/index.php b/index.php
index 09b4c0a..e5818dd 100644
--- a/index.php
+++ b/index.php
@@ -15,7 +15,7 @@
  * along with this program.  If not, see .
  */
 
-// Standard-Dateien
+require_once __DIR__ . '/vendor/autoload.php';
 require_once 'settings.php';
 require_once 'app.php';
 
@@ -31,17 +31,12 @@
 }
 
 $data = new stdClass();
-$data->Method = @$_SERVER['REQUEST_METHOD'];
-$data->Referer = @$_SERVER['HTTP_REFERER'];
-$data->Username = @$_REQUEST['user'];
+$data->Method = @$_SERVER['REQUEST_METHOD'] ?: 'GET';
+$data->Referer = @$_SERVER['HTTP_REFERER'] ?: null;
+$data->Username = @$_REQUEST['user'] ?: null;
 $data->options = array(
 'isPrefixPattern' => @$_REQUEST['isPrefixPattern'] === '1',
 );
-
-$data->Permalink = './?' . http_build_query(array_merge(
-array( 'user' => $data->Username ),
-array_map('intval', array_filter($data->options))
-));
 
 // Create app
 $app = $guc = $error = $robotsPolicy = $canonicalUrl = null;
@@ -61,6 +56,14 @@
 } catch (Exception $e) {
 $error = $e;
 }
+
+$query = $data->options;
+if ($data->Username) {
+$query['user'] = $data->Username;
+}
+// Strip defaults
+$query = array_diff_assoc( $query, guc::getDefaultOptions() );
+$data->Permalink = './' . ( !$query ? '' : '?' . http_build_query( $query ) );
 
 $headRobots = !$robotsPolicy ? '' :
 '';
@@ -108,7 +111,7 @@
 print '';
 }
 if ($guc) {
-print ''.$guc->getWikiCount()." wikis 
searched. ";
+print ''.$guc->getWikiCount().' wikis 
searched. ';
 print $guc->getGlobalEditcount().' edits found';
 if ($guc->getResultWikiCount()) {
 print ' in '.$guc->getResultWikiCount().' projects';
@@ -149,7 +152,7 @@
 // print '';
 ?>
 
-by https://wikitech.wikimedia.org/wiki/User:Luxo;>Luxo  https://wikitech.wikimedia.org/wiki/User:Krinkle;>Krinkle
+by https://wikitech.wikimedia.org/wiki/User:Luxo;>Luxo  https://meta.wikimedia.org/wiki/User:Krinkle;>Krinkle
 
 
 
diff --git a/lb/guc.php b/lb/guc.php
index fb5eed5..3ac0f51 100644
--- a/lb/guc.php
+++ b/lb/guc.php
@@ -27,6 +27,13 @@
 private $data;
 private $wikis;
 
+public static function getDefaultOptions() {
+return array(
+'isPrefixPattern' => false,
+'includeClosedWikis' => false,
+);
+}
+
 public function __construct(lb_app $app, $user, $options = array()) {
 $this->app = $app;
 
@@ -34,11 +41,7 @@
 $this->user = str_replace('_', ' ', ucfirst(trim($user)));
 
 // Defaults
-$this->options = $options += array(
-'isPrefixPattern' => false,
-'includeClosedWikis' => false,
-'onlyRecent' => false,
-);
+$this->options = $options += self::getDefaultOptions();
 
 if (!$this->user) {
 throw new Exception('No username or IP');
@@ -95,7 +98,7 @@
 $options
 );
 if ($this->options['isPrefixPattern'] && 
!$contribs->getRegisteredUsers()) {
-foreach ($contribs->getRecentChanges() as $rc) {
+foreach ($contribs->getContribs() as $rc) {
 $this->addIP($rc->rev_user_text);
 if (count($this->hostnames) > 10) {
 break;
@@ -152,9 +155,7 @@
 $sql = 'SELECT * FROM `meta_p`.`wiki` WHERE '.$f_where.' LIMIT 1500;';
 $statement = $this->app->getDB()->prepare($sql);
   

[MediaWiki-commits] [Gerrit] labs...guc[master]: Implement "Recent only" feature

2016-08-30 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: Implement "Recent only" feature
..


Implement "Recent only" feature

* Add dropdown to choose between revisions, recentchanges
  and last hour of recentchanges.

* Add prepareRecentchangesQuery() implementation.

* Add prepareLastHourQuery() implementation.

* Update _getWikisWithContribs() with logic for recentchanges
  to make sure the summary is still accurate.

Bug: T64914
Change-Id: Ic4ebf3716a92a12daabc292c6ff739b44ced35bd
---
M index.php
M lb/guc.php
M lb/wikicontribs.php
3 files changed, 110 insertions(+), 10 deletions(-)

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



diff --git a/index.php b/index.php
index e5818dd..86505c5 100644
--- a/index.php
+++ b/index.php
@@ -36,6 +36,7 @@
 $data->Username = @$_REQUEST['user'] ?: null;
 $data->options = array(
 'isPrefixPattern' => @$_REQUEST['isPrefixPattern'] === '1',
+'src' => @$_REQUEST['src'] ?: 'all',
 );
 
 // Create app
@@ -101,6 +102,16 @@
 print ' checked';
 }
 ?>>
+Results from:  'All contributions',
+'rc' => 'Recent changes (last 30 days)',
+'hr' => 'Last hour only'
+]);
+$resultSelect->setDefault( $data->options['src'] );
+$resultSelect->setName( 'src' );
+print $resultSelect->getHTML();
+?>
 
 
 
diff --git a/lb/guc.php b/lb/guc.php
index 3ac0f51..f79e025 100644
--- a/lb/guc.php
+++ b/lb/guc.php
@@ -30,6 +30,7 @@
 public static function getDefaultOptions() {
 return array(
 'isPrefixPattern' => false,
+'src' => 'all',
 'includeClosedWikis' => false,
 );
 }
@@ -167,19 +168,40 @@
 $this->app->aTP('Query all wikis for matching revisions');
 $wikisWithEditcount = array();
 
+// Copied from lb_wikicontribs::prepareLastHourQuery
+// (TODO: Refactor somehow)
+$cutoff = gmdate(lb_wikicontribs::MW_DATE_FORMAT, time() - 3600);
+
 $slices = array();
 $wikisByDbname = array();
 foreach ($wikis as $wiki) {
 $wikisByDbname[$wiki->dbname] = $wiki;
-$slices[$wiki->slice][] = 'SELECT
-COUNT(rev_id) AS counter,
-\''.$wiki->dbname.'\' AS dbname
-FROM '.$wiki->dbname.'_p.revision_userindex
-WHERE '.(
-($this->options['isPrefixPattern'])
-? 'rev_user_text LIKE :userlike'
-: 'rev_user_text = :user'
-);
+if ($this->options['src'] === 'rc' || $this->options['src'] === 
'hr') {
+$sql = 'SELECT
+COUNT(*) AS counter,
+\''.$wiki->dbname.'\' AS dbname
+FROM '.$wiki->dbname.'_p.recentchanges_userindex
+WHERE '.(
+($this->options['isPrefixPattern'])
+? 'rc_user_text LIKE :userlike'
+: 'rc_user_text = :user'
+).(
+($this->options['src'] === 'hr')
+? ' AND rc_timestamp >= :hrcutoff'
+: ''
+);
+} else {
+$sql = 'SELECT
+COUNT(rev_id) AS counter,
+\''.$wiki->dbname.'\' AS dbname
+FROM '.$wiki->dbname.'_p.revision_userindex
+WHERE '.(
+($this->options['isPrefixPattern'])
+? 'rev_user_text LIKE :userlike'
+: 'rev_user_text = :user'
+);
+}
+$slices[$wiki->slice][] = $sql;
 }
 
 $globalEditCount = 0;
@@ -193,6 +215,9 @@
 } else {
 $statement->bindParam(':user', $this->user);
 }
+if ($this->options['src'] === 'hr') {
+$statement->bindValue(':hrcutoff', $cutoff);
+}
 $statement->execute();
 
 $rows = $statement->fetchAll(PDO::FETCH_OBJ);
diff --git a/lb/wikicontribs.php b/lb/wikicontribs.php
index a65a7f3..826209b 100644
--- a/lb/wikicontribs.php
+++ b/lb/wikicontribs.php
@@ -17,6 +17,7 @@
 
 class lb_wikicontribs {
 const CONTRIB_LIMIT = 20;
+const MW_DATE_FORMAT = 'YmdHis';
 
 private $app;
 private $wiki;
@@ -55,6 +56,7 @@
 $this->isIp = $isIP;
 $this->options = $options += array(
 'isPrefixPattern' => false,
+'src' => 'all',
 );
 
 $this->wiki = $wiki;
@@ -156,13 +158,75 @@
 }
 
 /**
+ * @param PDO $pdo
+ 

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Fix AntifraudQueueConsumer constructor arguments

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

Change subject: Fix AntifraudQueueConsumer constructor arguments
..


Fix AntifraudQueueConsumer constructor arguments

Time limit comes first, take the default 0 message limit.

Will fix payments-init args in another patch.

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

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 3e74503..0b126b7 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -80,7 +80,6 @@
 
   $fraudQueueConsumer = new AntifraudQueueConsumer(
 variable_get('fredge_payments_antifraud_queue', 'payments-antifraud'),
-false,
 $cycle_time
   );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic68f832f2cbbba63ced561ded2010eda98effe07
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
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[deployment]: Fix AntifraudQueueConsumer constructor arguments

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

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

Change subject: Fix AntifraudQueueConsumer constructor arguments
..

Fix AntifraudQueueConsumer constructor arguments

Time limit comes first, take the default 0 message limit.

Will fix payments-init args in another patch.

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


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

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 3e74503..0b126b7 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -80,7 +80,6 @@
 
   $fraudQueueConsumer = new AntifraudQueueConsumer(
 variable_get('fredge_payments_antifraud_queue', 'payments-antifraud'),
-false,
 $cycle_time
   );
 

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix AntifraudQueueConsumer constructor arguments

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

Change subject: Fix AntifraudQueueConsumer constructor arguments
..


Fix AntifraudQueueConsumer constructor arguments

Time limit comes first, take the default 0 message limit.

Will fix payments-init args in another patch.

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

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 9ae179b..b65b94f 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -82,7 +82,6 @@
 
   $fraudQueueConsumer = new AntifraudQueueConsumer(
 variable_get('fredge_payments_antifraud_queue', 'payments-antifraud'),
-false,
 $cycle_time
   );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic68f832f2cbbba63ced561ded2010eda98effe07
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
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]: Fix constructor args for payments-init consumer

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

Change subject: Fix constructor args for payments-init consumer
..


Fix constructor args for payments-init consumer

See parent patch

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

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



diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index b65b94f..9ec3bdc 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -74,7 +74,6 @@
 
   $paymentsInitConsumer = new PaymentsInitQueueConsumer(
 variable_get('fredge_payments_init_queue', 'payments-init'),
-false,
 $cycle_time
   );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19a2f8f1162f3801236c2b6c6df37761c9bba420
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
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]: Fix constructor args for payments-init consumer

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

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

Change subject: Fix constructor args for payments-init consumer
..

Fix constructor args for payments-init consumer

See parent patch

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/81/307681/1

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 2e82b47..9632d85 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -74,8 +74,8 @@
 
   $paymentsInitConsumer = new PaymentsInitQueueConsumer(
 variable_get('fredge_payments_init_queue', 'payments-init'),
-false,
-$cycle_time
+$cycle_time,
+0
   );
 
   $processed = $paymentsInitConsumer->dequeueMessages();

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix AntifraudQueueConsumer constructor arguments

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

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

Change subject: Fix AntifraudQueueConsumer constructor arguments
..

Fix AntifraudQueueConsumer constructor arguments

Time limit comes first, message limit should be numeric.

Will fix payments-init args in another patch.

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


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

diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 9ae179b..2e82b47 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -82,8 +82,8 @@
 
   $fraudQueueConsumer = new AntifraudQueueConsumer(
 variable_get('fredge_payments_antifraud_queue', 'payments-antifraud'),
-false,
-$cycle_time
+$cycle_time,
+0
   );
 
   $processed += $fraudQueueConsumer->dequeueMessages();

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Move antifraud queue off ActiveMQ

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

Change subject: Move antifraud queue off ActiveMQ
..


Move antifraud queue off ActiveMQ

Requirements:
* Mirror antifraud queue to redis (in both DI and SmashPig)

Bug: T131273
Change-Id: Ida1a73bc8a2484a6ecf99bc8d70a0e5d69b1233a
---
A sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
D sites/all/modules/queue2civicrm/fredge/test/data/payments-antifraud.json
D sites/all/modules/queue2civicrm/fredge/test/data/payments-init.json
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
D sites/all/modules/queue2civicrm/tests/data/pending_amazon.json
D sites/all/modules/queue2civicrm/tests/data/pending_astropay.json
D sites/all/modules/queue2civicrm/tests/data/sparse_donation_amazon.json
D sites/all/modules/queue2civicrm/tests/data/sparse_donation_astropay.json
9 files changed, 134 insertions(+), 235 deletions(-)

Approvals:
  Ejegg: 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
new file mode 100644
index 000..0e5dfb0
--- /dev/null
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -0,0 +1,114 @@
+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
+*/
+   protected function insertAntifraudData( $msg, $logIdentifier ) {
+
+   if ( empty( $msg ) || empty( $msg['contribution_tracking_id'] ) 
|| empty( $msg['order_id'] ) ) {
+   $error = "$logIdentifier: missing essential 
payments_fraud IDs. Dropping message on floor.";
+   throw new FredgeDataValidationException( $error );
+   }
+
+   $id = 0;
+   $inserting = true;
+
+   $dbs = wmf_civicrm_get_dbs();
+   $dbs->push( 'fredge' );
+   $query = 'SELECT id FROM payments_fraud WHERE 
contribution_tracking_id = :ct_id AND order_id = :order_id LIMIT 1';
+   $result = db_query( $query, array(
+   ':ct_id' => $msg['contribution_tracking_id'],
+   ':order_id' => $msg['order_id']
+   ) );
+   if ( $result->rowCount() === 1 ) {
+   $id = $result->fetch()->id;
+   $inserting = false;
+   }
+   $data = fredge_prep_data( $msg, 'payments_fraud', 
$logIdentifier, $inserting );
+   //now all you have to do is insert the actual message data.
+   if ( $inserting ) {
+   $id = db_insert( 'payments_fraud' )
+   ->fields( $data )
+   ->execute();
+   } else {
+   db_update( 'payments_fraud' )
+   ->fields( $data )
+   ->condition( 'id', $id )
+   ->execute();
+   }
+   if ( $id ) {
+   foreach ( $msg['score_breakdown'] as $test => $score ) {
+   $breakdown = array(
+   'payments_fraud_id' => $id,
+   'filter_name' => $test,
+   'risk_score' => $score,
+   );
+   // validate the data. none of these fields 
would be converted, so no need
+   // to store the output
+   fredge_prep_data( $breakdown, 
'payments_fraud_breakdown', $logIdentifier, true );
+   db_merge( 'payments_fraud_breakdown' )->key( 
array(
+   'payments_fraud_id' => $id,
+   'filter_name' => $test,
+   ) )->fields( array(
+   'risk_score' => $score,
+   ) )->execute();
+   }
+   }
+   }
+}
diff --git 
a/sites/all/modules/queue2civicrm/fredge/test/data/payments-antifraud.json 
b/sites/all/modules/queue2civicrm/fredge/test/data/payments-antifraud.json
deleted file mode 100644
index 5472480..000
--- 

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Move antifraud queue off ActiveMQ

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

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

Change subject: Move antifraud queue off ActiveMQ
..

Move antifraud queue off ActiveMQ

Requirements:
* Mirror antifraud queue to redis (in both DI and SmashPig)

Bug: T131273
Change-Id: Ida1a73bc8a2484a6ecf99bc8d70a0e5d69b1233a
---
A sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
D sites/all/modules/queue2civicrm/fredge/test/data/payments-antifraud.json
D sites/all/modules/queue2civicrm/fredge/test/data/payments-init.json
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
D sites/all/modules/queue2civicrm/tests/data/pending_amazon.json
D sites/all/modules/queue2civicrm/tests/data/pending_astropay.json
D sites/all/modules/queue2civicrm/tests/data/sparse_donation_amazon.json
D sites/all/modules/queue2civicrm/tests/data/sparse_donation_astropay.json
9 files changed, 134 insertions(+), 235 deletions(-)


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

diff --git a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
new file mode 100644
index 000..0e5dfb0
--- /dev/null
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -0,0 +1,114 @@
+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
+*/
+   protected function insertAntifraudData( $msg, $logIdentifier ) {
+
+   if ( empty( $msg ) || empty( $msg['contribution_tracking_id'] ) 
|| empty( $msg['order_id'] ) ) {
+   $error = "$logIdentifier: missing essential 
payments_fraud IDs. Dropping message on floor.";
+   throw new FredgeDataValidationException( $error );
+   }
+
+   $id = 0;
+   $inserting = true;
+
+   $dbs = wmf_civicrm_get_dbs();
+   $dbs->push( 'fredge' );
+   $query = 'SELECT id FROM payments_fraud WHERE 
contribution_tracking_id = :ct_id AND order_id = :order_id LIMIT 1';
+   $result = db_query( $query, array(
+   ':ct_id' => $msg['contribution_tracking_id'],
+   ':order_id' => $msg['order_id']
+   ) );
+   if ( $result->rowCount() === 1 ) {
+   $id = $result->fetch()->id;
+   $inserting = false;
+   }
+   $data = fredge_prep_data( $msg, 'payments_fraud', 
$logIdentifier, $inserting );
+   //now all you have to do is insert the actual message data.
+   if ( $inserting ) {
+   $id = db_insert( 'payments_fraud' )
+   ->fields( $data )
+   ->execute();
+   } else {
+   db_update( 'payments_fraud' )
+   ->fields( $data )
+   ->condition( 'id', $id )
+   ->execute();
+   }
+   if ( $id ) {
+   foreach ( $msg['score_breakdown'] as $test => $score ) {
+   $breakdown = array(
+   'payments_fraud_id' => $id,
+   'filter_name' => $test,
+   'risk_score' => $score,
+   );
+   // validate the data. none of these fields 
would be converted, so no need
+   // to store the output
+   fredge_prep_data( $breakdown, 
'payments_fraud_breakdown', $logIdentifier, true );
+   db_merge( 'payments_fraud_breakdown' )->key( 
array(
+   'payments_fraud_id' => $id,
+   'filter_name' => $test,
+   ) )->fields( array(
+   'risk_score' => $score,
+   ) )->execute();
+   }
+   }
+   }
+}
diff --git 
a/sites/all/modules/queue2civicrm/fredge/test/data/payments-antifraud.json 
b/sites/all/modules/queue2civicrm/fredge/test/data/payments-antifraud.json
deleted file mode 

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix line-height for notification item text

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

Change subject: Fix line-height for notification item text
..


Fix line-height for notification item text

Bug: T140523
Change-Id: I6a1a174ed70324da50970ecfb35ebba21ea703dd
---
M modules/styles/mw.echo.ui.NotificationItemWidget.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 6ca16de..92d8205 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -49,7 +49,7 @@
box-sizing: border-box;
 
&-message {
-   line-height: 16px;
+   line-height: 1.3em;
// Compensate for the placement of the 'mark as read'
// button, so the message is not stretched past it.
// The 'mark as read' circle is placed with a right

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a1a174ed70324da50970ecfb35ebba21ea703dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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...Echo[master]: Fix sidebar counts Special:Notifications in monobook

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

Change subject: Fix sidebar counts Special:Notifications in monobook
..


Fix sidebar counts Special:Notifications in monobook

Bug: T143845
Change-Id: Idf5922876f55aca6ed5d6800d0ff5066306c5fb1
---
M Resources.php
A modules/styles/mw.echo.ui.CrossWikiUnreadFilterWidget.monobook.less
2 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 05b725b..c3c4c40 100644
--- a/Resources.php
+++ b/Resources.php
@@ -319,6 +319,11 @@
'styles/mw.echo.ui.CrossWikiUnreadFilterWidget.less',
'styles/mw.echo.ui.SpecialHelpMenuWidget.less',
),
+   'skinStyles' => array(
+   'monobook' => array(
+   
'styles/mw.echo.ui.CrossWikiUnreadFilterWidget.monobook.less',
+   ),
+   ),
'dependencies' => array(
'ext.echo.ui',
'mediawiki.Uri',
diff --git 
a/modules/styles/mw.echo.ui.CrossWikiUnreadFilterWidget.monobook.less 
b/modules/styles/mw.echo.ui.CrossWikiUnreadFilterWidget.monobook.less
new file mode 100644
index 000..d9454f9
--- /dev/null
+++ b/modules/styles/mw.echo.ui.CrossWikiUnreadFilterWidget.monobook.less
@@ -0,0 +1,7 @@
+@import '../echo.variables';
+
+.mw-echo-ui-crossWikiUnreadFilterWidget {
+   .mw-echo-ui-pageNotificationsOptionWidget-count .oo-ui-labelWidget {
+   padding: 0;
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf5922876f55aca6ed5d6800d0ff5066306c5fb1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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...Echo[master]: Adjust Special:Notifications width for small screens

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

Change subject: Adjust Special:Notifications width for small screens
..


Adjust Special:Notifications width for small screens

Bug: T141949
Change-Id: Id0987ea9e7929777c887ceea6757ec00b3bf18ae
---
M modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less 
b/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
index 5589baf..edd109f 100644
--- a/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
+++ b/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
@@ -40,4 +40,9 @@
display: none;
}
}
+
+   @media all and ( max-width: @specialpage-mobile-width-small ) {
+   // Make narrow with margin
+   width: @specialpage-mobile-width-small - 32px;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0987ea9e7929777c887ceea6757ec00b3bf18ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...guc[master]: guc: Fix broken display of projects with non-zero edits

2016-08-30 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: guc: Fix broken display of projects with non-zero edits
..


guc: Fix broken display of projects with non-zero edits

Currently it says "X edits in 1 projects" always.

Regressed in beb5d5bfc4b, which created getResultWikiCount().
The reason it didn't work was that 'count()' is meant for arrays.
`$this->datas`, however, is an object.

Bug: T118662
Change-Id: Ia38d4b45757af9ffaba3a8d09304ad3b21a30640
---
M lb/guc.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lb/guc.php b/lb/guc.php
index 4200e31..fb5eed5 100644
--- a/lb/guc.php
+++ b/lb/guc.php
@@ -273,7 +273,7 @@
  * @return int
  */
 public function getResultWikiCount() {
-return count($this->datas);
+return count($this->wikisWithEditcount);
 }
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia38d4b45757af9ffaba3a8d09304ad3b21a30640
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Danny B. 
Gerrit-Reviewer: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add the best CSS rule to notifications: word-break: break-word;

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

Change subject: Add the best CSS rule to notifications: word-break: break-word;
..


Add the best CSS rule to notifications: word-break: break-word;

Add word-break: break-word; so we make sure even long names or titles
without spaces are broken/wrapped where they need to.

Bug: T142662
Change-Id: I166e834495972ec49eb98e301ab9be85f40f5a5e
---
M modules/styles/mw.echo.ui.NotificationItemWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 6ca16de..55470dd 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -55,6 +55,7 @@
// The 'mark as read' circle is placed with a right
// margin of -1em
padding-right: 1em;
+   word-break: break-word;
 
&-header {
color: @notification-text-color;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I166e834495972ec49eb98e301ab9be85f40f5a5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...guc[master]: guc: Fix broken display of projects with non-zero edits

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

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

Change subject: guc: Fix broken display of projects with non-zero edits
..

guc: Fix broken display of projects with non-zero edits

Currently it says "X edits in 1 projects" always.

Regressed in beb5d5bfc4b, which created getResultWikiCount().
The reason it didn't work was that 'count()' is meant for arrays.
`$this->datas`, however, is an object.

Bug: T118662
Change-Id: Ia38d4b45757af9ffaba3a8d09304ad3b21a30640
---
M lb/guc.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/guc 
refs/changes/78/307678/1

diff --git a/lb/guc.php b/lb/guc.php
index 4200e31..fb5eed5 100644
--- a/lb/guc.php
+++ b/lb/guc.php
@@ -273,7 +273,7 @@
  * @return int
  */
 public function getResultWikiCount() {
-return count($this->datas);
+return count($this->wikisWithEditcount);
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia38d4b45757af9ffaba3a8d09304ad3b21a30640
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/guc
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add unwatch actions to bundle items

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

Change subject: Add unwatch actions to bundle items
..


Add unwatch actions to bundle items

Bug: T132975
Change-Id: I234b0aeff348b80fa2a9636d7dd182fcd3ef9553
---
M includes/Notifications/NewTopicPresentationModel.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/Notifications/NewTopicPresentationModel.php 
b/includes/Notifications/NewTopicPresentationModel.php
index d6f27b4..32abb64 100644
--- a/includes/Notifications/NewTopicPresentationModel.php
+++ b/includes/Notifications/NewTopicPresentationModel.php
@@ -23,7 +23,9 @@
 
public function getSecondaryLinks() {
if ( $this->isBundled() ) {
-   return array();
+   return array(
+   $this->getFlowUnwatchDynamicActionLink()
+   );
} else {
return array(
$this->getAgentLink(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I234b0aeff348b80fa2a9636d7dd182fcd3ef9553
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: Siebrand 
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[wmf/1.28.0-wmf.17]: mw.loader: Use requestAnimationFrame for addEmbeddedCSS()

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

Change subject: mw.loader: Use requestAnimationFrame for addEmbeddedCSS()
..


mw.loader: Use requestAnimationFrame for addEmbeddedCSS()

setTimeout is fairly inefficient for this purpose as it tends to schedule for
further in the future than rAF would. And even then, it happens at a bad time
for the browser with regards to style changes.

Instead, use rAF, which typically executes earlier and at the point where the
browser is expecting style changes.

This makes top and bottom modules finish execution earlier by having their
styles applied sooner.

Change-Id: Ie4e7464aa811fa8ea4e4f115696f0bddbd28737b
(cherry picked from commit 3ef8d8a418579b51e8e6aa777fec373c17782b91)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 7ceb5fe..78c674c 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -858,7 +858,8 @@
cssBuffer = '',
cssBufferTimer = null,
cssCallbacks = $.Callbacks(),
-   isIE9 = document.documentMode === 9;
+   isIE9 = document.documentMode === 9,
+   rAF = window.requestAnimationFrame || 
setTimeout;
 
function getMarker() {
if ( !marker ) {
@@ -930,10 +931,9 @@
if ( !cssBuffer || cssText.slice( 0, 
'@import'.length ) !== '@import' ) {
// Linebreak for somewhat 
distinguishable sections
cssBuffer += '\n' + cssText;
-   // TODO: Using 
requestAnimationFrame would perform better by not injecting
-   // styles while the browser is 
busy painting.
if ( !cssBufferTimer ) {
-   cssBufferTimer = 
setTimeout( function () {
+   cssBufferTimer = rAF( 
function () {
+   // Wrap in 
anonymous function that takes no arguments
// Support: 
Firefox < 13
// Firefox 12 
has non-standard behaviour of passing a number
// as first 
argument to a setTimeout callback.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4e7464aa811fa8ea4e4f115696f0bddbd28737b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
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]: Protect against target.getSurface() returning null

2016-08-30 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Protect against target.getSurface() returning null
..

Protect against target.getSurface() returning null

This can now happen due to I5510bbe3.

Bug: T139972
Change-Id: Ia9a171fd8f4800c50f116b13dbd00d8e098b47a9
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
1 file changed, 7 insertions(+), 4 deletions(-)


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

diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
index 2cc0eca..f7183ed 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
@@ -118,7 +118,7 @@
 * @inheritdoc
 */
mw.flow.ui.VisualEditorWidget.prototype.focus = function () {
-   if ( this.target ) {
+   if ( this.target && this.target.getSurface() ) {
this.target.getSurface().getView().focus();
}
};
@@ -127,7 +127,7 @@
 * @inheritdoc
 */
mw.flow.ui.VisualEditorWidget.prototype.moveCursorToEnd = function () {
-   if ( this.target ) {
+   if ( this.target && this.target.getSurface() ) {

this.target.getSurface().getModel().selectLastContentOffset();
}
};
@@ -139,7 +139,7 @@
var doc, html;
 
// If we haven't fully loaded yet, just return nothing.
-   if ( !this.target ) {
+   if ( !this.target || !this.target.getSurface() ) {
return '';
}
 
@@ -163,6 +163,9 @@
 * @inheritdoc
 */
mw.flow.ui.VisualEditorWidget.prototype.isEmpty = function () {
+   if ( !this.target || !this.target.getSurface() ) {
+   return true;
+   }
return 
!this.target.getSurface().getModel().getDocument().data.hasContent();
};
 
@@ -173,7 +176,7 @@
 */
mw.flow.ui.VisualEditorWidget.prototype.hasBeenChanged = function () {
// If we haven't fully loaded yet, just return false
-   if ( !this.target ) {
+   if ( !this.target || !this.target.getSurface() ) {
return false;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9a171fd8f4800c50f116b13dbd00d8e098b47a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] wikimedia...civicrm[master]: CiviCRM 4.7.11 upgrade

2016-08-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CiviCRM 4.7.11 upgrade
..

CiviCRM 4.7.11 upgrade

Our remaining customisations

a0521fb Add script for compiling deployment repo
a3bda32 Deployment file adds: gitreview, settings.location, readme, submodules
bc80624 Hack out version & extension checks.
2a10d9f Hack for running GenCode
0e9edb2 CRM-19148 Fix for on hold data being lost
93e4389 Fix custom fields update to work regardless of permissions
a72ecac Post upgrade logging tab isn't showing.
576b6c5 Show triggers as permitted if the setting says to manage them offline
8d02a60 wmf-sunset-patch alter exception behaviour
98bb292 Fix another slow point
a1feca6 Increase time out while doing exports
f83440f Return more rows per query and use unbuffered query to manage the memory
0647aac Merge from master :Include custom fields in default export
770cbb5 wmf-sunset patch skip process greetings on contact create
2382c37 wmf-sunset patch add extra columns to contribution recur tab
238c87f wmf: CRM-17158 block empty searches unless deliberate
48fe4d3 wmf: CRM-10700 use DELETE FROM instead of TRUNCATE
00bf6d3 wmf: CRM-17157 allow more than 2 decimal places in currency

Change-Id: I19d3d7f373ed0fa1646cb3d8ba4d0301282ad040
---
M CRM/ACL/DAO/ACL.php
M CRM/ACL/DAO/Cache.php
M CRM/ACL/DAO/EntityRole.php
M CRM/ACL/Page/ACL.php
M CRM/ACL/Page/EntityRole.php
M CRM/Activity/BAO/Activity.php
M CRM/Activity/DAO/Activity.php
M CRM/Activity/DAO/ActivityContact.php
M CRM/Activity/Page/AJAX.php
M CRM/Admin/Form/Preferences.php
M CRM/Admin/Form/Preferences/Address.php
M CRM/Admin/Form/Setting/Miscellaneous.php
M CRM/Batch/DAO/Batch.php
M CRM/Batch/DAO/EntityBatch.php
M CRM/Campaign/BAO/Petition.php
M CRM/Campaign/DAO/Campaign.php
M CRM/Campaign/DAO/CampaignGroup.php
M CRM/Campaign/DAO/Survey.php
M CRM/Campaign/Form/Task/Interview.php
M CRM/Case/DAO/Case.php
M CRM/Case/DAO/CaseActivity.php
M CRM/Case/DAO/CaseContact.php
M CRM/Case/DAO/CaseType.php
M CRM/Contact/BAO/Contact.php
M CRM/Contact/BAO/ContactType.php
M CRM/Contact/BAO/Group.php
M CRM/Contact/BAO/GroupContact.php
M CRM/Contact/BAO/GroupNesting.php
M CRM/Contact/BAO/Query.php
M CRM/Contact/DAO/ACLContactCache.php
M CRM/Contact/DAO/Contact.php
M CRM/Contact/DAO/ContactType.php
M CRM/Contact/DAO/DashboardContact.php
M CRM/Contact/DAO/Group.php
M CRM/Contact/DAO/GroupContact.php
M CRM/Contact/DAO/GroupContactCache.php
M CRM/Contact/DAO/GroupNesting.php
M CRM/Contact/DAO/GroupOrganization.php
M CRM/Contact/DAO/Relationship.php
M CRM/Contact/DAO/RelationshipType.php
M CRM/Contact/DAO/SavedSearch.php
M CRM/Contact/DAO/SubscriptionHistory.php
M CRM/Contact/Form/Edit/CommunicationPreferences.php
M CRM/Contact/Form/Inline/CommunicationPreferences.php
M CRM/Contact/Form/Search.php
M CRM/Contact/Form/Search/Custom/Sample.php
M CRM/Contact/Form/Task/EmailCommon.php
M CRM/Contact/Form/Task/LabelCommon.php
M CRM/Contact/Form/Task/PDFLetterCommon.php
M CRM/Contact/Form/Task/SaveSearch.php
M CRM/Contact/Import/Form/DataSource.php
M CRM/Contact/Page/AJAX.php
M CRM/Contact/Page/DashBoard.php
M CRM/Contact/Page/Dashlet.php
M CRM/Contact/Page/DedupeFind.php
M CRM/Contact/Page/View/UserDashBoard/GroupContact.php
M CRM/Contribute/BAO/Contribution.php
M CRM/Contribute/BAO/ContributionRecur.php
M CRM/Contribute/DAO/Contribution.php
M CRM/Contribute/DAO/ContributionPage.php
M CRM/Contribute/DAO/ContributionProduct.php
M CRM/Contribute/DAO/ContributionRecur.php
M CRM/Contribute/DAO/ContributionSoft.php
M CRM/Contribute/DAO/Premium.php
M CRM/Contribute/DAO/PremiumsProduct.php
M CRM/Contribute/DAO/Product.php
M CRM/Contribute/DAO/Widget.php
M CRM/Contribute/Form/AbstractEditPayment.php
M CRM/Contribute/Form/AdditionalInfo.php
M CRM/Contribute/Form/Contribution.php
M CRM/Contribute/Form/ContributionView.php
M CRM/Contribute/Form/Task/Batch.php
M CRM/Contribute/Form/Task/PDF.php
M CRM/Contribute/Form/Task/PDFLetter.php
M CRM/Contribute/Form/Task/PDFLetterCommon.php
M CRM/Core/Action.php
M CRM/Core/BAO/Cache.php
M CRM/Core/BAO/CustomGroup.php
M CRM/Core/BAO/CustomOption.php
M CRM/Core/BAO/Dashboard.php
M CRM/Core/BAO/File.php
M CRM/Core/BAO/FinancialTrxn.php
M CRM/Core/BAO/Mapping.php
M CRM/Core/BAO/MessageTemplate.php
M CRM/Core/BAO/Navigation.php
M CRM/Core/BAO/RecurringEntity.php
M CRM/Core/BAO/SchemaHandler.php
M CRM/Core/ClassLoader.php
M CRM/Core/CodeGen/BaseTask.php
M CRM/Core/CodeGen/Config.php
M CRM/Core/CodeGen/DAO.php
M CRM/Core/CodeGen/ITask.php
M CRM/Core/CodeGen/Main.php
M CRM/Core/CodeGen/Reflection.php
M CRM/Core/CodeGen/Schema.php
M CRM/Core/CodeGen/Util/File.php
M CRM/Core/CodeGen/Util/Smarty.php
M CRM/Core/CodeGen/Util/Template.php
A CRM/Core/CodeGen/Version.php
M CRM/Core/Config/MagicMerge.php
M CRM/Core/Controller.php
M CRM/Core/DAO.php
M CRM/Core/DAO/ActionLog.php
M CRM/Core/DAO/ActionMapping.php
M CRM/Core/DAO/ActionSchedule.php
M CRM/Core/DAO/Address.php
M 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ve.init.Target: Unset this.surface when destroying it

2016-08-30 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: ve.init.Target: Unset this.surface when destroying it
..

ve.init.Target: Unset this.surface when destroying it

So that getSurface() won't return a destroyed surface.

Bug: T139972
Change-Id: I5510bbe3883e84069ff08c789e378428d0b94572
---
M src/init/ve.init.Target.js
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/76/307676/1

diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 41904fc..3aa6416 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -354,6 +354,11 @@
  * Destroy and remove all surfaces from the target
  */
 ve.init.Target.prototype.clearSurfaces = function () {
+   if ( this.surfaces.indexOf( this.surface ) !== -1 ) {
+   // We're about to destroy this.surface, so unset it for sanity
+   // Otherwise, getSurface() could return a destroyed surface
+   this.surface = null;
+   }
while ( this.surfaces.length ) {
this.surfaces.pop().destroy();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5510bbe3883e84069ff08c789e378428d0b94572
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
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/core[wmf/1.28.0-wmf.17]: mw.loader: Use requestAnimationFrame for addEmbeddedCSS()

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

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

Change subject: mw.loader: Use requestAnimationFrame for addEmbeddedCSS()
..

mw.loader: Use requestAnimationFrame for addEmbeddedCSS()

setTimeout is fairly inefficient for this purpose as it tends to schedule for
further in the future than rAF would. And even then, it happens at a bad time
for the browser with regards to style changes.

Instead, use rAF, which typically executes earlier and at the point where the
browser is expecting style changes.

This makes top and bottom modules finish execution earlier by having their
styles applied sooner.

Change-Id: Ie4e7464aa811fa8ea4e4f115696f0bddbd28737b
(cherry picked from commit 3ef8d8a418579b51e8e6aa777fec373c17782b91)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 7ceb5fe..78c674c 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -858,7 +858,8 @@
cssBuffer = '',
cssBufferTimer = null,
cssCallbacks = $.Callbacks(),
-   isIE9 = document.documentMode === 9;
+   isIE9 = document.documentMode === 9,
+   rAF = window.requestAnimationFrame || 
setTimeout;
 
function getMarker() {
if ( !marker ) {
@@ -930,10 +931,9 @@
if ( !cssBuffer || cssText.slice( 0, 
'@import'.length ) !== '@import' ) {
// Linebreak for somewhat 
distinguishable sections
cssBuffer += '\n' + cssText;
-   // TODO: Using 
requestAnimationFrame would perform better by not injecting
-   // styles while the browser is 
busy painting.
if ( !cssBufferTimer ) {
-   cssBufferTimer = 
setTimeout( function () {
+   cssBufferTimer = rAF( 
function () {
+   // Wrap in 
anonymous function that takes no arguments
// Support: 
Firefox < 13
// Firefox 12 
has non-standard behaviour of passing a number
// as first 
argument to a setTimeout callback.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4e7464aa811fa8ea4e4f115696f0bddbd28737b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.28.0-wmf.17]: mw.loader: Make 'mwLoadEnd' less expensive with a single usi...

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

Change subject: mw.loader: Make 'mwLoadEnd' less expensive with a single using()
..


mw.loader: Make 'mwLoadEnd' less expensive with a single using()

20-30ms before this patch, ~2ms after this patch (MacBookPro, Chrome 52).

The creation of 100s of Deferred objects, $.when() tracking them
all, and bubbling up the completion took 20-30ms. This is quite
expensive. Optimise by using a single deferred first.
A module reaching state 'missing' or 'error' is very rare.

Change-Id: I90eea4bfe8fe6d85c395d9d0868bbde482c4a703
(cherry picked from commit 2bdd56e89334d85c48753b0052b0a94689dd584b)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index af37162..7ceb5fe 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2693,14 +2693,18 @@
var loading = $.grep( mw.loader.getModuleNames(), function ( 
module ) {
return mw.loader.getState( module ) === 'loading';
} );
-   // In order to use jQuery.when (which stops early if one of the 
promises got rejected)
-   // cast any loading failures into successes. We only need a 
callback, not the module.
-   loading = $.map( loading, function ( module ) {
-   return mw.loader.using( module ).then( null, function 
() {
-   return $.Deferred().resolve();
+   // We only need a callback, not any actual module. First try a 
single using()
+   // for all loading modules. If one fails, fall back to tracking 
each module
+   // separately via $.when(), this is expensive.
+   loading = mw.loader.using( loading ).then( null, function () {
+   var all = $.map( loading, function ( module ) {
+   return mw.loader.using( module ).then( null, 
function () {
+   return $.Deferred().resolve();
+   } );
} );
+   return $.when.apply( $, all );
} );
-   $.when.apply( $, loading ).then( function () {
+   loading.then( function () {
mwPerformance.mark( 'mwLoadEnd' );
mw.hook( 'resourceloader.loadEnd' ).fire();
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90eea4bfe8fe6d85c395d9d0868bbde482c4a703
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
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[wmf/1.28.0-wmf.17]: mw.loader: Make 'mwLoadEnd' less expensive with a single usi...

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

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

Change subject: mw.loader: Make 'mwLoadEnd' less expensive with a single using()
..

mw.loader: Make 'mwLoadEnd' less expensive with a single using()

20-30ms before this patch, ~2ms after this patch (MacBookPro, Chrome 52).

The creation of 100s of Deferred objects, $.when() tracking them
all, and bubbling up the completion took 20-30ms. This is quite
expensive. Optimise by using a single deferred first.
A module reaching state 'missing' or 'error' is very rare.

Change-Id: I90eea4bfe8fe6d85c395d9d0868bbde482c4a703
(cherry picked from commit 2bdd56e89334d85c48753b0052b0a94689dd584b)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/307673/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index af37162..7ceb5fe 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2693,14 +2693,18 @@
var loading = $.grep( mw.loader.getModuleNames(), function ( 
module ) {
return mw.loader.getState( module ) === 'loading';
} );
-   // In order to use jQuery.when (which stops early if one of the 
promises got rejected)
-   // cast any loading failures into successes. We only need a 
callback, not the module.
-   loading = $.map( loading, function ( module ) {
-   return mw.loader.using( module ).then( null, function 
() {
-   return $.Deferred().resolve();
+   // We only need a callback, not any actual module. First try a 
single using()
+   // for all loading modules. If one fails, fall back to tracking 
each module
+   // separately via $.when(), this is expensive.
+   loading = mw.loader.using( loading ).then( null, function () {
+   var all = $.map( loading, function ( module ) {
+   return mw.loader.using( module ).then( null, 
function () {
+   return $.Deferred().resolve();
+   } );
} );
+   return $.when.apply( $, all );
} );
-   $.when.apply( $, loading ).then( function () {
+   loading.then( function () {
mwPerformance.mark( 'mwLoadEnd' );
mw.hook( 'resourceloader.loadEnd' ).fire();
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90eea4bfe8fe6d85c395d9d0868bbde482c4a703
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mediawiki...CategoryTree[master]: Remove unused attribute mIsAjaxRequest

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

Change subject: Remove unused attribute mIsAjaxRequest
..


Remove unused attribute mIsAjaxRequest

The attribute mIsAjaxRequest is unused since 4b4a6308.

Change-Id: Ief01459527f04a13eb4db7e2d099188fc5c5504e
---
M ApiCategoryTree.php
M CategoryTreeFunctions.php
2 files changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/ApiCategoryTree.php b/ApiCategoryTree.php
index e824968..4a417cf 100644
--- a/ApiCategoryTree.php
+++ b/ApiCategoryTree.php
@@ -14,7 +14,7 @@
}
$depth = isset( $options['depth'] ) ? (int)$options['depth'] : 
1;
 
-   $ct = new CategoryTree( $options, true );
+   $ct = new CategoryTree( $options );
$depth = CategoryTree::capDepth( $ct->getOption( 'mode' ), 
$depth );
$title = CategoryTree::makeTitle( $params['category'] );
$config = $this->getConfig();
@@ -114,4 +114,4 @@
public function isInternal() {
return true;
}
-}
\ No newline at end of file
+}
diff --git a/CategoryTreeFunctions.php b/CategoryTreeFunctions.php
index 5e2198a..b6f7696 100644
--- a/CategoryTreeFunctions.php
+++ b/CategoryTreeFunctions.php
@@ -16,17 +16,13 @@
 }
 
 class CategoryTree {
-   public $mIsAjaxRequest = false;
public $mOptions = array();
 
/**
 * @param $options array
-* @param $ajax bool
 */
-   function __construct( $options, $ajax = false ) {
+   function __construct( $options ) {
global $wgCategoryTreeDefaultOptions;
-
-   $this->mIsAjaxRequest = $ajax;
 
# ensure default values and order of options. Order may become 
important, it may influence the cache key!
foreach ( $wgCategoryTreeDefaultOptions as $option => $default 
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief01459527f04a13eb4db7e2d099188fc5c5504e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Glaisher 
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]: Pass full HTML documents into VE, not fragments

2016-08-30 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Pass full HTML documents into VE, not fragments
..

Pass full HTML documents into VE, not fragments

This prevents XML parsing errors in IE.

Bug: T138536
Change-Id: Ib9bbaccfff9434452ac94bb66a7b076a734dde3d
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
index 2cc0eca..e3c6f7d 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.VisualEditorWidget.js
@@ -86,7 +86,8 @@
var widget = this,
deferred = $.Deferred();
 
-   this.target.loadHtml( content );
+   // loadHtml expects a full document, but we were only given the 
body content
+   this.target.loadHtml( '' + content + '' );
this.target.once( 'surfaceReady', function () {
var surface = widget.target.getSurface();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9bbaccfff9434452ac94bb66a7b076a734dde3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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/core[master]: mw.loader: Use requestAnimationFrame for addEmbeddedCSS()

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

Change subject: mw.loader: Use requestAnimationFrame for addEmbeddedCSS()
..


mw.loader: Use requestAnimationFrame for addEmbeddedCSS()

setTimeout is fairly inefficient for this purpose as it tends to schedule for
further in the future than rAF would. And even then, it happens at a bad time
for the browser with regards to style changes.

Instead, use rAF, which typically executes earlier and at the point where the
browser is expecting style changes.

This makes top and bottom modules finish execution earlier by having their
styles applied sooner.

Change-Id: Ie4e7464aa811fa8ea4e4f115696f0bddbd28737b
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 7ceb5fe..78c674c 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -858,7 +858,8 @@
cssBuffer = '',
cssBufferTimer = null,
cssCallbacks = $.Callbacks(),
-   isIE9 = document.documentMode === 9;
+   isIE9 = document.documentMode === 9,
+   rAF = window.requestAnimationFrame || 
setTimeout;
 
function getMarker() {
if ( !marker ) {
@@ -930,10 +931,9 @@
if ( !cssBuffer || cssText.slice( 0, 
'@import'.length ) !== '@import' ) {
// Linebreak for somewhat 
distinguishable sections
cssBuffer += '\n' + cssText;
-   // TODO: Using 
requestAnimationFrame would perform better by not injecting
-   // styles while the browser is 
busy painting.
if ( !cssBufferTimer ) {
-   cssBufferTimer = 
setTimeout( function () {
+   cssBufferTimer = rAF( 
function () {
+   // Wrap in 
anonymous function that takes no arguments
// Support: 
Firefox < 13
// Firefox 12 
has non-standard behaviour of passing a number
// as first 
argument to a setTimeout callback.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4e7464aa811fa8ea4e4f115696f0bddbd28737b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Jack Phoenix 
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]: mw.loader: Make 'mwLoadEnd' less expensive with a single usi...

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

Change subject: mw.loader: Make 'mwLoadEnd' less expensive with a single using()
..


mw.loader: Make 'mwLoadEnd' less expensive with a single using()

20-30ms before this patch, ~2ms after this patch (MacBookPro, Chrome 52).

The creation of 100s of Deferred objects, $.when() tracking them
all, and bubbling up the completion took 20-30ms. This is quite
expensive. Optimise by using a single deferred first.
A module reaching state 'missing' or 'error' is very rare.

Change-Id: I90eea4bfe8fe6d85c395d9d0868bbde482c4a703
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index af37162..7ceb5fe 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2693,14 +2693,18 @@
var loading = $.grep( mw.loader.getModuleNames(), function ( 
module ) {
return mw.loader.getState( module ) === 'loading';
} );
-   // In order to use jQuery.when (which stops early if one of the 
promises got rejected)
-   // cast any loading failures into successes. We only need a 
callback, not the module.
-   loading = $.map( loading, function ( module ) {
-   return mw.loader.using( module ).then( null, function 
() {
-   return $.Deferred().resolve();
+   // We only need a callback, not any actual module. First try a 
single using()
+   // for all loading modules. If one fails, fall back to tracking 
each module
+   // separately via $.when(), this is expensive.
+   loading = mw.loader.using( loading ).then( null, function () {
+   var all = $.map( loading, function ( module ) {
+   return mw.loader.using( module ).then( null, 
function () {
+   return $.Deferred().resolve();
+   } );
} );
+   return $.when.apply( $, all );
} );
-   $.when.apply( $, loading ).then( function () {
+   loading.then( function () {
mwPerformance.mark( 'mwLoadEnd' );
mw.hook( 'resourceloader.loadEnd' ).fire();
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90eea4bfe8fe6d85c395d9d0868bbde482c4a703
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
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/puppet[production]: Labs firstboot.sh: Use the new project_id setting

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

Change subject: Labs firstboot.sh:  Use the new project_id setting
..


Labs firstboot.sh:  Use the new project_id setting

Bug: T105891
Change-Id: I0335b5921070bf98f3ff47c5623693eb73ba5064
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index adc5dee..f11a2e7 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -65,7 +65,7 @@
 fi
 # At this point, all (the rest of) our disk are belong to LVM.
 
-project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project-id\": \"//'  | sed -r 's/\".*$//g'`
+project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
 ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 hostname=`hostname`
 # domain is the last two domain sections, e.g. eqiad.wmflabs
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index 0b62c76..a6fb4f9 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -41,7 +41,7 @@
 fi
 # At this point, all (the rest of) our disk are belong to LVM.
 
-project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project-id\": \"//'  | sed -r 's/\".*$//g'`
+project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
 ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 hostname=`hostname`
 # domain is the last two domain sections, e.g. eqiad.wmflabs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0335b5921070bf98f3ff47c5623693eb73ba5064
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: rake: Limit to commits that touch "*.rb" files

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

Change subject: rake: Limit to commits that touch "*.rb" files
..


rake: Limit to commits that touch "*.rb" files

Don't run 'rake' on every commit in MediaWiki core.

Follows-up 8f0530f7e which did this for rubocop jobs, but that
got lost in the transition to 'rake'.

Bug: T144325
Change-Id: I35a6fd61473e4c8e14dfb505241081b56f338008
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 4a0cce0..0e13520 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -629,6 +629,8 @@
 voting: false
 
   - name: ^rake$
+files:
+ - '^(\.rubocop.*|\.gemspec|.*\.rb|Gemfile$|Gemfile\.lock$)'
 # Rake entry points have not been backported to wmf branches yet
 # -- hashar Nov 10th 2015
 branch: (?!^wmf/1\.27\.0-wmf\.[45])

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a6fd61473e4c8e14dfb505241081b56f338008
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
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] operations/puppet[production]: Labs firstboot.sh: Use the new project_id setting

2016-08-30 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Labs firstboot.sh:  Use the new project_id setting
..

Labs firstboot.sh:  Use the new project_id setting

Bug: T105891
Change-Id: I0335b5921070bf98f3ff47c5623693eb73ba5064
---
M modules/labs_bootstrapvz/files/firstboot.sh
M modules/labs_vmbuilder/files/firstboot.sh
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/307671/1

diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index adc5dee..f11a2e7 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -65,7 +65,7 @@
 fi
 # At this point, all (the rest of) our disk are belong to LVM.
 
-project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project-id\": \"//'  | sed -r 's/\".*$//g'`
+project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
 ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 hostname=`hostname`
 # domain is the last two domain sections, e.g. eqiad.wmflabs
diff --git a/modules/labs_vmbuilder/files/firstboot.sh 
b/modules/labs_vmbuilder/files/firstboot.sh
index 0b62c76..a6fb4f9 100644
--- a/modules/labs_vmbuilder/files/firstboot.sh
+++ b/modules/labs_vmbuilder/files/firstboot.sh
@@ -41,7 +41,7 @@
 fi
 # At this point, all (the rest of) our disk are belong to LVM.
 
-project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project-id\": \"//'  | sed -r 's/\".*$//g'`
+project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
 ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 hostname=`hostname`
 # domain is the last two domain sections, e.g. eqiad.wmflabs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0335b5921070bf98f3ff47c5623693eb73ba5064
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: rake: Set "*.rb" files filter

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

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

Change subject: rake: Set "*.rb" files filter
..

rake: Set "*.rb" files filter

Don't run 'rake' on every commit in MediaWiki core.

Bug: T144325
Change-Id: I35a6fd61473e4c8e14dfb505241081b56f338008
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/70/307670/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 4a0cce0..7b6a840 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -629,6 +629,8 @@
 voting: false
 
   - name: ^rake$
+files:
+ - '^.*\.rb$'
 # Rake entry points have not been backported to wmf branches yet
 # -- hashar Nov 10th 2015
 branch: (?!^wmf/1\.27\.0-wmf\.[45])

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Change-Prop: Rerender summary on wikidata item update

2016-08-30 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Change-Prop: Rerender summary on wikidata item update
..


Change-Prop: Rerender summary on wikidata item update

Reading team requires wikidata description inside the
summary responce. This rule will purge summary endpoint
whenever wikidata item is updated.

Change-Id: Iaded5c5f6b03ee7b5e37712bd753bb93db900657
---
M modules/changeprop/templates/config.yaml.erb
1 file changed, 36 insertions(+), 11 deletions(-)

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



diff --git a/modules/changeprop/templates/config.yaml.erb 
b/modules/changeprop/templates/config.yaml.erb
index 9792086..fdcccec 100644
--- a/modules/changeprop/templates/config.yaml.erb
+++ b/modules/changeprop/templates/config.yaml.erb
@@ -16,17 +16,17 @@
   options:
 host: <%= @purge_host %>
 port: <%= @purge_port %>
-#/{api:sys}/links:
-#  x-modules:
-#- path: src/sys/dep_updates.js
-#  options:
-#templates:
-#  mw_api:
-#  uri: <%= @mwapi_uri %>
-#  headers:
-#host: '{{message.meta.domain}}'
-#  body:
-#formatversion: 2
+/{api:sys}/links:
+  x-modules:
+- path: src/sys/dep_updates.js
+  options:
+templates:
+  mw_api:
+uri: <%= @mwapi_uri %>
+headers:
+  host: '{{message.meta.domain}}'
+body:
+  formatversion: 2
 /{api:sys}/queue:
   x-modules:
 - path: src/sys/kafka.js
@@ -440,3 +440,28 @@
 models: 'reverted|damaging|goodfaith'
 revids: '{{message.rev_id}}'
 precache: true
+
+  # Re-renders summary on WikiData item update
+  wikidata_description:
+topic: mediawiki.revision_create
+match:
+  meta:
+domain: www.wikidata.org
+exec:
+  method: 'post'
+  uri: '/sys/links/wikidata_descriptions'
+  body: '{{globals.message}}'
+
+  on_wikidata_description_change:
+topic: resource_change
+match:
+  meta:
+uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/'
+  tags: [ 'change-prop', 'wikidata' ]
+exec:
+  method: get
+  uri: '<%= @restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri.title}}'
+  headers:
+cache-control: no-cache
+  query:
+redirect: false
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaded5c5f6b03ee7b5e37712bd753bb93db900657
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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/puppet[production]: Specify minute param for git pull cdnjs cron

2016-08-30 Thread Madhuvishy (Code Review)
Madhuvishy has submitted this change and it was merged.

Change subject: Specify minute param for git pull cdnjs cron
..


Specify minute param for git pull cdnjs cron

Change-Id: I0ac70fd21ac8779f13eb0a7f54d38d326b7df3e9
---
M modules/toollabs/manifests/static.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/static.pp 
b/modules/toollabs/manifests/static.pp
index b9ca465..f8b4f5d 100644
--- a/modules/toollabs/manifests/static.pp
+++ b/modules/toollabs/manifests/static.pp
@@ -35,6 +35,7 @@
 command => 'cd /srv/cdnjs && /usr/bin/git pull --depth 1 
https://github.com/cdnjs/cdnjs.git && /usr/local/bin/cdnjs-packages-gen 
/srv/cdnjs /srv/cdnjs/packages.json',
 user=> 'root',
 hour=> 0,
+minute  => 0,
 require => Exec['clone-cdnjs'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ac70fd21ac8779f13eb0a7f54d38d326b7df3e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
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...GeoData[master]: Put most DB operations into a separate class

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

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

Change subject: Put most DB operations into a separate class
..

Put most DB operations into a separate class

The only thing remaining is the API which has its own
ways of DB access, leaving it as it is for now.

Change-Id: Ia1926e25c756514d278e37ac82f5093b746ac969
---
M extension.json
A includes/AbstractStore.php
M includes/GeoData.body.php
M includes/Hooks.php
A includes/Store.php
A tests/phpunit/AbstractStoreTest.php
6 files changed, 306 insertions(+), 64 deletions(-)


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

diff --git a/extension.json b/extension.json
index a9c9b3d..6059da7 100644
--- a/extension.json
+++ b/extension.json
@@ -19,6 +19,7 @@
"GeoDataMagic": "GeoData.i18n.magic.php"
},
"AutoloadClasses": {
+   "GeoData\\AbstractStore": "includes/AbstractStore.php",
"GeoData\\ApiQueryCoordinates": 
"includes/api/ApiQueryCoordinates.php",
"GeoData\\ApiQueryGeoSearch": 
"includes/api/ApiQueryGeoSearch.php",
"GeoData\\ApiQueryGeoSearchDb": 
"includes/api/ApiQueryGeoSearchDb.php",
@@ -33,7 +34,8 @@
"GeoData\\Globe": "includes/Globe.php",
"GeoData\\Hooks": "includes/Hooks.php",
"GeoData\\Math": "includes/Math.php",
-   "GeoData\\Searcher": "includes/Searcher.php"
+   "GeoData\\Searcher": "includes/Searcher.php",
+   "GeoData\\Store": "includes/Store.php"
},
"Hooks": {
"LoadExtensionSchemaUpdates": 
"GeoData\\Hooks::onLoadExtensionSchemaUpdates",
diff --git a/includes/AbstractStore.php b/includes/AbstractStore.php
new file mode 100644
index 000..51ada81
--- /dev/null
+++ b/includes/AbstractStore.php
@@ -0,0 +1,83 @@
+deleteAllCoordinates( $pageId );
+   return;
+   }
+
+   $prevCoords = $this->getAllCoordinates( $pageId );
+   $add = [];
+   $delete = [];
+   // @fixme: this is a fragile assumption
+   $primary = ( isset( $coords[0] ) && $coords[0]->primary ) ? 
$coords[0] : null;
+   foreach ( $prevCoords as $old ) {
+   $delete[$old->id] = $old;
+   }
+   /** @var Coord $new */
+   foreach ( $coords as $new ) {
+   if ( !$new->primary && $new->equalsTo( $primary ) ) {
+   continue; // Don't save secondary coordinates 
pointing to the same place as the primary one
+   }
+   $match = false;
+   foreach ( $delete as $id => $old ) {
+   if ( $new->fullyEqualsTo( $old ) ) {
+   unset( $delete[$id] );
+   $match = true;
+   break;
+   }
+   }
+   if ( !$match ) {
+   $add[] = $new;
+   }
+   }
+
+   $this->deleteCoordinatesById( array_keys( $delete ) );
+   $this->storeCoordinates( $add, $pageId );
+   }
+
+   /**
+* @param int[] $ids
+*/
+   protected abstract function deleteCoordinatesById( array $ids );
+
+   /**
+* @param Coord[] $coords
+* @param int $pageId
+*/
+   protected abstract function storeCoordinates( array $coords, $pageId );
+}
diff --git a/includes/GeoData.body.php b/includes/GeoData.body.php
index e0df02a..c64bb29 100644
--- a/includes/GeoData.body.php
+++ b/includes/GeoData.body.php
@@ -4,6 +4,9 @@
 
 use Title;
 
+/**
+ * @deprecated Use GeoData\Store
+ */
 class GeoData {
/**
 * Returns primary coordinates of the given page, if any
@@ -11,29 +14,18 @@
 * @return Coord|bool Coordinates or false
 */
public static function getPageCoordinates( Title $title ) {
-   $coords = self::getAllCoordinates( $title->getArticleID(), [ 
'gt_primary' => 1 ] );
-   if ( $coords ) {
-   return $coords[0];
-   }
-   return false;
+   $store = new Store( wfGetDB( DB_SLAVE ) );
+   return $store->getPrimaryCoordinates( $title->getArticleID() );
}
 
/**
 * Retrieves all coordinates for the given page id
 *
 * @param int $pageId ID of the page
-* @param array $conds Conditions for Database::select()
-* @param int $dbType Database to select from DB_MASTER or DB_SLAVE
 * @return Coord[]
 */
-   public static function getAllCoordinates( $pageId, $conds = [], $dbType 
= DB_SLAVE ) {
- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Specify minute param for git pull cdnjs cron

2016-08-30 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review.

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

Change subject: Specify minute param for git pull cdnjs cron
..

Specify minute param for git pull cdnjs cron

Change-Id: I0ac70fd21ac8779f13eb0a7f54d38d326b7df3e9
---
M modules/toollabs/manifests/static.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/307668/1

diff --git a/modules/toollabs/manifests/static.pp 
b/modules/toollabs/manifests/static.pp
index b9ca465..f8b4f5d 100644
--- a/modules/toollabs/manifests/static.pp
+++ b/modules/toollabs/manifests/static.pp
@@ -35,6 +35,7 @@
 command => 'cd /srv/cdnjs && /usr/bin/git pull --depth 1 
https://github.com/cdnjs/cdnjs.git && /usr/local/bin/cdnjs-packages-gen 
/srv/cdnjs /srv/cdnjs/packages.json',
 user=> 'root',
 hour=> 0,
+minute  => 0,
 require => Exec['clone-cdnjs'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ac70fd21ac8779f13eb0a7f54d38d326b7df3e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: create shell account for Volker E.

2016-08-30 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: admin: create shell account for Volker E.
..

admin: create shell account for Volker E.

Volker E has requested access to people.wm.org,
no sudo involved, waiting period has passed a while ago.

UID matches existing labs user, which has a @wikimedia.org
email address.

Bug:T143465
Change-Id: I5cb8f1a3dae93f58198597b241f34802d38e3964
---
M modules/admin/data/data.yaml
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/307667/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 435c6ec..b3bd10c 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -2075,3 +2075,11 @@
 ssh_keys:
   - ssh-rsa 
B3NzaC1yc2EBJQAAAQEAhAOVYD/NaXnew0HlVw4i/3LYT6wn6b8D+5Yun2tWRGd8DaODevafjW0Bzf+XwjSNoRIP52ZRM4Vmhg4H6sL4g31FuMfEVgLwjI0WCTxUxIrR2aGuumXRVYRwLOhFkC2RT7TcjTkDzeMa7DijyDxjI9+/rqCgGHcQwIk/c20VYZ4AzHPpGWqeb2JQblDRu/Jz1enmzUt1rwX/4Kxo/lmkLAtJxzVKgNfn13Acj3BSu1w0DIbPBT7EjKCuzKx7ZthanoYIh+BV5KyErp13AB6dxoxSQNfcIbftBoG6idlUSkEqnzednYoVBQSWa4xNaA2NDbjqpxfbMhERRs8FSn9/iw==
 uid: 15297
+  volkere:
+ensure: present
+gid: 500
+name: volkere
+realname: Volker E.
+ssh_keys:
+  - ssh-rsa 
B3NzaC1yc2EDAQABAAACAQDKpQEVtQw8XJCKvG7oNL9d+dveFqRpHCzduUvdzi6MK7zgtY9xUKF7ZcQObgP5fCpgLonDUu2b61WRzYgiPoBkhhnTKqRkCx6sT6KfsHaSE2iZefW5N7qEyRqpWCoXfmGnXJdP3r4cCgxBqdAJ/aoFNcvzpLUrcgw7wfI+gJ6VV897fwkH9SEnjVUxn/AZDAxsK6xa2gDmCUjG+Biwl6LsRCXtop87jtJ6SdgKmDkmGNh8t2y6YJxE0vjYuzNH2E2bEaYOgFRS/GULbNh+U+UqrN3sE4RTHUzAOqXh3iYShpNnwgm9nj41j3Q4h1S51muPEywRz60nU16JfaAvvvA3vyrS2L1P3zB7F+MbvhVVhdprmMvQf7hXbqSNhcxBWwvYfGGA67jy6hDL8WCd8+ql5F7tGw66FxStDjs2GYCiLp0zaDeBkl5Fx9GKjTXD8kCtA7Y8JDLuW1L/7ROX58C8tO6SyHjHHQO4hpSUavieUHt+2CFLYWvGtBZFStdL+esQmOC6qjX1KdwSQxlRXN9D436VxGusVdo3gkbaVvPFVx25gefWrKQ0/a17iU3eDL02sVkNa91Xs3AfeNNTqOv111UfoZjsatva7ZhBujeD131Ky7wolm1IVYtwfF4ifEpgLwjHtSzgfmdMLJSv4IweGYebc71JILMOHZCQGJ3/iw==
 volke...@wikimedia.org
+uid: 12186

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cb8f1a3dae93f58198597b241f34802d38e3964
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add docs for the "pagePropertiesRdf" setting

2016-08-30 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Add docs for the "pagePropertiesRdf" setting
..

Add docs for the "pagePropertiesRdf" setting

Text mostly taken from Stas, per 0f9a06dee8.

Change-Id: I2afd611a8ba5840bdb4c4fa14a2c0888ef21df69
---
M docs/options.wiki
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/docs/options.wiki b/docs/options.wiki
index 56ccc28..46ae251 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -50,6 +50,7 @@
 ;formatterUrlProperty: Property to be used on properties that defines a 
formatter URL which is used to link identifiers. The placeholder 
$1 will be replaced by the identifier. Example: 
https://www.wikidata.org/entity/$1
 ;transformLegacyFormatOnExport: Whether entity revisions stored in a legacy 
format should be converted on the fly while exporting. Enabled per default.
 ;allowEntityImport: allow importing entities via Special:Import and 
importDump.php. Per default, imports are forbidden, since entities defined in 
another wiki would have or use IDs that conflict with entities defined locally.
+;pagePropertiesRdf: array that maps between page properties and Wikibase 
predicates for RDF dumps. Maps from database property name to an array that 
contains a key 'name' (RDF property name, which will be prefixed by wikibase:) 
and an optional key 'type'.
 
 == Client Settings ==
 
@@ -98,4 +99,4 @@
 ;injectRecentChanges: whether changes on the repository should be injected 
into this wiki's recent changes table, so they show up on watchlists, etc. 
Requires the dispatchChanges.php script to run, and this wiki to 
be listed in the localClientDatabases setting on the repository.
 ;showExternalRecentChanges: whether changes on the repository should be 
displayed on Special:RecentChanges, Special:Watchlist, etc on the client wiki. 
In contrast to injectRecentChanges, this setting just removes the 
changes from the user interface. The default is false. This is 
intended to temporarily prevent external changes from showing in order to find 
or fix some issue on a live site.
 ;sendEchoNotification: if true, allows users on the client wiki to get a 
notification when a page they created is connected to a repo item. This 
requires the Echo extension.
-;repoIcon: if sendEchoNotification is set to true, you 
can also provide what icon the user will see. The correct syntax is 
array( 'url' => '...' ) or array( 'path' => '...' ) 
where path is relative to $wgExtensionAssetsPath. 
Defaults to false which means that there will be the default Echo icon.
\ No newline at end of file
+;repoIcon: if sendEchoNotification is set to true, you 
can also provide what icon the user will see. The correct syntax is 
array( 'url' => '...' ) or array( 'path' => '...' ) 
where path is relative to $wgExtensionAssetsPath. 
Defaults to false which means that there will be the default Echo icon.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2afd611a8ba5840bdb4c4fa14a2c0888ef21df69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Implement page props in RDF

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

Change subject: Implement page props in RDF
..


Implement page props in RDF

Adds page props (by configuration) to RDF output like this:

wdata:Q2 a schema:Dataset ;
schema:about wd:Q2 ;
wikibase:sitelinks "1"^^xsd:integer ;
wikibase:statements "5"^^xsd:integer .

Change-Id: I95868d6ae75c4ebf98ff414200fcdcc2155488f1
Bug: T129046
---
M docs/rdf-binding.txt
M repo/config/Wikibase.default.php
M repo/includes/Dumpers/DumpGenerator.php
M repo/includes/Dumpers/RdfDumpGenerator.php
M repo/includes/LinkedData/EntityDataSerializationService.php
M repo/includes/Rdf/RdfBuilder.php
M repo/includes/Rdf/RdfProducer.php
M repo/includes/Rdf/RdfVocabulary.php
M repo/includes/WikibaseRepo.php
M repo/maintenance/dumpRdf.php
M repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q1_info.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q1_simple.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q2_labels.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q3_links.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_claims.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q5_badges.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q6_qualifiers.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_references.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q8_baddates.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/dumpheader.nt
A repo/tests/phpunit/data/rdf/RdfBuilder/prop1.nt
A repo/tests/phpunit/data/rdf/RdfBuilder/prop2.nt
A repo/tests/phpunit/data/rdf/RdfBuilder/prop3.nt
A repo/tests/phpunit/data/rdf/RdfBuilder/prop4.nt
M repo/tests/phpunit/data/rdf/RdfDumpGenerator/empty.nt
M repo/tests/phpunit/data/rdf/RdfDumpGenerator/entities.nt
M repo/tests/phpunit/data/rdf/RdfDumpGenerator/redirect.nt
M repo/tests/phpunit/data/rdf/RdfDumpGenerator/refs.nt
M repo/tests/phpunit/includes/Dumpers/RdfDumpGeneratorTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php
M repo/tests/phpunit/includes/Rdf/RdfBuilderTest.php
M repo/tests/phpunit/maintenance/dumpRdfTest.php
33 files changed, 460 insertions(+), 116 deletions(-)

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



diff --git a/docs/rdf-binding.txt b/docs/rdf-binding.txt
index 60e3d09..ff6210a 100644
--- a/docs/rdf-binding.txt
+++ b/docs/rdf-binding.txt
@@ -7,3 +7,4 @@
 
 0.0.1 - Initial implementation
 0.0.2 - Changed WKT coordinate order (see T130049)
+0.0.3 - Added page props option to wdata: (see T129046)
diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index df2305b..0f8f7c9 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -183,4 +183,13 @@
'http://www.wikidata.org/entity/Q3359' => 'triton',
'http://www.wikidata.org/entity/Q339' => 'pluto'
],
+
+   // Map between page properties and Wikibase predicates
+   // Maps from database property name to array:
+   // name => RDF property name (will be prefixed by wikibase:)
+   // type => type to convert to (optional)
+   'pagePropertiesRdf' => [
+   'wb-sitelinks' => [ 'name' => 'sitelinks', 'type' => 'integer' 
],
+   'wb-claims' => [ 'name' => 'statements', 'type' => 'integer' ],
+   ]
 ];
diff --git a/repo/includes/Dumpers/DumpGenerator.php 
b/repo/includes/Dumpers/DumpGenerator.php
index 5a1a31d..65f6323 100644
--- a/repo/includes/Dumpers/DumpGenerator.php
+++ b/repo/includes/Dumpers/DumpGenerator.php
@@ -29,7 +29,7 @@
 * @var int The max number of entities to process in a single batch.
 *  Also controls the interval for progress reports.
 */
-   private $batchSize = 100;
+   protected $batchSize = 100;
 
/**
 * @var resource File handle for output
@@ -214,6 +214,14 @@
}
 
/**
+* Do something before dumping a batch of entities
+* @param EntityId[] $entities
+*/
+   protected function preBatchDump( $entities ) {
+   $this->entityPrefetcher->prefetch( $entities );
+   }
+
+   /**
 * Do something before dumping entity
 *
 * @param int $dumpCount
@@ -273,7 +281,8 @@
$toLoad[] = $entityId;
}
}
-   $this->entityPrefetcher->prefetch( $toLoad );
+
+   $this->preBatchDump( $toLoad );
 
foreach ( $toLoad as $entityId ) {
try {
diff --git a/repo/includes/Dumpers/RdfDumpGenerator.php 
b/repo/includes/Dumpers/RdfDumpGenerator.php
index 673db5f..97cf5ef 100644
--- a/repo/includes/Dumpers/RdfDumpGenerator.php
+++ b/repo/includes/Dumpers/RdfDumpGenerator.php
@@ -5,12 +5,14 @@
 use InvalidArgumentException;
 use MWContentSerializationException;
 use MWException;
+use PageProps;
 use SiteList;
 use Wikibase\DataModel\Entity\EntityId;
 use 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: partman/cassandra: rename recipes, delete unused recipes

2016-08-30 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: partman/cassandra: rename recipes, delete unused recipes
..

partman/cassandra: rename recipes, delete unused recipes

Change-Id: I352b73878036dbc4c56f75d2d41f7e7844adb465
---
M modules/install_server/files/autoinstall/netboot.cfg
D modules/install_server/files/autoinstall/partman/cassandrahosts-2ssd-srv.cfg
M modules/install_server/files/autoinstall/partman/cassandrahosts-2ssd.cfg
D modules/install_server/files/autoinstall/partman/cassandrahosts-3ssd-srv.cfg
M modules/install_server/files/autoinstall/partman/cassandrahosts-3ssd.cfg
D modules/install_server/files/autoinstall/partman/cassandrahosts-4ssd-srv.cfg
M modules/install_server/files/autoinstall/partman/cassandrahosts-4ssd.cfg
R modules/install_server/files/autoinstall/partman/cassandrahosts-5ssd.cfg
8 files changed, 15 insertions(+), 222 deletions(-)


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

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 19682fe..419e40a 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -61,7 +61,7 @@
 helium|potassium|tmh1002|hydrogen|chromium) echo 
partman/raid1-1partition.cfg ;; \
 
lawrencium|netmon1001|notebook1001|notebook1002|stat1002|tungsten|labsdb100[0-9]|labsdb101[0-1])
 echo partman/db.cfg ;; \
 carbon|stat1003) echo partman/raid5-gpt-lvm.cfg ;; \
-cerium|praseodymium|xenon) echo partman/cassandrahosts-3ssd-srv.cfg ;; 
\
+cerium|praseodymium|xenon) echo partman/cassandrahosts-3ssd.cfg ;; \
 conf100[123]) echo partman/raid1-lvm-conf.cfg ;; \
 conf200[123]) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 contint1001) echo partman/ci-master.cfg ;; \
@@ -128,11 +128,11 @@
 puppetmaster200[1-2]) echo partman/raid1-lvm-ext4.cfg;;\
 pybal-test200[1-3]) echo partman/flat.cfg virtual.cfg;; \
 rdb100[1-6]) echo partman/mw.cfg ;; \
-restbase100[0-9]) echo partman/cassandrahosts-5ssd-srv.cfg ;; \
-restbase101[0-5]) echo partman/cassandrahosts-5ssd-srv.cfg ;; \
-restbase-test2*) echo partman/cassandrahosts-2ssd-srv.cfg ;; \
-restbase200[1-6]) echo partman/cassandrahosts-5ssd-srv.cfg ;; \
-restbase200[7-9]) echo partman/cassandrahosts-4ssd-srv.cfg ;; \
+restbase100[0-9]) echo partman/cassandrahosts-5ssd.cfg ;; \
+restbase101[0-5]) echo partman/cassandrahosts-5ssd.cfg ;; \
+restbase-test2*)  echo partman/cassandrahosts-2ssd.cfg ;; \
+restbase200[1-6]) echo partman/cassandrahosts-5ssd.cfg ;; \
+restbase200[7-9]) echo partman/cassandrahosts-4ssd.cfg ;; \
 rhenium) echo partman/raid1-gpt.cfg ;; \
 sarin) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 analytics1003|sc[ab]200[1-2]|sinistra) echo 
partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
diff --git 
a/modules/install_server/files/autoinstall/partman/cassandrahosts-2ssd-srv.cfg 
b/modules/install_server/files/autoinstall/partman/cassandrahosts-2ssd-srv.cfg
deleted file mode 100644
index 890a80d..000
--- 
a/modules/install_server/files/autoinstall/partman/cassandrahosts-2ssd-srv.cfg
+++ /dev/null
@@ -1,69 +0,0 @@
-# Automatic software RAID partitioning
-#
-# * 2 SSD, sda, sdb
-# * LVM
-# * layout:
-#   - /:   ext4, RAID1
-#   - swap:   RAID1, 1GB
-#   - /srv: RAID0, on ssd
-
-d-ipartman-auto/method string  raid
-d-ipartman-md/device_remove_md boolean true
-d-ipartman-lvm/device_remove_lvm   boolean true
-d-ipartman/alignment   select  optimal
-
-d-ipartman-auto/disk   string  /dev/sda /dev/sdb
-d-ipartman-auto/choose_recipe select raid1-root
-
-# Define physical partitions
-d-ipartman-auto/expert_recipe  string  \
-   raid1-root ::   \
-   3   1   3   raid\
-   $primary{ } method{ raid }  \
-   $lvmignore{ }   \
-   .   \
-   10002   1000raid\
-   $primary{ } method{ raid }  \
-   $lvmignore{ }   \
-   .   \
-   10  3   -1  raid\
-   $primary{ } method{ raid }  \
-   $lvmignore{ }   \
-   .   \
-   10   4  -1  ext4\
-   $lvmok{ }   \
-  

[MediaWiki-commits] [Gerrit] mediawiki...ZeroBanner[master]: Add basic test for Zero

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

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

Change subject: Add basic test for Zero
..

Add basic test for Zero

If the module loads with an error we should complain.
ZeroBanner tests are run in MobileFrontend so this will prevent
further breakages to this module.

Bug: T143425
Change-Id: I5921acd85ef16defb9df5fdabd7355e2842c8550
---
M ZeroBanner.php
A includes/TestHooks.php
A tests/test_zerobanner.js
3 files changed, 55 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/64/307664/1

diff --git a/ZeroBanner.php b/ZeroBanner.php
index 68fec3a..ef92825 100644
--- a/ZeroBanner.php
+++ b/ZeroBanner.php
@@ -45,6 +45,7 @@
'ApiRawJsonPrinter' => 'ApiZeroBanner',
'ApiZeroBanner',
'PageRendering',
+   'TestHooks',
'PageRenderingHooks',
'ZeroConfig',
'ZeroSpecialPage'
@@ -179,6 +180,8 @@
 $wgHooks['MakeGlobalVariablesScript'][] = $hook . 
'onMakeGlobalVariablesScript';
 $wgHooks['SpecialMobileEditWatchlist::images'][] = $hook . 
'onSpecialMobileEditWatchlist_images';
 
+$wgHooks['ResourceLoaderTestModules'][] = 
'ZeroBanner\\TestHooks::onResourceLoaderTestModules';
+
 $wgAPIModules['zeroconfig'] = 'ZeroBanner\ApiZeroBanner';
 
 // Define constants but don't add them to the namespace list - they will be 
used for external access only
diff --git a/includes/TestHooks.php b/includes/TestHooks.php
new file mode 100644
index 000..f118f81
--- /dev/null
+++ b/includes/TestHooks.php
@@ -0,0 +1,43 @@
+https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
+*
+* @param array $testModules
+* @param ResourceLoader $resourceLoader
+* @return bool
+*/
+   public static function onResourceLoaderTestModules( array &$testModules,
+   ResourceLoader &$resourceLoader
+   ) {
+   $testModule = [
+   'dependencies' => [ 'zerobanner' ],
+   'localBasePath' => __DIR__ . '/../tests/',
+   'remoteExtPath' => 'ZeroBanner',
+   'targets' => [ 'mobile', 'desktop' ],
+   'scripts' => [
+   'test_zerobanner.js',
+   ]
+   ];
+
+   // Expose templates module
+   $testModules['qunit']["tests.zero"] = $testModule;
+   return true;
+   }
+}
diff --git a/tests/test_zerobanner.js b/tests/test_zerobanner.js
new file mode 100644
index 000..859fe7c
--- /dev/null
+++ b/tests/test_zerobanner.js
@@ -0,0 +1,9 @@
+( function ( M, $ ) {
+   QUnit.module( 'Zero' );
+
+   QUnit.test( '#init', 1, function ( assert ) {
+   assert.ok( mw.loader.getState( 'zerobanner' ) === 'ready',
+   'check Zero banner module installed without problems' );
+   } );
+
+}( mw.mobileFrontend, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5921acd85ef16defb9df5fdabd7355e2842c8550
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add the best CSS rule to notifications: word-break: break-word;

2016-08-30 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: Add the best CSS rule to notifications: word-break: break-word;
..

Add the best CSS rule to notifications: word-break: break-word;

Add word-break: break-word; so we make sure even long names or titles
without spaces are broken/wrapped where they need to.

Bug: T142662
Change-Id: I166e834495972ec49eb98e301ab9be85f40f5a5e
---
M modules/styles/mw.echo.ui.NotificationItemWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 6ca16de..55470dd 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -55,6 +55,7 @@
// The 'mark as read' circle is placed with a right
// margin of -1em
padding-right: 1em;
+   word-break: break-word;
 
&-header {
color: @notification-text-color;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.Title: Correct handling of Unicode whitespace and bidi co...

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

Change subject: mw.Title: Correct handling of Unicode whitespace and bidi 
control characters
..


mw.Title: Correct handling of Unicode whitespace and bidi control characters

MediaWiki titles may not contain Unicode bidi control characters, e.g.
U+200E LEFT-TO-RIGHT MARK. They are silently stripped and such a
title is considered valid.

MediaWiki titles may not contain any whitespace other than a regular
space. Most of them are silently replaced with a regular space and
such a title is considered valid, but there are some (e.g. the tab
character) which make the title invalid. I'm not sure if this is an
intentional behavior, but I added a test case to verify it.

Bug: T143759
Change-Id: If8fad1f896027c5d93a62b0785923a39136c6a36
---
M resources/src/mediawiki/mediawiki.Title.js
M tests/phpunit/includes/TitleTest.php
M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
3 files changed, 20 insertions(+), 21 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.Title.js 
b/resources/src/mediawiki/mediawiki.Title.js
index 4c57faa..e468768 100644
--- a/resources/src/mediawiki/mediawiki.Title.js
+++ b/resources/src/mediawiki/mediawiki.Title.js
@@ -164,9 +164,12 @@
'|

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Remove bunyan from Parsoid settings

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

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

Change subject: Remove bunyan from Parsoid settings
..

Remove bunyan from Parsoid settings

Change-Id: Ice4f58ec3fa6c895e063c9ba2e136dec426959d9
---
M puppet/modules/parsoid/templates/localsettings.js.erb
1 file changed, 0 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/61/307661/1

diff --git a/puppet/modules/parsoid/templates/localsettings.js.erb 
b/puppet/modules/parsoid/templates/localsettings.js.erb
index b95d086..47f15b2 100644
--- a/puppet/modules/parsoid/templates/localsettings.js.erb
+++ b/puppet/modules/parsoid/templates/localsettings.js.erb
@@ -14,27 +14,4 @@
 <%- if @allow_cors -%>
 parsoidConfig.allowCORS = '<%= @allow_cors %>';
 <%- end %>
-
-// Direct logs to logstash via bunyan and gelf-stream.
-// To enable Logstash on MediaWiki-Vagrant:
-//   vagrant roles enable elk; vagrant provision
-//
-// See `vagrant roles info elk` for more information.
-parsoidConfig.loggerBackend = {
-  name: ':Logger.bunyan/BunyanLogger',
-  options: {
-name: 'parsoid',
-streams: [
-  {
-path: '<%= @log_file %>',
-level: '<%= @loglev %>'
-  },
-  {
-type: 'raw',
-stream: require('gelf-stream').forBunyan('127.0.0.1', 12201),
-level: '<%= @loglev %>'
-  }
-]
-  }
-};
 };

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix CirrusSearch BM25 A/B test similiraty config

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

Change subject: Fix CirrusSearch BM25 A/B test similiraty config
..


Fix CirrusSearch BM25 A/B test similiraty config

Using 'default' has a special meaning and cause the main query to be
different from what we adjusted with relforge.
Fixed also redirect into redirect.title, the mapping config builder
uses redirect.title as a field name to fetch its similarity.

Change-Id: I24b1834c690ab78f393e7dda9a6cb7278e6b66ef
---
M wmf-config/CirrusSearch-common.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index e6a6854..d9407f6 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -250,17 +250,17 @@
'k1' => 1.2,
'b' => 0.3,
],
-   'default' => [
+   'text' => [
'type' => 
'BM25',
'k1' => 1.2,
'b' => 0.75,
],
],
'fields' => [
-   '__default__' => 
'default',
+   '__default__' => 'text',
'category' => 'arrays',
'heading' => 'arrays',
-   'redirect' => 'arrays',
+   'redirect.title' => 
'arrays',
'suggest' => 'arrays',
],
],

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: logging: Require acknowledgment of kafka logging

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

Change subject: logging: Require acknowledgment of kafka logging
..


logging: Require acknowledgment of kafka logging

A new patch to core, I859dc7910, enables the kafka logging pipeline to
require acknowledgement from the kafka servers that the messages were
recieved. If the messages are not received it will log an error (to a
non-kafka channel).

Bug: T135159
Change-Id: Idb8af549acd17fb4450a4eaeae9b1cbb6cb876e2
---
M wmf-config/logging.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index e0d4665..45a8eb4 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -245,6 +245,7 @@
'logExceptions' => 
'wfDebugLogFile',
'sendTimeout' => 0.01,
'recvTimeout' => 0.5,
+   'requireAck' => 1,
],
],
'formatter' => 'avro'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb8af549acd17fb4450a4eaeae9b1cbb6cb876e2
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labsprojectfrommetadata: use jq instead of trying to parse J...

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

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

Change subject: labsprojectfrommetadata: use jq instead of trying to parse JSON 
with regex
..

labsprojectfrommetadata: use jq instead of trying to parse JSON with regex

Change-Id: I0dbaf6d9304dfce1542bc17a96dccd20df3fe33a
---
M modules/base/lib/facter/labsprojectfrommetadata.rb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/307660/1

diff --git a/modules/base/lib/facter/labsprojectfrommetadata.rb 
b/modules/base/lib/facter/labsprojectfrommetadata.rb
index 0725e10..8d738d3 100644
--- a/modules/base/lib/facter/labsprojectfrommetadata.rb
+++ b/modules/base/lib/facter/labsprojectfrommetadata.rb
@@ -9,8 +9,8 @@
 domain = Facter::Util::Resolution.exec("hostname -d").chomp
 if (domain.end_with? ".wmflabs") || (domain.end_with? ".labtest")
   # query the nova metadata service at 169.254.169.254
-  metadata = Facter::Util::Resolution.exec("curl -f 
http://169.254.169.254/openstack/2015-10-15/meta_data.json/ 2> /dev/null").chomp
-  metadata[/project_id\":\ \"(.*)\",/, 1]
+  metadata = Facter::Util::Resolution.exec("curl -f 
http://169.254.169.254/openstack/2015-10-15/meta_data.json/ 2> /dev/null | jq 
'.project_id'").chomp
+  metadata.slice(1, metadata.length - 2) # strip quotes
 else
   nil
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dbaf6d9304dfce1542bc17a96dccd20df3fe33a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: Add wikidiff2 directory

2016-08-30 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: releases: Add wikidiff2 directory
..


releases: Add wikidiff2 directory

This allows MediaWiki releasers to upload releases for the wikidiff2 PHP
extension.

Change-Id: I8df7f56326fa755f2466f491b5b48d16bedfd1c5
---
M modules/releases/manifests/init.pp
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 2d607d8..ba804a3 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -38,6 +38,14 @@
 require => File['/srv/org/wikimedia/releases'],
 }
 
+file { '/srv/org/wikimedia/releases/wikidiff2':
+ensure  => 'directory',
+mode=> '2775',
+owner   => 'root',
+group   => 'releasers-mediawiki',
+require => File['/srv/org/wikimedia/releases'],
+}
+
 include ::apache::mod::rewrite
 include ::apache::mod::headers
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8df7f56326fa755f2466f491b5b48d16bedfd1c5
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
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]: OutputPage: Ensure setupSkinUserCss() always applies to head...

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

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

Change subject: OutputPage: Ensure setupSkinUserCss() always applies to 
headElement()
..

OutputPage: Ensure setupSkinUserCss() always applies to headElement()

Follows-up 80e5b160e0, which had to move this call out of the
headElement() and buildCssLinks() methods as it was no longer
allowed to modify the module queue after it was created.

It was was moved to OutputPage::output(), right before Skin::outputPage()
is called, which ends up calling headElement().

The point in time was effectively unchanged for page views.

However for the caller in ApiParse() this meant setupSkinUserCss()
no longer got called at all as it never calls output(), but instead
calls headElement() directly.

Move it to getRlClient(), which is where we set all other OutputPage-specific
things relating to module loading already.

* For page views this has no impact.
* For ApiParse it means headElement(), which calls getRlClient(),
  will once again include skin stylesheets.

Bug: T144301
Change-Id: I5fd4a27fb2d70b98ce9161dc050788d8ac364110
---
M includes/OutputPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/307659/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 1083687..5aaa474 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2303,7 +2303,6 @@
// Hook that allows last minute changes to the output 
page, e.g.
// adding of CSS or Javascript by extensions.
Hooks::run( 'BeforePageDisplay', [ &$this, &$sk ] );
-   $this->getSkin()->setupSkinUserCss( $this );
 
try {
$sk->outputPage();
@@ -2675,6 +2674,7 @@
'user.styles',
'user.cssprefs',
] );
+   $this->getSkin()->setupSkinUserCss( $this );
 
// Prepare exempt modules for buildExemptModules()
$exemptGroups = [ 'site' => [], 'noscript' => [], 
'private' => [], 'user' => [] ];

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

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

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


Merge branch 'master' into deployment

9193318 Fix dumb omitted return statement
4717a1b Fix one more oversight with record capture job

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I718dfa4d0b24139c442ebe4e01d605285e4ee5ca
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
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] operations/puppet[production]: releases: Set mediawiki directory to 2775

2016-08-30 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: releases: Set mediawiki directory to 2775
..


releases: Set mediawiki directory to 2775

Change-Id: I802c56b463f39bc272859a471b917a769f5c2cbc
---
M modules/releases/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 2fa38d1..2d607d8 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -32,7 +32,7 @@
 
 file { '/srv/org/wikimedia/releases/mediawiki':
 ensure  => 'directory',
-mode=> '0775',
+mode=> '2775',
 owner   => 'root',
 group   => 'releasers-mediawiki',
 require => File['/srv/org/wikimedia/releases'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I802c56b463f39bc272859a471b917a769f5c2cbc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Dzahn 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: Set mediawiki directory to 2775

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

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

Change subject: releases: Set mediawiki directory to 2775
..

releases: Set mediawiki directory to 2775

Change-Id: I802c56b463f39bc272859a471b917a769f5c2cbc
---
M modules/releases/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/307658/1

diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 2fa38d1..2d607d8 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -32,7 +32,7 @@
 
 file { '/srv/org/wikimedia/releases/mediawiki':
 ensure  => 'directory',
-mode=> '0775',
+mode=> '2775',
 owner   => 'root',
 group   => 'releasers-mediawiki',
 require => File['/srv/org/wikimedia/releases'],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I802c56b463f39bc272859a471b917a769f5c2cbc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Preserve data when switching from NWE to VE

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

Change subject: Preserve data when switching from NWE to VE
..


Preserve data when switching from NWE to VE

Bug: T143917
Change-Id: I910e731914bd71fdb131dae79d233d4306facc5d
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
2 files changed, 32 insertions(+), 5 deletions(-)

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



diff --git 
a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
index 97290df..1eb0839 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
@@ -75,11 +75,28 @@
this.reloadSurface( dataPromise );
 };
 
+/**
+ * Switch to the visual editor.
+ */
 ve.init.mw.DesktopWikitextArticleTarget.prototype.switchToVisualEditor = 
function () {
+   var dataPromise;
+
this.setMode( 'visual' );
-   this.reloadSurface();
+
+   dataPromise = mw.libs.ve.targetLoader.requestParsoidData(
+   this.pageName,
+   this.requestedRevId,
+   this.constructor.name,
+   this.edited,
+   this.getWikitextFromDocument( this.getSurface().getDom() )
+   );
+
+   this.reloadSurface( dataPromise );
 };
 
+/**
+ * Reload the target surface in the new editor mode
+ */
 ve.init.mw.DesktopWikitextArticleTarget.prototype.reloadSurface = function ( 
dataPromise ) {
var target = this;
// Create progress - will be discarded when surface is destroyed.
@@ -228,7 +245,7 @@
if ( this.mode === 'source' ) {
data = ve.extendObject( {}, options, { format: 'json' } );
 
-   data.wikitext = Array.prototype.map.call( doc.body.children, 
function ( p ) { return p.innerText; } ).join( '\n' );
+   data.wikitext = this.getWikitextFromDocument( doc );
 
return new mw.Api().post( data, { contentType: 
'multipart/form-data' } );
} else {
@@ -237,6 +254,16 @@
}
 };
 
+/**
+ * Get wikitext for the whole document
+ *
+ * @param {ve.dm.Document} doc Document
+ * @return {string} Wikitext
+ */
+ve.init.mw.DesktopWikitextArticleTarget.prototype.getWikitextFromDocument = 
function ( doc ) {
+   return Array.prototype.map.call( doc.body.children, function ( p ) { 
return p.innerText; } ).join( '\n' );
+};
+
 /* Registration */
 
 ve.init.mw.targetFactory.register( ve.init.mw.DesktopWikitextArticleTarget );
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
index c1ded97..4640340 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
@@ -113,7 +113,7 @@
}
},
 
-   requestParsoidData: function ( pageName, oldid, targetName, 
modified ) {
+   requestParsoidData: function ( pageName, oldid, targetName, 
modified, wikitext ) {
var start, apiXhr, restbaseXhr, apiPromise, 
restbasePromise, dataPromise, pageHtmlUrl,
switched = false,
fromEditedState = false,
@@ -151,7 +151,7 @@
ve.track( 'trace.restbaseLoad.enter' );
if (
conf.fullRestbaseUrl &&
-   $( '#wpTextbox1' ).textSelection( 
'getContents' ) &&
+   ( wikitext || ( wikitext = $( 
'#wpTextbox1' ).textSelection( 'getContents' ) ) ) &&
!$( '[name=wpSection]' ).val()
) {
switched = true;
@@ -166,7 +166,7 @@
data: {
title: pageName,
oldid: oldid,
-   wikitext: $( 
'#wpTextbox1' ).textSelection( 'getContents' ),
+   wikitext: wikitext,
stash: 'true'
},
// Should be synchronised with 
ApiVisualEditor.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I910e731914bd71fdb131dae79d233d4306facc5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: puppetize ownership of /srv/org/wikimedia/releases...

2016-08-30 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: releases: puppetize ownership of 
/srv/org/wikimedia/releases/mediawiki
..


releases: puppetize ownership of /srv/org/wikimedia/releases/mediawiki

Change-Id: I82cfeed7699e79ef9f4979e66628d54a46740f1a
---
M modules/releases/manifests/init.pp
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 33150f5..2fa38d1 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -30,6 +30,14 @@
 ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
 ensure_resource('file', '/srv/org/wikimedia/releases', {'ensure' => 
'directory' })
 
+file { '/srv/org/wikimedia/releases/mediawiki':
+ensure  => 'directory',
+mode=> '0775',
+owner   => 'root',
+group   => 'releasers-mediawiki',
+require => File['/srv/org/wikimedia/releases'],
+}
+
 include ::apache::mod::rewrite
 include ::apache::mod::headers
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82cfeed7699e79ef9f4979e66628d54a46740f1a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
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] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

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

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

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

Merge branch 'master' into deployment

9193318 Fix dumb omitted return statement
4717a1b Fix one more oversight with record capture job

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/57/307657/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I718dfa4d0b24139c442ebe4e01d605285e4ee5ca
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[refs/meta/config]: Set permissions like mediawiki-config

2016-08-30 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Set permissions like mediawiki-config
..


Set permissions like mediawiki-config

Change-Id: I4b06b6ff60d3b2dc2d85d9f4e43a7f8306281537
---
M groups
M project.config
2 files changed, 18 insertions(+), 4 deletions(-)

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



diff --git a/groups b/groups
index 27cdbb7..ead8419 100644
--- a/groups
+++ b/groups
@@ -1,3 +1,7 @@
-# UUID Group Name
+# UUID Group Name
 #
-93b1e277b72d0e0a883afbc0a87948dd6dd0d7b7   Project and Group Creators
+2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2   JenkinsBot
+3fdcf8fd0d569e90a3e9b39788a29f2c50d33be9   wmf-deployment
+6aec730b12a6e11add70e4f248fcc33b75e47e5c   Administrators
+global:Anonymous-Users Anonymous Users
+ldap:cn=ops,ou=groups,dc=wikimedia,dc=org  ldap/ops
diff --git a/project.config b/project.config
index 7e58404..77edfc9 100644
--- a/project.config
+++ b/project.config
@@ -1,4 +1,14 @@
 [access]
-   inheritFrom = analytics
+   inheritFrom = All-Projects
 [access "refs/*"]
-   owner = group Project and Group Creators
+   owner = group Administrators
+   owner = group ldap/ops
+   owner = group wmf-deployment
+   read = group Anonymous Users
+   create = group ldap/ops
+   create = group wmf-deployment
+   forgeCommitter = group wmf-deployment
+   pushMerge = group wmf-deployment
+   submit = group JenkinsBot
+   submit = group ldap/ops
+   submit = group wmf-deployment

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b06b6ff60d3b2dc2d85d9f4e43a7f8306281537
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: refs/meta/config
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[wmf/1.28.0-wmf.17]: Followup I7ad9dd5b436: Truncate title in item label

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

Change subject: Followup I7ad9dd5b436: Truncate title in item label
..


Followup I7ad9dd5b436: Truncate title in item label

Bug: T132975
Change-Id: I8fc3ec881fdf04e5f6d95f5a87bb62eb04df3086
(cherry picked from commit 33e5b79c852946833c89cf6de907a16770f502bf)
---
M includes/Notifications/FlowPresentationModel.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Notifications/FlowPresentationModel.php 
b/includes/Notifications/FlowPresentationModel.php
index c510f98..873a751 100644
--- a/includes/Notifications/FlowPresentationModel.php
+++ b/includes/Notifications/FlowPresentationModel.php
@@ -210,7 +210,7 @@
$link['label'] = $this
->msg( 'notification-dynamic-actions-flow-' . $type . 
'-unwatch' )
->params(
-   $title->getPrefixedText(),
+   $stringPageTitle,
$title->getFullURL( $query )
)
->parse();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fc3ec881fdf04e5f6d95f5a87bb62eb04df3086
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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...SmashPig[master]: Fix one more oversight with record capture job

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

Change subject: Fix one more oversight with record capture job
..


Fix one more oversight with record capture job

Wrong way to refer to class

Change-Id: I90b244c81891e8bc1d6f4e2f2be7db6d895cea9e
---
M CrmLink/Messages/DonationInterfaceMessage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index 2dbb3be..c89d137 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -47,7 +47,7 @@
foreach ( $values as $key => $value ) {
// If we're creating this from a database row with some 
extra
// info such as the pending_id, only include the real 
properties
-   if( property_exists( 'DonationInterfaceMessage', $key ) 
) {
+   if( property_exists( get_called_class(), $key ) ) {
$message->$key = $value;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90b244c81891e8bc1d6f4e2f2be7db6d895cea9e
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Siebrand 
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...Echo[wmf/1.28.0-wmf.17]: Follow-up 191a3309eb: merge duplicate skinStyles for monobook

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

Change subject: Follow-up 191a3309eb: merge duplicate skinStyles for monobook
..


Follow-up 191a3309eb: merge duplicate skinStyles for monobook

This caused text in the notifications popup to be right-aligned
in Monobook, because the stylesheet overriding this was ignored.

Change-Id: Ibf76465996abc7bc218dbf94f1d4a54e445d3693
(cherry picked from commit 7b2fc76f8859d298a8b49c094e6d2f38f1052b40)
---
M Resources.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index c92082d..05b725b 100644
--- a/Resources.php
+++ b/Resources.php
@@ -95,6 +95,7 @@
'skinStyles' => array(
'monobook' => array(

'styles/mw.echo.ui.NotificationsListWidget.monobook.less',
+   'styles/mw.echo.ui.overlay.monobook.less',
),
'modern' => array(

'styles/mw.echo.ui.NotificationItemWidget.modern.less',
@@ -104,9 +105,6 @@
),
'minerva' => array(
'styles/mw.echo.ui.overlay.minerva.less',
-   ),
-   'monobook' => array(
-   'styles/mw.echo.ui.overlay.monobook.less',
)
),
'dependencies' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf76465996abc7bc218dbf94f1d4a54e445d3693
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.17
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: wmflib: Return default dir when role::puppet::self isn't used

2016-08-30 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: wmflib: Return default dir when role::puppet::self isn't used
..

wmflib: Return default dir when role::puppet::self isn't used

Change-Id: Ia59e587ff56fce628556fe556f9fa9f759b82945
---
M modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/307656/1

diff --git a/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb 
b/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb
index 58cbad9..796dcb0 100644
--- a/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb
+++ b/modules/wmflib/lib/puppet/parser/functions/puppet_ssldir.rb
@@ -45,10 +45,12 @@
 # Since all self-hosted puppetmasters are in .eqiad.wmflabs, while
 # the labs masters don't
 return default if lookupvar('::settings::certname') =~ /\.wikimedia\.org$/
-
 # Non-self-hosted puppetmasters all use the default ssldir
 puppetmaster = lookupvar('puppetmaster')
-puppetmaster ||= function_hiera(['role::puppet::self::master', ''])
+puppetmaster ||= function_hiera(['role::puppet::self::master', nil])
+if puppetmaster == nil
+  # Means we aren't using any of role::puppet::self!1!
+  default
 if [lookupvar('hostname'), 'localhost', '', nil].include?puppetmaster
   self_master
 else

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia59e587ff56fce628556fe556f9fa9f759b82945
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Increase ADB timeout

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

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

Change subject: Increase ADB timeout
..

Increase ADB timeout

ADB times out in the rare scenario where a new emulator image must be
created on CI instead of started from a snapshot. 15 minutes is a long
time but CI is really slow.

Change-Id: I1d536c789bf9f7cf5ad3445b8467b2dee21937f0
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/55/307655/1

diff --git a/app/build.gradle b/app/build.gradle
index 48a86aa..cf0d5a0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -17,7 +17,7 @@
 final Properties PROD_PROPS = loadProperties(PROD_PROPS_FILE)
 final Properties REPO_PROPS = loadProperties(REPO_PROPS_FILE)
 
-final int ADB_TIMEOUT = TimeUnit.MINUTES.toMillis(5)
+final int ADB_TIMEOUT = TimeUnit.MINUTES.toMillis(15)
 final boolean continuousIntegrationBuild = System.getenv('JENKINS_HOME') != 
null
 final boolean preDexEnabled = hasProperty('pre.dex') ?
 Boolean.valueOf(getProperty('pre.dex').toString()) :

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d536c789bf9f7cf5ad3445b8467b2dee21937f0
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Wikidata description taglines on all projects...

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

Change subject: Enable Wikidata description taglines on all projects...
..


Enable Wikidata description taglines on all projects...

... except top 6 wikis.

Bug: T143344
Change-Id: If657847f50ef3375b5225b93816b3ec1c598bc7c
---
A dblists/nowikidatadescriptiontaglines.dblist
D dblists/wikidatadescriptions.dblist
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
4 files changed, 10 insertions(+), 9 deletions(-)

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



diff --git a/dblists/nowikidatadescriptiontaglines.dblist 
b/dblists/nowikidatadescriptiontaglines.dblist
new file mode 100644
index 000..e2c80b9
--- /dev/null
+++ b/dblists/nowikidatadescriptiontaglines.dblist
@@ -0,0 +1,6 @@
+ruwiki
+frwiki
+dewiki
+eswiki
+jawiki
+enwiki
diff --git a/dblists/wikidatadescriptions.dblist 
b/dblists/wikidatadescriptions.dblist
deleted file mode 100644
index 7979cba..000
--- a/dblists/wikidatadescriptions.dblist
+++ /dev/null
@@ -1,5 +0,0 @@
-testwikidatawiki
-testwiki
-test2wiki
-cawiki
-plwiki
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5028826..0970815 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -166,7 +166,7 @@
foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-nondefault',
'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho', 'mobilemainpagelegacy', 
'clldefault', 'wikidatadescriptions'
+   'wikitech', 'nonecho', 'mobilemainpagelegacy', 
'clldefault', 'nowikidatadescriptiontaglines'
] as $tag ) {
$dblist = MWWikiversions::readDbListFile( $tag );
if ( in_array( $wgDBname, $dblist ) ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4ef3041..a68ed22 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14468,11 +14468,11 @@
 ],
 'wgMFDisplayWikibaseDescriptions' => [
'default' => [
-   'search' => true, 'nearby' => true, 'watchlist' => true, 
'tagline' => false
-   ],
-   'wikidatadescriptions' => [
'search' => true, 'nearby' => true, 'watchlist' => true, 
'tagline' => true
],
+   'nowikidatadescriptiontaglines' => [
+   'search' => true, 'nearby' => true, 'watchlist' => true, 
'tagline' => false
+   ],
 ],
 'wmgMFMobileFormatterHeadings' => [
'default' => [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add rm -fR "$WORKSPACE/modules/*/bin" to jenkins job operati...

2016-08-30 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Add rm -fR "$WORKSPACE/modules/*/bin" to jenkins job 
operations-puppet-doc
..

Add rm -fR "$WORKSPACE/modules/*/bin" to jenkins job operations-puppet-doc

Per https://phabricator.wikimedia.org/T143233#2580487

Bug: T143233
Change-Id: If92379eea44e12859d3fb14a53075064f30ac50c
---
M jjb/operations-puppet.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/54/307654/1

diff --git a/jjb/operations-puppet.yaml b/jjb/operations-puppet.yaml
index 0152ef6..4a35305 100644
--- a/jjb/operations-puppet.yaml
+++ b/jjb/operations-puppet.yaml
@@ -37,6 +37,7 @@
  - shell: |
 # Destination dir must not exist or 'puppet doc' complains
 rm -fR "$WORKSPACE/doc"
+rm -fR "$WORKSPACE/modules/*/bin"
 
 cd "$WORKSPACE/src"
 /usr/bin/puppet doc \

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia/slimapp[master]: Update ParsoidClient to talk to RESTBase

2016-08-30 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Update ParsoidClient to talk to RESTBase
..

Update ParsoidClient to talk to RESTBase

Call the RESTBase wikitext-to-html endpoint rather than directly
interacting with Parsoid.

Bug: T114186
Change-Id: I96947882b89df29026fc19e482a011bd426beb58
---
M src/ParsoidClient.php
1 file changed, 19 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/slimapp 
refs/changes/53/307653/1

diff --git a/src/ParsoidClient.php b/src/ParsoidClient.php
index c257485..b547087 100644
--- a/src/ParsoidClient.php
+++ b/src/ParsoidClient.php
@@ -18,7 +18,7 @@
  * .
  *
  * @file
- * @copyright © 2015 Bryan Davis, Wikimedia Foundation and contributors.
+ * @copyright © 2016 Bryan Davis, Wikimedia Foundation and contributors.
  */
 
 namespace Wikimedia\Slimapp;
@@ -26,11 +26,15 @@
 use Psr\Log\LoggerInterface;
 
 /**
- * Simple client for sending wikitext to parsoid to be converted into html.
+ * Simple client for sending wikitext to RESTBase to be converted into html.
+ *
+ * The class name predates the switch from Parsoid to RESTBase as the backing
+ * API provider. RESTBase still talks to Parsoid under the covers.
  *
  * @author Bryan Davis 
- * @copyright © 2015 Bryan Davis, Wikimedia Foundation and contributors.
- * @see https://www.mediawiki.org/wiki/Parsoid/API
+ * @copyright © 2016 Bryan Davis, Wikimedia Foundation and contributors.
+ * @see https://www.mediawiki.org/wiki/RESTBase
+ * @see https://en.wikipedia.org/api/rest_v1/
  */
 class ParsoidClient {
 
@@ -50,7 +54,7 @@
protected $logger;
 
/**
-* @param string $url URL to parsoid API
+* @param string $url URL to RESTBase /transform/wikitext/to/html API
 * @param string $cache Cache directory
 * @param LoggerInterface $logger Log channel
 */
@@ -80,7 +84,7 @@
}
 
protected function cacheGet( $key ) {
-   $file = "{$this->cache}/{$key}.parsoid";
+   $file = "{$this->cache}/{$key}.restbase";
if ( file_exists( $file ) ) {
$this->logger->debug( 'Cache hit for [{key}]', array(
'method' => __METHOD__,
@@ -96,7 +100,7 @@
}
 
protected function cachePut( $key, $value ) {
-   $file = "{$this->cache}/{$key}.parsoid";
+   $file = "{$this->cache}/{$key}.restbase";
file_put_contents( $file, $value );
$this->logger->info( 'Cache put for [{key}]', array(
'method' => __METHOD__,
@@ -112,8 +116,8 @@
 */
protected function fetchParse( $text ) {
$parms = array(
-   'wt' => $text,
-   'body' => 1,
+   'wikitext' => $text,
+   'body_only' => 'true',
);
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $this->url );
@@ -121,13 +125,16 @@
curl_setopt( $ch, CURLOPT_POSTFIELDS, $parms );
curl_setopt( $ch, CURLOPT_ENCODING, '' );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
-   curl_setopt( $ch, CURLOPT_USERAGENT, 'IEG Grant review 0.1' );
+   curl_setopt( $ch, CURLOPT_USERAGENT, 'Wikimedia Slimapp' );
+   curl_setopt( $ch, CURLOPT_HTTPHEADER, array(
+   'Accept: text/html; charset=utf-8; 
profile="https://www.mediawiki.org/wiki/Specs/HTML/1.2.1;',
+   ) );
$stderr = fopen( 'php://temp', 'rw+' );
curl_setopt( $ch, CURLOPT_VERBOSE, true );
curl_setopt( $ch, CURLOPT_STDERR, $stderr );
$body = curl_exec( $ch );
rewind( $stderr );
-   $this->logger->debug( 'Parsoid curl request', array(
+   $this->logger->debug( 'RESTBase curl request', array(
'method' => __METHOD__,
'url' => $this->url,
'parms' => $parms,
@@ -147,7 +154,7 @@
curl_close( $ch );
 
// Using a regex to parse html is generally not a sane thing to 
do,
-   // but in this case we are trusting Parsoid to be returning 
clean HTML
+   // but in this case we are trusting RESTBase to be returning 
clean HTML
// and all we want to do is unwrap our payload from the
// ... tag.
return preg_replace( '@^.*]+>(.*).*$@s', '$1', 
$body );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96947882b89df29026fc19e482a011bd426beb58
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Report partial result from mwgrep

2016-08-30 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Report partial result from mwgrep
..

Report partial result from mwgrep

mwgrep can currently return partial results by hitting the max_inspect
limit but doesn't tell the user anything about it (because elasticsearch
doesn't tell us it hit the max_inspect limit). Rather than using an
arbitrary document limit use the timeout to restrict how long a query
can run. When the query hits a timeout inform the user. The difference
between timeout based total results and the old max_inspect can be
seen with this example in prod. A short timeout may need to be added
to trigger the partial results path.

  mwgrep --user '[a-z]*'

Bug: T127788
Change-Id: Id95ba3f8df1bca2e2f089525bf7aa061ddbc1e2b
---
M modules/scap/files/mwgrep
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/307652/1

diff --git a/modules/scap/files/mwgrep b/modules/scap/files/mwgrep
index c277598..89845d0 100755
--- a/modules/scap/files/mwgrep
+++ b/modules/scap/files/mwgrep
@@ -101,7 +101,6 @@
 'regex': args.term,
 'field': 'source_text',
 'ngram_field': 'source_text.trigram',
-'max_inspect': 1,
 'max_determinized_states': 2,
 'case_sensitive': True,
 'locale': 'en',
@@ -129,7 +128,8 @@
 uri = BASE_URI + '?' + urllib.urlencode(query)
 try:
 req = urllib2.urlopen(uri, json.dumps(search))
-result = json.load(req)['hits']
+full_result = json.load(req)
+result = full_result['hits']
 
 private_wikis = 
open('/srv/mediawiki/dblists/private.dblist').read().splitlines()
 
@@ -156,6 +156,18 @@
 
 print('')
 print('(total: %s, shown: %s)' % (result['total'], len(result['hits'])))
+if full_result['timed_out']:
+print("""
+The query was unable to complete within the alloted time. Only partial results
+are shown here, and the reported total hits is <= the true value. To speed up 
the query:
+
+* Ensure the regular expression contains one or more sets of 3 contiguous
+  characters. A character range ([a-z]) won't be expanded to count as 
contiguous
+  if it matches more than 3 characters.
+* Use a simpler regular expression where possible. Consider breaking the query 
up
+  into multiple queries if necessary.
+""")
+
 except urllib2.HTTPError, error:
 try:
 error_body = json.load(error)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id95ba3f8df1bca2e2f089525bf7aa061ddbc1e2b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...LiquidThreads[master]: Fix doc comments

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

Change subject: Fix doc comments
..


Fix doc comments

Change-Id: Ie150fe35ff7a30731aa4472f46c8789ffd6c0cbb
---
M classes/View.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/classes/View.php b/classes/View.php
index e4caca1..8045422 100644
--- a/classes/View.php
+++ b/classes/View.php
@@ -7,11 +7,12 @@
 */
 
 class LqtView {
-   /*
+   /**
 * @var WikiPage
 */
public $article;
-   /*
+
+   /**
 * @var OutputPage
 */
public $output;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie150fe35ff7a30731aa4472f46c8789ffd6c0cbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
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...LiquidThreads[master]: Override main context in addition to globals

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

Change subject: Override main context in addition to globals
..


Override main context in addition to globals

Ideally the proper solution here would be to refactor all of this code
to pass around context instead of monkey-patching global state like
this. But I don't think anyone wants to do that.

Bug: T143889
Change-Id: I561d1c314c950034bf16868153e7a5287f9a54ce
---
M classes/View.php
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/classes/View.php b/classes/View.php
index efe401a..e4caca1 100644
--- a/classes/View.php
+++ b/classes/View.php
@@ -382,6 +382,14 @@
$oldOut = $wgOut;
$oldRequest = $wgRequest;
$oldTitle = $wgTitle;
+   // And override the main context too... (T143889)
+   $context = RequestContext::getMain();
+   $oldCOut = $context->getOutput();
+   $oldCRequest = $context->getRequest();
+   $oldCTitle = $context->getTitle();
+   $context->setOutput( $this->output );
+   $context->setRequest( $this->request );
+   $context->setTitle( $this->title );
$wgOut = $this->output;
$wgRequest = $this->request;
$wgTitle = $this->title;
@@ -408,6 +416,9 @@
$wgOut = $oldOut;
$wgRequest = $oldRequest;
$wgTitle = $oldTitle;
+   $context->setOutput( $oldCOut );
+   $context->setRequest( $oldCRequest );
+   $context->setTitle( $oldCTitle );
 
$this->output->setArticleBodyOnly( true );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I561d1c314c950034bf16868153e7a5287f9a54ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Tim Starling 
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...SmashPig[master]: Fix one more oversight with record capture job

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

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

Change subject: Fix one more oversight with record capture job
..

Fix one more oversight with record capture job

Wrong way to refer to class

Change-Id: I90b244c81891e8bc1d6f4e2f2be7db6d895cea9e
---
M CrmLink/Messages/DonationInterfaceMessage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/51/307651/1

diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index 2dbb3be..360988f 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -47,7 +47,7 @@
foreach ( $values as $key => $value ) {
// If we're creating this from a database row with some 
extra
// info such as the pending_id, only include the real 
properties
-   if( property_exists( 'DonationInterfaceMessage', $key ) 
) {
+   if( property_exists( self::class, $key ) ) {
$message->$key = $value;
}
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: Add wikidiff2 directory

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

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

Change subject: releases: Add wikidiff2 directory
..

releases: Add wikidiff2 directory

This allows MediaWiki releasers to upload releases for the wikidiff2 PHP
extension.

Change-Id: I8df7f56326fa755f2466f491b5b48d16bedfd1c5
---
M modules/releases/manifests/init.pp
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/307650/1

diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 33c475d..396f0a7 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -36,6 +36,12 @@
 group => 'releasers-mediawiki',
 }
 
+file { '/srv/org/wikimedia/releases/wikidiff2':
+ensure => 'directory',
+owner => 'root',
+group => 'releasers-mediawiki',
+}
+
 include ::apache::mod::rewrite
 include ::apache::mod::headers
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8df7f56326fa755f2466f491b5b48d16bedfd1c5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: puppetize ownership of /srv/org/wikimedia/releases...

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

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

Change subject: releases: puppetize ownership of 
/srv/org/wikimedia/releases/mediawiki
..

releases: puppetize ownership of /srv/org/wikimedia/releases/mediawiki

Change-Id: I82cfeed7699e79ef9f4979e66628d54a46740f1a
---
M modules/releases/manifests/init.pp
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/307649/1

diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 33150f5..33c475d 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -30,6 +30,12 @@
 ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
 ensure_resource('file', '/srv/org/wikimedia/releases', {'ensure' => 
'directory' })
 
+file { '/srv/org/wikimedia/releases/mediawiki':
+ensure => 'directory',
+owner => 'root',
+group => 'releasers-mediawiki',
+}
+
 include ::apache::mod::rewrite
 include ::apache::mod::headers
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82cfeed7699e79ef9f4979e66628d54a46740f1a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Allow overriding with dissimilar types

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

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

Change subject: Allow overriding with dissimilar types
..

Allow overriding with dissimilar types

Sometimes inst-args[0] needs to be an array, even when the default
value is a string.

Change-Id: I27577bdfd72b1733e69b3787cfb7e40d3b56098f
---
M Core/Configuration.php
M Tests/ConfigurationTest.php
2 files changed, 1 insertion(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/48/307648/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index 94547ea..fea2b6c 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -336,13 +336,7 @@
$baseNodeRef = &$base[$graftNodeName];
// Nodes that are present in the base and in 
the graft
 
-   if (!self::isMergable($baseNodeRef, 
$graftNodeValue)) {
-   // Stop if types don't match.
-   throw new SmashPigException(
-   "Dissimilar types cannot be 
merged at configuration node {$node}." );
-   }
-
-   if ( is_array( $graftNodeValue ) ) {
+   if ( is_array( $graftNodeValue ) && is_array( 
$baseNodeRef ) ) {
// Recursively merge arrays.
static::treeMerge( $baseNodeRef, 
$graftNodeValue, $node );
} else {
diff --git a/Tests/ConfigurationTest.php b/Tests/ConfigurationTest.php
index d12732f..4cace76 100644
--- a/Tests/ConfigurationTest.php
+++ b/Tests/ConfigurationTest.php
@@ -5,21 +5,6 @@
  */
 class ConfigurationTest extends BaseSmashPigUnitTestCase {
 
-   /**
-* Make sure we throw an exception when overriding a node with a 
different
-* type.
-*
-* @expectedException \SmashPig\Core\SmashPigException
-* @expectedExceptionMessage Dissimilar types cannot be merged at 
configuration node map_or_list.
-*
-* At integration level because the treeMerge function is currently
-* protected.
-*/
-   public function testTreeMergeDissimilarTypes() {
-   $this->setConfig( 'aview', __DIR__ . '/data/dissimilar.yaml' );
-   // expectedException above
-   }
-
public function testOverride() {
$config = $this->setConfig();
 

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix dumb omitted return statement

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

Change subject: Fix dumb omitted return statement
..


Fix dumb omitted return statement

And add comment.

Change-Id: Ic4a52199ebd58735f428c4191264a506927a5e37
---
M CrmLink/Messages/DonationInterfaceMessage.php
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index aee02d3..2dbb3be 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -3,7 +3,7 @@
 use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
 
 /**
- * Message sent to the 'cc-limbo' queue when a payment has been initiated and 
sent off to the gateway.
+ * Message sent to the pending queue when a payment has been initiated and 
sent off to the gateway.
  */
 class DonationInterfaceMessage extends KeyedOpaqueStorableObject {
public $captured = '';
@@ -38,13 +38,20 @@
public $utm_medium = '';
public $utm_source = '';
 
+   /**
+* @param array $values
+* @return DonationInterfaceMessage
+*/
public static function fromValues( $values = array() ) {
$message = new DonationInterfaceMessage();
foreach ( $values as $key => $value ) {
+   // If we're creating this from a database row with some 
extra
+   // info such as the pending_id, only include the real 
properties
if( property_exists( 'DonationInterfaceMessage', $key ) 
) {
$message->$key = $value;
}
}
$message->correlationId = 
"{$message->gateway}-{$message->order_id}";
+   return $message;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4a52199ebd58735f428c4191264a506927a5e37
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Siebrand 
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/core[master]: objectcache: Make SqlBagOStuff::waitForSlaves() no-op withou...

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

Change subject: objectcache: Make SqlBagOStuff::waitForSlaves() no-op without 
slaves
..


objectcache: Make SqlBagOStuff::waitForSlaves() no-op without slaves

Change-Id: Ibaa4745c18c6f4f66edb4c5f190196b575d3b738
---
M includes/objectcache/SqlBagOStuff.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 7a89991..73f8280 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -801,6 +801,10 @@
if ( $this->usesMainDB() ) {
$lb = $this->getSeparateMainLB()
?: 
MediaWikiServices::getInstance()->getDBLoadBalancer();
+   // Return if there are no slaves
+   if ( $lb->getServerCount() <= 1 ) {
+   return true;
+   }
// Main LB is used; wait for any slaves to catch up
try {
$pos = $lb->getMasterPos();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibaa4745c18c6f4f66edb4c5f190196b575d3b738
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Krinkle 
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...SmashPig[master]: Test for RecordCaptureJob

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

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

Change subject: Test for RecordCaptureJob
..

Test for RecordCaptureJob

FIXME: Dying because overriding string default inst-args[0] with an array

Change-Id: I65199c509e03ed0d0eeb6c3e81367d86ad6812a0
---
A PaymentProviders/Adyen/Tests/Data/capture.json
M PaymentProviders/Adyen/Tests/config_test.yaml
A PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
3 files changed, 103 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/47/307647/1

diff --git a/PaymentProviders/Adyen/Tests/Data/capture.json 
b/PaymentProviders/Adyen/Tests/Data/capture.json
new file mode 100644
index 000..71f9bd8
--- /dev/null
+++ b/PaymentProviders/Adyen/Tests/Data/capture.json
@@ -0,0 +1,17 @@
+{
+  "reason": "",
+  "parentPspReference": null,
+  "originalReference": "762895314225",
+  "pspReference": "9182739182739",
+  "merchantReference": "119223.0",
+  "merchantAccountCode": "WikimediaCOM",
+  "currency": "USD",
+  "amount": 10,
+  "eventDate": "2016-01-25T17:07:36.862+01:00",
+  "success": true,
+  "correlationId": "adyen-119223.0",
+  "propertiesExportedAsKeys": [
+"correlationId"
+  ],
+  "propertiesExcludedFromExport": []
+}
diff --git a/PaymentProviders/Adyen/Tests/config_test.yaml 
b/PaymentProviders/Adyen/Tests/config_test.yaml
index be18311..0a3c73c 100644
--- a/PaymentProviders/Adyen/Tests/config_test.yaml
+++ b/PaymentProviders/Adyen/Tests/config_test.yaml
@@ -8,6 +8,12 @@
 class: SmashPig\Tests\MockDataStore
 inst-args: []
 
+verified:
+class: PHPQueue\Backend\PDO
+inst-args:
+-
+connection_string: 'sqlite::memory:'
+
 pending-db:
 class: PDO
 inst-args:
diff --git a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
new file mode 100644
index 000..7b9ad7a
--- /dev/null
+++ b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
@@ -0,0 +1,80 @@
+config = AdyenTestConfiguration::get( true );
+   Context::initWithLogger( $this->config );
+   $this->pendingDatabase = PendingDatabase::get();
+   $this->pendingMessage = json_decode(
+   file_get_contents( __DIR__ . '/../Data/pending.json' ) 
, true
+   );
+   $this->pendingMessage['captured'] = true;
+   $this->pendingDatabase->storeMessage( $this->pendingMessage );
+   }
+
+   public function tearDown() {
+   $this->pendingDatabase->deleteMessage( $this->pendingMessage );
+   parent::tearDown();
+   }
+
+   public function testRecordCapture() {
+   $verifiedQueue = $this->config->object( 'data-store/verified', 
true );
+
+   $capture = KeyedOpaqueStorableObject::fromJsonProxy(
+   
'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Capture',
+   file_get_contents( __DIR__ . '/../Data/capture.json' )
+   );
+
+   $job = RecordCaptureJob::factory( $capture );
+   $this->assertTrue( $job->execute() );
+
+   $donorData = 
$this->pendingDatabase->fetchMessageByGatewayOrderId(
+   'adyen', $capture->merchantReference
+   );
+
+   $this->assertNull(
+   $donorData,
+   'RecordCaptureJob left donor data on pending queue'
+   );
+
+   $verifiedMessage = $verifiedQueue->pop();
+   $this->assertNotNull(
+   $verifiedMessage,
+   'RecordCaptureJob did not send verified message'
+   );
+   // can we use arraySubset yet?
+   $sameKeys = array_intersect(
+   array_keys( $verifiedMessage ),
+   array_keys( $this->pendingMessage )
+   );
+   foreach ( $sameKeys as $key ) {
+   $this->assertEquals(
+   $this->pendingMessage[$key], 
$verifiedMessage[$key],
+   "Value of key $key mutated"
+   );
+   }
+   }
+}

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Use a solid border for disabled SelectFile ...

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

Change subject: MediaWiki theme: Use a solid border for disabled SelectFile 
drop target
..


MediaWiki theme: Use a solid border for disabled SelectFile drop target

Remove the dashed border from a disabled SelectFileWidget's drop target,
as it's indicating possible activity. This unifies the border style with
the widget when the feature is not supported.

Change-Id: Ie6519da0b5474b16b737fc0e793fdc90acc5aefb
---
M src/themes/mediawiki/widgets.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index dd90c54..c66c4dc 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -295,7 +295,7 @@
}
}
 
-   &-empty.oo-ui-selectFileWidget-dropTarget {
+   &-empty.oo-ui-widget-enabled.oo-ui-selectFileWidget-dropTarget {
background-color: #eee;
border-style: dashed;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6519da0b5474b16b737fc0e793fdc90acc5aefb
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jforrester 
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/puppet[production]: Gerrit: Fix phabricator expanding links

2016-08-30 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Gerrit: Fix phabricator expanding links
..


Gerrit: Fix phabricator expanding links

@Author of change Thiemo Mättig (WMDE)

Bug: T75997
Change-Id: Icf71cdb7722293de95419e7e191efbc7684ff1af
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved

Objections:
  Peachey88: There's a problem with this change, please improve



diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index 0459ebc..57330b5 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -123,7 +123,7 @@
 # that we use, $1 needs to hold the bug number. By the way the
 # pattern gets used, neither non-capturing groups nor
 # look-aheads/look-backs work reliably.
-match =  "\\bT(\\d+)(#\\d+)?\\b(?!\")"
+match =  "\\bT(\\d+)(#\\d+)?\\b(?![#\"]|)"
 link = https://phabricator.wikimedia.org/T$1$2
 [mimetype "application/javascript"]
 safe = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf71cdb7722293de95419e7e191efbc7684ff1af
Gerrit-PatchSet: 13
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Peachey88 
Gerrit-Reviewer: QChris 
Gerrit-Reviewer: Thiemo Mättig (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] wikimedia...SmashPig[master]: Fix dumb omitted return statement

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

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

Change subject: Fix dumb omitted return statement
..

Fix dumb omitted return statement

And add comment.

Change-Id: Ic4a52199ebd58735f428c4191264a506927a5e37
---
M CrmLink/Messages/DonationInterfaceMessage.php
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/46/307646/1

diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index aee02d3..2dbb3be 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -3,7 +3,7 @@
 use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
 
 /**
- * Message sent to the 'cc-limbo' queue when a payment has been initiated and 
sent off to the gateway.
+ * Message sent to the pending queue when a payment has been initiated and 
sent off to the gateway.
  */
 class DonationInterfaceMessage extends KeyedOpaqueStorableObject {
public $captured = '';
@@ -38,13 +38,20 @@
public $utm_medium = '';
public $utm_source = '';
 
+   /**
+* @param array $values
+* @return DonationInterfaceMessage
+*/
public static function fromValues( $values = array() ) {
$message = new DonationInterfaceMessage();
foreach ( $values as $key => $value ) {
+   // If we're creating this from a database row with some 
extra
+   // info such as the pending_id, only include the real 
properties
if( property_exists( 'DonationInterfaceMessage', $key ) 
) {
$message->$key = $value;
}
}
$message->correlationId = 
"{$message->gateway}-{$message->order_id}";
+   return $message;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Update 1.27.1-2 changelog as unstable, urgency=high

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

Change subject: Update 1.27.1-2 changelog as unstable, urgency=high
..


Update 1.27.1-2 changelog as unstable, urgency=high

Change-Id: I2e34021fe2cf8a076d2bc0d2b20263128230de1e
---
M debian/changelog
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/debian/changelog b/debian/changelog
index cfcabb7..bcfd046 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mediawiki (1:1.27.1-2) UNRELEASED; urgency=medium
+mediawiki (1:1.27.1-2) unstable; urgency=high
 
   * Add missing php-xml dependency (Closes: #835912)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e34021fe2cf8a076d2bc0d2b20263128230de1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/debian[master]: Update 1.27.1-2 changelog as unstable, urgency=high

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

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

Change subject: Update 1.27.1-2 changelog as unstable, urgency=high
..

Update 1.27.1-2 changelog as unstable, urgency=high

Change-Id: I2e34021fe2cf8a076d2bc0d2b20263128230de1e
---
M debian/changelog
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/45/307645/1

diff --git a/debian/changelog b/debian/changelog
index cfcabb7..bcfd046 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mediawiki (1:1.27.1-2) UNRELEASED; urgency=medium
+mediawiki (1:1.27.1-2) unstable; urgency=high
 
   * Add missing php-xml dependency (Closes: #835912)
 

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: 9d23b47 CiviCRM submodule update

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

Change subject: 9d23b47 CiviCRM submodule update
..


9d23b47 CiviCRM submodule update

Fix DedupeFind cache set call

Change-Id: I810bf0e0a60789ad0acf95617959a31feb728830
---
M civicrm
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/civicrm b/civicrm
index 3833f80..9d23b47 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit 3833f805d0cc3a6bfdbc1b29f626832e1eb15f7e
+Subproject commit 9d23b47d2796e67cf19137fb44bfb9e24b9e4dc0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I810bf0e0a60789ad0acf95617959a31feb728830
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
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] wikimedia...crm[master]: 9d23b47 CiviCRM submodule update

2016-08-30 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: 9d23b47 CiviCRM submodule update
..

9d23b47 CiviCRM submodule update

Fix DedupeFind cache set call

Change-Id: I810bf0e0a60789ad0acf95617959a31feb728830
---
M civicrm
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/44/307644/1

diff --git a/civicrm b/civicrm
index 3833f80..9d23b47 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit 3833f805d0cc3a6bfdbc1b29f626832e1eb15f7e
+Subproject commit 9d23b47d2796e67cf19137fb44bfb9e24b9e4dc0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I810bf0e0a60789ad0acf95617959a31feb728830
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...SpamBlacklist[master]: Fix bogus stats where stashes counted as misses

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

Change subject: Fix bogus stats where stashes counted as misses
..


Fix bogus stats where stashes counted as misses

Also renew stash values if they will expire soon.

Change-Id: I36771f5736f80546aac99409463293c7699fb5de
---
M SpamBlacklist_body.php
1 file changed, 22 insertions(+), 9 deletions(-)

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



diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php
index 35ad323..137947a 100644
--- a/SpamBlacklist_body.php
+++ b/SpamBlacklist_body.php
@@ -7,6 +7,8 @@
 use \MediaWiki\MediaWikiServices;
 
 class SpamBlacklist extends BaseBlacklist {
+   const STASH_TTL = 60;
+   const STASH_AGE_DYING = 30;
 
/**
 * Changes to external links, for logging purposes
@@ -45,10 +47,11 @@
 * @param boolean $preventLog Whether to prevent logging of hits. Set 
to true when
 *   the action is testing the links rather than attempting 
to save them
 *   (e.g. the API spamblacklist action)
+* @param string $mode Either 'check' or 'stash'
 *
 * @return string[]|bool Matched text(s) if the edit should not be 
allowed; false otherwise
 */
-   function filter( array $links, Title $title = null, $preventLog = false 
) {
+   function filter( array $links, Title $title = null, $preventLog = 
false, $mode = 'check' ) {
$statsd = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
$cache = ObjectCache::getLocalClusterInstance();
$key = $cache->makeKey(
@@ -59,11 +62,19 @@
(string)$title
);
// Skip blacklist checks if nothing matched during edit 
stashing...
-   if ( $cache->get( $key ) ) {
-   $statsd->increment( 'spamblacklist.check-stash.hit' );
-   return false;
-   } else {
-   $statsd->increment( 'spamblacklist.check-stash.miss' );
+   $knownNonMatchAsOf = $cache->get( $key );
+   if ( $mode === 'check' ) {
+   if ( $knownNonMatchAsOf ) {
+   $statsd->increment( 
'spamblacklist.check-stash.hit' );
+
+   return false;
+   } else {
+   $statsd->increment( 
'spamblacklist.check-stash.miss' );
+   }
+   } elseif ( $mode === 'stash' ) {
+   if ( $knownNonMatchAsOf && ( time() - 
$knownNonMatchAsOf ) < self::STASH_AGE_DYING ) {
+   return false; // OK; not about to expire soon
+   }
}
 
$blacklists = $this->getBlacklists();
@@ -143,8 +154,10 @@
 
if ( $retVal === false ) {
// Cache the typical negative results
-   $cache->set( $key, 1, $cache::TTL_MINUTE );
-   $statsd->increment( 'spamblacklist.check-stash.store' );
+   $cache->set( $key, time(), $cache::TTL_MINUTE );
+   if ( $mode === 'stash' ) {
+   $statsd->increment( 
'spamblacklist.check-stash.store' );
+   }
}
 
return $retVal;
@@ -264,7 +277,7 @@
}
 
public function warmCachesForFilter( Title $title, array $entries ) {
-   $this->filter( $entries, $title, true /* no logging */ );
+   $this->filter( $entries, $title, true /* no logging */, 'stash' 
);
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36771f5736f80546aac99409463293c7699fb5de
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Victor Vasiliev 
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]: Make SqlBagOStuff::waitForSlaves() no-op without slaves

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

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

Change subject: Make SqlBagOStuff::waitForSlaves() no-op without slaves
..

Make SqlBagOStuff::waitForSlaves() no-op without slaves

Change-Id: Ibaa4745c18c6f4f66edb4c5f190196b575d3b738
---
M includes/objectcache/SqlBagOStuff.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/307643/1

diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 7a89991..37c7450 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -801,6 +801,10 @@
if ( $this->usesMainDB() ) {
$lb = $this->getSeparateMainLB()
?: 
MediaWikiServices::getInstance()->getDBLoadBalancer();
+   // Return if the are no slaves
+   if ( $lb->getServerCount() <= 1 ) {
+   return true;
+   }
// Main LB is used; wait for any slaves to catch up
try {
$pos = $lb->getMasterPos();

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Adjust Special:Notifications width for small screens

2016-08-30 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: Adjust Special:Notifications width for small screens
..

Adjust Special:Notifications width for small screens

Bug: T141949
Change-Id: Id0987ea9e7929777c887ceea6757ec00b3bf18ae
---
M modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less 
b/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
index 5589baf..edd109f 100644
--- a/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
+++ b/modules/styles/mw.echo.ui.DatedSubGroupListWidget.less
@@ -40,4 +40,9 @@
display: none;
}
}
+
+   @media all and ( max-width: @specialpage-mobile-width-small ) {
+   // Make narrow with margin
+   width: @specialpage-mobile-width-small - 32px;
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "Revert "Change-Prop: Rerender summary on wikidata it...

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

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

Change subject: Revert "Revert "Change-Prop: Rerender summary on wikidata item 
update""
..

Revert "Revert "Change-Prop: Rerender summary on wikidata item update""

This reverts commit edc9e0b0d1507deb4c1a2c7f8e77297d77f1e495.

Change Iaded5c5f6b03ee7b5e37712bd753bb93db900657 introduced re-rendering
the summary of pages that use wikidata descriptions, but after its merge
all of the edits coming from wikidata.org were being rejected by Change
Prop, so we reverted it. However, it turns out that the rule is correct;
there was a bug in the way the service handled the response from
wikidata. This has been fixed in
https://github.com/wikimedia/change-propagation/pull/88 and is live in
production, so it is safe to re-enable the rule.

Change-Id: Ib77f28f3aa84ff86f2b1e01c93bba40d60701cf6
---
M modules/changeprop/templates/config.yaml.erb
1 file changed, 36 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/307641/1

diff --git a/modules/changeprop/templates/config.yaml.erb 
b/modules/changeprop/templates/config.yaml.erb
index 9792086..fdcccec 100644
--- a/modules/changeprop/templates/config.yaml.erb
+++ b/modules/changeprop/templates/config.yaml.erb
@@ -16,17 +16,17 @@
   options:
 host: <%= @purge_host %>
 port: <%= @purge_port %>
-#/{api:sys}/links:
-#  x-modules:
-#- path: src/sys/dep_updates.js
-#  options:
-#templates:
-#  mw_api:
-#  uri: <%= @mwapi_uri %>
-#  headers:
-#host: '{{message.meta.domain}}'
-#  body:
-#formatversion: 2
+/{api:sys}/links:
+  x-modules:
+- path: src/sys/dep_updates.js
+  options:
+templates:
+  mw_api:
+uri: <%= @mwapi_uri %>
+headers:
+  host: '{{message.meta.domain}}'
+body:
+  formatversion: 2
 /{api:sys}/queue:
   x-modules:
 - path: src/sys/kafka.js
@@ -440,3 +440,28 @@
 models: 'reverted|damaging|goodfaith'
 revids: '{{message.rev_id}}'
 precache: true
+
+  # Re-renders summary on WikiData item update
+  wikidata_description:
+topic: mediawiki.revision_create
+match:
+  meta:
+domain: www.wikidata.org
+exec:
+  method: 'post'
+  uri: '/sys/links/wikidata_descriptions'
+  body: '{{globals.message}}'
+
+  on_wikidata_description_change:
+topic: resource_change
+match:
+  meta:
+uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/'
+  tags: [ 'change-prop', 'wikidata' ]
+exec:
+  method: get
+  uri: '<%= @restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri.title}}'
+  headers:
+cache-control: no-cache
+  query:
+redirect: false
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib77f28f3aa84ff86f2b1e01c93bba40d60701cf6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mobrovac 

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


  1   2   3   4   >