[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Towards adding mailing visibility to users

2017-07-03 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363125 )

Change subject: Towards adding mailing visibility to users
..

Towards adding mailing visibility to users

Change-Id: Ie89a7fccd0dc0d44fc690ef3b47369e214a1ae82
---
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/DAO/MailingProviderData.php
A 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Page/MailingsView.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/MailingProviderData.php
M sites/default/civicrm/extensions/org.wikimedia.omnimail/omnimail.php
A 
sites/default/civicrm/extensions/org.wikimedia.omnimail/templates/CRM/Omnimail/Page/MailingsView.tpl
A sites/default/civicrm/extensions/org.wikimedia.omnimail/xml/Menu/omnimail.xml
6 files changed, 118 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/25/363125/1

diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/DAO/MailingProviderData.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/DAO/MailingProviderData.php
index 23507d4..bdf61f9 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/DAO/MailingProviderData.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/DAO/MailingProviderData.php
@@ -73,7 +73,7 @@
*
* @var string
*/
-  public $recipient_action_type;
+  public $event_type;
   /**
* When the action happened
*
@@ -144,8 +144,8 @@
   'bao' => 'CRM_Omnimail_DAO_MailingProviderData',
   'localizable' => 0,
 ) ,
-'recipient_action_type' => array(
-  'name' => 'recipient_action_type',
+'event_type' => array(
+  'name' => 'event_type',
   'type' => CRM_Utils_Type::T_STRING,
   'title' => ts('Recipient Action Type') ,
   'description' => 'Type of action',
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Page/MailingsView.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Page/MailingsView.php
new file mode 100644
index 000..152515e
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Page/MailingsView.php
@@ -0,0 +1,21 @@
+ CRM_Utils_Request::retrieve('cid', 'Integer'),
+  'return' => array('event_type', 'mailing_identifier', 'email', 
'recipient_action_datetime'),
+  'sequential' => 1,
+  'options' => array('limit' => 500, 'sort' => 'recipient_action_datetime 
DESC')
+));
+//CRM_Core_Resources::singleton()->ad
+$this->assign('mailings', json_encode($mailings['values']));
+
+parent::run();
+  }
+
+}
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/MailingProviderData.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/MailingProviderData.php
index de1225e..01f051e 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/MailingProviderData.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/MailingProviderData.php
@@ -42,5 +42,8 @@
  * @throws API_Exception
  */
 function civicrm_api3_mailing_provider_data_get($params) {
-  return _civicrm_api3_basic_get('CRM_Omnimail_BAO_MailingProviderData', 
$params);
+  $bao = new CRM_Omnimail_BAO_MailingProviderData();
+  _civicrm_api3_dao_set_filter($bao, $params, TRUE);
+  $bao->selectAdd('CONCAT(contact_identifier, mailing_identifier, 
recipient_action_datetime) as id');
+  return civicrm_api3_create_success(_civicrm_api3_dao_to_array($bao, $params, 
FALSE, 'MailingProviderData'), $params, 'MailingProviderData', 'get');
 }
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/omnimail.php 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/omnimail.php
index 1d883a4..f9e61ad 100644
--- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/omnimail.php
+++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/omnimail.php
@@ -137,6 +137,32 @@
 }
 
 /**
+ * @param string $tabsetName
+ * @param array $tabs
+ * @param array $context
+ */
+function omnimail_civicrm_tabset($tabsetName, &$tabs, $context) {
+  if ($tabsetName == 'civicrm/contact/view') {
+$contactID = $context['contact_id'];
+  $url = CRM_Utils_System::url('civicrm/contact/mailings/view', 
"reset=1=json=1=$contactID");
+  //add a new Volunteer tab along with url
+  $tab['mailing_data'] = array(
+'title' => ts('Mailings'),
+'url' => $url,
+'valid' => 1,
+'active' => 1,
+'current' => FALSE,
+'class' => 'livePage',
+  );
+//Insert this tab into position 4
+$tabs = array_merge(
+  array_slice($tabs, 0, 4),
+  $tab,
+  array_slice($tabs, 4)
+);
+  }
+}
+/**
  * Keep mailing provider data out of log tables.
  *
  * @param array 

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fix: Drilldown crash after user deletes tables from Database

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

Change subject: Fix: Drilldown crash after user deletes tables from Database
..


Fix: Drilldown crash after user deletes tables from Database

Change-Id: I7896e856c7341be2b46b7f188bd4a51f32fc888f
---
M drilldown/CargoSpecialDrilldown.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Yaron Koren: Looks good to me, approved
  Nischayn22: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/drilldown/CargoSpecialDrilldown.php 
b/drilldown/CargoSpecialDrilldown.php
index 9e887fa..5cc2126 100644
--- a/drilldown/CargoSpecialDrilldown.php
+++ b/drilldown/CargoSpecialDrilldown.php
@@ -294,6 +294,10 @@
}
$cdb = CargoUtils::getDB();
foreach ( $tables as $table ) {
+   if( $cdb->tableExists( $table ) == false ) {
+   $text .= '' . 
$table . "";
+   continue;
+   }
$res = $cdb->select( $table, 'COUNT(*) AS total' );
$row = $cdb->fetchRow( $res );
$tableRows = $row['total'];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7896e856c7341be2b46b7f188bd4a51f32fc888f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Fz-29 
Gerrit-Reviewer: Fz-29 
Gerrit-Reviewer: Nischayn22 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

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


db-eqiad.php: Depool db1060

Needs to get its binlog changed to ROW and will be used to populate
sanitarium3

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

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ed23568..02cf83c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -113,7 +113,7 @@
 #  'db1018' => 0,   # B1 1.4TB  64GB, old master 2
'db1021' => 0,   # B1 1.4TB  64GB, vslow, dump
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-   'db1060' => 1,   # C2 2.8TB  96GB, api #master for sanitarium 
#T153743
+#  'db1060' => 1,   # C2 2.8TB  96GB, api #master for sanitarium 
#T153743
'db1074' => 300, # A2 3.6TB 512GB, api
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
@@ -276,7 +276,7 @@
'db1021' => 1,
],
'api' => [
-   'db1060' => 2,
+#  'db1060' => 2,
'db1074' => 1,
],
'watchlist' => [

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

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

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


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

2017-07-03 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363123 )

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

db-eqiad.php: Depool db1060

Needs to get its binlog changed to ROW and will be used to populate
sanitarium3

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


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ed23568..02cf83c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -113,7 +113,7 @@
 #  'db1018' => 0,   # B1 1.4TB  64GB, old master 2
'db1021' => 0,   # B1 1.4TB  64GB, vslow, dump
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-   'db1060' => 1,   # C2 2.8TB  96GB, api #master for sanitarium 
#T153743
+#  'db1060' => 1,   # C2 2.8TB  96GB, api #master for sanitarium 
#T153743
'db1074' => 300, # A2 3.6TB 512GB, api
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
@@ -276,7 +276,7 @@
'db1021' => 1,
],
'api' => [
-   'db1060' => 2,
+#  'db1060' => 2,
'db1074' => 1,
],
'watchlist' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: db1060.yaml: Change to ROW binlog format

2017-07-03 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363122 )

Change subject: db1060.yaml: Change to ROW binlog format
..

db1060.yaml: Change to ROW binlog format

db1060 is going to be sanitarium3's master, so needs its binlog
migrated to ROW
Taking the opportunity to migrate the socket to its new location too

Bug: T153743
Change-Id: I61bbf35fa37f9bc00554be880ff465875e23091a
---
M hieradata/hosts/db1060.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/363122/1

diff --git a/hieradata/hosts/db1060.yaml b/hieradata/hosts/db1060.yaml
index 9b907d8..8bb465d 100644
--- a/hieradata/hosts/db1060.yaml
+++ b/hieradata/hosts/db1060.yaml
@@ -1,2 +1,2 @@
 mariadb::shard: 's2'
-mariadb::socket: '/tmp/mysql.sock'
+mariadb::binlog_format: 'ROW'

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: site.pp: Add db1102 sanitarium role

2017-07-03 Thread Marostegui (Code Review)
Marostegui has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/362996 )

Change subject: site.pp: Add db1102 sanitarium role
..


site.pp: Add db1102 sanitarium role

db1102 is going to temporary become a multi-instance sanitarium3.
It will hold the 3 pending shards (s2,s6 and s7).

I know that the sanitarium role basically assumes there will be 7
but the other 4 can be just ignored for the sake of having this
host up with 3 shards so we can import the 2 pending shards
into labsdb1009, 10 and 11 and get it over with.

Bug: T153743
Change-Id: I333d32cf46ff98fcfde6d20069e0bee5c0c0ddaa
---
M manifests/site.pp
M modules/role/files/prometheus/mysql-labs_eqiad.yaml
2 files changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 4a79e8a..8ac849e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -627,6 +627,11 @@
 include ::base::firewall
 }
 
+node 'db1102.eqiad.wmnet' {
+role(mariadb::sanitarium)
+include ::base::firewall
+}
+
 node 'db1095.eqiad.wmnet' {
 role(mariadb::sanitarium2)
 }
diff --git a/modules/role/files/prometheus/mysql-labs_eqiad.yaml 
b/modules/role/files/prometheus/mysql-labs_eqiad.yaml
index 82c41d7..a7f39c5 100644
--- a/modules/role/files/prometheus/mysql-labs_eqiad.yaml
+++ b/modules/role/files/prometheus/mysql-labs_eqiad.yaml
@@ -4,6 +4,7 @@
   targets:
   - db1069:9104
   - db1095:9104
+  - db1102:9104
   - labsdb1001:9104
   - labsdb1003:9104
   - labsdb1009:9104

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I333d32cf46ff98fcfde6d20069e0bee5c0c0ddaa
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
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]: VCL: remove disableImages handling

2017-07-03 Thread Ema (Code Review)
Ema has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/359417 )

Change subject: VCL: remove disableImages handling
..


VCL: remove disableImages handling

Bug: T168013
Bug: T109870
Change-Id: I4017ff4395f6457e8e418454d0402e6fc80867ba
---
M modules/varnish/templates/text-common.inc.vcl.erb
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Ema: Verified; Looks good to me, approved
  Jdlrobson: Looks good to me, but someone else must approve



diff --git a/modules/varnish/templates/text-common.inc.vcl.erb 
b/modules/varnish/templates/text-common.inc.vcl.erb
index 885535c..44ada58 100644
--- a/modules/varnish/templates/text-common.inc.vcl.erb
+++ b/modules/varnish/templates/text-common.inc.vcl.erb
@@ -95,11 +95,6 @@
 sub text_common_hash {
// The cookies below represent mobile preferences that can be set for 
anonymous users.
if (req.http.X-Subdomain) {
-   // Split the cache for the images-disabled variant of the 
mobile site.
-   if (req.http.X-Orig-Cookie ~ "(^|;\s*)disableImages=1" || 
req.http.Cookie ~ "(^|;\s*)disableImages=1") {
-   hash_data("disableImages=1");
-   }
-
// Split the cache for the beta variant of the mobile site.
if (req.http.X-Orig-Cookie ~ "(^|;\s*)optin=beta" || 
req.http.Cookie ~ "(^|;\s*)optin=beta") {
hash_data("optin=beta");

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4017ff4395f6457e8e418454d0402e6fc80867ba
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
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...ParsoidBatchAPI[master]: Change "article" to "page"

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

Change subject: Change "article" to "page"
..


Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: I0ce3ccdc3672c97d130e90f0b033326fe904cab4
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 7a14249..38600b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,7 +12,7 @@
"apierror-parsoid-batch-invalidbatch": "Invalid batch, must be array.",
"apierror-parsoid-batch-batchtoolarge": "Batch too large, limit is 
500.",
"apierror-parsoid-batch-invalidaction": "Invalid action in item index 
$1.",
-   "apierror-parsoid-batch-texttoobig": "Input text exceeds maximum 
article size.",
+   "apierror-parsoid-batch-texttoobig": "Input text exceeds maximum page 
size.",
"apierror-parsoid-batch-invalidtitle": "Invalid title ($1).",
"apierror-parsoid-batch-mustbescalar": "The $1 parameter 
must be a scalar.",
"apierror-parsoid-batch-mustbearray": "The $1 parameter must 
be an array."

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ce3ccdc3672c97d130e90f0b033326fe904cab4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: phpcs: Fix errors and avoid excluding those checks

2017-07-03 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363121 )

Change subject: phpcs: Fix errors and avoid excluding those checks
..

phpcs: Fix errors and avoid excluding those checks

Enabling the following checks:
 MediaWiki.Commenting.FunctionComment.ParamNameNoCaseMatch
 MediaWiki.Commenting.FunctionComment.WrongStyle

Change-Id: I7e241c4392a8dec113191a8a4125922939086234
---
M includes/SiteMapper.php
M includes/Translation.php
M includes/Translator.php
M phpcs.xml
4 files changed, 7 insertions(+), 6 deletions(-)


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

diff --git a/includes/SiteMapper.php b/includes/SiteMapper.php
index d8d68a2..f6c847a 100644
--- a/includes/SiteMapper.php
+++ b/includes/SiteMapper.php
@@ -49,7 +49,7 @@
 
/**
 * @param string $title
-* @param string $username
+* @param string $userName
 * @return string
 */
public static function getTargetTitle( $title, $userName ) {
diff --git a/includes/Translation.php b/includes/Translation.php
index c174f87..1f8393d 100644
--- a/includes/Translation.php
+++ b/includes/Translation.php
@@ -187,8 +187,10 @@
return $row ? Translation::newFromRow( $row ) : null;
}
 
-   // Here we assume that the caller already checked that no draft for the
-   // user already exists.
+   /**
+* Here we assume that the caller already checked that no draft for the
+* user already exists.
+*/
public function getConflictingTranslations( TranslationWork $work ) {
// Use the fact that find returns all items when given array of 
titles.
$drafts = self::find(
diff --git a/includes/Translator.php b/includes/Translator.php
index 3b8669f..65e3f3c 100644
--- a/includes/Translator.php
+++ b/includes/Translator.php
@@ -74,7 +74,8 @@
 
/**
 * @param int $limit How many results to return
-* @param string [ $offset] Offset condition (timestamp)
+* @param string $offset Offset condition (timestamp)
+* @param string $type
 * @param string $from
 * @param string $to
 * @return Translation[]
diff --git a/phpcs.xml b/phpcs.xml
index 12324d1..12c81a9 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -5,9 +5,7 @@



-   

-   




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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add index to civicrm_campaign.name

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

Change subject: Add index to civicrm_campaign.name
..


Add index to civicrm_campaign.name

Bug: T168499
Change-Id: I9dc23a42397692ef61f83729f52538ba44a03ac7
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 1a3d860..16a24e2 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -67,6 +67,7 @@
 wmf_civicrm_update_7521();
 wmf_civicrm_update_7524();
 wmf_civicrm_update_7525();
+wmf_civicrm_update_7526();
 }
 
 /**
@@ -3037,3 +3038,14 @@
   $components[] = 'CiviCampaign';
   civicrm_api3('Setting', 'create', array('enable_components' => $components));
 }
+
+/**
+ * Add index to name field on civicrm_campaign.
+ *
+ * Bug: T168499
+ */
+function wmf_civicrm_update_7526() {
+civicrm_initialize();
+$tables = array('civicrm_campaign' => array('name'));
+CRM_Core_BAO_SchemaHandler::createIndexes($tables);
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dc23a42397692ef61f83729f52538ba44a03ac7
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
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] oojs/ui[master]: DropdownWidget, MenuSelectWidget: Set aria-expanded attribute

2017-07-03 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363120 )

Change subject: DropdownWidget, MenuSelectWidget: Set aria-expanded attribute
..

DropdownWidget, MenuSelectWidget: Set aria-expanded attribute

Bug: T149653
Change-Id: I79ec8918c0e6d22483e3d15c1b0d55bfe01c45a1
---
M src/widgets/DropdownWidget.js
M src/widgets/MenuSelectWidget.js
2 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/20/363120/1

diff --git a/src/widgets/DropdownWidget.js b/src/widgets/DropdownWidget.js
index 3f6c477..22f8745 100644
--- a/src/widgets/DropdownWidget.js
+++ b/src/widgets/DropdownWidget.js
@@ -158,6 +158,10 @@
  */
 OO.ui.DropdownWidget.prototype.onMenuToggle = function ( isVisible ) {
this.$element.toggleClass( 'oo-ui-dropdownWidget-open', isVisible );
+   this.$handle.attr(
+   'aria-expanded',
+   this.$element.hasClass( 'oo-ui-dropdownWidget-open' ).toString()
+   );
 };
 
 /**
diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index 1ea6e32..d566b9e 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -350,6 +350,8 @@
this.togglePositioning( !!this.$floatableContainer );
this.toggleClipping( true );
 
+   this.$focusOwner.attr( 'aria-expanded', 'true' );
+
if ( this.getSelectedItem() ) {
this.$focusOwner.attr( 'aria-activedescendant', 
this.getSelectedItem().getElementId() );
this.getSelectedItem().scrollElementIntoView( { 
duration: 0 } );
@@ -365,6 +367,7 @@
this.$focusOwner.removeAttr( 'aria-activedescendant' );
this.unbindKeyDownListener();
this.unbindKeyPressListener();
+   this.$focusOwner.attr( 'aria-expanded', 'false' );
this.getElementDocument().removeEventListener( 
'mousedown', this.onDocumentMouseDownHandler, true );
this.togglePositioning( false );
this.toggleClipping( false );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363119 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: I25d8ccb9090c31e4672998c8a01ebdfcaf625e9f
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 4b6e640..e224431 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,7 +8,7 @@
"popups-settings-title": "Page preview",
"popups-settings-description": "This tool lets you preview links to 
wiki pages and to references.",
"popups-settings-option-simple": "Enable",
-   "popups-settings-option-simple-description": "Get quick previews of a 
topic while reading an article.",
+   "popups-settings-option-simple-description": "Get quick previews of a 
topic while reading a page.",
"popups-settings-option-advanced": "Advanced",
"popups-settings-option-advanced-description": "See link previews and 
access editing function menus. This is used by many editors.",
"popups-settings-option-off": "Disable",
@@ -21,7 +21,7 @@
"popups-preview-no-preview": "Looks like there isn't a preview for this 
page",
"popups-preview-footer-read": "Read",
"prefs-reading": "Reading preferences",
-   "popups-prefs-optin-title": "Page previews\n\nGet quick previews of 
a topic while reading an article",
+   "popups-prefs-optin-title": "Page previews\n\nGet quick previews of 
a topic while reading a page",
"popups-prefs-optin-enabled-label": "Enable",
"popups-prefs-optin-disabled-label": "Disable",
"popups-prefs-disable-nav-gadgets-info": "You have to [[$1 | disable 
Navigation Popups Gadget]] from Gadgets tab to enable Page Previews",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25d8ccb9090c31e4672998c8a01ebdfcaf625e9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...ParsoidBatchAPI[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363118 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: I0ce3ccdc3672c97d130e90f0b033326fe904cab4
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParsoidBatchAPI 
refs/changes/18/363118/1

diff --git a/i18n/en.json b/i18n/en.json
index 7a14249..38600b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,7 +12,7 @@
"apierror-parsoid-batch-invalidbatch": "Invalid batch, must be array.",
"apierror-parsoid-batch-batchtoolarge": "Batch too large, limit is 
500.",
"apierror-parsoid-batch-invalidaction": "Invalid action in item index 
$1.",
-   "apierror-parsoid-batch-texttoobig": "Input text exceeds maximum 
article size.",
+   "apierror-parsoid-batch-texttoobig": "Input text exceeds maximum page 
size.",
"apierror-parsoid-batch-invalidtitle": "Invalid title ($1).",
"apierror-parsoid-batch-mustbescalar": "The $1 parameter 
must be a scalar.",
"apierror-parsoid-batch-mustbearray": "The $1 parameter must 
be an array."

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ce3ccdc3672c97d130e90f0b033326fe904cab4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...ParserMigration[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363117 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: Ie4e9d873914ef2d1bf8a912610d565c8d9ead871
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserMigration 
refs/changes/17/363117/1

diff --git a/i18n/en.json b/i18n/en.json
index 6e0a2a9..53e2cba 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,7 +9,7 @@
"parsermigration-current": "Current",
"parsermigration-new": "New",
"parsermigration-pref-label": "Enable parser migration tool",
-   "parsermigration-pref-help": "This adds a sidebar link giving access to 
[https://www.mediawiki.org/wiki/Extension:ParserMigration a tool] for migrating 
article text to new versions of the MediaWiki parser.",
+   "parsermigration-pref-help": "This adds a sidebar link giving access to 
[https://www.mediawiki.org/wiki/Extension:ParserMigration a tool] for migrating 
page text to new versions of the MediaWiki parser.",
"parsermigration-toolbox-label": "Edit with migration tool"
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4e9d873914ef2d1bf8a912610d565c8d9ead871
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserMigration
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363116 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: Iec216fa977de6c1525159b863aef36d40ac8c042
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/16/363116/1

diff --git a/i18n/en.json b/i18n/en.json
index ed57dbd..e2574b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,7 +21,7 @@
"apihelp-graph-summary": "Access graph tag functionality.",
"apihelp-graph-example": "Get the graph JSON by hash and title",
"apihelp-graph-param-hash": "Hash value of the graph",
-   "apihelp-graph-param-title": "Title of the article with the graph",
+   "apihelp-graph-param-title": "Title of the page with the graph",
"apihelp-graph-param-text": "Text of the graph to be converted to JSON. 
Must be posted and used without title and hash parameters",
"apierror-graph-mustposttext": "Request must be POSTed when the 
text parameter is used.",
"apierror-graph-invalid": "Graph is not valid.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec216fa977de6c1525159b863aef36d40ac8c042
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363115 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: I0c7a718e149b58fa2abf894a52118e54c7347f6d
---
M modules/ve-mw/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 620c35d..e87b96b 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -259,7 +259,7 @@
"visualeditor-linkinspector-convert-link-isbn": "Convert to ISBN link",
"visualeditor-linkinspector-convert-link-pmid": "Convert to PMID link",
"visualeditor-linkinspector-convert-link-rfc": "Convert to RFC link",
-   "visualeditor-linkinspector-educationpopup-text": "Link important words 
to other wiki articles or even other websites. It will help readers understand 
the context.",
+   "visualeditor-linkinspector-educationpopup-text": "Link important words 
to other wiki pages or even other websites. It will help readers understand the 
context.",
"visualeditor-linkinspector-educationpopup-title": "Links",
"visualeditor-linkinspector-illegal-title": "Invalid page title",
"visualeditor-linknodeinspector-add-label": "Add label",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c7a718e149b58fa2abf894a52118e54c7347f6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363114 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: Ic354e19171f1f214666787f08337648c6d5b203b
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 3559481..89730fc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -218,7 +218,7 @@
"flow-error-unknown-workflow-id-title": "Unknown topic",
"flow-error-unknown-workflow-id": "The requested topic does not exist.",
"flow-error-search": "We could not complete your search due to a 
temporary problem. Please try again later.",
-   "flow-error-invalid-undelete": "The article couldn't be restored 
because there is currently a discussion board in place.",
+   "flow-error-invalid-undelete": "The page couldn't be restored because 
there is currently a discussion board in place.",
"flow-edit-header-placeholder": "Describe this discussion board",
"flow-edit-header-submit": "Save description",
"flow-edit-header-submit-anonymously": "Save description anonymously",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic354e19171f1f214666787f08337648c6d5b203b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Rephrase cx-publish-destination-tooltip

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363113 )

Change subject: Rephrase cx-publish-destination-tooltip
..

Rephrase cx-publish-destination-tooltip

* Avoid "article", as in the rest of the message
* Rephrase a bit

Change-Id: I1811438566a14620503e2423981f3bed80cf06ee
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 5c8cdd8..8da33c1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -222,7 +222,7 @@
"cx-translation-template-select-param": "Select target fields",
"cx-tools-category-add": "Add category",
"cx-publish-destination-header": "Publish destination",
-   "cx-publish-destination-tooltip": "Choose the namespace of article to 
publish",
+   "cx-publish-destination-tooltip": "Choose the namespace in which the 
page will be published",
"cx-publish-destination-namespace-main": "New page",
"cx-publish-destination-namespace-user": "Personal draft",
"cx-publish-destination-namespace-draft": "Community draft"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Change "article" to "page"

2017-07-03 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363112 )

Change subject: Change "article" to "page"
..

Change "article" to "page"

This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: Ib8252c034009677a59c5c04fc6480b4ffa65252f
---
M i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 2e920ed..3951ef9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -37,8 +37,8 @@
"cirrussearch-completion-profile-fuzzy": "Similar to normal with typo 
correction (two typos supported).",
"cirrussearch-completion-profile-fast-fuzzy": "Experimental fuzzy 
profile (may be removed at any time)",
"cirrussearch-completion-profile-fuzzy-subphrases": "Similar to normal 
with typo correction (two typos supported). It will match also subphrases (can 
be subphrases or subpages depending on internal wiki configuration).",
-   "cirrussearch-qi-profile-classic": "Ranking based on the number of 
incoming links, some templates, article language and recency 
(templates/language/recency may not be activated on this wiki).",
-   "cirrussearch-qi-profile-classic-noboostlinks": "Ranking based on some 
templates, article language and recency when activated on this wiki.",
+   "cirrussearch-qi-profile-classic": "Ranking based on the number of 
incoming links, some templates, page language and recency 
(templates/language/recency may not be activated on this wiki).",
+   "cirrussearch-qi-profile-classic-noboostlinks": "Ranking based on some 
templates, page language and recency when activated on this wiki.",
"cirrussearch-qi-profile-empty": "Ranking based solely on query 
dependent features (for debug only).",
"cirrussearch-qi-profile-wsum-inclinks-pv": "Weighted sum based on 
incoming links and weekly pageviews",
"cirrussearch-qi-profile-wsum-inclinks": "Weighted sum based on 
incoming links",
@@ -50,7 +50,7 @@
"cirrussearch-pref-completion-section-legend": "The 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:CirrusSearch/CompletionSuggester
 completion suggester] is an algorithm for search suggestions with better typo 
correction and search relevance.",
"cirrussearch-completion-profile-fuzzy-pref-name": "Default 
(recommended)",
"cirrussearch-completion-profile-fuzzy-pref-desc": "Corrects up to two 
typos. Resolves close redirects.",
-   "cirrussearch-completion-profile-fuzzy-subphrases-pref-name": 
"Subphrase matching (recommended for longer article titles)",
+   "cirrussearch-completion-profile-fuzzy-subphrases-pref-name": 
"Subphrase matching (recommended for longer page titles)",
"cirrussearch-completion-profile-fuzzy-subphrases-pref-desc": "Corrects 
up to two typos. Resolves close redirects. Matches subphrase in titles.",
"cirrussearch-completion-profile-strict-pref-name": "Strict mode 
(advanced)",
"cirrussearch-completion-profile-strict-pref-desc": "No typo 
correction. No accent folding. Strict matching.",

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: grafana: Add legend to dashboard varnish-aggregate-client-st...

2017-07-03 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363111 )

Change subject: grafana: Add legend to dashboard 
varnish-aggregate-client-status-codes
..

grafana: Add legend to dashboard varnish-aggregate-client-status-codes

Change-Id: I3f9c47828ebc7408685218c72592b7bb64257720
---
M modules/grafana/files/dashboards/varnish-aggregate-client-status-codes
1 file changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/363111/1

diff --git 
a/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes 
b/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes
index 86c880f..6c142de 100644
--- a/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes
+++ b/modules/grafana/files/dashboards/varnish-aggregate-client-status-codes
@@ -18,6 +18,28 @@
   "rows": [
 {
   "collapse": false,
+  "height": "50px",
+  "panels": [
+{
+  "content": "Data comes from `varnishreqstats` 
([varnish::logging::reqstats](https://github.com/wikimedia/puppet/blob/HEAD/modules/varnish/manifests/logging/reqstats.pp))
 and is sent to Graphite via 
[statsd](https://wikitech.wikimedia.org/wiki/Statsd).",
+  "height": "",
+  "id": 8,
+  "links": [],
+  "mode": "markdown",
+  "span": 12,
+  "title": "",
+  "type": "text"
+}
+  ],
+  "repeat": null,
+  "repeatIteration": null,
+  "repeatRowId": null,
+  "showTitle": false,
+  "title": "Legend",
+  "titleSize": "h6"
+},
+{
+  "collapse": false,
   "height": "300px",
   "panels": [
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f9c47828ebc7408685218c72592b7bb64257720
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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]: decom subra and suhail

2017-07-03 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363110 )

Change subject: decom subra and suhail
..

decom subra and suhail

Bug: T169506
Change-Id: I23c39d91c0a65859b602065c79e865638269cf09
---
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
3 files changed, 3 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/363110/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 4a79e8a..4a1aa6c 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2150,9 +2150,9 @@
 role(snapshot::dumper, snapshot::monitor, snapshot::cronrunner)
 }
 
-# codfw poolcounters
+# formerly codfw poolcounters, now spares
 node /(subra|suhail)\.codfw\.wmnet/ {
-role(poolcounter::server)
+role(spare::system)
 }
 
 # mediawiki maintenance servers (https://wikitech.wikimedia.org/wiki/Terbium)
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 3e9f766..9496e3c 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -53,7 +53,7 @@
 
analytics102[8-9]|analytics103[0-9]|analytics104[0-9]|analytics105[0-9]|analytics106[0-9])
 echo partman/analytics-flex.cfg ;; \
 aqs100[456789]) echo partman/aqs-cassandra-8ssd-2srv.cfg ;; \
 heze|neodymium|oxygen|terbium) echo partman/lvm.cfg ;; \
-copper|ruthenium|subra|suhail|ocg1003) echo partman/raid1-lvm.cfg ;; \
+copper|ruthenium|ocg1003) echo partman/raid1-lvm.cfg ;; \
 bast[1234]*) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 californium|dbproxy10[0-1][0-9]|iridium) echo partman/raid1.cfg ;; \
 boron) echo partman/lvm.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 48ceb2b..e4d149a 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -6064,20 +6064,6 @@
 fixed-address stat1006.eqiad.wmnet;
 }
 
-host subra {
-hardware ethernet D4:AE:52:AD:62:75;
-fixed-address subra.codfw.wmnet;
-option pxelinux.pathprefix "trusty-installer/";
-filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
-}
-
-host suhail {
-hardware ethernet 90:B1:1C:00:AE:28;
-fixed-address suhail.codfw.wmnet;
-option pxelinux.pathprefix "trusty-installer/";
-filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
-}
-
 host tegmen {
 hardware ethernet 14:18:77:33:42:F8;
 fixed-address tegmen.wikimedia.org;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23c39d91c0a65859b602065c79e865638269cf09
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/core[master]: Skin: Use WANObjectCache for sitenotice caching

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

Change subject: Skin: Use WANObjectCache for sitenotice caching
..


Skin: Use WANObjectCache for sitenotice caching

* Move the md5() hash to the cache key, this makes it much safer
  after a change happens by avoiding write competitions between different
  servers and db slaves. It also allows an undo to re-use the existing
  cache if it still exists.

  In addition, it enables idiomatic use of getWithSetCallback given
  that get and set are now logically separated.

* Avoid fragile re-use of variable names. Previously it read the
  original $notice value at multiple points but also setting $notice
  to $parsed after a certain point. Consistently use $parsed only.

(Ref T115890.)

Change-Id: I5488cc894ff1544e6c20b7d51a7a2adfc292c4ec
---
M includes/skins/Skin.php
1 file changed, 22 insertions(+), 22 deletions(-)

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



diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index e9d2f07..3e8b3f2 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -20,6 +20,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * @defgroup Skins Skins
  */
@@ -1259,7 +1261,7 @@
};
 
if ( $wgEnableSidebarCache ) {
-   $cache = ObjectCache::getMainWANInstance();
+   $cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
$sidebar = $cache->getWithSetCallback(
$cache->makeKey( 'sidebar', 
$this->getLanguage()->getCode() ),
MessageCache::singleton()->isDisabled()
@@ -1506,29 +1508,27 @@
$notice = $msg->plain();
}
 
-   $cache = wfGetCache( CACHE_ANYTHING );
-   // Use the extra hash appender to let eg SSL variants 
separately cache.
-   $key = $cache->makeKey( $name . $wgRenderHashAppend );
-   $cachedNotice = $cache->get( $key );
-   if ( is_array( $cachedNotice ) ) {
-   if ( md5( $notice ) == $cachedNotice['hash'] ) {
-   $notice = $cachedNotice['html'];
-   } else {
-   $needParse = true;
+   $cache = 
MediaWikiServices::getInstance()->getMainWANObjectCache();
+   $parsed = $cache->getWithSetCallback(
+   // Use the extra hash appender to let eg SSL variants 
separately cache
+   // Key is verified with md5 hash of unparsed wikitext
+   $cache->makeKey( $name, $wgRenderHashAppend, md5( 
$notice ) ),
+   // TTL in seconds
+   600,
+   function () use ( $notice ) {
+   return $this->getOutput()->parse( $notice );
}
-   } else {
-   $needParse = true;
-   }
+   );
 
-   if ( $needParse ) {
-   $parsed = $this->getOutput()->parse( $notice );
-   $cache->set( $key, [ 'html' => $parsed, 'hash' => md5( 
$notice ) ], 600 );
-   $notice = $parsed;
-   }
-
-   $notice = Html::rawElement( 'div', [ 'id' => 'localNotice',
-   'lang' => $wgContLang->getHtmlCode(), 'dir' => 
$wgContLang->getDir() ], $notice );
-   return $notice;
+   return Html::rawElement(
+   'div',
+   [
+   'id' => 'localNotice',
+   'lang' => $wgContLang->getHtmlCode(),
+   'dir' => $wgContLang->getDir()
+   ],
+   $parsed
+   );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5488cc894ff1544e6c20b7d51a7a2adfc292c4ec
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
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] operations/puppet[production]: wikimania_scholarships: add support for stretch and PHP7

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/362137 )

Change subject: wikimania_scholarships: add support for stretch and PHP7
..


wikimania_scholarships: add support for stretch and PHP7

Change-Id: I61315692bf6e64975b4158f448c97d16f2051f8c
---
M modules/wikimania_scholarships/manifests/init.pp
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/modules/wikimania_scholarships/manifests/init.pp 
b/modules/wikimania_scholarships/manifests/init.pp
index 093e966..7790306 100644
--- a/modules/wikimania_scholarships/manifests/init.pp
+++ b/modules/wikimania_scholarships/manifests/init.pp
@@ -31,9 +31,14 @@
 
 include ::passwords::mysql::wikimania_scholarships
 include ::apache
-include ::apache::mod::php5
 
-require_package('php5-mysql')
+if os_version('debian == stretch') {
+include ::apache::mod::php7
+require_package('php7.0-mysql')
+} else {
+include ::apache::mod::php5
+require_package('php5-mysql')
+}
 
 $mysql_user = $passwords::mysql::wikimania_scholarships::app_user
 $mysql_pass = $passwords::mysql::wikimania_scholarships::app_password

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61315692bf6e64975b4158f448c97d16f2051f8c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Muehlenhoff 
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]: Push all DeferredUpdates to POSTSEND queue when running that...

2017-07-03 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363109 )

Change subject: Push all DeferredUpdates to POSTSEND queue when running that 
queue
..

Push all DeferredUpdates to POSTSEND queue when running that queue

This avoids putting updates in the PRESEND queue at a point where they
may never get run later in the request.

Change-Id: I40d16f6cd0adc8583797b99d859b76a836d362a8
---
M includes/deferred/DeferredUpdates.php
M tests/phpunit/includes/deferred/DeferredUpdatesTest.php
2 files changed, 37 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/363109/1

diff --git a/includes/deferred/DeferredUpdates.php 
b/includes/deferred/DeferredUpdates.php
index a3a37f6..4bac89d 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -64,6 +64,8 @@
 
/** @var array|null Information about the current execute() call or 
null if not running */
private static $executeContext;
+   /** @var bool Whether post-send job are being executed */
+   private static $postSendActive = false;
 
/**
 * Add an update to the deferred list to be run later by execute()
@@ -82,7 +84,9 @@
return;
}
 
-   if ( $stage === self::PRESEND ) {
+   // While post-send updates are running, push any "pre-send" 
jobs to the
+   // active post-send queue to make sure they get run this round 
(or at all)
+   if ( $stage === self::PRESEND && !self::$postSendActive ) {
self::push( self::$preSendUpdates, $update );
} else {
self::push( self::$postSendUpdates, $update );
@@ -125,7 +129,12 @@
}
 
if ( $stage === self::ALL || $stage == self::POSTSEND ) {
-   self::execute( self::$postSendUpdates, $mode, 
$stageEffective );
+   self::$postSendActive = true;
+   try {
+   self::execute( self::$postSendUpdates, $mode, 
$stageEffective );
+   } finally {
+   self::$postSendActive = false;
+   }
}
}
 
diff --git a/tests/phpunit/includes/deferred/DeferredUpdatesTest.php 
b/tests/phpunit/includes/deferred/DeferredUpdatesTest.php
index 2c199bc..3b42356 100644
--- a/tests/phpunit/includes/deferred/DeferredUpdatesTest.php
+++ b/tests/phpunit/includes/deferred/DeferredUpdatesTest.php
@@ -192,4 +192,30 @@
 
DeferredUpdates::doUpdates();
}
+
+   public function testPresendAddOnPostsendRun() {
+   $this->setMwGlobals( 'wgCommandLineMode', true );
+
+   $x = false;
+   $y = false;
+   wfGetLBFactory()->commitMasterChanges( __METHOD__ ); // clear 
anything
+
+   DeferredUpdates::addCallableUpdate(
+   function () use ( &$x, &$y ) {
+   $x = true;
+   DeferredUpdates::addCallableUpdate(
+   function () use ( &$y ) {
+   $y = true;
+   },
+   DeferredUpdates::PRESEND
+   );
+   },
+   DeferredUpdates::POSTSEND
+   );
+
+   DeferredUpdates::doUpdates();
+
+   $this->assertTrue( $x, "Outer POSTSEND update ran" );
+   $this->assertTrue( $y, "Nested PRESEND update ran" );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40d16f6cd0adc8583797b99d859b76a836d362a8
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] wikimedia...crm[master]: Add support for file storage of credentials

2017-07-03 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363108 )

Change subject: Add support for file storage of credentials
..

Add support for file storage of credentials

By adding setting support for credentials it is possible to store in the DB
however the intent is to declare these in civicrm.settings.php

  global '$civicrm_setting;
  '$civicrm_setting['Omnimail 
Preferences']['omnimail_credentials']['Silverpop'] = array('username' => 'abc', 
'password' => 'xyz');

Change-Id: I72e32aa9133b1e0a91106c03580beeaa2a08268a
---
A 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Helper.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnimailing/Get.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/settings/Omnimail.setting.php
4 files changed, 101 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/08/363108/1

diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Helper.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Helper.php
new file mode 100644
index 000..22b48f8
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Helper.php
@@ -0,0 +1,81 @@
+ $params['username'],
+'password' => $params['password']
+  );
+}
+$mailerCredentials = array(
+  'credentials' => new Credentials($credentials)
+);
+if (!empty($params['client'])) {
+  $mailerCredentials['client'] = $params['client'];
+}
+return $mailerCredentials;
+  }
+
+  /**
+   * @param $params
+   * @return array
+   */
+  public static function getJobSettings($params) {
+$settings = self::getSettings();
+$jobSettings = CRM_Utils_Array::value($params['mail_provider'], 
$settings['omnimail_omnirecipient_load'], array());
+return $jobSettings;
+  }
+
+  /**
+   * Get settings.
+   *
+   * This is just a helper for convenience.
+   *
+   * @return array
+   */
+  public static function getSettings() {
+if (!self::$settings) {
+  $settings = civicrm_api3('Setting', 'get', array('group' => 'omnimail'));
+  self::$settings= reset($settings['values']);
+}
+return self::$settings;
+  }
+
+  /**
+   * Get named setting.
+   *
+   * This is just a helper for convenience.
+   *
+   * @param string $name
+   * @return mixed
+   */
+  public static function getSetting($name) {
+$settings = self::getSettings();
+return CRM_Utils_Array::value($name, $settings);
+  }
+
+}
\ No newline at end of file
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
index e7c2e19..a7060c9 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
@@ -22,16 +22,15 @@
* @param array $params
*
* @return \Omnimail\Silverpop\Responses\RecipientsResponse
+   *
* @throws \CRM_Omnimail_IncompleteDownloadException
+   * @throws \CiviCRM_API3_Exception
*/
   static function getResult($params) {
-$jobSettings = self::getJobSettings($params);
-$settings = self::getSettings();
+$jobSettings = CRM_Omnimail_Helper::getJobSettings($params);
+$settings = CRM_Omnimail_Helper::getSettings();
 
-$mailerCredentials = array('credentials' => new 
Credentials(array('username' => $params['username'], 'password' => 
$params['password'])));
-if (!empty($params['client'])) {
-  $mailerCredentials['client'] = $params['client'];
-}
+$mailerCredentials = CRM_Omnimail_Helper::getCredentials($params);
 
 $request = Omnimail::create($params['mail_provider'], 
$mailerCredentials)->getRecipients();
 
@@ -40,7 +39,7 @@
 
 if (isset($jobSettings['retrieval_parameters'])) {
   if (!empty($params['end_date']) || !empty($params['start_date'])) {
-throw new CiviCRM_API3_Exception('A prior retrieval is in progress. Do 
not pass in dates to complete a retrieval');
+throw new API_Exception('A prior retrieval is in progress. Do not pass 
in dates to complete a retrieval');
   }
   $request->setRetrievalParameters($jobSettings['retrieval_parameters']);
 }
@@ -70,25 +69,6 @@
   'end_date' => $endTimestamp,
 ));
 
-  }
-
-  /**
-   * @param $params
-   * @return array
-   */
-  public static function getJobSettings($params) {
-$settings = self::getSettings();
-$jobSettings = CRM_Utils_Array::value($params['mail_provider'], 
$settings['omnimail_omnirecipient_load'], array());
-return $jobSettings;
-  }
-
-  /**
-   * @return array|mixed
-   */
-  protected static 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove ParserOptions::legacyOptions() and cleanup related code

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

Change subject: Remove ParserOptions::legacyOptions() and cleanup related code
..


Remove ParserOptions::legacyOptions() and cleanup related code

ParserOptions::legacyOptions() has been sitting around since 1.17.
Originally it seems to have been intended as a way to avoid a mass cache
invalidation (similar to optionsHashPre30() from I7fb9ffca9). That code
was mostly removed in 1.23, but legacyOptions() was left behind because
it was also being used in a few places as "all cache-varying options"
(despite it not being documented for that purpose) where we'd rather
have any key than no key at all.

This patch creates an actual ParserOptions::allCacheVaryingOptions()
method for those use cases and deprecates the long-obsolete
legacyOptions().

It also makes more explicit the use of the "all cache-varying options"
fallback in ParserCache::getKey(), and doesn't bother trying to use that
fallback in ParserCache::get() where it no longer makes sense.

Change-Id: Ife1e54744155136a570210c03fe907f18f8e8ece
---
M includes/parser/ParserCache.php
M includes/parser/ParserOptions.php
M tests/phpunit/includes/parser/ParserOptionsTest.php
3 files changed, 120 insertions(+), 19 deletions(-)

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



diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php
index 76a7e1e..3b84c4b 100644
--- a/includes/parser/ParserCache.php
+++ b/includes/parser/ParserCache.php
@@ -26,6 +26,26 @@
  * @todo document
  */
 class ParserCache {
+   /**
+* Constants for self::getKey()
+* @since 1.30
+*/
+
+   /** Use only current data */
+   const USE_CURRENT_ONLY = 0;
+
+   /** Use expired data if current data is unavailable */
+   const USE_EXPIRED = 1;
+
+   /** Use expired data or data from different revisions if current data 
is unavailable */
+   const USE_OUTDATED = 2;
+
+   /**
+* Use expired data and data from different revisions, and if all else
+* fails vary on all variable options
+*/
+   const USE_ANYTHING = 3;
+
/** @var BagOStuff */
private $mMemc;
/**
@@ -103,7 +123,7 @@
 */
public function getETag( $article, $popts ) {
return 'W/"' . $this->getParserOutputKey( $article,
-   $popts->optionsHash( ParserOptions::legacyOptions(), 
$article->getTitle() ) ) .
+   $popts->optionsHash( 
ParserOptions::allCacheVaryingOptions(), $article->getTitle() ) ) .
"--" . $article->getTouched() . '"';
}
 
@@ -130,15 +150,20 @@
 * It would be preferable to have this code in get()
 * instead of having Article looking in our internals.
 *
-* @todo Document parameter $useOutdated
-*
 * @param WikiPage $article
 * @param ParserOptions $popts
-* @param bool $useOutdated (default true)
+* @param int|bool $useOutdated One of the USE constants. For backwards
+*  compatibility, boolean false is treated as USE_CURRENT_ONLY and
+*  boolean true is treated as USE_ANYTHING.
 * @return bool|mixed|string
+* @since 1.30 Changed $useOutdated to an int and added the non-boolean 
values
 */
-   public function getKey( $article, $popts, $useOutdated = true ) {
+   public function getKey( $article, $popts, $useOutdated = 
self::USE_ANYTHING ) {
global $wgCacheEpoch;
+
+   if ( is_bool( $useOutdated ) ) {
+   $useOutdated = $useOutdated ? self::USE_ANYTHING : 
self::USE_CURRENT_ONLY;
+   }
 
if ( $popts instanceof User ) {
wfWarn( "Use of outdated prototype ParserCache::getKey( 
&\$article, &\$user )\n" );
@@ -150,14 +175,16 @@
$optionsKey = $this->mMemc->get(
$this->getOptionsKey( $article ), $casToken, 
BagOStuff::READ_VERIFIED );
if ( $optionsKey instanceof CacheTime ) {
-   if ( !$useOutdated && $optionsKey->expired( 
$article->getTouched() ) ) {
+   if ( $useOutdated < self::USE_EXPIRED && 
$optionsKey->expired( $article->getTouched() ) ) {
wfIncrStats( "pcache.miss.expired" );
$cacheTime = $optionsKey->getCacheTime();
wfDebugLog( "ParserCache",
"Parser options key expired, touched " 
. $article->getTouched()
. ", epoch $wgCacheEpoch, cached 
$cacheTime\n" );
return false;
-   } elseif ( !$useOutdated && 
$optionsKey->isDifferentRevision( 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: add releasers-mobile admin group to releases1001

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363107 )

Change subject: releases: add releasers-mobile admin group to releases1001
..


releases: add releasers-mobile admin group to releases1001

releasers-mediawiki is already here, but releasers-mobile is
missing. We are migrating this part of bromine over here.

We are syncing /srv/org/wikimedia/releases/ though, so
that includes ./mobile/ and these files are owned this group and
they should be able to upload here as well in the future.

As of right now the DNS name releases.wm.org still points to
bromine. We will let you know once that changes (soon).

Bug: T164040
Change-Id: Ic16804bfc6b54d47142bbb654977fed796a88a12
---
M hieradata/role/common/releases.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/role/common/releases.yaml 
b/hieradata/role/common/releases.yaml
index 4c1bd9e..ff1f796 100644
--- a/hieradata/role/common/releases.yaml
+++ b/hieradata/role/common/releases.yaml
@@ -1,2 +1,3 @@
 admin::groups:
   - releasers-mediawiki
+  - releasers-mobile

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic16804bfc6b54d47142bbb654977fed796a88a12
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: releases: add releasers-mobile admin group to releases1001

2017-07-03 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363107 )

Change subject: releases: add releasers-mobile admin group to releases1001
..

releases: add releasers-mobile admin group to releases1001

releasers-mediawiki is already here, but releasers-mediawiki is
missing.

We are syncing /srv/org/wikimedia/releases/ though, so
that includes ./mobile/ and these files are owned this group and
they should be able to upload here as well in the future.

Bug: T164040
Change-Id: Ic16804bfc6b54d47142bbb654977fed796a88a12
---
M hieradata/role/common/releases.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/363107/1

diff --git a/hieradata/role/common/releases.yaml 
b/hieradata/role/common/releases.yaml
index 4c1bd9e..ff1f796 100644
--- a/hieradata/role/common/releases.yaml
+++ b/hieradata/role/common/releases.yaml
@@ -1,2 +1,3 @@
 admin::groups:
   - releasers-mediawiki
+  - releasers-mobile

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic16804bfc6b54d47142bbb654977fed796a88a12
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] operations/puppet[production]: rsync::quickdatacopy: fix commandline for cron, don't need f...

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363106 )

Change subject: rsync::quickdatacopy: fix commandline for cron, don't need 
file_path
..


rsync::quickdatacopy: fix commandline for cron, don't need file_path

The current command translates to, example:

/usr/bin/rsync -a rsync://bromine.eqiad.wmnet/srv-org-wikimedia-releases/* 
/srv/org/wikimedia/releases/*

This doesn't work. "Unexpected local arg: /srv/org/wikimedia/releases/debian"
If arg is a remote file/dir, prefix it with a colon (:).
rsync error: syntax or usage error (code 1).

This works and is how i did it manually.

sudo /usr/bin/rsync -av rsync://bromine.eqiad.wmnet/srv-org-wikimedia-releases 
/srv/org/wikimedia/releases/

For that we only need $title and $module_path. I suggest we just drop file_path 
and keep it even simpler.
One path, one module.

Bug: T164030
Change-Id: Ia75e3b7d120f50f307192cf35dd09601aa7830e2
---
M modules/rsync/manifests/quickdatacopy.pp
M modules/rsync/templates/quickdatacopy.erb
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/rsync/manifests/quickdatacopy.pp 
b/modules/rsync/manifests/quickdatacopy.pp
index cc74d3d..3b6a21e 100644
--- a/modules/rsync/manifests/quickdatacopy.pp
+++ b/modules/rsync/manifests/quickdatacopy.pp
@@ -14,7 +14,7 @@
 #
 # [*module_path*] What path are we giving to rsync as the docroot for syncing 
from
 #
-# [*file_path*] What file within that document root do we need?
+# [*file_path*] What file within that document root do we need? (currently not 
used)
 #
 # [*ensure*] The usual meaning, set to absent to clean up when done
 #
diff --git a/modules/rsync/templates/quickdatacopy.erb 
b/modules/rsync/templates/quickdatacopy.erb
index 44dc67a..fea2243 100644
--- a/modules/rsync/templates/quickdatacopy.erb
+++ b/modules/rsync/templates/quickdatacopy.erb
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-/usr/bin/rsync -a rsync://<%= @source_host %>/<%= @title %>/<%= @file_path %> 
<%= @module_path %>/<%= @file_path %>
+/usr/bin/rsync -a rsync://<%= @source_host %>/<%= @title %> <%= @module_path 
%>/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia75e3b7d120f50f307192cf35dd09601aa7830e2
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/puppet[production]: rsync::quickdatacopy: fix commandline for cron, don't need f...

2017-07-03 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363106 )

Change subject: rsync::quickdatacopy: fix commandline for cron, don't need 
file_path
..

rsync::quickdatacopy: fix commandline for cron, don't need file_path

The current command translates to, example:

/usr/bin/rsync -a rsync://bromine.eqiad.wmnet/srv-org-wikimedia-releases/* 
/srv/org/wikimedia/releases/*

This doesn't work. "Unexpected local arg: /srv/org/wikimedia/releases/debian"
If arg is a remote file/dir, prefix it with a colon (:).
rsync error: syntax or usage error (code 1).

This works and is how i did it manually.

sudo /usr/bin/rsync -av rsync://bromine.eqiad.wmnet/srv-org-wikimedia-releases 
/srv/org/wikimedia/releases/

For that we only need $title and $module_path. I suggest we just drop file_path 
and keep it even simpler.
One path, one module.

Bug: T164030
Change-Id: Ia75e3b7d120f50f307192cf35dd09601aa7830e2
---
M modules/rsync/manifests/quickdatacopy.pp
M modules/rsync/templates/quickdatacopy.erb
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/363106/1

diff --git a/modules/rsync/manifests/quickdatacopy.pp 
b/modules/rsync/manifests/quickdatacopy.pp
index cc74d3d..3b6a21e 100644
--- a/modules/rsync/manifests/quickdatacopy.pp
+++ b/modules/rsync/manifests/quickdatacopy.pp
@@ -14,7 +14,7 @@
 #
 # [*module_path*] What path are we giving to rsync as the docroot for syncing 
from
 #
-# [*file_path*] What file within that document root do we need?
+# [*file_path*] What file within that document root do we need? (currently not 
used)
 #
 # [*ensure*] The usual meaning, set to absent to clean up when done
 #
diff --git a/modules/rsync/templates/quickdatacopy.erb 
b/modules/rsync/templates/quickdatacopy.erb
index 44dc67a..fea2243 100644
--- a/modules/rsync/templates/quickdatacopy.erb
+++ b/modules/rsync/templates/quickdatacopy.erb
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-/usr/bin/rsync -a rsync://<%= @source_host %>/<%= @title %>/<%= @file_path %> 
<%= @module_path %>/<%= @file_path %>
+/usr/bin/rsync -a rsync://<%= @source_host %>/<%= @title %> <%= @module_path 
%>/

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia75e3b7d120f50f307192cf35dd09601aa7830e2
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] operations/puppet[production]: rsync/releases: add dest_host parameter, only include what's...

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363105 )

Change subject: rsync/releases: add dest_host parameter, only include what's 
needed
..


rsync/releases: add dest_host parameter, only include what's needed

It seems we can't get away without a "dest_host" parameter because
the source host needs to have a ferm rule that allows dest_host to connect
to rsyncd to pull from it.

Add dest_host parameter to use in ferm rule.

Since now we have a clear separation between source/dest anyways,
only include parts needed on each site, so rsyncd and ferm rule
on the source and the sync command and cron on the destination.

Bug: T164030
Change-Id: I44c23efe0d90b788aff34a94f8005383b07d8081
---
M modules/profile/manifests/microsites/releases.pp
M modules/role/manifests/releases.pp
M modules/rsync/manifests/quickdatacopy.pp
3 files changed, 28 insertions(+), 19 deletions(-)

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



diff --git a/modules/profile/manifests/microsites/releases.pp 
b/modules/profile/manifests/microsites/releases.pp
index e913186..f44de08 100644
--- a/modules/profile/manifests/microsites/releases.pp
+++ b/modules/profile/manifests/microsites/releases.pp
@@ -26,6 +26,7 @@
 rsync::quickdatacopy { 'srv-org-wikimedia-releases':
 ensure  => present,
 source_host => 'bromine.eqiad.wmnet',
+dest_host   => 'releases1001.eqiad.wmnet',
 module_path => '/srv/org/wikimedia/releases',
 }
 
diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index 3f41e488..28e91ec 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -17,6 +17,7 @@
 rsync::quickdatacopy { 'srv-org-wikimedia-releases':
   ensure  => present,
   source_host => 'bromine.eqiad.wmnet',
+  dest_host   => 'releases1001.eqiad.wmnet',
   module_path => '/srv/org/wikimedia/releases',
 }
 }
diff --git a/modules/rsync/manifests/quickdatacopy.pp 
b/modules/rsync/manifests/quickdatacopy.pp
index 3674036..cc74d3d 100644
--- a/modules/rsync/manifests/quickdatacopy.pp
+++ b/modules/rsync/manifests/quickdatacopy.pp
@@ -10,6 +10,8 @@
 #
 # [*source_host*] What machine are we copying data from
 #
+# [*dest_host*] What machine are we copying data to
+#
 # [*module_path*] What path are we giving to rsync as the docroot for syncing 
from
 #
 # [*file_path*] What file within that document root do we need?
@@ -18,35 +20,40 @@
 #
 define rsync::quickdatacopy(
   $source_host,
+  $dest_host,
   $module_path,
   $file_path = '*',
   $ensure = present,
   ) {
 
-  include rsync::server
+  if $source_host == $::fqdn {
 
-  ferm::service { $title:
-  ensure => $ensure,
-  proto  => 'tcp',
-  port   => 873,
-  srange => "@resolve(${source_host})",
+  include rsync::server
+
+  ferm::service { $title:
+  ensure => $ensure,
+  proto  => 'tcp',
+  port   => 873,
+  srange => "@resolve(${dest_host})",
+  }
+
+  rsync::server::module { $title:
+  ensure=> $ensure,
+  read_only => 'yes',
+  path  => $module_path,
+  }
   }
 
-  rsync::server::module { $title:
-  ensure=> $ensure,
-  read_only => 'yes',
-  path  => $module_path,
-  }
+  if $dest_host == $::fqdn {
 
-  file { "/usr/local/sbin/${title}":
-  ensure  => $ensure,
-  owner   => 'root',
-  group   => 'root',
-  mode=> '0755',
-  content => template('rsync/quickdatacopy.erb'),
-  }
+  file { "/usr/local/sbin/${title}":
+  ensure  => $ensure,
+  owner   => 'root',
+  group   => 'root',
+  mode=> '0755',
+  content => template('rsync/quickdatacopy.erb'),
+  }
 
-  if $source_host != $::fqdn {
   cron { 'sync-rsync-data':
   ensure  => $ensure,
   minute  => '*/10',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I44c23efe0d90b788aff34a94f8005383b07d8081
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/puppet[production]: rsync/releases: add dest_host parameter, only include what's...

2017-07-03 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363105 )

Change subject: rsync/releases: add dest_host parameter, only include what's 
needed
..

rsync/releases: add dest_host parameter, only include what's needed

It seems we can't get away without a "dest_host" parameter because
the source host needs to have a ferm rule that allows dest_host to connect
to rsyncd to pull from it.

Add dest_host parameter to use in ferm rule.

Since now we have a clear separation between source/dest anyways,
only include parts needed on each site, so rsyncd and ferm rule
on the source and the sync command and cron on the destination.

Bug: T164030
Change-Id: I44c23efe0d90b788aff34a94f8005383b07d8081
---
M modules/role/manifests/releases.pp
M modules/rsync/manifests/quickdatacopy.pp
2 files changed, 27 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/363105/1

diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index 3f41e488..28e91ec 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -17,6 +17,7 @@
 rsync::quickdatacopy { 'srv-org-wikimedia-releases':
   ensure  => present,
   source_host => 'bromine.eqiad.wmnet',
+  dest_host   => 'releases1001.eqiad.wmnet',
   module_path => '/srv/org/wikimedia/releases',
 }
 }
diff --git a/modules/rsync/manifests/quickdatacopy.pp 
b/modules/rsync/manifests/quickdatacopy.pp
index 3674036..cc74d3d 100644
--- a/modules/rsync/manifests/quickdatacopy.pp
+++ b/modules/rsync/manifests/quickdatacopy.pp
@@ -10,6 +10,8 @@
 #
 # [*source_host*] What machine are we copying data from
 #
+# [*dest_host*] What machine are we copying data to
+#
 # [*module_path*] What path are we giving to rsync as the docroot for syncing 
from
 #
 # [*file_path*] What file within that document root do we need?
@@ -18,35 +20,40 @@
 #
 define rsync::quickdatacopy(
   $source_host,
+  $dest_host,
   $module_path,
   $file_path = '*',
   $ensure = present,
   ) {
 
-  include rsync::server
+  if $source_host == $::fqdn {
 
-  ferm::service { $title:
-  ensure => $ensure,
-  proto  => 'tcp',
-  port   => 873,
-  srange => "@resolve(${source_host})",
+  include rsync::server
+
+  ferm::service { $title:
+  ensure => $ensure,
+  proto  => 'tcp',
+  port   => 873,
+  srange => "@resolve(${dest_host})",
+  }
+
+  rsync::server::module { $title:
+  ensure=> $ensure,
+  read_only => 'yes',
+  path  => $module_path,
+  }
   }
 
-  rsync::server::module { $title:
-  ensure=> $ensure,
-  read_only => 'yes',
-  path  => $module_path,
-  }
+  if $dest_host == $::fqdn {
 
-  file { "/usr/local/sbin/${title}":
-  ensure  => $ensure,
-  owner   => 'root',
-  group   => 'root',
-  mode=> '0755',
-  content => template('rsync/quickdatacopy.erb'),
-  }
+  file { "/usr/local/sbin/${title}":
+  ensure  => $ensure,
+  owner   => 'root',
+  group   => 'root',
+  mode=> '0755',
+  content => template('rsync/quickdatacopy.erb'),
+  }
 
-  if $source_host != $::fqdn {
   cron { 'sync-rsync-data':
   ensure  => $ensure,
   minute  => '*/10',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44c23efe0d90b788aff34a94f8005383b07d8081
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] operations/puppet[production]: releases: use rsync::quickdatacopy in profile on bromine

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363104 )

Change subject: releases: use rsync::quickdatacopy in profile on bromine
..


releases: use rsync::quickdatacopy in profile on bromine

This is a follow-up to I1c9b073f12503f7a8db which adds
this in our new role class for releases* servers.

Since our first source is bromine though and it doesn't use
our new role class, we also need it here.

Later bromine will not use this role anymore and it will
automatically be applied to future releases* servers via the role.

Bug: T164030
This is just needed now to migrate from bromine initially.

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

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



diff --git a/modules/profile/manifests/microsites/releases.pp 
b/modules/profile/manifests/microsites/releases.pp
index 81a899b..e913186 100644
--- a/modules/profile/manifests/microsites/releases.pp
+++ b/modules/profile/manifests/microsites/releases.pp
@@ -23,6 +23,12 @@
 port  => '80',
 }
 
+rsync::quickdatacopy { 'srv-org-wikimedia-releases':
+ensure  => present,
+source_host => 'bromine.eqiad.wmnet',
+module_path => '/srv/org/wikimedia/releases',
+}
+
 include ::profile::backup::host
 backup::set { 'srv-org-wikimedia': }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I083305fb9b7afea76684da4f1f0bb23feca061c8
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/puppet[production]: releases: use rsync::quickdatacopy in profile on bromine

2017-07-03 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363104 )

Change subject: releases: use rsync::quickdatacopy in profile on bromine
..

releases: use rsync::quickdatacopy in profile on bromine

This is a follow-up to I1c9b073f12503f7a8db which adds
this in our new role class for releases* servers.

Since our first source is bromine though and it doesn't use
our new role class, we also need it here.

Later bromine will not use this role anymore and it will
automatically be applied to future releases* servers via the role.

This is just needed now to migrate from bromine initially.

Change-Id: I083305fb9b7afea76684da4f1f0bb23feca061c8
---
M modules/profile/manifests/microsites/releases.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/363104/1

diff --git a/modules/profile/manifests/microsites/releases.pp 
b/modules/profile/manifests/microsites/releases.pp
index 81a899b..d2ba71a 100644
--- a/modules/profile/manifests/microsites/releases.pp
+++ b/modules/profile/manifests/microsites/releases.pp
@@ -23,6 +23,13 @@
 port  => '80',
 }
 
+rsync::quickdatacopy { 'srv-org-wikimedia-releases':
+ensure  => present,
+source_host => 'bromine.eqiad.wmnet',
+module_path => '/srv/org/wikimedia/releases',
+}
+}
+
 include ::profile::backup::host
 backup::set { 'srv-org-wikimedia': }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I083305fb9b7afea76684da4f1f0bb23feca061c8
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/core[master]: RCFilters: Fix parameter name for "namespace"

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

Change subject: RCFilters: Fix parameter name for "namespace"
..


RCFilters: Fix parameter name for "namespace"

Bug: T169579
Change-Id: I3e4c22ab28ccc65275246a777172bdc2fe611a9e
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 7de6669..27387c9 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -56,7 +56,7 @@
trigger: ':',
groups: [ {
// Group definition (single group)
-   name: 'namespaces',
+   name: 'namespace', // parameter name is 
singular
type: 'string_options',
title: mw.msg( 'namespaces' ),
labelPrefixKey: { 'default': 
'rcfilters-tag-prefix-namespace', inverted: 
'rcfilters-tag-prefix-namespace-inverted' },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e4c22ab28ccc65275246a777172bdc2fe611a9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 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/core[master]: RCFilters: Fix parameter name for "namespace"

2017-07-03 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363103 )

Change subject: RCFilters: Fix parameter name for "namespace"
..

RCFilters: Fix parameter name for "namespace"

Bug: T169579
Change-Id: I3e4c22ab28ccc65275246a777172bdc2fe611a9e
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/363103/2

diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
index 7de6669..27387c9 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
@@ -56,7 +56,7 @@
trigger: ':',
groups: [ {
// Group definition (single group)
-   name: 'namespaces',
+   name: 'namespace', // parameter name is 
singular
type: 'string_options',
title: mw.msg( 'namespaces' ),
labelPrefixKey: { 'default': 
'rcfilters-tag-prefix-namespace', inverted: 
'rcfilters-tag-prefix-namespace-inverted' },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e4c22ab28ccc65275246a777172bdc2fe611a9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
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] operations/puppet[production]: releases: Use rsync::quickdatacopy to copy data between servers

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/361812 )

Change subject: releases: Use rsync::quickdatacopy to copy data between servers
..


releases: Use rsync::quickdatacopy to copy data between servers

Copy release data from bromine to new dedicated VM releases1001.

Bug:T164030

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

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



diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index ea40abb..3f41e488 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -13,4 +13,10 @@
 include ::profile::backup::host
 include ::profile::releases::mediawiki
 include ::profile::releases::reprepro
+
+rsync::quickdatacopy { 'srv-org-wikimedia-releases':
+  ensure  => present,
+  source_host => 'bromine.eqiad.wmnet',
+  module_path => '/srv/org/wikimedia/releases',
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c9b073f12503f7a8db33473615549585964f70e
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 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...parsoid[master]: Improve the thumb response in the mock api

2017-07-03 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363102 )

Change subject: Improve the thumb response in the mock api
..

Improve the thumb response in the mock api

 * Necessary for the test in the follow up patch to fail without the
   fix, since previously thumb info isn't returned for all batch
   requests.

Change-Id: I14617f839e860ec8faaed96ace088ba13f11e1de
---
M tests/mockAPI.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
M tests/timedMediaHandlerParserTests.txt
4 files changed, 49 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/02/363102/1

diff --git a/tests/mockAPI.js b/tests/mockAPI.js
index 1010495..7afea06 100644
--- a/tests/mockAPI.js
+++ b/tests/mockAPI.js
@@ -314,6 +314,13 @@
if (props.hasOwnProperty('duration')) {
result.duration = props.duration;
}
+   // The batch api always generates thumbs
+   if (useBatchAPI &&
+   (theight === undefined || theight === null) &&
+   (twidth === undefined || twidth === null)) {
+   twidth = width;
+   theight = height;
+   }
if (twidth || theight) {
if (twidth && (theight === undefined || theight === null)) {
// File::scaleHeight in PHP
@@ -336,15 +343,30 @@
}
}
var urlWidth = twidth;
-   if (twidth >= width || theight >= height) {
-   // The PHP api won't enlarge an image ... but the batch 
api will.
-   if (!useBatchAPI) {
-   twidth = width;
-   theight = height;
+   if (twidth > width) {
+   // The PHP api won't enlarge a bitmap ... but the batch 
api will.
+   // But, to match the PHP sections, don't scale.
+   if (mediatype !== 'DRAWING') {
+   urlWidth = width;
}
-   urlWidth = width;  // That right?
}
-   turl += '/' + urlWidth + 'px-' + normFilename;
+   if (urlWidth !== width || ['AUDIO', 
'VIDEO'].includes(mediatype)) {
+   turl += '/' + urlWidth + 'px-' + normFilename;
+   switch (mediatype) {
+   case 'AUDIO':
+   // No thumbs are generated for audio
+   turl = IMAGE_BASE_URL + 
'/w/resources/assets/file-type-icons/fileicon-ogg.png';
+   break;
+   case 'VIDEO':
+   turl += '.jpg';
+   break;
+   case 'DRAWING':
+   turl += '.png';
+   break;
+   }
+   } else {
+   turl = baseurl;
+   }
result.thumbwidth = twidth;
result.thumbheight = theight;
result.thumburl = turl;
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index ea79c48..c939609 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -139,7 +139,7 @@
 add("wt2html", "{{#speciale:}} page name, unknown", "Parser 
function implementation for pf_speciale missing in Parsoid.");
 add("wt2html", "Image with link parameter, wgNoFollowLinks set to false", "http://example.com/\; data-parsoid=\"{}\">");
 add("wt2html", "Image with link parameter, wgNoFollowDomainExceptions", "http://example.com/\; data-parsoid=\"{}\">");
-add("wt2html", "SVG thumbnails with invalid language code", "caption");
+add("wt2html", "SVG thumbnails with invalid language code", "caption");
 add("wt2html", "T2561: {{/Subpage}}", "{{/Subpage}}");
 add("wt2html", "PAGESINCATEGORY invalid title fatal (r33546 fix)", "Parser
 function implementation for pf_pagesincategory missing in Parsoid.");
 add("wt2html", "Section headings with TOC", " Headline 1 \n Subheadline 1 \n Skipping a level 
\n 
Skipping a level \n\n Headline 2 \nSome text\nAnother 
headline");
@@ -409,7 +409,7 @@
 add("html2html", "Image with link parameter, wgNoFollowDomainExceptions", "http://example.com/images/3/3a/Foobar.jpg\; alt=\"Foobar.jpg\" 
rel=\"mw:externalImage\" data-parsoid='{\"dsr\":[0,41,null,null]}'/>\n");
 add("html2html", "Link to image page- image page normally doesn't exists, 
hence edit link\nAdd test with existing image page\n#Image:test", "[/index.php?title=File:Testaction=editredlink=1
 Image:test]\n");
 add("html2html", "T20784  Link to non-existent image page with caption should 
use caption as link text", 

[MediaWiki-commits] [Gerrit] mediawiki...TemplateSandbox[master]: Allow extensions to register additional namespaces in extens...

2017-07-03 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363100 )

Change subject: Allow extensions to register additional namespaces in 
extension.json
..

Allow extensions to register additional namespaces in extension.json

Extensions can register additional namespaces by setting the
"TemplateSandboxEditNamespaces" attribte in their extension.json.

Change-Id: Ia5d34cb78fa6af337b373731ab1afc0539db4f52
---
M TemplateSandbox.hooks.php
M extension.json
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox 
refs/changes/00/363100/1

diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index 3594499..5cca2ea 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -18,7 +18,6 @@
$editpage->templatesandbox_page = $request->getText( 
'wpTemplateSandboxPage' );
 
if ( $request->wasPosted() ) {
-
if ( $request->getCheck( 'wpTemplateSandboxPreview' ) ) 
{
$editpage->templatesandbox_preview = true;
$editpage->preview = true;
@@ -188,9 +187,14 @@
public static function injectOptions( $editpage, $output, &$tabindex ) {
global $wgTemplateSandboxEditNamespaces;
 
+   $namespaces = array_merge(
+   $wgTemplateSandboxEditNamespaces,
+   ExtensionRegistry::getInstance()->getAttribute( 
'TemplateSandboxEditNamespaces' )
+   );
+
// Show the form if the title is in a whitelisted namespace, or 
if the
// user requested it with 
-   $showForm = $editpage->getTitle()->inNamespaces( 
$wgTemplateSandboxEditNamespaces )
+   $showForm = $editpage->getTitle()->inNamespaces( $namespaces )
|| $output->getRequest()->getCheck( 
'wpTemplateSandboxShow' );
 
if ( !$showForm ) {
diff --git a/extension.json b/extension.json
index 9a9e25f..719061a 100644
--- a/extension.json
+++ b/extension.json
@@ -58,5 +58,6 @@
10
]
},
+   "TemplateSandboxEditNamespaces": [],
"manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5d34cb78fa6af337b373731ab1afc0539db4f52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
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] mediawiki...Scribunto[master]: Set "TemplateSandboxEditNamespaces" in extension.json

2017-07-03 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363101 )

Change subject: Set "TemplateSandboxEditNamespaces" in extension.json
..

Set "TemplateSandboxEditNamespaces" in extension.json

If TemplateSandbox is installed, then enable it in the Module namespace
by default.

Change-Id: I96d9601ff80c2d3eb052c0150fe4392bef5a93a9
Depends-On: Ia5d34cb78fa6af337b373731ab1afc0539db4f52
---
M extension.json
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index c261b39..4f109bc 100644
--- a/extension.json
+++ b/extension.json
@@ -165,5 +165,8 @@
"ScribuntoGatherFunctionStats": false,
"ScribuntoSlowFunctionThreshold": 0.9
},
+   "TemplateSandboxEditNamespaces": [
+   828
+   ],
"manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96d9601ff80c2d3eb052c0150fe4392bef5a93a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
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]: Add extension tests to phpunit.dist

2017-07-03 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363099 )

Change subject: Add extension tests to phpunit.dist
..

Add extension tests to phpunit.dist

Change-Id: I76aec1df847966b6756daf3447b47f0d80226d95
---
M phpunit.xml
M sites/default/bootstrap-phpunit.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php
3 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/99/363099/1

diff --git a/phpunit.xml b/phpunit.xml
index 7ce..2f3e236 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -3,6 +3,7 @@
 xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/3.7/phpunit.xsd;
 bootstrap="sites/default/bootstrap-phpunit.php">
 
+
 
   
 sites/all/modules/large_donation/tests
@@ -36,5 +37,8 @@
 
sites/all/modules/wmf_communication/tests/phpunit
 
sites/all/modules/wmf_communication/tests/phpunit/CiviMailTestBase.php
   
+  
+
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit
+  
 
 
diff --git a/sites/default/bootstrap-phpunit.php 
b/sites/default/bootstrap-phpunit.php
index 310d531..57bd2e0 100644
--- a/sites/default/bootstrap-phpunit.php
+++ b/sites/default/bootstrap-phpunit.php
@@ -16,3 +16,7 @@
 
 // Load contrib libs so tests can inherit from them.
 require_once( DRUPAL_ROOT . '/../vendor/autoload.php' );
+
+putenv('CIVICRM_SETTINGS=' . DRUPAL_ROOT . 
'/sites/default/civicrm.settings.php');
+require_once DRUPAL_ROOT . 
'/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/bootstrap.php';
+
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php
index b7b25a5..38d0216 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php
@@ -38,6 +38,7 @@
   }
 
   public function tearDown() {
+CRM_Core_DAO::executeQuery('DELETE FROM civicrm_mailing_provider_data');
 parent::tearDown();
   }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76aec1df847966b6756daf3447b47f0d80226d95
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] VisualEditor/VisualEditor[master]: ui.FormatAction: fixup selection for empty conversions

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

Change subject: ui.FormatAction: fixup selection for empty conversions
..


ui.FormatAction: fixup selection for empty conversions

Converting an empty node needs a small selection fixup afterwards, otherwise
the selection will be displayed outside the new empty node. This causes issues
with the display of the current format in the toolbar, and with hitting enter
if no content is entered. Don't always reapply the selection, because the
automatic behavior is better if isolateAndUnwrap has actually acted.

Bug: T151594
Change-Id: Ibf143e7954919d0d9efacd53205d5451461a3115
---
M src/ui/actions/ve.ui.FormatAction.js
M tests/ui/actions/ve.ui.FormatAction.test.js
2 files changed, 24 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/src/ui/actions/ve.ui.FormatAction.js 
b/src/ui/actions/ve.ui.FormatAction.js
index eb4fdce..a808e6d 100644
--- a/src/ui/actions/ve.ui.FormatAction.js
+++ b/src/ui/actions/ve.ui.FormatAction.js
@@ -51,9 +51,10 @@
var selected, i, length, contentBranch,
surfaceModel = this.surface.getModel(),
fragment = surfaceModel.getFragment(),
+   fragmentSelection = fragment.getSelection(),
fragments = [];
 
-   if ( !( fragment.getSelection() instanceof ve.dm.LinearSelection ) ) {
+   if ( !( fragmentSelection instanceof ve.dm.LinearSelection ) ) {
return;
}
 
@@ -73,6 +74,15 @@
}
 
fragment.convertNodes( type, attributes );
+   if ( fragmentSelection.isCollapsed() ) {
+   // Converting an empty node needs a small selection fixup 
afterwards,
+   // otherwise the selection will be displayed outside the new 
empty
+   // node. This causes issues with the display of the current 
format in
+   // the toolbar, and with hitting enter if no content is 
entered. Don't
+   // always reapply the selection, because the automatic behavior 
is
+   // better if isolateAndUnwrap has actually acted. (T151594)
+   surfaceModel.setSelection( fragmentSelection );
+   }
this.surface.getView().focus();
return true;
 };
diff --git a/tests/ui/actions/ve.ui.FormatAction.test.js 
b/tests/ui/actions/ve.ui.FormatAction.test.js
index 359fccc..9472d01 100644
--- a/tests/ui/actions/ve.ui.FormatAction.test.js
+++ b/tests/ui/actions/ve.ui.FormatAction.test.js
@@ -96,6 +96,19 @@
},
undo: true,
msg: 'converting preformatted in list item to 
paragraph'
+   },
+   {
+   html: 'a',
+   rangeOrSelection: new ve.Range( 4, 4 ),
+   type: 'heading',
+   attributes: { level: 2 },
+   expectedRangeOrSelection: new ve.Range( 4, 4 ),
+   expectedData: function ( data ) {
+   data.splice( 3, 1, { type: 'heading', 
attributes: { level: 2 } } );
+   data.splice( 4, 1, { type: '/heading' } 
);
+   },
+   undo: true,
+   msg: 'converting empty paragraph to heading'
}
];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf143e7954919d0d9efacd53205d5451461a3115
Gerrit-PatchSet: 3
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Esanders 
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] mediawiki...VisualEditor[master]: Visual diffs: Use DifferenceEngine methods to find revisions...

2017-07-03 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363098 )

Change subject: Visual diffs: Use DifferenceEngine methods to find revisions to 
compare
..

Visual diffs: Use DifferenceEngine methods to find revisions to compare

Like so many other things, this too is more complicated than it needs
to be for historical reasons. Previous code did not corrently handle
parameters like =prev / =next.

This also removes an undeclared dependency on mediawiki.Uri.

Bug: T169574
Change-Id: I76803da5f1a52171a1af8de1f3e31ea127a2da78
---
M VisualEditor.hooks.php
M modules/ve-mw/init/ve.init.mw.DiffPage.init.js
2 files changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 1a27f4c..759a228 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -98,6 +98,10 @@
'oojs-ui.styles.icons-editing-advanced'
] );
$output->addModules( 'ext.visualEditor.diffPage.init' );
+   $output->addJsConfigVars( [
+   'wgVisualDiffOldid' => $diff->getOldid(),
+   'wgVisualDiffNewid' => $diff->getNewid(),
+   ] );
$output->enableOOUI();
$output->addHtml(
'' .
diff --git a/modules/ve-mw/init/ve.init.mw.DiffPage.init.js 
b/modules/ve-mw/init/ve.init.mw.DiffPage.init.js
index 90a307d..c261083 100644
--- a/modules/ve-mw/init/ve.init.mw.DiffPage.init.js
+++ b/modules/ve-mw/init/ve.init.mw.DiffPage.init.js
@@ -36,8 +36,8 @@
var oldRevPromise, newRevPromise, modulePromise, progress,
$revSlider = $( '.mw-revslider-container' ),
$wikitextDiff = $( 'table.diff[data-mw="interface"]' ),
-   oldId = +( new mw.Uri() ).query.oldid,
-   newId = mw.config.get( 'wgRevisionId' );
+   oldId = mw.config.get( 'wgVisualDiffOldid' ),
+   newId = mw.config.get( 'wgVisualDiffNewid' );
 
mode = item.getData();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76803da5f1a52171a1af8de1f3e31ea127a2da78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: TextInputWidgets: update for deprecated multiline behavior

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

Change subject: TextInputWidgets: update for deprecated multiline behavior
..


TextInputWidgets: update for deprecated multiline behavior

Remove config option `multiline` and change to MultilineTextInputWidget as
appropriate.

Bug: T169272
Change-Id: I45565f01de76a88d64d7b0691d1e7279354f375d
---
M modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
M modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
6 files changed, 4 insertions(+), 9 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js 
b/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
index 1ccb3f9..68f7ca5 100644
--- a/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
+++ b/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
@@ -19,7 +19,7 @@
// Parent constructors
ve.ce.MWWikitextSurface.super.apply( this, arguments );
 
-   this.pasteTargetInput = new OO.ui.TextInputWidget( { multiline: true } 
);
+   this.pasteTargetInput = new OO.ui.MultilineTextInputWidget();
 };
 
 /* Inheritance */
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 2ca281b..8f0a82a 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -127,9 +127,8 @@
.addClass( 've-ui-mwGalleryDialog-highlighted-image' );
this.filenameFieldset.$element.append( this.$highlightedImage );
// TODO: make into a ve.ui.MWTargetWidget once Parsoid handles galleries
-   this.highlightedCaptionInput = new OO.ui.TextInputWidget( {
+   this.highlightedCaptionInput = new OO.ui.MultilineTextInputWidget( {
placeholder: ve.msg( 
'visualeditor-mwgallerydialog-image-caption-placeholder' ),
-   multiline: true,
autosize: true
} );
this.highlightedCaptionFieldset = new OO.ui.FieldsetLayout( {
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
index 293d0e2..c900ac8 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
@@ -58,7 +58,6 @@
} );
// Note that this overrides this.input from ve.ui.MWExtensionWindow
this.input = new ve.ui.MWPreTextInputWidget( {
-   multiline: true,
// This number doesn't really matter, it just needs to be large.
// The real height is enforced by #getBodyHeight and max-height 
in CSS.
rows: 100,
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index 017095e..7312479 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -513,8 +513,7 @@
this.$editSummaryLabel = $( '' ).addClass( 
've-ui-mwSaveDialog-summaryLabel' )
.html( ve.init.platform.getParsedMessage( 'summary' ) )
.find( 'a' ).attr( 'target', '_blank' ).end();
-   this.editSummaryInput = new OO.ui.TextInputWidget( {
-   multiline: true,
+   this.editSummaryInput = new OO.ui.MultilineTextInputWidget( {
placeholder: ve.msg( 'visualeditor-editsummary' ),
classes: [ 've-ui-mwSaveDialog-summary' ],
inputFilter: function ( value ) {
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
index 15c5cab..595daf5 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
@@ -27,8 +27,7 @@
 
// Properties
this.content = content;
-   this.textInput = new OO.ui.TextInputWidget( {
-   multiline: true,
+   this.textInput = new OO.ui.MultilineTextInputWidget( {
autosize: true,
classes: [ 've-ui-mwTransclusionDialog-input' ]
} )
diff --git a/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js 
b/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
index e00b77e..57ea1ae 100644
--- a/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
+++ b/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
@@ -56,7 +56,6 @@
 ve.ui.MWExtensionWindow.prototype.initialize = function () {
this.input = new ve.ui.WhitespacePreservingTextInputWidget( {
limit: 1,
-   multiline: true,
classes: [ 've-ui-mwExtensionWindow-input' ]
} );
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/363095
To 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Minimal demo: update deprecated TextInputWidget

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

Change subject: Minimal demo: update deprecated TextInputWidget
..


Minimal demo: update deprecated TextInputWidget

Change-Id: I985ebe9a7968b3bb9cfe704c9e49341dc6469a38
---
M demos/ve/demo.minimal.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved



diff --git a/demos/ve/demo.minimal.js b/demos/ve/demo.minimal.js
index 0be6f52..633c6e6 100644
--- a/demos/ve/demo.minimal.js
+++ b/demos/ve/demo.minimal.js
@@ -32,7 +32,7 @@
convertText.setValue( target.getSurface().getHtml() );
} );
 
-   convertText = new OO.ui.TextInputWidget( { multiline: true, 
autosize: true, classes: [ 've-demo-html' ] } );
+   convertText = new OO.ui.MultilineTextInputWidget( { autosize: 
true, classes: [ 've-demo-html' ] } );
 
$( '.ve-demo-output' ).append(
convertButton.$element,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I985ebe9a7968b3bb9cfe704c9e49341dc6469a38
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Bartosz Dziewoński 
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] mediawiki...Wikibase[master]: Replace self-made finally logic with actual "finally" sections

2017-07-03 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363097 )

Change subject: Replace self-made finally logic with actual "finally" sections
..

Replace self-made finally logic with actual "finally" sections

Bug: T169508
Change-Id: Iacc4dcfc5b4847a9de987bb1cf109f98dda52e9e
---
M client/includes/Usage/Sql/SqlUsageTracker.php
1 file changed, 11 insertions(+), 32 deletions(-)


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

diff --git a/client/includes/Usage/Sql/SqlUsageTracker.php 
b/client/includes/Usage/Sql/SqlUsageTracker.php
index ec5662f..3f76f70 100644
--- a/client/includes/Usage/Sql/SqlUsageTracker.php
+++ b/client/includes/Usage/Sql/SqlUsageTracker.php
@@ -3,7 +3,6 @@
 namespace Wikibase\Client\Usage\Sql;
 
 use ArrayIterator;
-use Exception;
 use InvalidArgumentException;
 use Traversable;
 use Wikimedia\Rdbms\Database;
@@ -145,9 +144,8 @@
 * @param int $pageId
 * @param EntityUsage[] $usages
 *
-* @throws Exception
+* @throws InvalidArgumentException
 * @throws UsageTrackerException
-* @throws Exception
 */
public function addUsedEntities( $pageId, array $usages ) {
if ( !is_int( $pageId ) ) {
@@ -174,16 +172,10 @@
 
// Actually add the new entries
$usageTable->addUsages( $pageId, $added );
-
+   } catch ( DBError $ex ) {
+   throw new UsageTrackerException( $ex->getMessage(), 
$ex->getCode(), $ex );
+   } finally {
$this->connectionManager->releaseConnection( $db );
-   } catch ( Exception $ex ) {
-   $this->connectionManager->releaseConnection( $db );
-
-   if ( $ex instanceof DBError ) {
-   throw new UsageTrackerException( 
$ex->getMessage(), $ex->getCode(), $ex );
-   } else {
-   throw $ex;
-   }
}
}
 
@@ -195,9 +187,8 @@
 *
 * @return EntityUsage[] Usages that have been removed
 *
-* @throws Exception
+* @throws InvalidArgumentException
 * @throws UsageTrackerException
-* @throws Exception
 */
public function replaceUsedEntities( $pageId, array $usages ) {
if ( !is_int( $pageId ) ) {
@@ -222,17 +213,11 @@
$usageTable->removeUsages( $pageId, $removed );
$usageTable->addUsages( $pageId, $added );
 
-   $this->connectionManager->releaseConnection( $db );
-
return $removed;
-   } catch ( Exception $ex ) {
+   } catch ( DBError $ex ) {
+   throw new UsageTrackerException( $ex->getMessage(), 
$ex->getCode(), $ex );
+   } finally {
$this->connectionManager->releaseConnection( $db );
-
-   if ( $ex instanceof DBError ) {
-   throw new UsageTrackerException( 
$ex->getMessage(), $ex->getCode(), $ex );
-   } else {
-   throw $ex;
-   }
}
}
 
@@ -242,7 +227,6 @@
 * @param int $pageId
 *
 * @return EntityUsage[]
-* @throws Exception
 * @throws UsageTrackerException
 */
public function pruneUsages( $pageId ) {
@@ -254,16 +238,11 @@
$usageTable = $this->newUsageTable( $db );
$pruned = $usageTable->pruneUsages( $pageId );
 
-   $this->connectionManager->releaseConnection( $db );
return $pruned;
-   } catch ( Exception $ex ) {
+   } catch ( DBError $ex ) {
+   throw new UsageTrackerException( $ex->getMessage(), 
$ex->getCode(), $ex );
+   } finally {
$this->connectionManager->releaseConnection( $db );
-
-   if ( $ex instanceof DBError ) {
-   throw new UsageTrackerException( 
$ex->getMessage(), $ex->getCode(), $ex );
-   } else {
-   throw $ex;
-   }
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacc4dcfc5b4847a9de987bb1cf109f98dda52e9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Minimal demo: update deprecated TextInputWidget

2017-07-03 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363096 )

Change subject: Minimal demo: update deprecated TextInputWidget
..

Minimal demo: update deprecated TextInputWidget

Change-Id: I985ebe9a7968b3bb9cfe704c9e49341dc6469a38
---
M demos/ve/demo.minimal.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/96/363096/1

diff --git a/demos/ve/demo.minimal.js b/demos/ve/demo.minimal.js
index 0be6f52..633c6e6 100644
--- a/demos/ve/demo.minimal.js
+++ b/demos/ve/demo.minimal.js
@@ -32,7 +32,7 @@
convertText.setValue( target.getSurface().getHtml() );
} );
 
-   convertText = new OO.ui.TextInputWidget( { multiline: true, 
autosize: true, classes: [ 've-demo-html' ] } );
+   convertText = new OO.ui.MultilineTextInputWidget( { autosize: 
true, classes: [ 've-demo-html' ] } );
 
$( '.ve-demo-output' ).append(
convertButton.$element,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I985ebe9a7968b3bb9cfe704c9e49341dc6469a38
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Custom TextInputWidgets: clean up unneeded multiline config

2017-07-03 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363095 )

Change subject: Custom TextInputWidgets: clean up unneeded multiline config
..

Custom TextInputWidgets: clean up unneeded multiline config

Bug: T169272
Change-Id: I45565f01de76a88d64d7b0691d1e7279354f375d
---
M modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
M modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
6 files changed, 4 insertions(+), 9 deletions(-)


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

diff --git a/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js 
b/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
index 1ccb3f9..898a457 100644
--- a/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
+++ b/modules/ve-mw/ce/ve.ce.MWWikitextSurface.js
@@ -19,7 +19,7 @@
// Parent constructors
ve.ce.MWWikitextSurface.super.apply( this, arguments );
 
-   this.pasteTargetInput = new OO.ui.TextInputWidget( { multiline: true } 
);
+   this.pasteTargetInput = new OO.ui.MultilineTextInputWidget( {} );
 };
 
 /* Inheritance */
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 2ca281b..8f0a82a 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -127,9 +127,8 @@
.addClass( 've-ui-mwGalleryDialog-highlighted-image' );
this.filenameFieldset.$element.append( this.$highlightedImage );
// TODO: make into a ve.ui.MWTargetWidget once Parsoid handles galleries
-   this.highlightedCaptionInput = new OO.ui.TextInputWidget( {
+   this.highlightedCaptionInput = new OO.ui.MultilineTextInputWidget( {
placeholder: ve.msg( 
'visualeditor-mwgallerydialog-image-caption-placeholder' ),
-   multiline: true,
autosize: true
} );
this.highlightedCaptionFieldset = new OO.ui.FieldsetLayout( {
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
index 293d0e2..c900ac8 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWPreDialog.js
@@ -58,7 +58,6 @@
} );
// Note that this overrides this.input from ve.ui.MWExtensionWindow
this.input = new ve.ui.MWPreTextInputWidget( {
-   multiline: true,
// This number doesn't really matter, it just needs to be large.
// The real height is enforced by #getBodyHeight and max-height 
in CSS.
rows: 100,
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index 017095e..7312479 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -513,8 +513,7 @@
this.$editSummaryLabel = $( '' ).addClass( 
've-ui-mwSaveDialog-summaryLabel' )
.html( ve.init.platform.getParsedMessage( 'summary' ) )
.find( 'a' ).attr( 'target', '_blank' ).end();
-   this.editSummaryInput = new OO.ui.TextInputWidget( {
-   multiline: true,
+   this.editSummaryInput = new OO.ui.MultilineTextInputWidget( {
placeholder: ve.msg( 'visualeditor-editsummary' ),
classes: [ 've-ui-mwSaveDialog-summary' ],
inputFilter: function ( value ) {
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
index 15c5cab..595daf5 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWTransclusionContentPage.js
@@ -27,8 +27,7 @@
 
// Properties
this.content = content;
-   this.textInput = new OO.ui.TextInputWidget( {
-   multiline: true,
+   this.textInput = new OO.ui.MultilineTextInputWidget( {
autosize: true,
classes: [ 've-ui-mwTransclusionDialog-input' ]
} )
diff --git a/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js 
b/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
index e00b77e..57ea1ae 100644
--- a/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
+++ b/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js
@@ -56,7 +56,6 @@
 ve.ui.MWExtensionWindow.prototype.initialize = function () {
this.input = new ve.ui.WhitespacePreservingTextInputWidget( {
limit: 1,
-   multiline: true,
classes: [ 've-ui-mwExtensionWindow-input' ]
} );
 };

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

Gerrit-MessageType: 

[MediaWiki-commits] [Gerrit] eventlogging[master]: Fix mysql handler scid grouping

2017-07-03 Thread Mforns (Code Review)
Mforns has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363092 )

Change subject: Fix mysql handler scid grouping
..

Fix mysql handler scid grouping

The mysql handler groups events by scid before it sends them to
store_sql_events. store_sql_events assumes all events in the batch
belong to the same schema, and gets the table it should insert
them all from the first event in the batch.

This is a problem with events that come from eventBus, because
they can share a scid. If they do, the mysql handler will group
them together in the same batch and send them together to
store_sql_events, who will determine the table to insert into
by the topic of the first event in the batch. This causes that
the whole batch of mixed events gets inserted into the same table.

This patch fixes the grouping of the events by adding the topic
to the group key (batch_key).

Bug: T150369
Change-Id: Ie714f4fcf7bb66614e8f4f89dbf7a66e6464aaba
---
M eventlogging/handlers.py
1 file changed, 15 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/92/363092/1

diff --git a/eventlogging/handlers.py b/eventlogging/handlers.py
index f97e008..e5da360 100644
--- a/eventlogging/handlers.py
+++ b/eventlogging/handlers.py
@@ -480,21 +480,26 @@
 event = (yield)
 # Group the event stream by schema (and revision)
 scid = event.scid()
-scid_events, first_timestamp = events[scid]
-scid_events.append(event)
+try:
+topic = event.topic()
+except TopicNotFound:
+topic = None
+batch_key = (scid, topic)
+batch_events, first_timestamp = events[batch_key]
+batch_events.append(event)
 # Whenever the batch reaches
 # the size specified by batch_size or it hasn't received events
 # for more than batch_time seconds it is flushed into mysql.
-if (len(scid_events) >= batch_size or
+if (len(batch_events) >= batch_size or
 time.time() - first_timestamp >= batch_time):
 try:
-store_sql_events(meta, scid, scid_events, replace=replace)
+store_sql_events(meta, scid, batch_events, replace=replace)
 except jsonschema.SchemaError as e:
 logger.error(e.message)
 else:
 if stats:
-stats.incr('overall.inserted', len(scid_events))
-del events[scid]
+stats.incr('overall.inserted', len(batch_events))
+del events[batch_key]
 except Exception:
 t = traceback.format_exc()
 logger.warn('Exception caught %s', t)
@@ -502,14 +507,15 @@
 finally:
 # If there are any batched events remaining,
 # process them before exiting.
-for scid, (scid_events, _) in events.iteritems():
+for batch_key, (batch_events, _) in events.iteritems():
+scid = batch_key[0]
 try:
-store_sql_events(meta, scid, scid_events, replace=replace)
+store_sql_events(meta, scid, batch_events, replace=replace)
 except jsonschema.SchemaError as e:
 logger.error(e.message)
 else:
 if stats:
-stats.incr('overall.inserted', len(scid_events))
+stats.incr('overall.inserted', len(batch_events))
 logger.info(
 'Finally finished inserting remaining events '
 'before exiting sql handler.'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie714f4fcf7bb66614e8f4f89dbf7a66e6464aaba
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Mforns 

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Make sure popup appears for both classic and wikitext editors

2017-07-03 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363090 )

Change subject: Make sure popup appears for both classic and wikitext editors
..

Make sure popup appears for both classic and wikitext editors

Bug: T165003
Change-Id: I4b1c9498df7931643ea3c39d6d2afd9384e47de0
---
M CodeMirror.hooks.php
M extension.json
M resources/ext.CodeMirror.js
3 files changed, 27 insertions(+), 19 deletions(-)


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

diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index 9c88320..34364fa 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -127,7 +127,6 @@
 */
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
if ( self::isCodeMirrorEnabled( $out->getContext() ) ) {
-   $out->enableOOUI();
$out->addModules( 'ext.CodeMirror' );
}
}
diff --git a/extension.json b/extension.json
index e9fd787..bff8255 100644
--- a/extension.json
+++ b/extension.json
@@ -29,7 +29,7 @@
"mediawiki.api",
"mediawiki.api.options",
"user.options",
-   "oojs-ui",
+   "oojs-ui-widgets",
"mediawiki.storage"
],
"scripts": [
diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index abf6a24..aa823ac 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -412,6 +412,28 @@
popup.toggle( true );
}
 
+   /**
+* Handle popup. If popup hasn't been shown before, show popup and add 
a localStorage entry.
+* check it before showing popup in future.
+*/
+   function handlePopup() {
+   popupStatus = mw.storage.get( 'codemirror-try-popup' );
+   // If popup entry isn't in local storage, lets show them the 
popup
+   if ( !popupStatus ) {
+   mw.storage.set( 'codemirror-try-popup', 1 );
+   addPopup();
+   $( '.codemirror-popup-btn-yes' ).click( function () {
+   $( enableCodeMirror );
+   $( setCodeEditorPreference( true ) );
+   $( updateToolbarButton );
+   popup.toggle( false );
+   } );
+   $( '.codemirror-popup-btn-no' ).click( function () {
+   popup.toggle( false );
+   } );
+   }
+   }
+
/* Check if view is in edit mode and that the required modules are 
available. Then, customize the toolbar … */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== 
-1 ) {
if ( wikiEditorToolbarEnabled ) {
@@ -432,26 +454,13 @@
// We don't know when button will be added, 
wait until the document is ready to update it
$( function () {
updateToolbarButton();
-   // Is there already a local storage 
entry?
-   // If so, we already showed them the 
popup, don't show again
-   popupStatus = mw.storage.get( 
'codemirror-try-popup' );
-   // If popup entry isn't in local 
storage, lets show them the popup
-   if ( !popupStatus ) {
-   mw.storage.set( 
'codemirror-try-popup', 1 );
-   addPopup();
-   $( '.codemirror-popup-btn-yes' 
).click( function () {
-   enableCodeMirror();
-   
setCodeEditorPreference( true );
-   updateToolbarButton();
-   popup.toggle( false );
-   } );
-   $( '.codemirror-popup-btn-no' 
).click( function () {
-   popup.toggle( false );
-   } );
-   }
} );
} );
}
+   // Wait for DOM before loading our popup
+   $( function() {
+   handlePopup();
+   } );
}
 
// enable 

[MediaWiki-commits] [Gerrit] mediawiki...TextExtracts[master]: WIP: more test cases

2017-07-03 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363083 )

Change subject: WIP: more test cases
..

WIP: more test cases

Change-Id: I928299d5f008c37d3bc7d28ce226bf4f6be02bcc
---
M includes/ExtractFormatter.php
M tests/phpunit/ExtractFormatterTest.php
2 files changed, 8 insertions(+), 25 deletions(-)


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

diff --git a/includes/ExtractFormatter.php b/includes/ExtractFormatter.php
index 48a4e88..dd714bb 100644
--- a/includes/ExtractFormatter.php
+++ b/includes/ExtractFormatter.php
@@ -212,31 +212,8 @@
 * @return string
 */
protected static function getFirstSentencesPlain( $text, 
$requestedSentenceCount ) {
-   // Based on code from OpenSearchXml by Brion Vibber
-   $endchars = [
-   '[^\p{Lu}]\.(?:[ \n]|$)', '[\!\?](?:[ \n]|$)', // 
regular ASCII
-   '。', // full-width ideographic full-stop
-   '.', '!', '?', // double-width roman forms
-   '。', // half-width ideographic full stop
-   ];
-
-   $endgroup = implode( '|', $endchars );
-   $regexp = "/($endgroup)+/u";
-
-   $matches = [];
-   $res = preg_match_all( $regexp, $text, $matches, 
PREG_OFFSET_CAPTURE );
-
-   if ( $res ) {
-   $index = min( $requestedSentenceCount, $res ) - 1;
-   list( $tail, $length ) = $matches[0][ $index ];
-   // PCRE returns raw offsets, so using substr() instead 
of mb_substr()
-   $text = substr( $text, 0, $length ) . trim( $tail );
-   } else {
-   // Just return the first line
-   $lines = explode( "\n", $text, 2 );
-   $text = trim( $lines[0] );
-   }
-   return $text;
+   $sentences = self::explodeSentences( $text );
+   return implode( '', array_slice( $sentences, 0, 
$requestedSentenceCount ) );
}
 
/**
diff --git a/tests/phpunit/ExtractFormatterTest.php 
b/tests/phpunit/ExtractFormatterTest.php
index 97826ec..4c0318c 100644
--- a/tests/phpunit/ExtractFormatterTest.php
+++ b/tests/phpunit/ExtractFormatterTest.php
@@ -110,6 +110,12 @@
1,
"It's good to stay at the Y.M.C.A. 
establishment."
],
+   // brackets are ignored
+   [
+   "Jon Robson (b. 1985) wrote this 
test.Feel free to refactor it.honestly",
+   1,
+   "Jon Robson (b. 1985) wrote this 
test."
+   ],
// Inappropriate use of `...` is fine
[
'a. b... c. d. e. f. g.',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I928299d5f008c37d3bc7d28ce226bf4f6be02bcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TextExtracts
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...CirrusSearch[master]: Fix UtilTest.php

2017-07-03 Thread DCausse (Code Review)
DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363067 )

Change subject: Fix UtilTest.php
..

Fix UtilTest.php

Change-Id: I7931f273971595ac55b493d85dbceac264c04ef0
---
M tests/unit/UtilTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/tests/unit/UtilTest.php b/tests/unit/UtilTest.php
index 67400ce..10c6a37 100644
--- a/tests/unit/UtilTest.php
+++ b/tests/unit/UtilTest.php
@@ -233,7 +233,7 @@
public function testDisableOverrideBoostTemplatesWithOnWikiConfig() {
$configValues = [
'CirrusSearchBoostTemplates' => [
-   'Featured' => 2,
+   'Featured' => 3,
],
// we can disable on wiki customization
'CirrusSearchIgnoreOnWikiBoostTemplates' => true,
@@ -243,7 +243,7 @@
$cache = $this->makeLocalCache();
$this->putDataIntoCache( $cache, 'ruwiki' );
 
-   $ru = Util::getDefaultBoostTemplates( $this->getHashConfig( 
'ruwiki' ) );
+   $ru = Util::getDefaultBoostTemplates( $config );
$this->assertArrayEquals( 
$configValues['CirrusSearchBoostTemplates'], $ru );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Beta: Add deployment-sca0[34] to the mix

2017-07-03 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363062 )

Change subject: Beta: Add deployment-sca0[34] to the mix
..


Beta: Add deployment-sca0[34] to the mix

Also, increase the deployment group size in beta, since there is no
depooling/repooling going on there.

Bug: T165760
Change-Id: Idebe233f0e98c32856674c0d60353f238d7945cc
---
M scap/environments/beta/betacluster
M scap/environments/beta/scap.cfg
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/scap/environments/beta/betacluster 
b/scap/environments/beta/betacluster
index f62e6b6..f702b62 100644
--- a/scap/environments/beta/betacluster
+++ b/scap/environments/beta/betacluster
@@ -1,3 +1,5 @@
 deployment-sca01.deployment-prep.eqiad.wmflabs
 deployment-sca02.deployment-prep.eqiad.wmflabs
+deployment-sca03.deployment-prep.eqiad.wmflabs
+deployment-sca04.deployment-prep.eqiad.wmflabs
 
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
index 323d650..8958999 100644
--- a/scap/environments/beta/scap.cfg
+++ b/scap/environments/beta/scap.cfg
@@ -1,3 +1,4 @@
 [deployment-prep.eqiad.wmflabs]
 server_groups: default
 dsh_targets: betacluster
+group_size: 10

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idebe233f0e98c32856674c0d60353f238d7945cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/recommendation-api/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Nschaaf 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Beta: Add deployment-sca0[34] to the mix

2017-07-03 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363062 )

Change subject: Beta: Add deployment-sca0[34] to the mix
..

Beta: Add deployment-sca0[34] to the mix

Also, increase the deployment group size in beta, since there is no
depooling/repooling going on there.

Bug: T165760
Change-Id: Idebe233f0e98c32856674c0d60353f238d7945cc
---
M scap/environments/beta/betacluster
M scap/environments/beta/scap.cfg
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/recommendation-api/deploy 
refs/changes/62/363062/1

diff --git a/scap/environments/beta/betacluster 
b/scap/environments/beta/betacluster
index f62e6b6..f702b62 100644
--- a/scap/environments/beta/betacluster
+++ b/scap/environments/beta/betacluster
@@ -1,3 +1,5 @@
 deployment-sca01.deployment-prep.eqiad.wmflabs
 deployment-sca02.deployment-prep.eqiad.wmflabs
+deployment-sca03.deployment-prep.eqiad.wmflabs
+deployment-sca04.deployment-prep.eqiad.wmflabs
 
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
index 323d650..8958999 100644
--- a/scap/environments/beta/scap.cfg
+++ b/scap/environments/beta/scap.cfg
@@ -1,3 +1,4 @@
 [deployment-prep.eqiad.wmflabs]
 server_groups: default
 dsh_targets: betacluster
+group_size: 10

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idebe233f0e98c32856674c0d60353f238d7945cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/recommendation-api/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Create rsync::quickdatacopy

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/361811 )

Change subject: Create rsync::quickdatacopy
..


Create rsync::quickdatacopy

Designed for setting up quick rsync migration bridges. Use case
will be pretty evident in follow-up commit

Change-Id: I9f5d328cd17eb03ea8cacdce1bfb0ef65ba041a7
---
A modules/rsync/manifests/quickdatacopy.pp
A modules/rsync/templates/quickdatacopy.erb
2 files changed, 59 insertions(+), 0 deletions(-)

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



diff --git a/modules/rsync/manifests/quickdatacopy.pp 
b/modules/rsync/manifests/quickdatacopy.pp
new file mode 100644
index 000..3674036
--- /dev/null
+++ b/modules/rsync/manifests/quickdatacopy.pp
@@ -0,0 +1,56 @@
+# == Class rsync::quickdatacopy
+#
+# This class sets up a very quick and dirty rsync server. It's designed to be
+# used for copying data between two (or more) machines, mostly for migrations.
+#
+# Since it's meant to be used for data migrations, it assumes the source and
+# destination locations are the same
+#
+# === Parameters
+#
+# [*source_host*] What machine are we copying data from
+#
+# [*module_path*] What path are we giving to rsync as the docroot for syncing 
from
+#
+# [*file_path*] What file within that document root do we need?
+#
+# [*ensure*] The usual meaning, set to absent to clean up when done
+#
+define rsync::quickdatacopy(
+  $source_host,
+  $module_path,
+  $file_path = '*',
+  $ensure = present,
+  ) {
+
+  include rsync::server
+
+  ferm::service { $title:
+  ensure => $ensure,
+  proto  => 'tcp',
+  port   => 873,
+  srange => "@resolve(${source_host})",
+  }
+
+  rsync::server::module { $title:
+  ensure=> $ensure,
+  read_only => 'yes',
+  path  => $module_path,
+  }
+
+  file { "/usr/local/sbin/${title}":
+  ensure  => $ensure,
+  owner   => 'root',
+  group   => 'root',
+  mode=> '0755',
+  content => template('rsync/quickdatacopy.erb'),
+  }
+
+  if $source_host != $::fqdn {
+  cron { 'sync-rsync-data':
+  ensure  => $ensure,
+  minute  => '*/10',
+  command => "/usr/local/sbin/${title} >/dev/null 2>&1",
+  }
+  }
+}
diff --git a/modules/rsync/templates/quickdatacopy.erb 
b/modules/rsync/templates/quickdatacopy.erb
new file mode 100644
index 000..44dc67a
--- /dev/null
+++ b/modules/rsync/templates/quickdatacopy.erb
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/bin/rsync -a rsync://<%= @source_host %>/<%= @title %>/<%= @file_path %> 
<%= @module_path %>/<%= @file_path %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f5d328cd17eb03ea8cacdce1bfb0ef65ba041a7
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
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...deploy[master]: Beta: Separate the files into environments/beta and do no ch...

2017-07-03 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363053 )

Change subject: Beta: Separate the files into environments/beta and do no 
checks there
..


Beta: Separate the files into environments/beta and do no checks there

Bug: T165760
Change-Id: I5ff0d5c3e45cba4b38df2b7f896356ea8b92a1dc
---
R scap/environments/beta/betacluster
A scap/environments/beta/checks.yaml
A scap/environments/beta/scap.cfg
M scap/scap.cfg
4 files changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/scap/betacluster b/scap/environments/beta/betacluster
similarity index 100%
rename from scap/betacluster
rename to scap/environments/beta/betacluster
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..ff38a8d
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,4 @@
+checks:
+  depool: {}
+  repool: {}
+  endpoints: {}
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
new file mode 100644
index 000..323d650
--- /dev/null
+++ b/scap/environments/beta/scap.cfg
@@ -0,0 +1,3 @@
+[deployment-prep.eqiad.wmflabs]
+server_groups: default
+dsh_targets: betacluster
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 21a994a..ec5b2d3 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -15,5 +15,3 @@
 
 [deployment-prep.eqiad.wmflabs]
 environment: beta
-server_groups: default
-dsh_targets: betacluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ff0d5c3e45cba4b38df2b7f896356ea8b92a1dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/recommendation-api/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Nschaaf 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Beta: Separate the files into environments/beta and do no ch...

2017-07-03 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363053 )

Change subject: Beta: Separate the files into environments/beta and do no 
checks there
..

Beta: Separate the files into environments/beta and do no checks there

Bug: T165760
Change-Id: I5ff0d5c3e45cba4b38df2b7f896356ea8b92a1dc
---
R scap/environments/beta/betacluster
A scap/environments/beta/checks.yaml
A scap/environments/beta/scap.cfg
M scap/scap.cfg
4 files changed, 7 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/recommendation-api/deploy 
refs/changes/53/363053/1

diff --git a/scap/betacluster b/scap/environments/beta/betacluster
similarity index 100%
rename from scap/betacluster
rename to scap/environments/beta/betacluster
diff --git a/scap/environments/beta/checks.yaml 
b/scap/environments/beta/checks.yaml
new file mode 100644
index 000..ff38a8d
--- /dev/null
+++ b/scap/environments/beta/checks.yaml
@@ -0,0 +1,4 @@
+checks:
+  depool: {}
+  repool: {}
+  endpoints: {}
diff --git a/scap/environments/beta/scap.cfg b/scap/environments/beta/scap.cfg
new file mode 100644
index 000..323d650
--- /dev/null
+++ b/scap/environments/beta/scap.cfg
@@ -0,0 +1,3 @@
+[deployment-prep.eqiad.wmflabs]
+server_groups: default
+dsh_targets: betacluster
diff --git a/scap/scap.cfg b/scap/scap.cfg
index 21a994a..ec5b2d3 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -15,5 +15,3 @@
 
 [deployment-prep.eqiad.wmflabs]
 environment: beta
-server_groups: default
-dsh_targets: betacluster

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ff0d5c3e45cba4b38df2b7f896356ea8b92a1dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/recommendation-api/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Echo per-user blacklist on meta

2017-07-03 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363049 )

Change subject: Enable Echo per-user blacklist on meta
..

Enable Echo per-user blacklist on meta

Bug: T150419
Change-Id: Ib08ade77f388395a100f62f81c8090cc67b710e6
---
M wmf-config/InitialiseSettings.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 08424d5..ed84db4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16971,6 +16971,11 @@
'default' => true,
 ],
 
+'wgEchoPerUserBlacklist' => [
+   'default' => false,
+   'metawiki' => true,
+],
+
 // Thanks should be enabled for wikis with Echo
 'wmgUseThanks' => [
'default' => true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib08ade77f388395a100f62f81c8090cc67b710e6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] translatewiki[master]: [ParsoidBatchAPI] Remove keys that have content now

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

Change subject: [ParsoidBatchAPI] Remove keys that have content now
..

[ParsoidBatchAPI] Remove keys that have content now

https://gerrit.wikimedia.org/r/#/c/363014/1/i18n/en.json

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/48/363048/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 4033570..810a8ba 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1957,7 +1957,6 @@
 # Parsoid
 
 Parsoid Batch API
-ignored = apihelp-parsoid-batch-description, 
apihelp-parsoid-batch-param-batch, apihelp-parsoid-batch-summary
 
 # Incomplete message doc
 # Patroller

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

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

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [ParsoidBatchAPI] Remove keys that have content now

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

Change subject: [ParsoidBatchAPI] Remove keys that have content now
..


[ParsoidBatchAPI] Remove keys that have content now

https://gerrit.wikimedia.org/r/#/c/363014/1/i18n/en.json

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

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 4033570..810a8ba 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1957,7 +1957,6 @@
 # Parsoid
 
 Parsoid Batch API
-ignored = apihelp-parsoid-batch-description, 
apihelp-parsoid-batch-param-batch, apihelp-parsoid-batch-summary
 
 # Incomplete message doc
 # Patroller

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: DNS: Add production DNS entries for labtestservices2003, labt...

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363022 )

Change subject: DNS: Add production DNS entries for 
labtestservices2003,labtestcontrol2003,labtestservices2002 and labtestmetal2001
..


DNS: Add production DNS entries for 
labtestservices2003,labtestcontrol2003,labtestservices2002 and labtestmetal2001

Bug:T168894
Bug:T168893
Bug:T168892
Bug:T168891
Change-Id: I7351a5a8b2843d8ff6a8bfb6041e281ad5769049
---
M templates/10.in-addr.arpa
M templates/153.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 82dbc67..8f62220 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -3154,6 +3154,7 @@
 8   1H IN PTR   labtestvirt2003.codfw.wmnet.
 9   1H IN PTR   labtestnet2002.codfw.wmnet.
 10  1H IN PTR   labtestneutron2002.codfw.wmnet.
+11  1H IN PTR   labtestmetal2001.codfw.wmnet.
 
 ; 10.192.21.0/24 - labs-support1-b-codfw
 $ORIGIN 21.192.{{ zonename }}.
diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index 0448d06..084bff5 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -64,6 +64,8 @@
 72  1H  IN PTR  vl2003-eth2.lvs2005.codfw.wmnet.
 73  1H  IN PTR  vl2003-eth2.lvs2006.codfw.wmnet.
 74  1H  IN PTR  tegmen.wikimedia.org.
+75  1H  IN PTR  labtestcontrol2003.wikimedia.org.
+76  1H  IN PTR  labtestservices2002.wikimedia.org.
 
 ; 208.80.153.96/27 (public1-d-codfw)
 97  1H  IN PTR  vrrp-gw-2004.wikimedia.org.
@@ -78,6 +80,7 @@
 106 1H  IN PTR  gerrit2001.wikimedia.org.
 107 1H  IN PTR  gerrit-slave.wikimedia.org.
 108 1H  IN PTR  labtestpuppetmaster2001.wikimedia.org.
+109 1H  IN PTR  labtestservices2003.wikimedia.org.
 
 ; 208.80.153.128/27 labtest codfw public IPs (pool used by openstack)
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 48b2e80..12ed2dd 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -155,8 +155,11 @@
 labservices1001 1H  IN A208.80.155.117
 labservices1002 1H  IN A208.80.154.12
 labtestcontrol2001  1H  IN A208.80.153.47
+labtestcontrol2003  1H  IN A208.80.153.75
 labtestpuppetmaster2001 1H IN A 208.80.153.108
 labtestservices2001 1H  IN A208.80.153.48
+labtestservices2002 1H  IN A208.80.153.76
+labtestservices2003 1H  IN A208.80.153.109
 labtestweb2001  1H  IN A208.80.153.14
 labtestweb2001  1H  IN  2620:0:860:1:208:80:153:14
 lvs1001 1H  IN A208.80.154.55
diff --git a/templates/wmnet b/templates/wmnet
index c565690..6f789c2 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2709,6 +2709,7 @@
 labstore20021H  IN A10.192.21.5
 labstore20031H  IN A10.192.21.6
 labstore20041H  IN A10.192.21.8
+labtestmetal2001  1H  IN A10.192.20.11
 labtestneutron2001  1H  IN A10.192.20.4
 labtestneutron2002  1H  IN A10.192.20.10
 labtestnet2001  1H  IN A10.192.20.5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7351a5a8b2843d8ff6a8bfb6041e281ad5769049
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Chasemp 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobH 
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]: publishing: drop postbuildscript

2017-07-03 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363047 )

Change subject: publishing: drop postbuildscript
..

publishing: drop postbuildscript

Use a shell trap to cleanup the publishing instance. That let us get rid
of the postbuildscript step.

Update publish-on-contint1001

Change-Id: I9a44992d2baa3fb6b85816f321cd895fe012cc37
---
M jjb/publish.yaml
1 file changed, 15 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/47/363047/1

diff --git a/jjb/publish.yaml b/jjb/publish.yaml
index 4235c13..ce18ac9 100644
--- a/jjb/publish.yaml
+++ b/jjb/publish.yaml
@@ -98,6 +98,21 @@
  echo "Publisher Path: $PUBLISHER_PATH"
  echo "..."
 
+ function cleanup_publishing() {{
+echo "Removing directory from publishing instance..."
+rm -rf "$PUBLISHER_PATH"
+# The trick here is that the local side of the rsync does not
+# have the content at all at the time of sync. Rsync expands
+# `--include="$PUBLISHER_PATH/***"` to mean the directory and all 
of
+# it's contents followed by the exclusion of all files not
+# explicitly included. Without the three wildcards rsync will not
+# touch the named directory itself.
+#
+# -- Bryan "bd808" Davis
+rsync --delete --recursive --include="$PUBLISHER_PATH/***" 
--exclude="*" . rsync://10.68.23.254/doc
+ }}
+ trap cleanup_publishing EXIT
+
  LOCAL_DOCROOT="/srv/$WMF_CI_PUB_DOCROOT"
  if [ ! -d $LOCAL_DOCROOT ]; then
 echo "Error: Invalid docroot. Directory $LOCAL_DOCROOT must exist, 
aborting."
@@ -111,27 +126,6 @@
  LOCAL_VHOST=$(echo $WMF_CI_PUB_DOCROOT | awk -F'/' '{ print 
$3"."$2"."$1 }')
  echo
  echo "Published to https://$LOCAL_VHOST/$WMF_CI_PUB_DEST/;
-publishers:
- - postbuildscript:
- builders:
-  - shell: |
-  set -u
-  echo "Removing directory from publishing instance..."
-  rm -rf "$PUBLISHER_PATH"
-  # The trick here is that the local side of the rsync does not
-  # have the content at all at the time of sync. Rsync expands
-  # `--include="$PUBLISHER_PATH/***"` to mean the directory and 
all of
-  # it's contents followed by the exclusion of all files not
-  # explicitly included. Without the three wildcards rsync will not
-  # touch the named directory itself.
-  #
-  # -- Bryan "bd808" Davis
-  rsync --delete --recursive --include="$PUBLISHER_PATH/***" 
--exclude="*" . rsync://10.68.23.254/doc
-
- # Options are confusing, setting them both to false ensures the
- # postbuildscript is ALWAYS run.
- onsuccess: False
- onfailure: False
 properties:
  - build-discarder:
  days-to-keep: 15

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T169293: Media links should point to url not thumb

2017-07-03 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363046 )

Change subject: T169293: Media links should point to url not thumb
..

T169293: Media links should point to url not thumb

Change-Id: I78c42021374a5dfde0238d7d210bd75da644015b
---
M lib/wt2html/tt/LinkHandler.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/46/363046/1

diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index b05f57f..ab12d65 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -1818,7 +1818,8 @@
fileName = hrefParts[2];
}
 
-   var imgHref = getPath(info);
+   // Only pass in the url, since media links should not link to the 
thumburl
+   var imgHref = getPath({ url: info.url });
var imgHrefFileName = imgHref.replace(/.*\//, '');
 
var link = new TagTk('a', [], Util.clone(token.dataAttribs));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78c42021374a5dfde0238d7d210bd75da644015b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add myself to sms contactgroup

2017-07-03 Thread Herron (Code Review)
Herron has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363044 )

Change subject: Add myself to sms contactgroup
..


Add myself to sms contactgroup

Change-Id: Ic8dad72417b1279ca8433bdd176082165d7b
---
M modules/nagios_common/files/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 743c8a1..abd8a0d 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -46,7 +46,7 @@
 
 define contactgroup {
 contactgroup_name   sms
-members 
akosiaris,andrew,ariel,bblack,cmjohnson,dzahn,ema,faidon,fgiunchedi,mark,otto,robh,volans,tstarling,rush,glavagetto,yuvipanda,jmm,jcrespo,team-operations,gehel,madhuvishy,marostegui,elukey
+members 
akosiaris,andrew,ariel,bblack,cmjohnson,dzahn,ema,faidon,fgiunchedi,mark,otto,robh,volans,tstarling,rush,glavagetto,yuvipanda,jmm,jcrespo,team-operations,gehel,madhuvishy,marostegui,elukey,herron
 }
 
 define contactgroup {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8dad72417b1279ca8433bdd176082165d7b
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Herron 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Herron 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix some of the invalid escape sequences

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

Change subject: Fix some of the invalid escape sequences
..


Fix some of the invalid escape sequences

Bug: T164575
Change-Id: Idf8a01717db55309a1cb18a3c82fce783a5b4976
---
M pywikibot/config2.py
M scripts/imagecopy.py
M scripts/imagecopy_self.py
M scripts/table2wiki.py
4 files changed, 14 insertions(+), 13 deletions(-)

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



diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 0d82f2d..35f248d 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -936,7 +936,7 @@
 key1 = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_name)
 _progID = winreg.EnumValue(key1, 0)[0]
 _key2 = _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT,
-'%s\shell\open\command' % _progID)
+r'%s\shell\open\command' % _progID)
 _cmd = _winreg.QueryValueEx(_key2, None)[0]
 # See T102465 for issues relating to using this value.
 cmd = _cmd
diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py
index 80e53eb..7d836a3 100644
--- a/scripts/imagecopy.py
+++ b/scripts/imagecopy.py
@@ -352,11 +352,11 @@
 def fixAuthor(self, pageText):
 """Fix the author field in the information template."""
 informationRegex = re.compile(
-'\|Author\=Original uploader was '
-'(?P\[\[:\w+:\w+:\w+\|\w+\]\] at \[.+\])')
+r'\|Author=Original uploader was '
+r'(?P\[\[:\w+:\w+:\w+\|\w+\]\] at \[.+\])')
 selfRegex = re.compile(
-'\{\{self\|author\='
-'(?P\[\[:\w+:\w+:\w+\|\w+\]\] at \[.+\])\|')
+r'{{self\|author='
+r'(?P\[\[:\w+:\w+:\w+\|\w+\]\] at \[.+\])\|')
 
 # Find the |Author=Original uploader was 
 informationMatch = informationRegex.search(pageText)
@@ -485,8 +485,8 @@
 saltos = getautoskip()
 # print saltos
 for salto in saltos:
-rex = u'\{\{\s*[' + salto[0].upper() + salto[0].lower() + ']' + \
-  salto[1:] + '(\}\}|\|)'
+rex = r'\{\{\s*[' + salto[0].upper() + salto[0].lower() + r']' + \
+  salto[1:] + r'(\}\}|\|)'
 # print rex
 if re.search(rex, pagetext):
 return True
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index aa7d1f2..c45fe22 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -580,8 +580,8 @@
 lang = sourceSite.code
 family = sourceSite.family.name
 conversions = [
-(u'\[\[([^\[\]\|]+)\|([^\[\]\|]+)\]\]', u'[[:%(lang)s:\\1|\\2]]'),
-(u'\[\[([^\[\]\|]+)\]\]', u'[[:%(lang)s:\\1|\\1]]'),
+(r'\[\[([^\[\]\|]+)\|([^\[\]\|]+)\]\]', r'[[:%(lang)s:\1|\2]]'),
+(r'\[\[([^\[\]\|]+)\]\]', r'[[:%(lang)s:\1|\1]]'),
 ]
 for (regex, replacement) in conversions:
 text = re.sub(regex, replacement % {u'lang': lang,
@@ -992,8 +992,8 @@
 if imagepage.site.lang in moveToCommonsTemplate:
 for moveTemplate in moveToCommonsTemplate[
 imagepage.site.lang]:
-imtxt = re.sub(u'(?i)\{\{' + moveTemplate +
-   u'[^\}]*\}\}', u'', imtxt)
+imtxt = re.sub(r'(?i){{' + moveTemplate +
+   r'[^}]*}}', r'', imtxt)
 
 # add {{NowCommons}}
 if imagepage.site.lang in nowCommonsTemplate:
diff --git a/scripts/table2wiki.py b/scripts/table2wiki.py
index 82dba5b..3d41b20 100644
--- a/scripts/table2wiki.py
+++ b/scripts/table2wiki.py
@@ -226,8 +226,9 @@
 # warnings += n
 
 # what is this for?
-newTable, n = re.subn("[\r\n]+<(td|TD)([^>]+?)>([^\r\n]*?)<\/(td|TD)>",
-  r"\r\n|\2 | \3\r\n", newTable)
+newTable, n = re.subn(
+r'[\r\n]+<(td|TD)([^>]+?)>([^\r\n]*?)',
+r'\r\n|\2 | \3\r\n', newTable)
 if n > 0:
 warning_messages.append(
 u"WARNING: (sorry, bot code unreadable (1). I don't know why "

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf8a01717db55309a1cb18a3c82fce783a5b4976
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
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...ParsoidBatchAPI[master]: i18n: Fill out empty apihelp keys

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

Change subject: i18n: Fill out empty apihelp keys
..


i18n: Fill out empty apihelp keys

Change-Id: I6e17f0b50d8bceb6a9942943a658c1231b4fccb7
---
M i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 6516f5a..7a14249 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,9 +5,9 @@
]
},
"parsoidbatchapi-desc": "Batch API for Parsoid",
-   "apihelp-parsoid-batch-description": "",
-   "apihelp-parsoid-batch-summary": "",
-   "apihelp-parsoid-batch-param-batch": "",
+   "apihelp-parsoid-batch-description": "Batching API (for Parsoid) to 
make MediaWiki API requests in bulk",
+   "apihelp-parsoid-batch-summary": "Batch API for Parsoid",
+   "apihelp-parsoid-batch-param-batch": "Action API requests (max 500 per 
match).",
"apierror-parsoid-batch-notallowed": "Client IP address not in 
ParsoidBatchAPI_AllowedIPs.",
"apierror-parsoid-batch-invalidbatch": "Invalid batch, must be array.",
"apierror-parsoid-batch-batchtoolarge": "Batch too large, limit is 
500.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e17f0b50d8bceb6a9942943a658c1231b4fccb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Legoktm 
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] operations/puppet[production]: OCG: Do not use the INFO command as a readiness check

2017-07-03 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363045 )

Change subject: OCG: Do not use the INFO command as a readiness check
..

OCG: Do not use the INFO command as a readiness check

We run Redis behind Nutcracker, which doesn't support the INFO command,
used by the driver as a rediness check. Hence, disable it altogether.

Change-Id: I2a2d302819acfe7dbe7a56f4c60dd57d6ba28156
Depends-On: I61dfc38dd662a2bf86da3568ab21511fe627d5b6
---
M modules/ocg/templates/mw-ocg-service.js.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/363045/1

diff --git a/modules/ocg/templates/mw-ocg-service.js.erb 
b/modules/ocg/templates/mw-ocg-service.js.erb
index 2075233d..f6a3a23 100644
--- a/modules/ocg/templates/mw-ocg-service.js.erb
+++ b/modules/ocg/templates/mw-ocg-service.js.erb
@@ -19,6 +19,7 @@
config.redis.host = "<%= @redis_host %>";
config.redis.port = <%= @redis_port %>;
config.redis.password = "<%= @redis_password %>";
+   config.redis.no_ready_check = true;
 
config.frontend.port = <%= @service_port %>;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a2d302819acfe7dbe7a56f4c60dd57d6ba28156
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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add myself to sms contactgroup

2017-07-03 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363044 )

Change subject: Add myself to sms contactgroup
..

Add myself to sms contactgroup

Change-Id: Ic8dad72417b1279ca8433bdd176082165d7b
---
M modules/nagios_common/files/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/363044/1

diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 743c8a1..abd8a0d 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -46,7 +46,7 @@
 
 define contactgroup {
 contactgroup_name   sms
-members 
akosiaris,andrew,ariel,bblack,cmjohnson,dzahn,ema,faidon,fgiunchedi,mark,otto,robh,volans,tstarling,rush,glavagetto,yuvipanda,jmm,jcrespo,team-operations,gehel,madhuvishy,marostegui,elukey
+members 
akosiaris,andrew,ariel,bblack,cmjohnson,dzahn,ema,faidon,fgiunchedi,mark,otto,robh,volans,tstarling,rush,glavagetto,yuvipanda,jmm,jcrespo,team-operations,gehel,madhuvishy,marostegui,elukey,herron
 }
 
 define contactgroup {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove empty lines at begin of function, if, foreach, switch

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

Change subject: Remove empty lines at begin of function, if, foreach, switch
..


Remove empty lines at begin of function, if, foreach, switch

Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
---
M docs/hooks.txt
M includes/Block.php
M includes/Category.php
M includes/CategoryFinder.php
M includes/CategoryViewer.php
M includes/DeprecatedGlobal.php
M includes/FeedUtils.php
M includes/Linker.php
M includes/MediaWiki.php
M includes/MovePage.php
M includes/OutputHandler.php
M includes/Sanitizer.php
M includes/Title.php
M includes/actions/CreditsAction.php
M includes/api/ApiBase.php
M includes/api/ApiEditPage.php
M includes/api/ApiModuleManager.php
M includes/api/ApiQueryBase.php
M includes/api/ApiQueryUsers.php
M includes/cache/BacklinkCache.php
M includes/changes/ChangesListBooleanFilter.php
M includes/changes/ChangesListFilter.php
M includes/changes/ChangesListFilterGroup.php
M includes/changes/ChangesListStringOptionsFilterGroup.php
M includes/changes/EnhancedChangesList.php
M includes/changes/OldChangesList.php
M includes/changetags/ChangeTags.php
M includes/changetags/ChangeTagsList.php
M includes/changetags/ChangeTagsLogList.php
M includes/changetags/ChangeTagsRevisionList.php
M includes/content/AbstractContent.php
M includes/content/ContentHandler.php
M includes/content/WikitextContent.php
M includes/debug/logger/monolog/LegacyHandler.php
M includes/diff/DiffEngine.php
M includes/diff/DiffFormatter.php
M includes/diff/TableDiffFormatter.php
M includes/export/XmlDumpWriter.php
M includes/gallery/PackedOverlayImageGallery.php
M includes/import/WikiImporter.php
M includes/installer/PostgresUpdater.php
M includes/interwiki/InterwikiLookupAdapter.php
M includes/libs/CryptRand.php
M includes/libs/objectcache/MemcachedClient.php
M includes/libs/xmp/XMP.php
M includes/media/BitmapMetadataHandler.php
M includes/media/Exif.php
M includes/media/IPTC.php
M includes/media/JpegMetadataExtractor.php
M includes/media/MediaHandler.php
M includes/media/PNG.php
M includes/media/TransformationalImageHandler.php
M includes/page/Article.php
M includes/page/WikiPage.php
M includes/parser/CoreParserFunctions.php
M includes/parser/Parser.php
M includes/parser/Preprocessor_DOM.php
M includes/parser/Preprocessor_Hash.php
M includes/resourceloader/ResourceLoaderModule.php
M includes/resourceloader/ResourceLoaderStartUpModule.php
M includes/search/SearchNearMatcher.php
M includes/site/MediaWikiPageNameNormalizer.php
M includes/skins/MediaWikiI18N.php
M includes/skins/Skin.php
M includes/specialpage/ChangesListSpecialPage.php
M includes/specialpage/QueryPage.php
M includes/specialpage/SpecialPageFactory.php
M includes/specials/SpecialChangeEmail.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialExport.php
M includes/specials/SpecialPageData.php
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialRecentchangeslinked.php
M includes/specials/SpecialSearch.php
M includes/specials/SpecialSpecialpages.php
M includes/specials/SpecialStatistics.php
M includes/specials/SpecialTags.php
M includes/specials/SpecialUpload.php
M includes/specials/SpecialUserrights.php
M includes/specials/SpecialWatchlist.php
M includes/title/MediaWikiTitleCodec.php
M includes/upload/UploadBase.php
M includes/user/UserGroupMembership.php
M includes/utils/AutoloadGenerator.php
M includes/widget/search/InterwikiSearchResultSetWidget.php
M includes/widget/search/InterwikiSearchResultWidget.php
M languages/Language.php
M languages/LanguageConverter.php
M languages/classes/LanguageBe_tarask.php
M languages/classes/LanguageKk.php
M languages/classes/LanguageKu_ku.php
M languages/classes/LanguageYue.php
M languages/classes/LanguageZh_hans.php
M maintenance/checkSyntax.php
M maintenance/deleteOldRevisions.php
M maintenance/dumpTextPass.php
M maintenance/importImages.php
M maintenance/language/checkDupeMessages.php
M maintenance/namespaceDupes.php
M maintenance/nukePage.php
M maintenance/oracle/alterSharedConstraints.php
M maintenance/refreshLinks.php
M maintenance/removeUnusedAccounts.php
M maintenance/userOptions.inc
M mw-config/index.php
M phpcs.xml
M tests/phpunit/MediaWikiTestCase.php
M tests/phpunit/includes/GlobalFunctions/GlobalTest.php
M tests/phpunit/includes/LinkerTest.php
M tests/phpunit/includes/WatchedItemIntegrationTest.php
M tests/phpunit/includes/api/generateRandomImages.php
M tests/phpunit/includes/api/query/ApiQueryBasicTest.php
M tests/phpunit/includes/changes/TestRecentChangesHelper.php
M tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php
M tests/phpunit/includes/interwiki/InterwikiLookupAdapterTest.php
M tests/phpunit/includes/libs/xmp/XMPTest.php
M tests/phpunit/includes/linkeddata/PageDataRequestHandlerTest.php
M tests/phpunit/includes/media/GIFMetadataExtractorTest.php
M 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move wgBreakFrames client code to mediawiki.page.startup

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

Change subject: Move wgBreakFrames client code to mediawiki.page.startup
..


Move wgBreakFrames client code to mediawiki.page.startup

Follows-up f7c324685195, which migrated this from legacy wikibits
to the 'mediawiki.page.ready', however it's better suited in
'mediawiki.page.startup' because that one loaded on all pages blindly
(used to be hardcoded in OutputPage, now part of 'core' group
in Skin::getDefaultModules).

mediawiki.page.ready on the other hand is primarily for enhancing
the page content, loaded in Skin::getDefaultModules in the 'content'
group, which extensions like MobileFrontend may override with an
alternate implementation. This means frame breaking is bypassed!

Change-Id: Ia7206fac5c4ec6ace87304cfaeef375916b94fcf
---
M resources/src/mediawiki/page/ready.js
M resources/src/mediawiki/page/startup.js
2 files changed, 9 insertions(+), 10 deletions(-)

Approvals:
  Umherirrender: Looks good to me, but someone else must approve
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/resources/src/mediawiki/page/ready.js 
b/resources/src/mediawiki/page/ready.js
index 1f6c8a6..e147664 100644
--- a/resources/src/mediawiki/page/ready.js
+++ b/resources/src/mediawiki/page/ready.js
@@ -1,14 +1,4 @@
 ( function ( mw, $ ) {
-   // Break out of framesets
-   if ( mw.config.get( 'wgBreakFrames' ) ) {
-   // Note: In IE < 9 strict comparison to window is non-standard 
(the standard didn't exist yet)
-   // it works only comparing to window.self or window.window 
(http://stackoverflow.com/q/4850978/319266)
-   if ( window.top !== window.self ) {
-   // Un-trap us from framesets
-   window.top.location.href = location.href;
-   }
-   }
-
mw.hook( 'wikipage.content' ).add( function ( $content ) {
var $sortable, $collapsible;
 
diff --git a/resources/src/mediawiki/page/startup.js 
b/resources/src/mediawiki/page/startup.js
index 49cfd8a..7514044 100644
--- a/resources/src/mediawiki/page/startup.js
+++ b/resources/src/mediawiki/page/startup.js
@@ -1,4 +1,13 @@
 ( function ( mw, $ ) {
+   // Break out of framesets
+   if ( mw.config.get( 'wgBreakFrames' ) ) {
+   // Note: In IE < 9 strict comparison to window is non-standard 
(the standard didn't exist yet)
+   // it works only comparing to window.self or window.window 
(http://stackoverflow.com/q/4850978/319266)
+   if ( window.top !== window.self ) {
+   // Un-trap us from framesets
+   window.top.location.href = location.href;
+   }
+   }
 
$( function () {
var $diff;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7206fac5c4ec6ace87304cfaeef375916b94fcf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable WikiLove for ckbwiki

2017-07-03 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363043 )

Change subject: Enable WikiLove for ckbwiki
..

Enable WikiLove for ckbwiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 08424d5..1bdedaf 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14939,6 +14939,7 @@
'azwiki' => true, // T119727
'bnwiki' => true, // T129728
'bnwikisource' => true, // T149683
+   'ckbwiki' => true, // T169563
'commonswiki' => true,
'enwiki' => true,
'enwikivoyage' => true, // T52063

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

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

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


[MediaWiki-commits] [Gerrit] operations...cumin[master]: CLI: migrate to timeout per command

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

Change subject: CLI: migrate to timeout per command
..


CLI: migrate to timeout per command

- This is a breaking behaviour
- the global timeout command line options changes from -t/--timeout to
  --global-timeout.
- the -t/--timeout option is now used to set the timeout foreach
  command in each host independently.

Bug: T164838
Change-Id: Ic297fa34f2e1736299bd4d6bcdaf80b73ea8c73c
---
M cumin/cli.py
M cumin/tests/integration/test_cli.py
2 files changed, 77 insertions(+), 30 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Volans: Looks good to me, approved



diff --git a/cumin/cli.py b/cumin/cli.py
index ad3ea56..db583bb 100644
--- a/cumin/cli.py
+++ b/cumin/cli.py
@@ -20,6 +20,7 @@
 from cumin import CuminError
 from cumin.query import QueryBuilder
 from cumin.transport import Transport
+from cumin.transports import Command
 
 logger = logging.getLogger(__name__)
 OUTPUT_FORMATS = ('txt', 'json')
@@ -71,8 +72,11 @@
 epilog='More details at https://wikitech.wikimedia.org/wiki/Cumin')
 parser.add_argument('-c', '--config', default='/etc/cumin/config.yaml',
 help='configuration file. [default: 
/etc/cumin/config.yaml]')
-parser.add_argument('-t', '--timeout', type=int, default=None,
+parser.add_argument('--global-timeout', type=int, default=None,
 help='Global timeout in seconds (int) for the whole 
execution. [default: None (unlimited)]')
+parser.add_argument('-t', '--timeout', type=int, default=None,
+help=('Timeout in seconds (int) for the the execution 
of every command in each host. '
+  '[default: None (unlimited)]'))
 parser.add_argument('-m', '--mode', choices=(sync_mode, async_mode),
 help=('Execution mode, required when there are 
multiple COMMANDS to be executed. In sync mode, '
   'execute the first command on all hosts, then 
proceed with the next one only if '
@@ -325,8 +329,13 @@
 
 worker = Transport.new(config, logger)
 worker.hosts = hosts
-worker.commands = args.commands
-worker.timeout = args.timeout
+
+if args.timeout is not None:
+worker.commands = [Command(command, timeout=args.timeout) for command 
in args.commands]
+else:
+worker.commands = args.commands
+
+worker.timeout = args.global_timeout
 worker.handler = args.mode
 worker.success_threshold = args.success_percentage / float(100)
 worker.batch_size = args.batch_size
diff --git a/cumin/tests/integration/test_cli.py 
b/cumin/tests/integration/test_cli.py
index 5a9951d..931e1a2 100644
--- a/cumin/tests/integration/test_cli.py
+++ b/cumin/tests/integration/test_cli.py
@@ -22,7 +22,7 @@
 _EXPECTED_LINES = {
 'all_targeted': '5 hosts will be targeted',
 'failed': 'failed',
-'timeout': 'timeout',
+'global_timeout': 'global timeout',
 'successfully': 'successfully',
 'dry_run': 'DRY-RUN mode enabled, aborting',
 'subfanout_targeted': '2 hosts will be targeted',
@@ -30,7 +30,7 @@
 'ls_success_threshold': "100.0% (5/5) success ratio (>= 50.0% threshold) 
for command: 'ls -la /tmp'.",
 'ls_partial_success': "/5) of nodes failed to execute command 'ls -la 
/tmp/maybe'",
 'ls_partial_success_ratio_re':
-r"[4-6]0.0% \([2-3]/5\) success ratio \(< 100.0% threshold\) for 
command: 'ls -la /tmp/maybe'. Aborting.",
+r"[4-6]0\.0% \([2-3]/5\) success ratio \(< 100\.0% threshold\) for 
command: 'ls -la /tmp/maybe'\. Aborting.",
 'ls_partial_success_threshold_ratio':
 "60.0% (3/5) success ratio (>= 50.0% threshold) for command: 'ls -la 
/tmp/maybe'.",
 'ls_failure_batch': "40.0% (2/5) of nodes failed to execute command 'ls 
-la /tmp/non_existing'",
@@ -51,13 +51,19 @@
 '0.0% (0/5) success ratio (< 100.0% threshold) of nodes successfully 
executed all commands. Aborting.',
 'all_failure_threshold':
 '0.0% (0/5) success ratio (< 50.0% threshold) of nodes successfully 
executed all commands. Aborting.',
-'timeout_executing_re': r'([2-6]|)0.0% \([0-3]/5\) of nodes were executing 
a command when the timeout occurred',
-'timeout_executing_threshold_re':
-r'([2-6]|)0.0% \([0-3]/5\) of nodes were executing a command when the 
timeout occurred',
-'timeout_pending_re': r'([2-6]|)0.0% \([0-3]/5\) of nodes were pending 
execution when the timeout occurred',
-'timeout_pending_threshold_re':
-r'([2-6]|)0.0% \([0-3]/5\) of nodes were pending execution when the 
timeout occurred',
+'global_timeout_executing_re': (r'([2-6]|)0\.0% \([0-3]/5\) of nodes were 
executing a command when the global '
+r'timeout occurred'),
+

[MediaWiki-commits] [Gerrit] operations...cumin[master]: ClusterShell: allow to set a timeout per command

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

Change subject: ClusterShell: allow to set a timeout per command
..


ClusterShell: allow to set a timeout per command

Bug: T164838
Change-Id: I1d174c2f037dd9b19a144f43e64340b37637cffe
---
M cumin/tests/unit/transports/test_clustershell.py
M cumin/transports/clustershell.py
2 files changed, 101 insertions(+), 58 deletions(-)

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



diff --git a/cumin/tests/unit/transports/test_clustershell.py 
b/cumin/tests/unit/transports/test_clustershell.py
index bb2410d..187adc7 100644
--- a/cumin/tests/unit/transports/test_clustershell.py
+++ b/cumin/tests/unit/transports/test_clustershell.py
@@ -42,7 +42,7 @@
 self.worker = clustershell.worker_class(self.config)
 self.nodes = ['node1', 'node2']
 self.nodes_set = clustershell.NodeSet.NodeSet.fromlist(self.nodes)
-self.commands = [Command('command1'), Command('command2')]
+self.commands = [Command('command1'), Command('command2', ok_codes=[0, 
100], timeout=5)]
 self.task_self = task_self
 # Mock default handlers
 clustershell.DEFAULT_HANDLERS = {
@@ -68,7 +68,7 @@
 self.worker.handler = 'sync'
 self.worker.execute()
 self.worker.task.shell.assert_called_once_with(
-'command1', nodes=self.nodes_set, 
handler=self.worker._handler_instance)
+'command1', nodes=self.nodes_set, 
handler=self.worker._handler_instance, timeout=None)
 self.assertTrue(clustershell.DEFAULT_HANDLERS['sync'].called)
 
 def test_execute_default_async_handler(self):
@@ -76,11 +76,11 @@
 self.worker.handler = 'async'
 self.worker.execute()
 self.worker.task.shell.assert_called_once_with(
-'command1', nodes=self.nodes_set, 
handler=self.worker._handler_instance)
+'command1', nodes=self.nodes_set, 
handler=self.worker._handler_instance, timeout=None)
 self.assertTrue(clustershell.DEFAULT_HANDLERS['async'].called)
 
 def test_execute_timeout(self):
-"""Calling execute() and let the timeout expire should call 
on_timeout."""
+"""Calling execute() and let the global timeout expire should call 
on_timeout."""
 self.worker.task.run = 
mock.Mock(side_effect=clustershell.Task.TimeoutError)
 self.worker.handler = 'sync'
 self.worker.execute()
@@ -92,7 +92,7 @@
 self.worker.execute()
 self.assertIsInstance(self.worker._handler_instance, 
ConcreteBaseEventHandler)
 self.worker.task.shell.assert_called_once_with(
-'command1', nodes=self.nodes_set, 
handler=self.worker._handler_instance)
+'command1', nodes=self.nodes_set, 
handler=self.worker._handler_instance, timeout=None)
 
 def test_execute_no_commands(self):
 """Calling execute() without commands should return without doing 
anything."""
@@ -118,7 +118,8 @@
 self.worker.batch_size = 1
 self.worker.execute()
 self.worker.task.shell.assert_called_once_with(
-'command1', nodes=clustershell.NodeSet.NodeSet(self.nodes[0]), 
handler=self.worker._handler_instance)
+'command1', nodes=clustershell.NodeSet.NodeSet(self.nodes[0]), 
handler=self.worker._handler_instance,
+timeout=None)
 
 def test_get_results(self):
 """Calling get_results() should call ClusterShell iter_buffers with 
the right parameters."""
@@ -175,7 +176,7 @@
 def setUp(self, *args):
 """Initialize default properties and instances."""
 self.nodes = ['node1', 'node2']
-self.commands = [Command('command1', ok_codes=[0, 100]), 
Command('command2')]
+self.commands = [Command('command1', ok_codes=[0, 100]), 
Command('command2', timeout=5)]
 self.worker = mock.MagicMock()
 self.worker.current_node = 'node1'
 self.worker.command = 'command1'
@@ -232,13 +233,10 @@
 self.worker.task.num_timeout.return_value = 1
 self.worker.task.iter_keys_timeout.return_value = [self.nodes[0]]
 
+self.assertFalse(self.handler.global_timedout)
 self.handler.on_timeout(self.worker.task)
-
-self.assertEqual(self.worker.eh.counters['timeout'], 1)
-self.assertListEqual([node for node in 
self.worker.eh.nodes.itervalues() if node.state.is_timeout],
- [self.worker.eh.nodes[self.nodes[0]]])
 self.assertTrue(self.handler.pbar_ko.update.called)
-self.assertTrue(tqdm.write.called)
+self.assertTrue(self.handler.global_timedout)
 
 def test_ev_pickup(self):
 """Calling ev_pickup() should set the state of the current node to 
running."""
@@ -271,6 +269,17 @@
 self.worker.current_msg = output
 self.handler.ev_read(self.worker)
 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Manual:Pywikibot is not old

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

Change subject: Manual:Pywikibot is not old
..


Manual:Pywikibot is not old

Change-Id: Ibbaa13a26e785834a8885a4b5d279907fc73d393
---
M docs/index.rst
M docs/installation.rst
M docs/library_usage.rst
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/docs/index.rst b/docs/index.rst
index c9e3763..55fff71 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -6,7 +6,7 @@
 **This documentation is incomplete**, and needs quite some work.
 
 If you are not familiar with pywikibot, please start at the
-old documentation:
+documentation:
 `Manual:Pywikibot on mediawiki.org 
`_
 
 
diff --git a/docs/installation.rst b/docs/installation.rst
index 2221e95..9e24268 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -4,4 +4,4 @@
 .. _installation:
 
 .. note::
-   Please see the old documentation at `Manual:Pywikibot/Installation 
`_
+   Please see the documentation at `Manual:Pywikibot/Installation 
`_
diff --git a/docs/library_usage.rst b/docs/library_usage.rst
index 759b795..232143d 100644
--- a/docs/library_usage.rst
+++ b/docs/library_usage.rst
@@ -2,4 +2,4 @@
 
 
 .. note::
-   Please see the old documentation at `Manual:Pywikibot/Create your own 
script 
`_
+   Please see the documentation at `Manual:Pywikibot/Create your own script 
`_

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Return truthy object when image info not found

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

Change subject: Return truthy object when image info not found
..


Return truthy object when image info not found

A missing image should return some data to say the
image is missing, not just reject the promise.

Bug: T169337
Change-Id: Ib41a64a783c1baca88f428417c98e7fb913d14a1
---
M modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
M modules/ve-mw/init/ve.init.mw.ImageInfoCache.js
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
3 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
index 9f4246f..f2a5e6f 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWImageNode.js
@@ -260,7 +260,7 @@
// original dimensions from the API.
if ( ve.init.platform.imageInfoCache ) {
return ve.init.platform.imageInfoCache.get( filename ).then( 
function ( info ) {
-   if ( !info ) {
+   if ( !info || info.missing ) {
return $.Deferred().reject().promise();
}
return info;
diff --git a/modules/ve-mw/init/ve.init.mw.ImageInfoCache.js 
b/modules/ve-mw/init/ve.init.mw.ImageInfoCache.js
index 6e112f0..53715d4 100644
--- a/modules/ve-mw/init/ve.init.mw.ImageInfoCache.js
+++ b/modules/ve-mw/init/ve.init.mw.ImageInfoCache.js
@@ -28,6 +28,8 @@
 ve.init.mw.ImageInfoCache.static.processPage = function ( page ) {
if ( page.imageinfo ) {
return page.imageinfo[ 0 ];
+   } else if ( 'missing' in page ) {
+   return { missing: true };
}
 };
 
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index a131e7d..d683636 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -448,6 +448,7 @@
  * Request the images for the images tab panel menu
  *
  * @param {Object} options Options for the request
+ * @return {jQuery.Promise} Promise which resolves when image data has been 
fetched
  */
 ve.ui.MWGalleryDialog.prototype.requestImages = function ( options ) {
var i, len,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41a64a783c1baca88f428417c98e7fb913d14a1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
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] pywikibot/core[master]: [DOC] Fix missleading comment for UserBlocked

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

Change subject: [DOC] Fix missleading comment for UserBlocked
..


[DOC] Fix missleading comment for UserBlocked

Change-Id: Iefea1ad27bf2eb691d3e1636a3323548833e5491
---
M pywikibot/exceptions.py
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index 921ce86..aa249c7 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -77,7 +77,7 @@
   - FamilyMaintenanceWarning: missing information in family definition
 """
 #
-# (C) Pywikibot team, 2008-2015
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -480,13 +480,12 @@
 
 """Server responded with BadTitle."""
 
-# UserBlocked exceptions should in general not be caught. If the bot has
-# been blocked, the bot operator should address the reason for the block
-# before continuing.
-
 pass
 
 
+# UserBlocked exceptions should in general not be caught. If the bot has
+# been blocked, the bot operator should address the reason for the block
+# before continuing.
 class UserBlocked(Error):  # noqa
 
 """Your username or IP has been blocked"""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefea1ad27bf2eb691d3e1636a3323548833e5491
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Magul 
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]: ORES: Add scap::target to create user deploy-service

2017-07-03 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363042 )

Change subject: ORES: Add scap::target to create user deploy-service
..

ORES: Add scap::target to create user deploy-service

We need this mostly for labs where the user is not created. But also a safety 
measure to prevent the user from being removed on prods ores machines aswell.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/363042/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP: Add DHCP entries for labtestservices2003, labtestcontro...

2017-07-03 Thread RobH (Code Review)
RobH has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/363039 )

Change subject: DHCP: Add DHCP entries for 
labtestservices2003,labtestcontrol2003,labtestservices2002 and labtestmetal2001
..


DHCP: Add DHCP entries for 
labtestservices2003,labtestcontrol2003,labtestservices2002 and labtestmetal2001

Bug:T168894
Bug:T168893
Bug:T168892
Bug:T168891
Change-Id: I93dad5e232686cad131da37690547dc3a51d5b08
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 29 insertions(+), 0 deletions(-)

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



diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 4140ba9..48ceb2b 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2763,6 +2763,13 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labtestcontrol2003 {
+hardware ethernet 30:e1:71:63:0e:dc;
+fixed-address labtestcontrol2003.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
 host labtestvirt2002 {
 hardware ethernet 78:2b:cb:49:00:15;
 fixed-address labtestvirt2002.codfw.wmnet;
@@ -2773,6 +2780,13 @@
 host labtestvirt2003 {
 hardware ethernet 30:e1:71:60:e9:7c;
 fixed-address labtestvirt2003.codfw.wmnet;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestmetal2001 {
+hardware ethernet 30:e1:71:63:0e:88;
+fixed-address labtestmetal2001.codfw.wmnet;
 option pxelinux.pathprefix "trusty-installer/";
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
@@ -2819,6 +2833,21 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labtestservices2002 {
+hardware ethernet 30:e1:71:70:a3:34;
+fixed-address labtestservices2002.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestservices2003 {
+hardware ethernet 30:e1:71:63:0e:f8;
+fixed-address labtestservices2003.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+
 host labtestvirt2001 {
 hardware ethernet 90:B1:1C:2D:7E:B9;
 fixed-address labtestvirt2001.codfw.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I93dad5e232686cad131da37690547dc3a51d5b08
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Don't fail TestProofreadPageValidSite.test_url_image

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

Change subject: [bugfix] Don't fail TestProofreadPageValidSite.test_url_image
..


[bugfix] Don't fail TestProofreadPageValidSite.test_url_image

TestProofreadPageValidSite.test_url_image requires bs4 package.
Don't fail tests with TypeError but skip tests when BeautifulSoup is missing

Bug: T169542
Change-Id: I45e08d5dd080b3089c050af87a85826e655dd58d
---
M tests/proofreadpage_tests.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py
index 0e17ae1..77117ad 100644
--- a/tests/proofreadpage_tests.py
+++ b/tests/proofreadpage_tests.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Tests for the proofreadpage module."""
 #
-# (C) Pywikibot team, 2015-2016
+# (C) Pywikibot team, 2015-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -283,6 +283,7 @@
 page_text = page._page_to_json()
 self.assertEqual(json.loads(page_text), json.loads(loaded_text))
 
+@require_modules('bs4')
 def test_url_image(self):
 """Test fetching of url image of the scan of ProofreadPage."""
 page = ProofreadPage(self.site, self.valid['title'])

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45e08d5dd080b3089c050af87a85826e655dd58d
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics...source[master]: UDF to tag requests

2017-07-03 Thread Mforns (Code Review)
Mforns has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/353287 )

Change subject: UDF to tag requests
..


UDF to tag requests

UDF that understands webrequest data and can classify
requests into types like "portal", "wikidata" and others. It uses a
set of classes to look at requests and tag them
as belonging to a type, a request can belong
to several types.

To create a Tagger you must implement the tagger interface
and annotate your class with @Tag

Tested with guava 12.0

Bug: T164021
Change-Id: I725e130431f3a869864275aa41af479fef9f157c
---
M refinery-camus/pom.xml
M refinery-cassandra/pom.xml
M refinery-core/pom.xml
M 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/PageviewDefinition.java
R 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/webrequest/WebrequestData.java
A 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/webrequest/tag/PortalTagger.java
A 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/webrequest/tag/Tag.java
A 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/webrequest/tag/Tagger.java
A 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/webrequest/tag/TaggerChain.java
A 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/webrequest/tag/TaggerComparator.java
M 
refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestPageview.java
A 
refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/webrequest/tag/FakePageviewTagger.java
A 
refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/webrequest/tag/TestTagger.java
A 
refinery-hive/src/main/java/org/wikimedia/analytics/refinery/hive/GetWebrequestTagsUDF.java
M 
refinery-hive/src/main/java/org/wikimedia/analytics/refinery/hive/IsPageviewUDF.java
M 
refinery-hive/src/main/java/org/wikimedia/analytics/refinery/hive/IsRedirectToPageviewUDF.java
A 
refinery-hive/src/test/java/org/wikimedia/analytics/refinery/hive/TestGetWebrequestRequestTagsUDF.java
M refinery-tools/pom.xml
18 files changed, 581 insertions(+), 6 deletions(-)

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



diff --git a/refinery-camus/pom.xml b/refinery-camus/pom.xml
index 88044a8..c0ee693 100644
--- a/refinery-camus/pom.xml
+++ b/refinery-camus/pom.xml
@@ -19,6 +19,16 @@
 com.linkedin.camus
 camus-api
 ${camus.version}
+ 
+
+com.google.guava
+guava
+
+
+com.google.collections
+google-collections
+
+
 
 
 
@@ -40,6 +50,12 @@
 
 
 
+com.google.guava
+guava
+12.0
+
+
+
 junit
 junit
 test
diff --git a/refinery-cassandra/pom.xml b/refinery-cassandra/pom.xml
index 1996d2e..9038924 100644
--- a/refinery-cassandra/pom.xml
+++ b/refinery-cassandra/pom.xml
@@ -58,12 +58,32 @@
 com.datastax.cassandra
 cassandra-driver-core
 2.2.0-rc3
+
+
+com.google.guava
+guava
+
+
+com.google.collections
+google-collections
+
+
 
 
 
 org.apache.cassandra
 cassandra-all
 2.2.6
+
+
+com.google.guava
+guava
+
+
+com.google.collections
+google-collections
+
+
 
 
 
@@ -77,7 +97,11 @@
 1.10.19
 test
 
-
+
+com.google.guava
+guava
+12.0
+
 
 
 
diff --git a/refinery-core/pom.xml b/refinery-core/pom.xml
index 6721a44..271d84c 100644
--- a/refinery-core/pom.xml
+++ b/refinery-core/pom.xml
@@ -84,7 +84,17 @@
 com.github.nscala-time
 nscala-time_2.10
 
-
+
+
+com.google.guava
+guava
+12.0
+
+
+org.reflections
+reflections
+0.9.7
+
 
 
 
@@ -131,6 +141,10 @@
 
${project.build.testOutputDirectory}/GeoIP2-Country-Test.mmdb
 
${project.build.testOutputDirectory}/GeoIP2-City-Test.mmdb
 
+1
+
+**/Test*.java
+
 
 
 
diff --git 
a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/PageviewDefinition.java
 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Clear all gallery state on teardown

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

Change subject: Clear all gallery state on teardown
..


Clear all gallery state on teardown

Change-Id: I90662d02bd2d9768bdcf27e532ed8b8792f764c3
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index 2ca281b..a131e7d 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -408,11 +408,16 @@
 ve.ui.MWGalleryDialog.prototype.getTeardownProcess = function ( data ) {
return ve.ui.MWGalleryDialog.super.prototype.getTeardownProcess.call( 
this, data )
.first( function () {
+   // Widgets
this.galleryGroup.clearItems();
-   this.highlightedItem = null;
this.searchWidget.getQuery().setValue( '' );
this.searchWidget.teardown();
+
+   // States
+   this.highlightedItem = null;
this.searchPanelVisible = false;
+   this.selectedFilenames = {};
+   this.initialImageData = [];
 
// Disconnect events
this.indexLayout.disconnect( this );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90662d02bd2d9768bdcf27e532ed8b8792f764c3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
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] integration/config[master]: Add revi <w...@ymhong.com> due to a trusted user meeting mer...

2017-07-03 Thread Zppix (Code Review)
Zppix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363041 )

Change subject: Add revi  due to a trusted user meeting merge 
commit requirements.
..

Add revi  due to a trusted user meeting merge commit 
requirements.

Change-Id: I1f3f629c15d5540cb494741264346e4b5497abe9
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/41/363041/2

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 74c0f81..0eefcc5 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -465,6 +465,7 @@
- ^zhorishna@gmail\.com$ # Isarra
- ^zhuyifei1999@gmail\.com$
- ^mwalker@khaosdev\.com$ # Matt Walker
+   - ^wiki@ymhong/.com$ # Revi
 
# Pywikibot related
- ^alexsh@mail2000\.com\.tw$  # Alex S.H. Lin

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f3f629c15d5540cb494741264346e4b5497abe9
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Zppix 
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]: Remove no-op onSkinMinervaDefaultModules hook logic

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

Change subject: Remove no-op onSkinMinervaDefaultModules hook logic
..


Remove no-op onSkinMinervaDefaultModules hook logic

There is no longer a 'talk' key in the array exposed by Minerva
in MobileFrontend.

Also remove fragile boolean returns (redundant since MW 1.20).

Change-Id: I6f247ea439b274cc5a1fa7189acf838da552c8f7
---
M Hooks.php
1 file changed, 0 insertions(+), 11 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index f139b26..8cf5bfb 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -675,7 +675,6 @@
 *
 * @param Skin $skin
 * @param array $modules
-* @return bool
 */
public static function onSkinMinervaDefaultModules( Skin $skin, array 
&$modules ) {
// Disable toggling on occupied talk pages in mobile
@@ -683,16 +682,6 @@
if ( $title->getContentModel() === CONTENT_MODEL_FLOW_BOARD ) {
$modules['toggling'] = [];
}
-   // Turn off default mobile talk overlay for these pages
-   if ( $title->canTalk() ) {
-   $talkPage = $title->getTalkPage();
-   if ( $talkPage->getContentModel() === 
CONTENT_MODEL_FLOW_BOARD ) {
-   // TODO: Insert lightweight JavaScript that 
opens flow via ajax
-   $modules['talk'] = [];
-   }
-   }
-
-   return true;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f247ea439b274cc5a1fa7189acf838da552c8f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix mailmap email address

2017-07-03 Thread Revi (Code Review)
Revi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363040 )

Change subject: Fix mailmap email address
..

Fix mailmap email address

I just realized it was using old email address. While it redirects
to the new address, it's better to have it fixed.

Change-Id: I2df2a32f6144acca985d04b4bf58372343d119f6
---
M .mailmap
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/363040/1

diff --git a/.mailmap b/.mailmap
index e649fb1..2134fc5 100644
--- a/.mailmap
+++ b/.mailmap
@@ -455,9 +455,9 @@
 Yaron Koren 
 Yaron Koren  
 Yaroslav Melnychuk 
-Yongmin Hong 
-Yongmin Hong  
-Yongmin Hong  
+Yongmin Hong 
+Yongmin Hong  
+Yongmin Hong  
 Yuri Astrakhan 
 Yuri Astrakhan  
 Yuri Astrakhan  

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Improve messages about page reminders

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

Change subject: Improve messages about page reminders
..


Improve messages about page reminders

* Changed "article" to "page" in all the messages.
  This is the custom in all MediaWiki messages.
  It ensures that the messages can be used in
  wikis where pages are not necessarily articles.
* Removed unnecessary PLURAL clause. If it's a category title,
  then it's probably constant.
* Correct the grammar of echo-pref-tooltip-article-reminder.
  "When I asked" is always past, and it's probably supposed to refer
  to actions that may happen in the future.

Change-Id: Iddf4ac8bec4f751c570138c9557dc9174772d272
---
M i18n/en.json
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  jenkins-bot: Verified
  Foxy brown: Looks good to me, but someone else must approve
  Mooeypoo: Looks good to me, approved



diff --git a/i18n/en.json b/i18n/en.json
index c45b58f..baeca0e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -72,16 +72,16 @@
"echo-category-title-system": "{{PLURAL:$1|System}}",
"echo-category-title-user-rights": "{{PLURAL:$1|User rights change|User 
rights changes}}",
"echo-category-title-emailuser": "{{PLURAL:$1|Email from other 
user|Emails from other users}}",
-   "echo-category-title-article-reminder": "Page 
{{PLURAL:$1|article-reminder|article-reminders}}",
+   "echo-category-title-article-reminder": "Page reminders",
"echo-pref-tooltip-edit-user-talk": "Notify me when someone posts a 
message or replies on my talk page.",
-   "echo-pref-tooltip-article-linked": "Notify me when someone links to a 
page I created from an article page.",
+   "echo-pref-tooltip-article-linked": "Notify me when someone links to a 
page I created from another page.",
"echo-pref-tooltip-reverted": "Notify me when someone reverts an edit I 
made, by using the undo or rollback tool.",
"echo-pref-tooltip-mention": "Notify me when someone links to my user 
page.",
"echo-pref-tooltip-mention-failure": "Notify me when I could not send 
out a mention to someone.",
"echo-pref-tooltip-mention-success": "Notify me when I send out a 
mention to someone.",
"echo-pref-tooltip-user-rights": "Notify me when someone changes my 
user rights.",
"echo-pref-tooltip-emailuser": "Notify me when someone sends me an 
email.",
-   "echo-pref-tooltip-article-reminder": "Notify me about this article 
when I asked.",
+   "echo-pref-tooltip-article-reminder": "Notify me about this page when I 
ask.",
"echo-error-no-formatter": "No formatting defined for notification.",
"notifications": "Notifications",
"tooltip-pt-notifications-alert": "{{GENDER:|Your}} alerts",
@@ -147,7 +147,7 @@
"notification-header-page-linked": "A link was made from 
$4 to $3.",
"notification-compact-header-page-linked": "Linked from 
$1.",
"notification-bundle-header-page-linked": "Links were made from 
{{PLURAL:$5||$5 pages|100=99+ pages}} to $3.",
-   "notification-header-article-reminder": "An article {{GENDER:$2|you}} 
have requested to be reminded about is at $3",
+   "notification-header-article-reminder": "A page {{GENDER:$2|you}} have 
requested to be reminded about is at $3",
"notification-link-text-what-links-here": "All links to this page",
"notification-body-mention": "$1",
"notification-header-mention-other": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$3|you}} on $4 in \"$5\".",
@@ -185,7 +185,7 @@
"notification-header-thank-you-100-edit": "{{GENDER:$2|You}} just 
made {{GENDER:$2|your}} millionth edit; thank {{GENDER:$2|you}} for an 
astonishing contribution!",
"notification-link-thank-you-edit": "{{GENDER:$1|Your}} edit",
"notification-link-text-view-edit": "View edit",
-   "notification-link-article-reminder": "View article",
+   "notification-link-article-reminder": "View page",
"notification-header-reverted": "Your {{PLURAL:$4|edit on 
$3 was|edits on $3 were}} 
{{GENDER:$2|reverted}}.",
"notification-body-reverted": "$1",
"notification-header-emailuser": "$1 {{GENDER:$2|sent}} you an email.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddf4ac8bec4f751c570138c9557dc9174772d272
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Foxy brown 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] operations/puppet[production]: admins: Add awight to ores-admins

2017-07-03 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/361593 )

Change subject: admins: Add awight to ores-admins
..


admins: Add awight to ores-admins

Bug: T168442
Change-Id: I51e92d67229edce9d9bfe8cce0e1cafa8bd2b526
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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

Objections:
  RobH: There's a problem with this change, please improve



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 43b8fad..1a2908b 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -541,7 +541,7 @@
   ores-admin:
 description: ORES admins
 gid: 782
-members: [halfak, ladsgroup]
+members: [awight, halfak, ladsgroup]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service uwsgi-ores *',
  'ALL = NOPASSWD: /usr/sbin/service celery-ores-worker *']
   sectools-roots:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51e92d67229edce9d9bfe8cce0e1cafa8bd2b526
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: RobH 
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...Timeless[master]: Make Timeless compatible with MobileFrontend

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

Change subject: Make Timeless compatible with MobileFrontend
..


Make Timeless compatible with MobileFrontend

I'm giving you some attention on Extension:MobileFrontend page and
want to promote skins which look nice on mobile.

https://www.mediawiki.org/wiki/Extension:MobileFrontend#Setup_a_skin

The targets are needed to ensure code is loaded by the skin when
operating in mobile mode so currently that wiki page is lying.
Please let it be true :)

Change-Id: Ie9ba6beec172f7b499ae347652318fe54d258e39
---
M skin.json
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/skin.json b/skin.json
index 5e38aa2..28c87d1 100644
--- a/skin.json
+++ b/skin.json
@@ -17,6 +17,7 @@
},
"ResourceModules": {
"skins.timeless": {
+   "targets": [ "desktop", "mobile" ],
"position": "top",
"class": "ResourceLoaderSkinModule",
"styles": {
@@ -51,18 +52,21 @@
"@NOTE": "Remember to also update variables.less if you 
change the width cutoffs here. screen-misc.less and mobile.js may also need 
updating."
},
"skins.timeless.misc": {
+   "targets": [ "desktop", "mobile" ],
"position": "top",
"styles": [
"resources/screen-misc.less"
]
},
"skins.timeless.js": {
+   "targets": [ "desktop", "mobile" ],
"position": "bottom",
"scripts": [
"resources/main.js"
]
},
"skins.timeless.mobile": {
+   "targets": [ "desktop", "mobile" ],
"position": "bottom",
"scripts": [
"resources/libraries/jquery.mobile.custom.js",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9ba6beec172f7b499ae347652318fe54d258e39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Isarra 
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]: RCFilters: Reverse the sorting on tags

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

Change subject: RCFilters: Reverse the sorting on tags
..


RCFilters: Reverse the sorting on tags

We want the results to show most used tags on top and least
on bottom, so use a reverse sort.

Bug: T166914
Change-Id: I1473070ac9293626bde5e95dad79c7e0ca954f70
---
M includes/specials/SpecialRecentchanges.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 75d104b..d28604e 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -213,7 +213,7 @@
$tagHitCounts = array_merge( $explicitlyDefinedTags, 
$softwareActivatedTags, $tagStats );
 
// Sort by hits
-   asort( $tagHitCounts );
+   arsort( $tagHitCounts );
 
// Build the list and data
$result = [];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1473070ac9293626bde5e95dad79c7e0ca954f70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] operations/puppet[production]: DHCP: Add DHCP entries for labtestservices2003, labtestcontro...

2017-07-03 Thread Papaul (Code Review)
Papaul has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363039 )

Change subject: DHCP: Add DHCP entries for 
labtestservices2003,labtestcontrol2003,labtestservices2002 and labtestmetal2001
..

DHCP: Add DHCP entries for 
labtestservices2003,labtestcontrol2003,labtestservices2002 and labtestmetal2001

Bug:T168894
Bug:T168893
Bug:T168892
Bug:T168891
Change-Id: I93dad5e232686cad131da37690547dc3a51d5b08
---
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
1 file changed, 29 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/363039/1

diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 4140ba9..48ceb2b 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2763,6 +2763,13 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labtestcontrol2003 {
+hardware ethernet 30:e1:71:63:0e:dc;
+fixed-address labtestcontrol2003.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
 host labtestvirt2002 {
 hardware ethernet 78:2b:cb:49:00:15;
 fixed-address labtestvirt2002.codfw.wmnet;
@@ -2773,6 +2780,13 @@
 host labtestvirt2003 {
 hardware ethernet 30:e1:71:60:e9:7c;
 fixed-address labtestvirt2003.codfw.wmnet;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestmetal2001 {
+hardware ethernet 30:e1:71:63:0e:88;
+fixed-address labtestmetal2001.codfw.wmnet;
 option pxelinux.pathprefix "trusty-installer/";
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
@@ -2819,6 +2833,21 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labtestservices2002 {
+hardware ethernet 30:e1:71:70:a3:34;
+fixed-address labtestservices2002.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+host labtestservices2003 {
+hardware ethernet 30:e1:71:63:0e:f8;
+fixed-address labtestservices2003.wikimedia.org;
+option pxelinux.pathprefix "trusty-installer/";
+filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
+}
+
+
 host labtestvirt2001 {
 hardware ethernet 90:B1:1C:2D:7E:B9;
 fixed-address labtestvirt2001.codfw.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WindowManager: Set aria-hidden by default and change toggleA...

2017-07-03 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363038 )

Change subject: WindowManager: Set aria-hidden by default and change 
toggleAriaIsolation behavior
..

WindowManager: Set aria-hidden by default and change toggleAriaIsolation 
behavior

* demo: Add a link to open an alert from the ProcessDialog
* Set aria-hidden to true by default on a new WindowManager
* Set aria-hidden to true everywhere, instead of just adding the attribute.
  Not setting it explicitly might cause issues according to the note on:
  https://www.w3.org/TR/wai-aria-1.1/#aria-hidden
  Also see:
  https://www.w3.org/TR/wai-aria-1.1/#valuetype_true-false-undefined
* Return the element itself if there is no other top level element
* Explicitly un-hide the WindowManager $element when isolate === true
* Explicit hide the WindowManager $eleme when isolate === false

I could make multiple patches out of this if it makes review easier.

Bug: T98561
Change-Id: I7c1f42dd163a7850fb33912d6a41c7d56b9083b0
---
M demos/classes/ProcessDialog.js
M src/WindowManager.js
2 files changed, 27 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/38/363038/1

diff --git a/demos/classes/ProcessDialog.js b/demos/classes/ProcessDialog.js
index c0f3d6c..6ddc898 100644
--- a/demos/classes/ProcessDialog.js
+++ b/demos/classes/ProcessDialog.js
@@ -9,9 +9,20 @@
{ action: 'other', label: 'Other', flags: 'other' }
 ];
 Demo.ProcessDialog.prototype.initialize = function () {
+   var $content;
Demo.ProcessDialog.parent.prototype.initialize.apply( this, arguments );
+
+   $content = $( '' ).append(
+   $( '' ).text( 'Dialog content' ),
+   $( '' )
+   .text( 'Be alert!' )
+   .on( 'click', function () {
+   OO.ui.alert( 'You are alert!' );
+   } )
+   );
+
this.content = new OO.ui.PanelLayout( { padded: true, expanded: false } 
);
-   this.content.$element.append( 'Dialog content' );
+   this.content.$element.append( $content );
this.$body.append( this.content.$element );
 };
 Demo.ProcessDialog.prototype.getActionProcess = function ( action ) {
diff --git a/src/WindowManager.js b/src/WindowManager.js
index 1945318..5df5a04 100644
--- a/src/WindowManager.js
+++ b/src/WindowManager.js
@@ -82,6 +82,7 @@
// Initialization
this.$element
.addClass( 'oo-ui-windowManager' )
+   .attr( 'aria-hidden', true )
.toggleClass( 'oo-ui-windowManager-modal', this.modal );
 };
 
@@ -748,20 +749,32 @@
  * @chainable
  */
 OO.ui.WindowManager.prototype.toggleAriaIsolation = function ( isolate ) {
+   var $topLevelElement;
isolate = isolate === undefined ? !this.$ariaHidden : !!isolate;
 
if ( isolate ) {
if ( !this.$ariaHidden ) {
+   // Find the top level element containing the window 
manager or the
+   // window manager's element itself in case its a direct 
child of body
+   $topLevelElement = this.$element.parentsUntil( 'body' 
).last();
+   $topLevelElement = $topLevelElement.length === 0 ? 
this.$element : $topLevelElement;
+
+   // In case previously set by another window manager
+   this.$element.removeAttr( 'aria-hidden' );
+
// Hide everything other than the window manager from 
screen readers
this.$ariaHidden = $( 'body' )
.children()
-   .not( this.$element.parentsUntil( 'body' 
).last() )
-   .attr( 'aria-hidden', '' );
+   .not( $topLevelElement )
+   .attr( 'aria-hidden', true );
}
} else if ( this.$ariaHidden ) {
// Restore screen reader visibility
this.$ariaHidden.removeAttr( 'aria-hidden' );
this.$ariaHidden = null;
+
+   // and hide the window manager
+   this.$element.attr( 'aria-hidden', true );
}
 
return this;

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: proofreadpage.py: Fallback to "html.parser" if "lxml" is not...

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

Change subject: proofreadpage.py: Fallback to "html.parser" if "lxml" is not 
available
..


proofreadpage.py: Fallback to "html.parser" if "lxml" is not available

Bug: T169515
Change-Id: I8c6a3741b54b9a09dcdd263cbf59fad91fa9923a
---
M pywikibot/proofreadpage.py
1 file changed, 13 insertions(+), 6 deletions(-)

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



diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py
index 13dbce3..a49e657 100644
--- a/pywikibot/proofreadpage.py
+++ b/pywikibot/proofreadpage.py
@@ -26,16 +26,23 @@
 
 __version__ = '$Id$'
 
+from functools import partial
 import json
 import re
 
 try:
-from bs4 import BeautifulSoup
+from bs4 import BeautifulSoup, FeatureNotFound
 except ImportError as e:
 BeautifulSoup = e
+else:
+try:
+BeautifulSoup('', 'lxml')
+except FeatureNotFound:
+Soup = partial(BeautifulSoup, features='html.parser')
+else:
+Soup = partial(BeautifulSoup, features='lxml')
 
 import pywikibot
-
 from pywikibot.comms import http
 from pywikibot.data.api import Request
 
@@ -522,7 +529,7 @@
 pywikibot.error('Error fetching HTML for %s.' % self)
 raise
 
-soup = BeautifulSoup(response.content, 'lxml')
+soup = Soup(response.content)
 
 try:
 # None if nothing is found by .find()
@@ -577,7 +584,7 @@
 """Do hocr using //tools.wmflabs.org/phetools/hocr_cgi.py?cmd=hocr."""
 def parse_hocr_text(txt):
 """Parse hocr text."""
-soup = BeautifulSoup(txt, 'lxml')
+soup = Soup(txt)
 
 res = []
 for ocr_page in soup.find_all(class_='ocr_page'):
@@ -743,7 +750,7 @@
 del self._parsed_text
 
 self._parsed_text = self._get_parsed_page()
-self._soup = BeautifulSoup(self._parsed_text, 'html.parser')
+self._soup = Soup(self._parsed_text)
 # Do not search for "new" here, to avoid to skip purging if links
 # to non-existing pages are present.
 attrs = {'class': re.compile('prp-pagequality')}
@@ -765,7 +772,7 @@
 self.purge()
 del self._parsed_text
 self._parsed_text = self._get_parsed_page()
-self._soup = BeautifulSoup(self._parsed_text, 'html.parser')
+self._soup = Soup(self._parsed_text)
 if not self._soup.find_all('a', attrs=attrs):
 raise ValueError(
 'Missing class="qualityN prp-pagequality-N" or '

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c6a3741b54b9a09dcdd263cbf59fad91fa9923a
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Xqt 
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]: RCFilters: Reverse the sorting on tags

2017-07-03 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363037 )

Change subject: RCFilters: Reverse the sorting on tags
..

RCFilters: Reverse the sorting on tags

We want the results to show most used tags on top and least
on bottom, so use a reverse sort.

Bug: T166914
Change-Id: I1473070ac9293626bde5e95dad79c7e0ca954f70
---
M includes/specials/SpecialRecentchanges.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/363037/1

diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 75d104b..d28604e 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -213,7 +213,7 @@
$tagHitCounts = array_merge( $explicitlyDefinedTags, 
$softwareActivatedTags, $tagStats );
 
// Sort by hits
-   asort( $tagHitCounts );
+   arsort( $tagHitCounts );
 
// Build the list and data
$result = [];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1473070ac9293626bde5e95dad79c7e0ca954f70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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...VisualEditor[master]: Update VE core submodule to master (65ea4cf36)

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

Change subject: Update VE core submodule to master (65ea4cf36)
..


Update VE core submodule to master (65ea4cf36)

New changes:
7b9f264b6 Localisation updates from https://translatewiki.net.
52e9cc349 Update OOjs UI to v0.22.2
65ea4cf36 ui.WhitespacePreservingTextInputWidget: inherit from 
MultilineTextInputWidget

Bug: T169272
Change-Id: I37987fec09a340a14eedd3535fcb48bea265823c
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ve b/lib/ve
index b528a53..65ea4cf 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit b528a532135f0806a310d1cb4832ac0cff20c00b
+Subproject commit 65ea4cf36d125ac95de1d658fe10f0664d3a4e69

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37987fec09a340a14eedd3535fcb48bea265823c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
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] mediawiki...VisualEditor[master]: Update VE core submodule to master (65ea4cf36)

2017-07-03 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363036 )

Change subject: Update VE core submodule to master (65ea4cf36)
..

Update VE core submodule to master (65ea4cf36)

New changes:
7b9f264b6 Localisation updates from https://translatewiki.net.
52e9cc349 Update OOjs UI to v0.22.2
65ea4cf36 ui.WhitespacePreservingTextInputWidget: inherit from 
MultilineTextInputWidget

Change-Id: I37987fec09a340a14eedd3535fcb48bea265823c
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/ve b/lib/ve
index b528a53..65ea4cf 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit b528a532135f0806a310d1cb4832ac0cff20c00b
+Subproject commit 65ea4cf36d125ac95de1d658fe10f0664d3a4e69

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37987fec09a340a14eedd3535fcb48bea265823c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ui.WhitespacePreservingTextInputWidget: inherit from Multili...

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

Change subject: ui.WhitespacePreservingTextInputWidget: inherit from 
MultilineTextInputWidget
..


ui.WhitespacePreservingTextInputWidget: inherit from MultilineTextInputWidget

Commit 1eb25592c to OOui removed multiline support from TextInputWidget. All
uses of WhitespacePreservingTextInputWidget require multiline, and caused
errors instead of functioning.

Bug: T169272
Change-Id: I3e510aa9b44f2ad37f8ff026d680df446925e8ee
---
M src/ui/inspectors/ve.ui.CommentInspector.js
M src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
2 files changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/src/ui/inspectors/ve.ui.CommentInspector.js 
b/src/ui/inspectors/ve.ui.CommentInspector.js
index 2d9c5ac..c6d27c1 100644
--- a/src/ui/inspectors/ve.ui.CommentInspector.js
+++ b/src/ui/inspectors/ve.ui.CommentInspector.js
@@ -52,7 +52,6 @@
ve.ui.CommentInspector.super.prototype.initialize.call( this );
 
this.textWidget = new ve.ui.WhitespacePreservingTextInputWidget( {
-   multiline: true,
autosize: true
} );
this.textWidget.connect( this, { resize: 'updateSize' } );
diff --git a/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js 
b/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
index 2be7710..3cd654b 100644
--- a/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
+++ b/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
@@ -8,7 +8,7 @@
  * Text input widget which hides but preserves leading and trailing whitespace
  *
  * @class
- * @extends OO.ui.TextInputWidget
+ * @extends OO.ui.MultilineTextInputWidget
  *
  * @constructor
  * @param {Object} [config] Configuration options
@@ -32,7 +32,7 @@
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.WhitespacePreservingTextInputWidget, 
OO.ui.TextInputWidget );
+OO.inheritClass( ve.ui.WhitespacePreservingTextInputWidget, 
OO.ui.MultilineTextInputWidget );
 
 /* Methods */
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e510aa9b44f2ad37f8ff026d680df446925e8ee
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
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] mediawiki...WikibaseLexeme[master]: Remove the "Lexeme…" prefix from variable and function names

2017-07-03 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363035 )

Change subject: Remove the "Lexeme…" prefix from variable and function names
..

Remove the "Lexeme…" prefix from variable and function names

It's not so easily possible to rename the widget, because the namespace
must be "jQuery.wikibase.…" because of some reused code in ViewFactory.
I would like to create a "jQuery.wikibase.lexeme.…" namespace for the
jQuery widgets in this component, but this is not possible at the moment.

Change-Id: I4e714c3a5c2e72b70ac6ae8363a4cfae9df4d52b
---
M resources/jquery.wikibase.lexemeview.js
M resources/view/ControllerViewFactory.js
M src/WikibaseLexeme.hooks.php
M tests/qunit/jquery.wikibase.lexemeformlistview.tests.js
M tests/qunit/jquery.wikibase.lexemeformview.tests.js
5 files changed, 30 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/35/363035/1

diff --git a/resources/jquery.wikibase.lexemeview.js 
b/resources/jquery.wikibase.lexemeview.js
index b40e918..839119c 100644
--- a/resources/jquery.wikibase.lexemeview.js
+++ b/resources/jquery.wikibase.lexemeview.js
@@ -15,7 +15,7 @@
 *
 * @param {Object} options
 * @param {Function} options.buildStatementGroupListView
-* @param {Function} options.buildLexemeFormListView
+* @param {Function} options.buildFormListView
 * @param {Function} options.buildSenseListView
 *
 * @constructor
@@ -28,7 +28,7 @@
 */
options: {
buildStatementGroupListView: null,
-   buildLexemeFormListView: null,
+   buildFormListView: null,
buildSenseListView: null
},
 
@@ -50,7 +50,7 @@
this.$statements = $( '' ).appendTo( 
this.$main );
}
 
-   this.options.buildLexemeFormListView();
+   this.options.buildFormListView();
this.options.buildSenseListView();
},
 
@@ -60,7 +60,7 @@
 */
_init: function () {
if ( !this.options.buildStatementGroupListView ||
-   !this.options.buildLexemeFormListView ||
+   !this.options.buildFormListView ||
!this.options.buildSenseListView
) {
throw new Error( 'Required option(s) missing' );
diff --git a/resources/view/ControllerViewFactory.js 
b/resources/view/ControllerViewFactory.js
index 30cbc39..1f01b4c 100644
--- a/resources/view/ControllerViewFactory.js
+++ b/resources/view/ControllerViewFactory.js
@@ -73,7 +73,7 @@
buildEntityTermsView: 
this.getEntityTermsView.bind( this, startEditingCallback ),
buildSitelinkGroupListView: 
this.getSitelinkGroupListView.bind( this, startEditingCallback ),
buildStatementGroupListView: 
this.getStatementGroupListView.bind( this, startEditingCallback ),
-   buildLexemeFormListView: 
this.getLexemeFormListView.bind( this, lexeme, startEditingCallback ),
+   buildFormListView: this.getFormListView.bind( 
this, lexeme, startEditingCallback ),
buildSenseListView: this.getSenseListView.bind( 
this, lexeme, startEditingCallback ),
value: lexeme
}
@@ -84,12 +84,12 @@
return null; // Don't render terms view
};
 
-   SELF.prototype.getLexemeFormListView = function ( lexeme, 
startEditingCallback ) {
+   SELF.prototype.getFormListView = function ( lexeme, 
startEditingCallback ) {
return this._getView(
'lexemeformlistview',
$( '.wikibase-lexeme-forms-section' ),
{
-   getListItemAdapter: 
this.getListItemAdapterForLexemeFormListView.bind( this, lexeme, 
startEditingCallback ),
+   getListItemAdapter: 
this.getListItemAdapterForFormListView.bind( this, lexeme, startEditingCallback 
),
getAdder: this._getAdderWithStartEditing( 
startEditingCallback ),
value: lexeme.forms
}
@@ -118,7 +118,7 @@
}
};
 
-   SELF.prototype.getLexemeFormView = function (
+   SELF.prototype.getFormView = function (
lexemeId,
form,
labelFormattingService,
@@ -128,7 +128,7 @@
) {
var self = this;
 
-   var lexemeFormView = this._getView(
+   

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ui.WhitespacePreservingTextInputWidget: inherit from Multili...

2017-07-03 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363034 )

Change subject: ui.WhitespacePreservingTextInputWidget: inherit from 
MultilineTextInputWidget
..

ui.WhitespacePreservingTextInputWidget: inherit from MultilineTextInputWidget

Commit 1eb25592c to OOui removed multiline support from TextInputWidget. All
uses of WhitespacePreservingTextInputWidget require multiline, and caused
errors instead of functioning.

Bug: T169272
Change-Id: I3e510aa9b44f2ad37f8ff026d680df446925e8ee
---
M src/ui/inspectors/ve.ui.CommentInspector.js
M src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
2 files changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/34/363034/1

diff --git a/src/ui/inspectors/ve.ui.CommentInspector.js 
b/src/ui/inspectors/ve.ui.CommentInspector.js
index 2d9c5ac..c6d27c1 100644
--- a/src/ui/inspectors/ve.ui.CommentInspector.js
+++ b/src/ui/inspectors/ve.ui.CommentInspector.js
@@ -52,7 +52,6 @@
ve.ui.CommentInspector.super.prototype.initialize.call( this );
 
this.textWidget = new ve.ui.WhitespacePreservingTextInputWidget( {
-   multiline: true,
autosize: true
} );
this.textWidget.connect( this, { resize: 'updateSize' } );
diff --git a/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js 
b/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
index 2be7710..3cd654b 100644
--- a/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
+++ b/src/ui/widgets/ve.ui.WhitespacePreservingTextInputWidget.js
@@ -8,7 +8,7 @@
  * Text input widget which hides but preserves leading and trailing whitespace
  *
  * @class
- * @extends OO.ui.TextInputWidget
+ * @extends OO.ui.MultilineTextInputWidget
  *
  * @constructor
  * @param {Object} [config] Configuration options
@@ -32,7 +32,7 @@
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.WhitespacePreservingTextInputWidget, 
OO.ui.TextInputWidget );
+OO.inheritClass( ve.ui.WhitespacePreservingTextInputWidget, 
OO.ui.MultilineTextInputWidget );
 
 /* Methods */
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e510aa9b44f2ad37f8ff026d680df446925e8ee
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 

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


[MediaWiki-commits] [Gerrit] mediawiki...GoogleLogin[master]: Rewrite domain host parsing part of EmailDomain

2017-07-03 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363033 )

Change subject: Rewrite domain host parsing part of EmailDomain
..

Rewrite domain host parsing part of EmailDomain

This also adds some tests to EmailDomain (before I refactored the
domain host parsing part).

The domain list (public suffix list) is not downloaded "on-the-fly"
anymore, but is now required to be downloaded beforehand using the
new maintenance script. The parsing part is also simplified, credits
goes to mgutt [1], where I was free to get inspiration.

[1] https://stackoverflow.com/a/9632782/3394281

Change-Id: I006de79ca6217ec7da662a04b5baff58c98c
---
M .gitignore
M includes/Constants.php
M includes/alloweddomains/EmailDomain.php
A maintenance/updatePublicSuffixArray.php
A tests/phpunit/includes/alloweddomains/EmailDomainTest.php
5 files changed, 155 insertions(+), 107 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/33/363033/1

diff --git a/.gitignore b/.gitignore
index d62d8a9..8a3f223 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 composer.phar
 cache
 composer.lock
+publicSuffixArray.php
\ No newline at end of file
diff --git a/includes/Constants.php b/includes/Constants.php
index 710b7e8..c7055da 100644
--- a/includes/Constants.php
+++ b/includes/Constants.php
@@ -10,4 +10,5 @@
 
 class Constants {
const SERVICE_ALLOWED_DOMAINS_STORE = 'GoogleLogin.AllowedDomainsStore';
+   const PUBLIC_SUFFIX_ARRAY_FILE = 'publicSuffixArray.php';
 }
diff --git a/includes/alloweddomains/EmailDomain.php 
b/includes/alloweddomains/EmailDomain.php
index cd9c4fb..e483e13 100644
--- a/includes/alloweddomains/EmailDomain.php
+++ b/includes/alloweddomains/EmailDomain.php
@@ -2,7 +2,7 @@
 
 namespace GoogleLogin\AllowedDomains;
 
-use MWException;
+use GoogleLogin\Constants;
 
 /**
  * Represents a single E-Mail address.
@@ -11,7 +11,12 @@
  */
 class EmailDomain {
private $emailAddress;
-   private $domainHost;
+   private $domainHost = '';
+
+   /**
+* @var array
+*/
+   private $publicSuffixes;
 
/**
 * EmailDomain constructor.
@@ -21,8 +26,14 @@
 *  t...@test.example.com will be converted to example.com if this is 
false)
 */
public function __construct( $mail, $strict = false ) {
+   $this->publicSuffixes =
+   array_flip( include __DIR__ . '/../../' . 
Constants::PUBLIC_SUFFIX_ARRAY_FILE );
+
$this->emailAddress = $mail;
-   $this->domainHost = $this->parseHost( $mail, $strict );
+   $domain = explode( '@', $mail );
+   if ( isset( $domain[1] ) ) {
+   $this->domainHost = $this->parseHost( $domain[1], 
$strict );
+   }
}
 
/**
@@ -46,121 +57,32 @@
 * Returns the domain and tld (without subdomains) of the provided 
E-Mailadress
 * @param string $domain The domain part of the email address to 
extract from.
 * @return string The Tld and domain of $domain without subdomains
-* @see 
http://www.programmierer-forum.de/domainnamen-ermitteln-t244185.htm
 */
private function parseHost( $domain = '', $strict ) {
-   $dir = __DIR__ . "/../..";
if ( $strict ) {
-   $domain = explode( '@', $domain );
// we can trust google to give us only valid email 
address, so give the last element
-   return array_pop( $domain );
+   return $domain;
}
-   // for parse_url()
-   $domain =
-   !isset( $domain[5] ) ||
-   (
-   $domain[3] != ':' &&
-   $domain[4] != ':' &&
-   $domain[5] != ':'
-   ) ? 'http://' . $domain : $domain;
-   // remove "/path/file.html", "/:80", etc.
-   $domain = parse_url( $domain, PHP_URL_HOST );
-   // separate domain level
-   $lvl = explode( '.', $domain ); // 0 => www, 1 => example, 2 => 
co, 3 => uk
-   // set levels
-   krsort( $lvl ); // 3 => uk, 2 => co, 1 => example, 0 => www
-   $lvl = array_values( $lvl ); // 0 => uk, 1 => co, 2 => example, 
3 => www
-   $_1st = $lvl[0];
-   $_2nd = isset( $lvl[1] ) ? $lvl[1] . '.' . $_1st : false;
-   $_3rd = isset( $lvl[2] ) ? $lvl[2] . '.' . $_2nd : false;
-   $_4th = isset( $lvl[3] ) ? $lvl[3] . '.' . $_3rd : false;
 
-   // tld extract
-   if ( !file_exists( "$dir/cache/tld.txt" ) ) {
-   $this->createTLDCache( "$dir/cache/tld.txt" );
-   }
-   require 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Normalize to template namespace when comparing

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

Change subject: Normalize to template namespace when comparing
..


Normalize to template namespace when comparing

Bug: T169307
Change-Id: Ic3524819fb026713b27b193e4a03338fffd97229
---
M modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
index 0b6aa7b..cdb1d0d 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
@@ -339,10 +339,12 @@
  * @return {boolean} Transclusion only contains a single template, which is 
one of the ones in templates
  */
 ve.dm.MWTransclusionNode.prototype.isSingleTemplate = function ( templates ) {
-   var i, len, partsList = this.getPartsList();
+   var i, len,
+   templateNS = mw.config.get( 'wgNamespaceIds' ).template,
+   partsList = this.getPartsList();
 
-   function normalizeTitle( name ) {
-   var title = mw.Title.newFromText( name );
+   function normalizeTemplateTitle( name ) {
+   var title = mw.Title.newFromText( name, templateNS );
return title ? title.getPrefixedText() : name;
}
 
@@ -358,7 +360,7 @@
for ( i = 0, len = templates.length; i < len; i++ ) {
if (
partsList[ 0 ].templatePage &&
-   partsList[ 0 ].templatePage === normalizeTitle( 
templates[ i ] )
+   partsList[ 0 ].templatePage === normalizeTemplateTitle( 
templates[ i ] )
) {
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3524819fb026713b27b193e4a03338fffd97229
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
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...WikibaseQualityConstraints[master]: Add constraint status for incorrect parameters

2017-07-03 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/363032 )

Change subject: Add constraint status for incorrect parameters
..

Add constraint status for incorrect parameters

A fifth constraint status is added, which marks constraints with missing
or invalid parameters. The gadget shows violations of this type, and
also adds a CSS class for the constraint status to the report.

Bug: T167397
Change-Id: I0f0ee0f508d8fc440536c883c5312e407c3023f3
---
M i18n/en.json
M i18n/qqq.json
M includes/ConstraintCheck/DelegatingConstraintChecker.php
M includes/ConstraintCheck/Result/CheckResult.php
M modules/SpecialConstraintReportPage.css
M modules/gadget.js
6 files changed, 13 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/32/363032/1

diff --git a/i18n/en.json b/i18n/en.json
index f8f8156..3ae6ce2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,6 +21,7 @@
"wbqc-constraintreport-status-compliance": "Compliance",
"wbqc-constraintreport-status-exception": "Exception",
"wbqc-constraintreport-status-todo": "Todo",
+   "wbqc-constraintreport-status-bad-parameters": "Bad parameters",
"wbqc-constraintreport-result-table-header-status": "Status",
"wbqc-constraintreport-result-table-header-claim": "Claim",
"wbqc-constraintreport-result-table-header-constraint": "Constraint",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a37f040..51f6970 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -23,6 +23,7 @@
"wbqc-constraintreport-status-compliance": "Status for claims that 
comply with a constraint",
"wbqc-constraintreport-status-exception": "Status for claims that were 
marked as a exception",
"wbqc-constraintreport-status-todo": "Status for constraints which 
cannot be checked yet.\n{{Identical|Todo}}",
+   "wbqc-constraintreport-status-bad-parameters": "Status for constraints 
that have missing or invalid constraint parameters.",
"wbqc-constraintreport-result-table-header-status": "Header of the 
column that tells whether the check found a violation or something 
else.\n{{Identical|Status}}",
"wbqc-constraintreport-result-table-header-claim": "Header of the 
column that displays a link to the claim, the used property and its 
value.\n{{Identical|Claim}}",
"wbqc-constraintreport-result-table-header-constraint": "Header of the 
column that gives information about which constraint was 
checked.\n{{Identical|Constraint}}",
diff --git a/includes/ConstraintCheck/DelegatingConstraintChecker.php 
b/includes/ConstraintCheck/DelegatingConstraintChecker.php
index 34cfe68..79d7a80 100644
--- a/includes/ConstraintCheck/DelegatingConstraintChecker.php
+++ b/includes/ConstraintCheck/DelegatingConstraintChecker.php
@@ -240,7 +240,7 @@
$statement,
$constraint,
[],
-   CheckResult::STATUS_VIOLATION,
+   CheckResult::STATUS_BAD_PARAMETERS,
$e->getMessage()
);
} catch ( SparqlHelperException $e ) {
@@ -275,7 +275,7 @@
}
 
$sortFunction = function ( CheckResult $a, CheckResult $b ) {
-   $order = [ 'other' => 4, 'compliance' => 3, 'exception' 
=> 2, 'violation' => 1 ];
+   $order = [ 'other' => 4, 'compliance' => 3, 'exception' 
=> 2, 'violation' => 1, 'bad-parameters' => 0 ];
 
$statusA = $a->getStatus();
$statusB = $b->getStatus();
diff --git a/includes/ConstraintCheck/Result/CheckResult.php 
b/includes/ConstraintCheck/Result/CheckResult.php
index 03314d3..0b33e32 100644
--- a/includes/ConstraintCheck/Result/CheckResult.php
+++ b/includes/ConstraintCheck/Result/CheckResult.php
@@ -24,6 +24,7 @@
const STATUS_VIOLATION = 'violation';
const STATUS_EXCEPTION = 'exception';
const STATUS_TODO = 'todo';
+   const STATUS_BAD_PARAMETERS = 'bad-parameters';
 
/**
 * @var EntityId
diff --git a/modules/SpecialConstraintReportPage.css 
b/modules/SpecialConstraintReportPage.css
index 47a50ae..831949f 100644
--- a/modules/SpecialConstraintReportPage.css
+++ b/modules/SpecialConstraintReportPage.css
@@ -36,6 +36,10 @@
color: #54595d; /* Base20 */
 }
 
+.wbqc-status-bad-parameters {
+   color: #b32424; /* Red30 */
+}
+
 /* Tooltip */
 .wbqc-indicator {
color: #72777d; /* Base30 */
diff --git a/modules/gadget.js b/modules/gadget.js
index b6ac5e4..0c5d051 100644
--- a/modules/gadget.js
+++ b/modules/gadget.js
@@ -30,8 +30,10 @@
function buildReport( result ) {
var 

  1   2   3   >