[MediaWiki-commits] [Gerrit] Add more logging - change (wikidata...rdf)

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

Change subject: Add more logging
..


Add more logging

Change-Id: Iddd557e2141d63a9d87372a7573e38966d75907f
---
M tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
2 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
index d65fa01..e7cc07b 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
@@ -8,6 +8,7 @@
 
 import org.openrdf.model.Statement;
 import org.wikidata.query.rdf.tool.exception.RetryableException;
+import org.wikidata.query.rdf.tool.wikibase.WikibaseRepository;
 
 import com.google.common.collect.ImmutableList;
 
@@ -101,7 +102,8 @@
 b.append('@').append(revision);
 }
 if (timestamp != null) {
-b.append("@").append(timestamp);
+
b.append("@").append(WikibaseRepository.outputDateFormat().format(timestamp));
+b.append("|").append(rcid);
 }
 return b.toString();
 }
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index e4bf556..7b79e87 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -87,6 +87,12 @@
 public Date leftOffDate() {
 return leftOffDate;
 }
+
+@Override
+public String leftOffHuman() {
+return leftOffDate.toString() + " (next: " + 
nextContinue.get("rccontinue").toString()
++ ")";
+}
 }
 
 /**
@@ -108,7 +114,7 @@
 JSONObject rc = (JSONObject) rco;
 long namespace = (long) rc.get("ns");
 if (!wikibase.isEntityNamespace(namespace)) {
-log.debug("Skipping change in irrelevant namespace:  {}", 
rc);
+log.info("Skipping change in irrelevant namespace:  {}", 
rc);
 continue;
 }
 Date timestamp = df.parse(rc.get("timestamp").toString());
@@ -142,6 +148,14 @@
 }
 }
 
+if (changes.size() != 0) {
+log.info("Got {} changes, from {} to {}", changes.size(),
+changes.get(0).toString(),
+changes.get(changes.size() - 1).toString());
+} else {
+log.info("Got no real changes");
+}
+
 // Show the user the polled time - one second because we can't
 // be sure we got the whole second
 String upTo = inputDateFormat().format(new Date(nextStartTime - 
1000));

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddd557e2141d63a9d87372a7573e38966d75907f
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add more logging - change (wikidata...rdf)

2016-07-15 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Add more logging
..

Add more logging

Change-Id: Iddd557e2141d63a9d87372a7573e38966d75907f
---
M tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
2 files changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/74/299274/1

diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
index d65fa01..e7cc07b 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/change/Change.java
@@ -8,6 +8,7 @@
 
 import org.openrdf.model.Statement;
 import org.wikidata.query.rdf.tool.exception.RetryableException;
+import org.wikidata.query.rdf.tool.wikibase.WikibaseRepository;
 
 import com.google.common.collect.ImmutableList;
 
@@ -101,7 +102,8 @@
 b.append('@').append(revision);
 }
 if (timestamp != null) {
-b.append("@").append(timestamp);
+
b.append("@").append(WikibaseRepository.outputDateFormat().format(timestamp));
+b.append("|").append(rcid);
 }
 return b.toString();
 }
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index e4bf556..7b79e87 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -87,6 +87,12 @@
 public Date leftOffDate() {
 return leftOffDate;
 }
+
+@Override
+public String leftOffHuman() {
+return leftOffDate.toString() + " (next: " + 
nextContinue.get("rccontinue").toString()
++ ")";
+}
 }
 
 /**
@@ -108,7 +114,7 @@
 JSONObject rc = (JSONObject) rco;
 long namespace = (long) rc.get("ns");
 if (!wikibase.isEntityNamespace(namespace)) {
-log.debug("Skipping change in irrelevant namespace:  {}", 
rc);
+log.info("Skipping change in irrelevant namespace:  {}", 
rc);
 continue;
 }
 Date timestamp = df.parse(rc.get("timestamp").toString());
@@ -142,6 +148,14 @@
 }
 }
 
+if (changes.size() != 0) {
+log.info("Got {} changes, from {} to {}", changes.size(),
+changes.get(0).toString(),
+changes.get(changes.size() - 1).toString());
+} else {
+log.info("Got no real changes");
+}
+
 // Show the user the polled time - one second because we can't
 // be sure we got the whole second
 String upTo = inputDateFormat().format(new Date(nextStartTime - 
1000));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddd557e2141d63a9d87372a7573e38966d75907f
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] Mustache for obt_bpay - change (mediawiki...DonationInterface)

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

Change subject: Mustache for obt_bpay
..


Mustache for obt_bpay

Change-Id: If384791067ed44229affeb80286f384c1566c661
---
M DonationInterfaceFormSettings.php
M globalcollect_gateway/config/payment_methods.yaml
D globalcollect_gateway/forms/html/obt/obt-bpay.html
M globalcollect_gateway/globalcollect.adapter.php
4 files changed, 4 insertions(+), 107 deletions(-)

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



diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index 3451d67..32b9e47 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -40,9 +40,6 @@
  /
 
 $forms_whitelist['obt-bpay'] = array(
-   'file' => $form_dirs['gc'] . '/obt/obt-bpay.html',
-   'dependencies' => 'gc.form.rapidhtml.webitects.2nd',
-   'styles' => 'di.form.rapidhtml.webitects.2nd.styles',
'gateway' => 'globalcollect',
'countries' => array( '+' => 'AU'),
'currencies' => array( '+' => 'AUD'),
diff --git a/globalcollect_gateway/config/payment_methods.yaml 
b/globalcollect_gateway/config/payment_methods.yaml
index cef32ce..5f1bdf5 100644
--- a/globalcollect_gateway/config/payment_methods.yaml
+++ b/globalcollect_gateway/config/payment_methods.yaml
@@ -24,6 +24,8 @@
 obt:
 label: 'Online bank transfer'
 validation:
+name: true
+email: true
 creditCard: false
 short_circuit_at: first_iop
 rtbt:
diff --git a/globalcollect_gateway/forms/html/obt/obt-bpay.html 
b/globalcollect_gateway/forms/html/obt/obt-bpay.html
deleted file mode 100644
index f048eea..000
--- a/globalcollect_gateway/forms/html/obt/obt-bpay.html
+++ /dev/null
@@ -1,103 +0,0 @@
-
-   // these must go through RapidHTML and thus are inline
-   var amountErrors = 
["#general|escape",'#retryMsg|escape','#amount|escape'];
-   var billingErrors = 
['#fname|escape','#lname|escape','#city|escape','#country|escape','#street|escape','#state|escape','#zip|escape','#email|escape'];
-   var paymentErrors = 
['#card_num|escape','#card_type|escape','#cvv|escape'];
-   var actionURL = "@action";
-   var scriptPath = "@script_path";
-
-
-
-$( document ).ready( function() {
-   $( ".collapsingCity input" ).removeClass( "optional" );
-   $( ".collapsingCity" ).css( "display", "table-row" );
-} );
-
-
-
-   
-   
-   
-   
-   
-{{LanguageSwitch|2011FR/@appeal/title|@language}}
-   {{LanguageSwitch|2011FR/@appeal/text|@language}}
-   
-   
-   
-   
-   
-   
-
-   
-   
-   
-   
-   
-   
-   
%donate_interface-amount-legend%:  {% block donation-amount currency_code %}
-   
-   
-   
-   {% block 
personal-information country %}
-   
-   
-
-   
-   

-   
 Registered to BPAY Pty Ltd ABN 69 079 137 518
-   
-   
-   
-   
-
-   
-   
-
-   
-   
-   
-   
-   
-   
-   
-   

[MediaWiki-commits] [Gerrit] Add bpay logo and css class - change (mediawiki...DonationInterface)

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

Change subject: Add bpay logo and css class
..


Add bpay logo and css class

I tried to make it 25% instead of 100px but that stretched the box all
huge because I suck at css.

Change-Id: Id0ffe5b119c0ad145912b8ecc5a5a86879be
---
M gateway_forms/mustache/forms.css
M gateway_forms/mustache/payment_method.html.mustache
M globalcollect_gateway/config/payment_submethods.yaml
3 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index cd6e205..06d3a76 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -1,3 +1,6 @@
+img.submethod-logo {
+   max-width: 100px;
+}
 div#payment_gateway-donate-addl-info-text {
font-size: 90%;
line-height: 120%;
diff --git a/gateway_forms/mustache/payment_method.html.mustache 
b/gateway_forms/mustache/payment_method.html.mustache
index 6f7fcbb..44671ae 100644
--- a/gateway_forms/mustache/payment_method.html.mustache
+++ b/gateway_forms/mustache/payment_method.html.mustache
@@ -8,7 +8,7 @@
 
 
 
-
+
 {{# sub_text_key }}
 {{ l10n . }}
 {{/ sub_text_key }}
@@ -21,7 +21,7 @@


 {{/ show_submethods }}
 {{# show_single_submethod }}
-   

+   

 {{/ show_single_submethod }}


diff --git a/globalcollect_gateway/config/payment_submethods.yaml 
b/globalcollect_gateway/config/payment_submethods.yaml
index 1f1d4df..2a3bfd3 100644
--- a/globalcollect_gateway/config/payment_submethods.yaml
+++ b/globalcollect_gateway/config/payment_submethods.yaml
@@ -232,6 +232,7 @@
 show_single_logo: true
 validation: {  }
 keys: {  }
+logo: BPAY_Landscape_MONO.gif
 
 rtbt_ideal:
 paymentproductid: 809

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0ffe5b119c0ad145912b8ecc5a5a86879be
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Mustache for rtbt_ideal - change (mediawiki...DonationInterface)

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

Change subject: Mustache for rtbt_ideal
..


Mustache for rtbt_ideal

* Add data and partials to support rtbt.
* Remove unused RapidHtml forms and modules.
* Option to display single submethod logo.

Bug: T123002
Change-Id: Ia5f2dcad16674464740ee521c21d0ef87edee640
---
M DonationInterfaceFormSettings.php
M extension.json
M gateway_common/DataValidator.php
M gateway_common/donation.api.php
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/qqq.json
M gateway_forms/Mustache.php
A gateway_forms/mustache/issuers.html.mustache
M gateway_forms/mustache/payment_method.html.mustache
M globalcollect_gateway/config/payment_methods.yaml
M globalcollect_gateway/config/payment_submethods.yaml
D globalcollect_gateway/forms/html/rtbt/rtbt-enets.html
D globalcollect_gateway/forms/html/rtbt/rtbt-eps.html
D globalcollect_gateway/forms/html/rtbt/rtbt-ideal-noadd.html
D globalcollect_gateway/forms/html/rtbt/rtbt-ideal.html
D globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
D globalcollect_gateway/forms/html/rtbt/rtbt-sofo.html
M globalcollect_gateway/forms/js/ingenico.js
M globalcollect_gateway/globalcollect.adapter.php
M modules/js/ext.donationInterface.forms.js
M modules/js/ext.donationInterface.validation.js
M modules/validate_input.js
M tests/Adapter/GlobalCollect/GlobalCollectFormLoadTest.php
D tests/Adapter/GlobalCollect/RealTimeBankTransferEnetsTest.php
D tests/Adapter/GlobalCollect/RealTimeBankTransferEpsTest.php
M tests/Adapter/GlobalCollect/RealTimeBankTransferIdealTest.php
D tests/Adapter/GlobalCollect/RealTimeBankTransferNordeaSwedenTest.php
D tests/Adapter/GlobalCollect/RealTimeBankTransferSofortuberweisungTest.php
28 files changed, 127 insertions(+), 1,489 deletions(-)

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



diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index 90f4f19..3451d67 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -28,35 +28,6 @@
  ***/
 
 $forms_whitelist['rtbt-ideal'] = array(
-   'file' => $form_dirs['gc'] . '/rtbt/rtbt-ideal.html',
-   'dependencies' => 'gc.form.rapidhtml.rapidhtml.rtbt',
-   'styles' => array(
-   'di.form.rapidhtml.webitects.2nd.styles',
-   'gc.styles'
-   ),
-   'gateway' => 'globalcollect',
-   'payment_methods' => array('rtbt' => 'rtbt_ideal'),
-   'countries' => array( '+' => 'NL' ),
-   'currencies' => array( '+' => 'EUR' ),
-);
-
-$forms_whitelist['rtbt-enets'] = array(
-   'file' => $form_dirs['gc'] . '/rtbt/rtbt-enets.html',
-   'dependencies' => 'gc.form.rapidhtml.webitects.2nd',
-   'styles' => 'di.form.rapidhtml.webitects.2nd.styles',
-   'gateway' => 'globalcollect',
-   'payment_methods' => array('rtbt' => 'rtbt_enets'),
-   'countries' => array( '+' => 'SG' ),
-   'currencies' => array( '+' => 'SGD' ),
-);
-
-$forms_whitelist['rtbt-ideal-noadd'] = array(
-   'file' => $form_dirs['gc'] . '/rtbt/rtbt-ideal-noadd.html',
-   'dependencies' => 'gc.form.rapidhtml.rtbt',
-   'styles' => array(
-   'di.form.rapidhtml.webitects.2nd.styles',
-   'gc.styles'
-   ),
'gateway' => 'globalcollect',
'payment_methods' => array('rtbt' => 'rtbt_ideal'),
'countries' => array( '+' => 'NL' ),
diff --git a/extension.json b/extension.json
index fc00d95..0ff133d 100644
--- a/extension.json
+++ b/extension.json
@@ -274,31 +274,8 @@
"di.form.rapidhtml.webitects"
]
},
-   "gc.form.rapidhtml.webitects.dd": {
-   "scripts": 
"globalcollect_gateway/forms/js/webitects.bt.js",
-   "dependencies": "gc.form.rapidhtml.webitects.2nd"
-   },
"gc.styles": {
"styles": "globalcollect_gateway/forms/css/gc.css"
-   },
-   "gc.form.rapidhtml.dd": {
-   "scripts": "globalcollect_gateway/forms/js/gc.dd.js",
-   "dependencies": "di.form.core.validate"
-   },
-   "gc.form.rapidhtml.ew": {
-   "scripts": "globalcollect_gateway/forms/js/gc.ew.js",
-   "dependencies": "di.form.core.validate"
-   },
-   "gc.form.rapidhtml.boletos": {
-   "scripts": 
"globalcollect_gateway/forms/js/gc.boletos.js",
-   "dependencies": "di.form.core.validate"
-   },
-   "gc.form.rapidhtml.rtbt": {
-   "dependencies": [
-   "di.form.core.validate",
-   "mediawiki.Uri",
-  

[MediaWiki-commits] [Gerrit] [WIP] resourceloader: Move queue formatting out of OutputPag... - change (mediawiki/core)

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

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

Change subject: [WIP] resourceloader: Move queue formatting out of OutputPage 
(DRAFT)
..

[WIP] resourceloader: Move queue formatting out of OutputPage (DRAFT)

See .

Change-Id: I605b8cd1e1fc009b4662a0edbc54d09dd65ee1df
---
M autoload.php
M includes/OutputPage.php
A includes/resourceloader/ResourceLoaderClientHtml.php
3 files changed, 111 insertions(+), 0 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index d82d699..0371f3e 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1144,6 +1144,7 @@
'ResetUserTokens' => __DIR__ . '/maintenance/resetUserTokens.php',
'ResourceFileCache' => __DIR__ . 
'/includes/cache/ResourceFileCache.php',
'ResourceLoader' => __DIR__ . 
'/includes/resourceloader/ResourceLoader.php',
+   'ResourceLoaderClientHtml' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderClientHtml.php',
'ResourceLoaderContext' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderContext.php',
'ResourceLoaderEditToolbarModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderEditToolbarModule.php',
'ResourceLoaderFileModule' => __DIR__ . 
'/includes/resourceloader/ResourceLoaderFileModule.php',
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 474ad7e..29e1216 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2950,6 +2950,7 @@
 * JS stuff to put in the "". This is the startup module, config
 * vars and modules marked with position 'top'
 *
+* @deprecated since 1.28 Unused
 * @return string HTML fragment
 */
function getHeadScripts() {
diff --git a/includes/resourceloader/ResourceLoaderClientHtml.php 
b/includes/resourceloader/ResourceLoaderClientHtml.php
new file mode 100644
index 000..d9c0dde
--- /dev/null
+++ b/includes/resourceloader/ResourceLoaderClientHtml.php
@@ -0,0 +1,109 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @author Timo Tijhof
+ */
+
+use MediaWiki\Logger\LoggerFactory;
+
+/**
+ * @since 1.28
+ */
+class ResourceLoaderClientHtml {
+
+   /** @var ResourceLoader */
+   private $resourceLoader;
+
+   /** @var array */
+   private $modules = [];
+
+   /** @var array */
+   private $moduleScripts = [];
+
+   /** @var array */
+   private $moduleStyles = [];
+
+   public function __construct( ResourceLoader $resourceLoader ) {
+   $this->resourceLoader = $resourceLoader;
+   }
+
+   /**
+* Ensure one or more modules are loaded.
+*
+* @param string|array $modules Module name or array of module names
+*/
+   public function addModules( $modules ) {
+   $this->modules = array_merge( $this->modules, (array)$modules );
+   }
+
+   /**
+* Ensure the scripts of one or more modules are loaded.
+*
+* @deprecated since 1.28
+* @param string|array $modules Module name or array of module names
+*/
+   public function addModuleScripts( $modules ) {
+   $this->moduleScripts = array_merge( $this->moduleScripts, 
(array)$modules );
+   }
+
+   /**
+* Ensure the styles of one or more modules are loaded.
+*
+* @deprecated since 1.28
+* @param string|array $modules Module name or array of module names
+*/
+   public function addModuleStyles( $modules ) {
+   $this->moduleStyles = array_merge( $this->moduleStyles, 
(array)$modules );
+   }
+
+   /**
+* TODO:
+* - Implement analogous logic for:
+*   - getAllowedModules() - filter by trusted origin level
+*   - filterModules() - split by queue position (deprecated)
+*   - split by scripts/styles-only and regular (deprecated)
+*/
+
+   public function getDocumentElementAttributes() {
+   // For OutputPage::headElement() ->
+   //  Skin::getHtmlElementAttributes()
+   // - class="client-nojs" (changed by startup.js)
+   // - (later) data-rl-load=",,," data-rl-state-ready=",,," 
data-rl-state-loading=",,,"
+   //(to be dealt by startup.js, instead of current state() 
and load() inline scripts)
+   }
+
+   /**
+* @return string HTML
+*/
+   public function getHeadHtml() {
+   // For OutputPage::headElement()
+   // See
+   //  getInlineHeadScripts()
+   //  buildCssLinks()
+   //  getExternalHeadScripts()
+   //  makeResourceLoaderLink()
+   }
+
+   public function getBodyHtml() {
+   // For OutputPage::getBottomScripts() ->
+ 

[MediaWiki-commits] [Gerrit] Make categorisation project aware - change (labs...heritage)

2016-07-15 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Make categorisation project aware
..

Make categorisation project aware

Also:
* Fixed an issue where non-category sitelinks on wikidata
  could be added as a category.
* Added a test for the wikidata method
* Removed unused method and variable.

Not done:
* Could not successfully mock NoPage triggers in the wikidata
  method. Attempt left commented out.

Bug:T111618
Change-Id: Ie1804ec682b284fcbe6cf154b3455992d9112fd5
---
M erfgoedbot/categorize_images.py
M tests/test_categorization.py
2 files changed, 141 insertions(+), 72 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/73/299273/1

diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py
index 47ca122..95f75e1 100644
--- a/erfgoedbot/categorize_images.py
+++ b/erfgoedbot/categorize_images.py
@@ -41,7 +41,7 @@
 pass
 
 # Contains the commonscat templates for most Wikipedia's (taken from 
ex-commonscat.py)
-commonscatTemplates = {
+wikipedia_commonscat_templates = {
 '_default': (u'Commonscat', []),
 'af': (u'CommonsKategorie', [u'commonscat']),
 'an': (u'Commonscat', [u'Commons cat']),
@@ -269,7 +269,7 @@
 
 def get_new_categories(monumentId, monData, lang, commonsCatTemplates):
 (monumentName, monumentCommonscat,
- monumentArticleTitle, monumentSource) = monData
+ monumentArticleTitle, monumentSource, project) = monData
 commons_site = pywikibot.Site(u'commons', u'commons')
 newcats = []
 # First try to add a category based on the commonscat field in the list
@@ -285,12 +285,13 @@
 except pywikibot.exceptions.InvalidTitle:
 pywikibot.warning(
 u'Incorrect category title %s' % (monumentCommonscat,))
+
 # Option two is to use the article about the monument and see if it has
 # Commonscat links
 if not newcats:
 monumentArticle = None
 if monumentArticleTitle:
-project_site = pywikibot.Site(lang, u'wikipedia')
+project_site = pywikibot.Site(lang, project)
 monumentArticle = pywikibot.Page(project_site, 
monumentArticleTitle)
 if monumentArticle:
 try:
@@ -312,9 +313,10 @@
 except pywikibot.exceptions.Error as e:
 pywikibot.error(u'Error occured with monument %s: %s' % (
 monumentId, str(e)))
+
 # Option three is to see if the list contains Commonscat links (whole list)
 if not newcats:
-monumentList = getList(lang, monumentSource)
+monumentList = getList(lang, project, monumentSource)
 # print monumentList
 if not monumentList:
 return False
@@ -378,10 +380,11 @@
 
 
 def getMonData(countrycode, lang, monumentId, conn, cursor):
-'''
-Get monument name and source from db
-'''
-query = u"""SELECT `name`, `commonscat`, `monument_article`, `source` FROM 
monuments_all WHERE (country=%s AND lang=%s AND id=%s) LIMIT 1"""
+"""Get monument name and source from db."""
+query = u"SELECT `name`, `commonscat`, `monument_article`, `source`, 
`project` " \
+u"FROM monuments_all " \
+u"WHERE (country=%s AND lang=%s AND id=%s) " \
+u"LIMIT 1"
 
 cursor.execute(query, (countrycode, lang, monumentId))
 
@@ -393,38 +396,18 @@
 return False
 
 
-def getArticle(lang, monumentName):
-'''
-Get monument article page from wikilink at monumentName
-'''
-
-if monumentName:
-regex = u'^\[\[(.+?)(\||\])'
-
-match = re.search(regex, monumentName)
-if not match:
-return False
-
-page_title = match.group(1)
-site = pywikibot.Site(lang, u'wikipedia')
-
-return pywikibot.Page(site, page_title)
-else:
-return False
-
-
-def getList(lang, monumentSource):
+def getList(lang, project, monumentSource):
 '''
 Get listpage
 '''
 if monumentSource:
-regex = u'^(https:)?//%s.wikipedia.org/w/index.php\?title=(.+?)&' % (
-lang,)
+regex = u'^(https:)?//%s.%s.org/w/index.php\?title=(.+?)&' % (
+lang, project)
 match = re.search(regex, monumentSource)
 if not match:
 return False
 page_title = match.group(2)
-site = pywikibot.Site(lang, u'wikipedia')
+site = pywikibot.Site(lang, project)
 return pywikibot.Page(site, page_title)
 else:
 return False
@@ -504,12 +487,13 @@
 
 
 def get_Commons_category_via_Wikidata(page):
-'''
+"""
 Get Commons Category from the linked Wikidata item and P373.
 
-Raises: NoCommonsCatFromWikidataItemException if either there is no linked 
item
-or it does not bear P373 or a sitelink to Commons
-'''
+Raises: NoCommonsCatFromWikidataItemException if either there 

[MediaWiki-commits] [Gerrit] Rename README.md to README.mediawiki - change (apps...java-mwapi)

2016-07-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Rename README.md to README.mediawiki
..

Rename README.md to README.mediawiki

Needed for correctness (since the syntax is MW wikitext) and in order to
display correctly in Github.

Change-Id: I7512ee7145d820aeeed430167ee47655b227ae9d
---
D README.md
1 file changed, 0 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/java-mwapi 
refs/changes/71/299271/1

diff --git a/README.md b/README.md
deleted file mode 100644
index 90b1459..000
--- a/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Building
-
-Run:
-
-  $ ./gradlew clean build
-
-# Documentation
-
-All other documentation is kept on 
[https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Wikipedia_Android_app_hacking
 our wiki]. Check it out!

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7512ee7145d820aeeed430167ee47655b227ae9d
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/java-mwapi
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] Fix entity namespace checking in RecentChangesPoller - change (wikidata...rdf)

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

Change subject: Fix entity namespace checking in RecentChangesPoller
..


Fix entity namespace checking in RecentChangesPoller

Change-Id: Id67d78fb591023a796e2dd2bc0eac9e1de22caf2
---
M tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
M 
tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/change/RecentChangesPollerUnitTest.java
4 files changed, 66 insertions(+), 14 deletions(-)

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



diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java 
b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
index 9a9bff9..3c50e3a 100644
--- a/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
+++ b/tools/src/main/java/org/wikidata/query/rdf/tool/Update.java
@@ -93,7 +93,7 @@
 @Option(shortName = "V", longName = "verify", description = "Verify 
updates (may have performance impact)")
 boolean verify();
 
-@Option(defaultToNull = true, description = "If specified must be 
numbers of Item and Property namespaces"
+@Option(defaultToNull = true, description = "If specified must be 
numerical indexes of Item and Property namespaces"
 + " that defined in Wikibase repository, comma separated.")
 String entityNamespaces();
 }
@@ -103,12 +103,9 @@
  */
 public static void main(String[] args) {
 Options options = handleOptions(Options.class, args);
-WikibaseRepository wikibaseRepository;
-if (options.entityNamespaces() == null) {
-wikibaseRepository = new 
WikibaseRepository(options.wikibaseScheme(), options.wikibaseHost());
-} else {
-String[] entityNamespaces = options.entityNamespaces().split(",");
-wikibaseRepository = new 
WikibaseRepository(options.wikibaseScheme(), options.wikibaseHost(), 0, 
entityNamespaces);
+WikibaseRepository wikibaseRepository = 
buildWikibaseRepository(options);
+if (wikibaseRepository == null) {
+return;
 }
 URI sparqlUri;
 try {
@@ -167,7 +164,7 @@
 return IdRangeChangeSource.forItems(start, end, 
options.batchSize());
 }
 if (options.ids() != null) {
-List parsedIds = new ArrayList();
+List parsedIds = new ArrayList(); // FIXME use 
OptionsUtils.splitByComma(options.ids())
 for (String idOpt: options.ids()) {
 if (idOpt.contains(",")) {
 // Id list
@@ -216,6 +213,30 @@
 }
 
 /**
+ * Build WikibaseRepository object.
+ *
+ * @return null if non can be built - its ok to just exit - errors have 
been
+ * logged to the user
+ */
+private static WikibaseRepository buildWikibaseRepository(Options options) 
{
+if (options.entityNamespaces() == null) {
+return new WikibaseRepository(options.wikibaseScheme(), 
options.wikibaseHost());
+}
+
+String[] strEntityNamespaces = options.entityNamespaces().split(","); 
// FIXME use OptionsUtils.splitByComma(options.entityNamespaces())
+long[] longEntityNamespaces = new long[strEntityNamespaces.length];
+try {
+for (int i = 0; i < strEntityNamespaces.length; i++) {
+longEntityNamespaces[i] = 
Long.parseLong(strEntityNamespaces[i]);
+}
+} catch (NumberFormatException e) {
+log.error("Invalid value for --entityNamespaces. Namespace index 
should be an integer.", e);
+return null;
+}
+return new WikibaseRepository(options.wikibaseScheme(), 
options.wikibaseHost(), 0, longEntityNamespaces);
+}
+
+/**
  * Metric registry.
  */
 private final MetricRegistry metrics = new MetricRegistry();
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
index 64415da..e4bf556 100644
--- 
a/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/change/RecentChangesPoller.java
@@ -107,7 +107,7 @@
 for (Object rco : result) {
 JSONObject rc = (JSONObject) rco;
 long namespace = (long) rc.get("ns");
-if (namespace != 0 && namespace != 120) {
+if (!wikibase.isEntityNamespace(namespace)) {
 log.debug("Skipping change in irrelevant namespace:  {}", 
rc);
 continue;
 }
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java
 

[MediaWiki-commits] [Gerrit] Delete maps-team hiera - change (operations/puppet)

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

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

Change subject: Delete maps-team hiera
..

Delete maps-team hiera

Has been migrated to https://wikitech.wikimedia.org/wiki/Hiera:Maps-team

Change-Id: I44433fb3b03cb995c2615ccdcce316b1a4586974
---
D hieradata/labs/maps-team/common.yaml
1 file changed, 0 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/299270/1

diff --git a/hieradata/labs/maps-team/common.yaml 
b/hieradata/labs/maps-team/common.yaml
deleted file mode 100644
index aeb58df..000
--- a/hieradata/labs/maps-team/common.yaml
+++ /dev/null
@@ -1,26 +0,0 @@

-postgresql::slave::pgversion: 9.4
-postgresql::slave::master_server: mapsmaster01.eqiad.wmflabs
-postgresql::slave::replication_pass: justapass
-postgresql::postgis::pgversion: 9.4
-postgresql::spatialdb::postgis_version: 2.1
-postgresql::master::pgversion: 9.4
-maps::postgres_slaves:
-  replication@mapsslave01-v4:
-user: replication
-password: justapass
-cidr: 10.68.17.160/32
-attrs: REPLICATION
-database: replication
-pgversion: 9.4
-  replication@mapsslave02-v4:
-user: replication
-password: justapass
-cidr: 10.68.17.164/32
-attrs: REPLICATION
-database: replication
-pgversion: 9.4
-cassandra::cluster_name: Test cluster
-cassandra::seeds: [ 10.68.17.79, 10.68.17.160, 10.68.17.164 ]
-cassandra::dc: mydc
-cassandra::rack: myrack

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

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

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


[MediaWiki-commits] [Gerrit] Remove mw.kartographer, use module interface instead. - change (mediawiki...Kartographer)

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

Change subject: Remove mw.kartographer, use module interface instead.
..


Remove mw.kartographer, use module interface instead.

Bug: T140520
Change-Id: I18549fe448a71aa811df6bc1b0fdc87a1cd7ea74
---
M modules/fullscreen/MapDialog.js
M modules/kartographer.js
M modules/live/FullScreenControl.js
M modules/mapframe/mapframe.js
M modules/maplink/maplink.js
5 files changed, 30 insertions(+), 31 deletions(-)

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



diff --git a/modules/fullscreen/MapDialog.js b/modules/fullscreen/MapDialog.js
index b7a1b84..5901abe 100644
--- a/modules/fullscreen/MapDialog.js
+++ b/modules/fullscreen/MapDialog.js
@@ -9,7 +9,7 @@
  * @class Kartographer.Fullscreen.MapDialog
  * @extends OO.ui.Dialog
  */
-module.MapDialog = ( function ( $, mw, kartoLive, router, CloseControl ) {
+module.MapDialog = ( function ( $, mw, kartographer, kartoLive, router, 
CloseControl ) {
 
/**
 * @constructor
@@ -101,7 +101,7 @@
 * Tells the router to navigate to the current full screen map route.
 */
MapDialog.prototype.updateHash = function () {
-   var hash = mw.kartographer.getMapHash( this.mapData, this.map );
+   var hash = kartographer.getMapHash( this.mapData, this.map );
 
// Avoid extra operations
if ( this.lastHash !== hash ) {
@@ -191,6 +191,7 @@
 } )(
jQuery,
mediaWiki,
+   require( 'ext.kartographer.init' ),
require( 'ext.kartographer.live' ),
require( 'mediawiki.router' ),
module.FullScreenCloseControl
diff --git a/modules/kartographer.js b/modules/kartographer.js
index 6dce207..437e461 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -1,7 +1,7 @@
 /* globals module */
 /**
- * The base module creates the `mw.kartographer` namespace and defines common
- * utility methods.
+ * This module contains utility methods that may be useful to all other
+ * modules.
  *
  * @alias ext.kartographer.init
  * @class Kartographer
@@ -9,9 +9,7 @@
  */
 ( function ( $, mw ) {
 
-   var windowManager, mapDialog;
-
-   mw.kartographer = mw.kartographer || {};
+   var windowManager, mapDialog, openFullscreenMap;
 
function getWindowManager() {
if ( !windowManager ) {
@@ -38,7 +36,7 @@
 * @param {number} [fullScreenState.latitude]
 * @param {number} [fullScreenState.longitude]
 */
-   mw.kartographer.openFullscreenMap = ( function () {
+   openFullscreenMap = ( function () {
 
var counter = -1;
 
@@ -56,8 +54,6 @@
if ( mapData instanceof L.Map ) {
map = mapData;
mapData = getMapData( $( 
map.getContainer() ).closest( '.mw-kartographer-interactive' ) );
-   } else if ( mapData && mapData.isMapframe ) {
-   map = mw.kartographer.maps[ 
mapData.maptagId ];
}
 
$.extend( dialogData, mapData, {
@@ -110,7 +106,7 @@
 *   read the current zoom and center from the map object.
 * @return {string} The route to open the map in full screen mode.
 */
-   mw.kartographer.getMapHash = function ( data, map ) {
+   function getMapHash( data, map ) {
 
var hash = '/' + ( data.isMapframe ? 'map' : 'maplink' ),
mapPosition,
@@ -129,7 +125,7 @@
}
 
return hash;
-   };
+   }
 
/**
 * Convenient method that gets the current position of the map.
@@ -230,8 +226,8 @@
}
 
module.exports = {
-   getMapHash: mw.kartographer.getMapHash,
-   openFullscreenMap: mw.kartographer.openFullscreenMap,
+   getMapHash: getMapHash,
+   openFullscreenMap: openFullscreenMap,
getMapData: getMapData,
getMapPosition: getMapPosition,
getFullScreenState: getFullScreenState,
diff --git a/modules/live/FullScreenControl.js 
b/modules/live/FullScreenControl.js
index e1ade8c..ba59d1c 100644
--- a/modules/live/FullScreenControl.js
+++ b/modules/live/FullScreenControl.js
@@ -44,13 +44,13 @@
},
 
updateHash: function () {
-   var hash = mw.kartographer.getMapHash( 
this.options.mapData, this.map );
+   var hash = kartographer.getMapHash( 
this.options.mapData, this.map );
this.link.href = '#' + hash;
},
 
onShowFullScreen: function ( e ) {
L.DomEvent.stop( e );
-   mw.kartographer.openFullscreenMap( this.map, 
kartographer.getMapPosition( 

[MediaWiki-commits] [Gerrit] Remove mw.kartographer, use module interface instead. - change (mediawiki...Kartographer)

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

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

Change subject: Remove mw.kartographer, use module interface instead.
..

Remove mw.kartographer, use module interface instead.

Bug: T140520
Change-Id: I18549fe448a71aa811df6bc1b0fdc87a1cd7ea74
---
M modules/fullscreen/MapDialog.js
M modules/kartographer.js
M modules/live/FullScreenControl.js
M modules/mapframe/mapframe.js
M modules/maplink/maplink.js
5 files changed, 30 insertions(+), 31 deletions(-)


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

diff --git a/modules/fullscreen/MapDialog.js b/modules/fullscreen/MapDialog.js
index b7a1b84..5901abe 100644
--- a/modules/fullscreen/MapDialog.js
+++ b/modules/fullscreen/MapDialog.js
@@ -9,7 +9,7 @@
  * @class Kartographer.Fullscreen.MapDialog
  * @extends OO.ui.Dialog
  */
-module.MapDialog = ( function ( $, mw, kartoLive, router, CloseControl ) {
+module.MapDialog = ( function ( $, mw, kartographer, kartoLive, router, 
CloseControl ) {
 
/**
 * @constructor
@@ -101,7 +101,7 @@
 * Tells the router to navigate to the current full screen map route.
 */
MapDialog.prototype.updateHash = function () {
-   var hash = mw.kartographer.getMapHash( this.mapData, this.map );
+   var hash = kartographer.getMapHash( this.mapData, this.map );
 
// Avoid extra operations
if ( this.lastHash !== hash ) {
@@ -191,6 +191,7 @@
 } )(
jQuery,
mediaWiki,
+   require( 'ext.kartographer.init' ),
require( 'ext.kartographer.live' ),
require( 'mediawiki.router' ),
module.FullScreenCloseControl
diff --git a/modules/kartographer.js b/modules/kartographer.js
index 6dce207..437e461 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -1,7 +1,7 @@
 /* globals module */
 /**
- * The base module creates the `mw.kartographer` namespace and defines common
- * utility methods.
+ * This module contains utility methods that may be useful to all other
+ * modules.
  *
  * @alias ext.kartographer.init
  * @class Kartographer
@@ -9,9 +9,7 @@
  */
 ( function ( $, mw ) {
 
-   var windowManager, mapDialog;
-
-   mw.kartographer = mw.kartographer || {};
+   var windowManager, mapDialog, openFullscreenMap;
 
function getWindowManager() {
if ( !windowManager ) {
@@ -38,7 +36,7 @@
 * @param {number} [fullScreenState.latitude]
 * @param {number} [fullScreenState.longitude]
 */
-   mw.kartographer.openFullscreenMap = ( function () {
+   openFullscreenMap = ( function () {
 
var counter = -1;
 
@@ -56,8 +54,6 @@
if ( mapData instanceof L.Map ) {
map = mapData;
mapData = getMapData( $( 
map.getContainer() ).closest( '.mw-kartographer-interactive' ) );
-   } else if ( mapData && mapData.isMapframe ) {
-   map = mw.kartographer.maps[ 
mapData.maptagId ];
}
 
$.extend( dialogData, mapData, {
@@ -110,7 +106,7 @@
 *   read the current zoom and center from the map object.
 * @return {string} The route to open the map in full screen mode.
 */
-   mw.kartographer.getMapHash = function ( data, map ) {
+   function getMapHash( data, map ) {
 
var hash = '/' + ( data.isMapframe ? 'map' : 'maplink' ),
mapPosition,
@@ -129,7 +125,7 @@
}
 
return hash;
-   };
+   }
 
/**
 * Convenient method that gets the current position of the map.
@@ -230,8 +226,8 @@
}
 
module.exports = {
-   getMapHash: mw.kartographer.getMapHash,
-   openFullscreenMap: mw.kartographer.openFullscreenMap,
+   getMapHash: getMapHash,
+   openFullscreenMap: openFullscreenMap,
getMapData: getMapData,
getMapPosition: getMapPosition,
getFullScreenState: getFullScreenState,
diff --git a/modules/live/FullScreenControl.js 
b/modules/live/FullScreenControl.js
index e1ade8c..ba59d1c 100644
--- a/modules/live/FullScreenControl.js
+++ b/modules/live/FullScreenControl.js
@@ -44,13 +44,13 @@
},
 
updateHash: function () {
-   var hash = mw.kartographer.getMapHash( 
this.options.mapData, this.map );
+   var hash = kartographer.getMapHash( 
this.options.mapData, this.map );
this.link.href = '#' + hash;
},
 
onShowFullScreen: function ( e ) {
L.DomEvent.stop( e );
-   

[MediaWiki-commits] [Gerrit] Remove map param from addDataLayer signature (redundant) - change (mediawiki...Kartographer)

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

Change subject: Remove map param from addDataLayer signature (redundant)
..


Remove map param from addDataLayer signature (redundant)

Change-Id: I1ee60cb27d28886600cf8809026ca194b2a6a154
---
M modules/live/MWMap.js
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/modules/live/MWMap.js b/modules/live/MWMap.js
index 7b7491b..f53aef5 100644
--- a/modules/live/MWMap.js
+++ b/modules/live/MWMap.js
@@ -192,7 +192,7 @@
getMapGroupData( data.overlays ).then( function ( mapData ) {
$.each( data.overlays, function ( index, group ) {
if ( !$.isEmptyObject( mapData[ group ] ) ) {
-   map.dataLayers[ group ] = 
self.addDataLayer( map, mapData[ group ] );
+   map.dataLayers[ group ] = 
self.addDataLayer( mapData[ group ] );
} else {
mw.log.warn( 'Layer not found or 
contains no data: "' + group + '"' );
}
@@ -302,12 +302,11 @@
};
 
/**
-* Create a new GeoJSON layer and add it to map.
+* Creates a new GeoJSON layer and adds it to the map.
 *
-* @param {L.Map} map Map to get layers from
 * @param {Object} geoJson
 */
-   MWMap.prototype.addDataLayer = function ( map, geoJson ) {
+   MWMap.prototype.addDataLayer = function ( geoJson ) {
try {
return L.mapbox.featureLayer( geoJson, dataLayerOpts 
).addTo( this.map );
} catch ( e ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ee60cb27d28886600cf8809026ca194b2a6a154
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove map param from addDataLayer signature (redundant) - change (mediawiki...Kartographer)

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

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

Change subject: Remove map param from addDataLayer signature (redundant)
..

Remove map param from addDataLayer signature (redundant)

Change-Id: I1ee60cb27d28886600cf8809026ca194b2a6a154
---
M modules/live/MWMap.js
1 file changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/modules/live/MWMap.js b/modules/live/MWMap.js
index 7b7491b..f53aef5 100644
--- a/modules/live/MWMap.js
+++ b/modules/live/MWMap.js
@@ -192,7 +192,7 @@
getMapGroupData( data.overlays ).then( function ( mapData ) {
$.each( data.overlays, function ( index, group ) {
if ( !$.isEmptyObject( mapData[ group ] ) ) {
-   map.dataLayers[ group ] = 
self.addDataLayer( map, mapData[ group ] );
+   map.dataLayers[ group ] = 
self.addDataLayer( mapData[ group ] );
} else {
mw.log.warn( 'Layer not found or 
contains no data: "' + group + '"' );
}
@@ -302,12 +302,11 @@
};
 
/**
-* Create a new GeoJSON layer and add it to map.
+* Creates a new GeoJSON layer and adds it to the map.
 *
-* @param {L.Map} map Map to get layers from
 * @param {Object} geoJson
 */
-   MWMap.prototype.addDataLayer = function ( map, geoJson ) {
+   MWMap.prototype.addDataLayer = function ( geoJson ) {
try {
return L.mapbox.featureLayer( geoJson, dataLayerOpts 
).addTo( this.map );
} catch ( e ) {

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

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

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


[MediaWiki-commits] [Gerrit] Add qqq.json for WV messages - change (mediawiki...Kartographer)

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

Change subject: Add qqq.json for WV messages
..


Add qqq.json for WV messages

Change-Id: Icfe0d512cf08d4fce22661d2ac6688b6ceb08b25
---
M modules/wikivoyage/i18n/qqq.json
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/wikivoyage/i18n/qqq.json b/modules/wikivoyage/i18n/qqq.json
index cb916b4..0692280 100644
--- a/modules/wikivoyage/i18n/qqq.json
+++ b/modules/wikivoyage/i18n/qqq.json
@@ -5,5 +5,11 @@
]
},
"kartographer-wv-group": "{{Identical|Group}}",
+   "kartographer-wv-layer-nearby-articles": "Label for the map overlay 
that contains nearby articles' markers.",
+   "kartographer-wv-layer-wikimedia": "Label for the tile layer that 
contains tiles from Wikimedia tile server.",
+   "kartographer-wv-nearby-articles-control": "Title attribute for the map 
control that displays the nearby articles.",
+   "kartographer-wv-warning-external-source-title": "Title for the message 
dialog that warns about loading external data source.",
+   "kartographer-wv-warning-external-source-message": "Message for the 
message dialog that warns about loading external data source.",
+   "kartographer-wv-warning-external-source-agree": "Label of the message 
dialog action that approves loading external data source.",
"kartographer-wv-warning-external-source-disagree": 
"{{Identical|Cancel}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfe0d512cf08d4fce22661d2ac6688b6ceb08b25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add qqq.json for WV messages - change (mediawiki...Kartographer)

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

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

Change subject: Add qqq.json for WV messages
..

Add qqq.json for WV messages

Change-Id: Icfe0d512cf08d4fce22661d2ac6688b6ceb08b25
---
M modules/wikivoyage/i18n/qqq.json
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/modules/wikivoyage/i18n/qqq.json b/modules/wikivoyage/i18n/qqq.json
index cb916b4..0692280 100644
--- a/modules/wikivoyage/i18n/qqq.json
+++ b/modules/wikivoyage/i18n/qqq.json
@@ -5,5 +5,11 @@
]
},
"kartographer-wv-group": "{{Identical|Group}}",
+   "kartographer-wv-layer-nearby-articles": "Label for the map overlay 
that contains nearby articles' markers.",
+   "kartographer-wv-layer-wikimedia": "Label for the tile layer that 
contains tiles from Wikimedia tile server.",
+   "kartographer-wv-nearby-articles-control": "Title attribute for the map 
control that displays the nearby articles.",
+   "kartographer-wv-warning-external-source-title": "Title for the message 
dialog that warns about loading external data source.",
+   "kartographer-wv-warning-external-source-message": "Message for the 
message dialog that warns about loading external data source.",
+   "kartographer-wv-warning-external-source-agree": "Label of the message 
dialog action that approves loading external data source.",
"kartographer-wv-warning-external-source-disagree": 
"{{Identical|Cancel}}"
 }

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

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

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


[MediaWiki-commits] [Gerrit] Convert remaining HttpURLConnection usages to OkHttp - change (apps...wikipedia)

2016-07-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Convert remaining HttpURLConnection usages to OkHttp
..

Convert remaining HttpURLConnection usages to OkHttp

Most of our core API calls already use the up-to-date Request/Response API
provided by OkHttp.  But there were a few remaining calls using the
HttpRequest library from earlier versions of the app.  This patch brings
them in line with the rest of the app.

This completely removes the HttpRequest library from the app, so remove
incidentals related to it.

Also includes some light refactoring (use log.L in favor of Log, remove
unused constants).

Bug: T134904

Change-Id: I785eeb329718453818d6d224fa5c059ce37cad2e
---
M app/proguard-rules.pro
D app/src/main/assets/licenses/Http-Request
M app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
M app/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/alphaupdater/AlphaUpdateChecker.java
M app/src/main/java/org/wikipedia/analytics/EventLoggingEvent.java
M app/src/main/java/org/wikipedia/analytics/Funnel.java
M app/src/main/java/org/wikipedia/recurring/RecurringTasksExecutor.java
M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
M app/src/main/java/org/wikipedia/util/ThrowableUtil.java
M app/src/main/res/values/credits.xml
12 files changed, 61 insertions(+), 102 deletions(-)


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

diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index cf588dc..c414278 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -37,8 +37,6 @@
 
 -keep class uk.co.senab.photoview.** {*;}
 
--keep class com.github.kevinsawicki.http.** {*;}
-
 # --- Retrofit2 ---
 -dontwarn retrofit2.**
 -keep class retrofit2.** { *; }
diff --git a/app/src/main/assets/licenses/Http-Request 
b/app/src/main/assets/licenses/Http-Request
deleted file mode 100644
index 3407a78..000
--- a/app/src/main/assets/licenses/Http-Request
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2014 Kevin Sawicki 
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java 
b/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
index 8a18c10..21ad8c6 100644
--- a/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
+++ b/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java
@@ -3,23 +3,15 @@
 import android.content.Context;
 import android.support.annotation.NonNull;
 
-import com.github.kevinsawicki.http.HttpRequest;
-
 import org.wikipedia.settings.Prefs;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.Proxy;
-import java.net.URL;
 
 import okhttp3.Cache;
 import okhttp3.CookieJar;
 import okhttp3.JavaNetCookieJar;
 import okhttp3.OkHttpClient;
-import okhttp3.OkUrlFactory;
 import okhttp3.logging.HttpLoggingInterceptor;
 
-public class OkHttpConnectionFactory implements HttpRequest.ConnectionFactory {
+public class OkHttpConnectionFactory {
 private static final long HTTP_CACHE_SIZE = 16 * 1024 * 1024;
 private static final Cache HTTP_CACHE = new 
Cache(WikipediaApp.getInstance().getCacheDir(), HTTP_CACHE_SIZE);
 
@@ -27,17 +19,6 @@
 
 public OkHttpConnectionFactory(@NonNull Context context) {
 client = createClient(context).build();
-}
-
-@Override
-public HttpURLConnection create(URL url) throws IOException {
-return new OkUrlFactory(client).open(url); // TODO: update to newer API
-}
-
-@Override
-public HttpURLConnection create(URL url, Proxy proxy) throws IOException {
-throw new UnsupportedOperationException(
-"Per-connection proxy is not supported. Use OkHttpClient's 
setProxy instead.");
 }
 
 public static 

[MediaWiki-commits] [Gerrit] Merge master into deployment - change (wikimedia...crm)

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

Change subject: Merge master into deployment
..


Merge master into deployment

0e9fe98226120eb0edd5c57e493bc6e697f84a38 Don't assume configured directories 
end in a slash
27c13d6aadcb163244ccbe0f16167092413c99a6 Fail if the message body is missing

Change-Id: I8ed9b3243878ffe60d62a9e9cbd1bfa18f68616c
---
D sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
1 file changed, 0 insertions(+), 167 deletions(-)

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



diff --git a/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php 
b/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
deleted file mode 100644
index 0bdd632..000
--- a/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
+++ /dev/null
@@ -1,167 +0,0 @@
-<<< HEAD   (cea316 Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-===
- 'Worldpay Audit',
-'group' => 'Audit',
-'description' => 'Parse audit files and match with logs.',
-);
-}
-
-public function setUp() {
-   parent::setUp();
-   self::$messages = array();
-   $dirs = array(
-   'wmf_audit_log_archive_dir' => __DIR__ . '/data/logs',
-   'worldpay_audit_recon_completed_dir' => $this->getTempDir() . 
'/completed',
-   'worldpay_audit_working_log_dir' => $this->getTempDir() . 
'/working',
-   );
-
-   foreach ( $dirs as $var => $dir ) {
-   if ( !is_dir( $dir ) ) {
-   mkdir( $dir );
-   }
-   variable_set( $var, $dir );
-   }
-
-   variable_set( 'worldpay_audit_log_search_past_days', 7 );
-}
-
-public function auditTestProvider() {
-   return array(
-   array( __DIR__ . '/data/TransactionReconciliationFile', array(
-   'main' => array(
-   array(
- 'utm_source' => 'worldpay_audit',
- 'utm_medium' => 'worldpay_audit',
- 'utm_campaign' => 'worldpay_audit',
- 'date' => 1411723740,
- 'gateway_txn_id' => '19330306.0',
- 'gross' => '1',
- 'user_ip' => '1.2.3.4',
- 'first_name' => 'Test',
- 'last_name' => 'PErson',
- 'country' => 'FR',
- 'email' => 'fr-tech+testper...@wikimedia.org',
- 'contribution_tracking_id' => '19330306',
- 'currency' => 'EUR',
- 'gateway' => 'worldpay',
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
-   ),
-   array(
- 'utm_source' => 'worldpay_audit',
- 'utm_medium' => 'worldpay_audit',
- 'utm_campaign' => 'worldpay_audit',
- 'date' => 1411729200,
- 'gateway_txn_id' => '19343862.0',
- 'gross' => '1.33',
- 'user_ip' => '2.3.4.5',
- 'first_name' => 'Other',
- 'last_name' => 'Friend',
- 'country' => 'FR',
- 'email' => 'fr-tech+ot...@wikimedia.org',
- 'contribution_tracking_id' => '19343862',
- 'currency' => 'EUR',
- 'gateway' => 'worldpay',
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
-   ),
-   ),
-   ), array() ),
-   /* FIXME: broken, see T113782
-* array( __DIR__ . '/data/LynkReconciliationFile/', array(
-*   'main' => array(
-* array(
-*   'utm_source' => 'worldpay_audit',
-*   'utm_medium' => 'worldpay_audit',
-*   'utm_campaign' => 'worldpay_audit',
-*   'date' => 1409263836,
-*   'gateway_txn_id' => '5055',
-*   'gross' => '1',
-*   'user_ip' => '5.4.3.2',
-*   'first_name' => 'Bøld',
-*   'last_name' => 'Bot?ton',
-*   'street_address' => '123 Sesame St',
-*   'postal_code' => '02480',
-*   'country' => 'US',
-*   'email' => 'fr-tech+testb...@wikimedia.org',
-*   'contribution_tracking_id' => '1895',
-*   'currency' => 'USD',
-*   'gateway' => 'worldpay',
-*   'payment_method' => 'cc',
-*   'payment_submethod' => 'visa',
-* ),
-*   ),
-* ), array() ),
-*/
-   );
-}
-
-/**
- * @dataProvider auditTestProvider
- */
-public function testParseFiles( $path, $expectedMessages, 

[MediaWiki-commits] [Gerrit] Merge master into deployment - change (wikimedia...crm)

2016-07-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Merge master into deployment
..

Merge master into deployment

0e9fe98226120eb0edd5c57e493bc6e697f84a38 Don't assume configured directories 
end in a slash
27c13d6aadcb163244ccbe0f16167092413c99a6 Fail if the message body is missing

Change-Id: I8ed9b3243878ffe60d62a9e9cbd1bfa18f68616c
---
D sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
1 file changed, 0 insertions(+), 167 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/64/299264/1

diff --git a/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php 
b/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
deleted file mode 100644
index 0bdd632..000
--- a/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
+++ /dev/null
@@ -1,167 +0,0 @@
-<<< HEAD   (cea316 Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-===
- 'Worldpay Audit',
-'group' => 'Audit',
-'description' => 'Parse audit files and match with logs.',
-);
-}
-
-public function setUp() {
-   parent::setUp();
-   self::$messages = array();
-   $dirs = array(
-   'wmf_audit_log_archive_dir' => __DIR__ . '/data/logs',
-   'worldpay_audit_recon_completed_dir' => $this->getTempDir() . 
'/completed',
-   'worldpay_audit_working_log_dir' => $this->getTempDir() . 
'/working',
-   );
-
-   foreach ( $dirs as $var => $dir ) {
-   if ( !is_dir( $dir ) ) {
-   mkdir( $dir );
-   }
-   variable_set( $var, $dir );
-   }
-
-   variable_set( 'worldpay_audit_log_search_past_days', 7 );
-}
-
-public function auditTestProvider() {
-   return array(
-   array( __DIR__ . '/data/TransactionReconciliationFile', array(
-   'main' => array(
-   array(
- 'utm_source' => 'worldpay_audit',
- 'utm_medium' => 'worldpay_audit',
- 'utm_campaign' => 'worldpay_audit',
- 'date' => 1411723740,
- 'gateway_txn_id' => '19330306.0',
- 'gross' => '1',
- 'user_ip' => '1.2.3.4',
- 'first_name' => 'Test',
- 'last_name' => 'PErson',
- 'country' => 'FR',
- 'email' => 'fr-tech+testper...@wikimedia.org',
- 'contribution_tracking_id' => '19330306',
- 'currency' => 'EUR',
- 'gateway' => 'worldpay',
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
-   ),
-   array(
- 'utm_source' => 'worldpay_audit',
- 'utm_medium' => 'worldpay_audit',
- 'utm_campaign' => 'worldpay_audit',
- 'date' => 1411729200,
- 'gateway_txn_id' => '19343862.0',
- 'gross' => '1.33',
- 'user_ip' => '2.3.4.5',
- 'first_name' => 'Other',
- 'last_name' => 'Friend',
- 'country' => 'FR',
- 'email' => 'fr-tech+ot...@wikimedia.org',
- 'contribution_tracking_id' => '19343862',
- 'currency' => 'EUR',
- 'gateway' => 'worldpay',
- 'payment_method' => 'cc',
- 'payment_submethod' => 'visa',
-   ),
-   ),
-   ), array() ),
-   /* FIXME: broken, see T113782
-* array( __DIR__ . '/data/LynkReconciliationFile/', array(
-*   'main' => array(
-* array(
-*   'utm_source' => 'worldpay_audit',
-*   'utm_medium' => 'worldpay_audit',
-*   'utm_campaign' => 'worldpay_audit',
-*   'date' => 1409263836,
-*   'gateway_txn_id' => '5055',
-*   'gross' => '1',
-*   'user_ip' => '5.4.3.2',
-*   'first_name' => 'Bøld',
-*   'last_name' => 'Bot?ton',
-*   'street_address' => '123 Sesame St',
-*   'postal_code' => '02480',
-*   'country' => 'US',
-*   'email' => 'fr-tech+testb...@wikimedia.org',
-*   'contribution_tracking_id' => '1895',
-*   'currency' => 'USD',
-*   'gateway' => 'worldpay',
-*   'payment_method' => 'cc',
-*   'payment_submethod' => 'visa',
-* ),
-*   ),
-* ), array() ),
-*/
-   );
-}
-
-/**
- * @dataProvider auditTestProvider
- */
-public function 

[MediaWiki-commits] [Gerrit] Fail if the message body is missing - change (wikimedia...crm)

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

Change subject: Fail if the message body is missing
..


Fail if the message body is missing

Bug: T140515
Change-Id: I5ad32b9ec2272d1a991bc612c8b122abb87f8211
---
M sites/all/modules/wmf_common/Queue.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/sites/all/modules/wmf_common/Queue.php 
b/sites/all/modules/wmf_common/Queue.php
index c9702c5..4d64ae2 100644
--- a/sites/all/modules/wmf_common/Queue.php
+++ b/sites/all/modules/wmf_common/Queue.php
@@ -445,6 +445,10 @@
 }
 
 protected function commonMessageNormalize( &$msg ) {
+if ( !$msg->body ) {
+throw new WmfException( 'INVALID_MESSAGE', 'Bad news, this message 
was lacking a body.' );
+}
+
 // argh.  Collapse useful headers into the message, then do a stupid 
dance.
 $pull_headers = array(
 'source_name',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad32b9ec2272d1a991bc612c8b122abb87f8211
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP] Remove RapidHTML - change (mediawiki...DonationInterface)

2016-07-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: [WIP] Remove RapidHTML
..

[WIP] Remove RapidHTML

Change-Id: Ic569153e9205c5691074c0a3580a7004f9268893
---
M DonationInterface.class.php
M DonationInterfaceFormSettings.php
M Gruntfile.js
M extension.json
D gateway_forms/RapidHtml.php
D gateway_forms/rapidhtml/css/images/button-disabled-blue.png
D gateway_forms/rapidhtml/css/images/button-disabled-green.png
D gateway_forms/rapidhtml/css/images/button-disabled-red.png
D gateway_forms/rapidhtml/css/images/button-disabled.png
D gateway_forms/rapidhtml/css/images/button-down-blue.png
D gateway_forms/rapidhtml/css/images/button-down-green.png
D gateway_forms/rapidhtml/css/images/button-down-red.png
D gateway_forms/rapidhtml/css/images/button-down.png
D gateway_forms/rapidhtml/css/images/button-off-blue.png
D gateway_forms/rapidhtml/css/images/button-off-green.png
D gateway_forms/rapidhtml/css/images/button-off-red.png
D gateway_forms/rapidhtml/css/images/button-off.png
D gateway_forms/rapidhtml/css/images/button-over-blue.png
D gateway_forms/rapidhtml/css/images/button-over-green.png
D gateway_forms/rapidhtml/css/images/button-over-red.png
D gateway_forms/rapidhtml/css/images/button-over.png
D gateway_forms/rapidhtml/css/images/close.png
D gateway_forms/rapidhtml/css/images/titlebar-fade.png
D gateway_forms/rapidhtml/css/images/ui-anim_basic_16x16.gif
D gateway_forms/rapidhtml/css/images/ui-bg_flat_15_cd0a0a_40x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_flat_70_00_40x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_highlight-hard_80_d7ebf9_1x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_highlight-soft_100_e4f1fb_1x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_highlight-soft_100_ff_1x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
D gateway_forms/rapidhtml/css/images/ui-bg_inset-hard_100_f0f0f0_1x100.png
D gateway_forms/rapidhtml/css/images/ui-icons_2694e8_256x240.png
D gateway_forms/rapidhtml/css/images/ui-icons_2e83ff_256x240.png
D gateway_forms/rapidhtml/css/images/ui-icons_3d80b3_256x240.png
D gateway_forms/rapidhtml/css/images/ui-icons_66_256x240.png
D gateway_forms/rapidhtml/css/images/ui-icons_72a7cf_256x240.png
D gateway_forms/rapidhtml/css/images/ui-icons_ff_256x240.png
D gateway_forms/rapidhtml/css/jquery.ui.button.css
D gateway_forms/rapidhtml/css/jquery.ui.core.css
D gateway_forms/rapidhtml/css/jquery.ui.dialog.css
D gateway_forms/rapidhtml/css/jquery.ui.theme.css
D gateway_forms/rapidhtml/css/lp1.css
D gateway_forms/rapidhtml/css/webitects.css
D gateway_forms/rapidhtml/css/webitects2nd.css
D gateway_forms/rapidhtml/html/_moreinfolinks/default.html
D gateway_forms/rapidhtml/images/loading-green.gif
D gateway_forms/rapidhtml/images/loading-white.gif
D gateway_forms/rapidhtml/images/security-code.png
D gateway_forms/rapidhtml/js/basicForm.js
D globalcollect_gateway/forms/html/_country-instructions/MX.html
D globalcollect_gateway/forms/html/_country-instructions/default.html
D globalcollect_gateway/forms/html/_dd-bank-fields/AT.html
D globalcollect_gateway/forms/html/_dd-bank-fields/DE.html
D globalcollect_gateway/forms/html/_dd-bank-fields/ES.html
D globalcollect_gateway/forms/html/_dd-bank-fields/NL.html
D globalcollect_gateway/forms/html/_dd-bank-fields/default.html
D globalcollect_gateway/forms/html/_dd-bank-fields/hide/BE.html
D globalcollect_gateway/forms/html/_dd-bank-fields/hide/IT.html
D globalcollect_gateway/forms/html/_donation-amount/ARS.html
D globalcollect_gateway/forms/html/_donation-amount/CLP.html
D globalcollect_gateway/forms/html/_donation-amount/EUR.html
D globalcollect_gateway/forms/html/_donation-amount/GBP.html
D globalcollect_gateway/forms/html/_donation-amount/JPY.html
D globalcollect_gateway/forms/html/_donation-amount/MXP.html
D globalcollect_gateway/forms/html/_donation-amount/RUB.html
D globalcollect_gateway/forms/html/_donation-amount/USD.html
D globalcollect_gateway/forms/html/_donation-amount/default.html
D globalcollect_gateway/forms/html/_optional_email/default.html
D globalcollect_gateway/forms/html/_personal-information/AU.html
D globalcollect_gateway/forms/html/_personal-information/BR.html
D globalcollect_gateway/forms/html/_personal-information/CA.html
D globalcollect_gateway/forms/html/_personal-information/GB.html
D globalcollect_gateway/forms/html/_personal-information/JP.html
D globalcollect_gateway/forms/html/_personal-information/US.html
D globalcollect_gateway/forms/html/_personal-information/default.html
D globalcollect_gateway/forms/html/bt/bt.html
D globalcollect_gateway/forms/html/cash/boletos.html
D globalcollect_gateway/forms/html/cc/cc-a.html
D globalcollect_gateway/forms/html/cc/cc-jvma.html
D globalcollect_gateway/forms/html/cc/cc-vjma.html
D 

[MediaWiki-commits] [Gerrit] Style character diffs on Special:PendingChanges - change (mediawiki...FlaggedRevs)

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

Change subject: Style character diffs on Special:PendingChanges
..


Style character diffs on Special:PendingChanges

Needed styles was moved to module

Follows Ifd90292fc54875403d871429ce6e5020036d4797

Bug: T140450
Change-Id: I7c6fecdbfdc2b69fb81722cde4f9610b7308bd16
---
M frontend/specialpages/reports/PendingChanges_body.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/frontend/specialpages/reports/PendingChanges_body.php 
b/frontend/specialpages/reports/PendingChanges_body.php
index 2c379f7..7f00389 100644
--- a/frontend/specialpages/reports/PendingChanges_body.php
+++ b/frontend/specialpages/reports/PendingChanges_body.php
@@ -114,6 +114,10 @@
 
public function showPageList() {
$out = $this->getOutput();
+   if ( $this->pager->getNumRows() ) {
+   // To style output of 
ChangesList::showCharacterDifference
+   $out->addModuleStyles( 'mediawiki.special.changeslist' 
);
+   }
// Viewing the list normally...
if ( !$this->including() ) {
if ( $this->pager->getNumRows() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c6fecdbfdc2b69fb81722cde4f9610b7308bd16
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add two upload warnings - change (pywikibot/core)

2016-07-15 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Add two upload warnings
..

Add two upload warnings

Adds the bad-prefix and the page-exists upload warnings.

Also add graceful handling of simulation mode when using chunked
uploading.

Change-Id: Ife628004680399e047a75d1443e1d7ac0a22aabf
---
M pywikibot/site.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/62/299262/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index f8c6996..f4b6c18 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -5716,6 +5716,8 @@
 'filetype-unwanted-type': "File %(msg)s type is unwanted type.",
 'exists-normalized': 'File exists with different extension as '
  '"%(msg)s".',
+'bad-prefix': "Target filename has a bad prefix %(msg)s.",
+'page-exists': "Target filename exists but with a different file 
%(msg)s.",
 }
 
 # An offset != 0 doesn't make sense without a file key
@@ -5877,6 +5879,8 @@
 if error.code == u'uploaddisabled':
 self._uploaddisabled = True
 raise error
+if "nochange" in data:  # in simulation mode
+break
 _file_key = data['filekey']
 if 'warnings' in data and not ignore_all_warnings:
 if callable(ignore_warnings):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife628004680399e047a75d1443e1d7ac0a22aabf
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] Fail if the message body is missing - change (wikimedia...crm)

2016-07-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Fail if the message body is missing
..

Fail if the message body is missing

Bug: T140515
Change-Id: I5ad32b9ec2272d1a991bc612c8b122abb87f8211
---
M sites/all/modules/wmf_common/Queue.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/61/299261/1

diff --git a/sites/all/modules/wmf_common/Queue.php 
b/sites/all/modules/wmf_common/Queue.php
index c9702c5..4d64ae2 100644
--- a/sites/all/modules/wmf_common/Queue.php
+++ b/sites/all/modules/wmf_common/Queue.php
@@ -445,6 +445,10 @@
 }
 
 protected function commonMessageNormalize( &$msg ) {
+if ( !$msg->body ) {
+throw new WmfException( 'INVALID_MESSAGE', 'Bad news, this message 
was lacking a body.' );
+}
+
 // argh.  Collapse useful headers into the message, then do a stupid 
dance.
 $pull_headers = array(
 'source_name',

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

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

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


[MediaWiki-commits] [Gerrit] Improvements to RefreshLinksJob locking - change (mediawiki/core)

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

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

Change subject: Improvements to RefreshLinksJob locking
..

Improvements to RefreshLinksJob locking

* Removed the lockAndGetLatest() call which caused contention problems.
  Previously, job #2 could block on job #1 in that method, then job #1
  yields the row lock to job #2 in LinksUpdate::acquirePageLock() by
  committing, then job #1 blocks on job #2 in updateLinksTimestamp().
  This caused timeout errors. It also is not fully safe ever since
  batching and acquirePageLock() was added.
* Add an outer getScopedLockAndFlush() call to runForTitle() which
  avoids this contention (as well as contention with page edits)
  but still prevents older jobs from clobbering newer jobs. Edits
  can happen concurrently, since they will enqueue a job post-commit
  that will block on the lock.

Change-Id: I9e2d1eefd7cbb3d2f333c595361d070527d6f0c5
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 22 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/299260/1

diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index c76ea4f..78059aa 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -128,8 +128,25 @@
 * @return bool
 */
protected function runForTitle( Title $title ) {
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
+
$page = WikiPage::factory( $title );
$page->loadPageData( WikiPage::READ_LATEST );
+
+   // Serialize links updates by page ID so they see each others' 
changes
+   $scopedLock = wfGetDB( DB_MASTER )->getScopedLockAndFlush(
+   "RefreshLinks:pageid:{$page->getId()}",
+   __METHOD__,
+   15
+   );
+   if ( !$scopedLock ) {
+   throw new RuntimeException( "Could not acquire lock on 
page #{$page->getId()}." );
+   }
+   // Get the latest ID *after* getScopedLockAndFlush() flushed 
the transaction.
+   // This is used to detect edits/moves after loadPageData() but 
before the scope lock.
+   // The works around the chicken/egg problem of determining the 
scope lock key.
+   $latest = $title->getLatestRevID( Title::GAID_FOR_UPDATE );
+
if ( !empty( $this->params['triggeringRevisionId'] ) ) {
// Fetch the specified revision; lockAndGetLatest() 
below detects if the page
// was edited since and aborts in order to avoid 
corrupting the link tables
@@ -142,15 +159,15 @@
$revision = Revision::newFromTitle( $title, false, 
Revision::READ_LATEST );
}
 
-   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
-
if ( !$revision ) {
$stats->increment( 'refreshlinks.rev_not_found' );
$this->setLastError( "Revision not found for 
{$title->getPrefixedDBkey()}" );
return false; // just deleted?
-   } elseif ( !$revision->isCurrent() || $revision->getPage() != 
$page->getId() ) {
-   // If the revision isn't current, there's no point in 
doing a bunch
-   // of work just to fail at the lockAndGetLatest() check 
later.
+   } elseif ( $revision->getId() != $latest || 
$revision->getPage() !== $page->getId() ) {
+   // Do not clobber over newer updates with older ones. 
If all jobs where FIFO and
+   // serialized, it would be OK to update links based on 
older revisions since it
+   // would eventually get to the latest. Since that is 
not the case (by design),
+   // only update the link tables to a state matching the 
current revision's output.
$stats->increment( 'refreshlinks.rev_not_current' );
$this->setLastError( "Revision {$revision->getId()} is 
not current" );
return false;
@@ -248,17 +265,6 @@
$update->setTriggeringUser( $user );
}
}
-   }
-
-   $latestNow = $page->lockAndGetLatest();
-   if ( !$latestNow || $revision->getId() != $latestNow ) {
-   // Do not clobber over newer updates with older ones. 
If all jobs where FIFO and
-   // serialized, it would be OK to update links based on 
older revisions since it
-   // would eventually get to the latest. Since that is 
not the case (by 

[MediaWiki-commits] [Gerrit] Add a link to the annotations page from file page - change (mediawiki...FileAnnotations)

2016-07-15 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Add a link to the annotations page from file page
..

Add a link to the annotations page from file page

Bug: 140502
Change-Id: Ia042ef423e3352b549954ca057a1a4fa9f0f59fc
---
M FileAnnotations.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
4 files changed, 26 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileAnnotations 
refs/changes/04/299204/1

diff --git a/FileAnnotations.hooks.php b/FileAnnotations.hooks.php
index fd6da57..44f401d 100644
--- a/FileAnnotations.hooks.php
+++ b/FileAnnotations.hooks.php
@@ -35,4 +35,26 @@
$out->addModules( array( 'fileannotations' ) );
}
}
+
+   public static function addFileAnnotationsTab( SkinTemplate 
&$sktemplate, array &$links ) {
+   $title = $sktemplate->getTitle();
+   if ( $title->inNamespace( NS_FILE ) ) {
+   $fatitle = Title::makeTitle(
+   NS_FILE_ANNOTATIONS,
+   $title->getDBkey()
+   );
+
+   $tabMessage = new Message(
+   'fileannotations-tab'
+   );
+
+   $links['namespaces']['annotations'] = [
+   'class' => '',
+   'text' => $tabMessage->text(),
+   'href' => $sktemplate->makeArticleUrlDetails(
+   $fatitle->getFullText()
+   )['href'],
+   ];
+   }
+   }
 }
diff --git a/extension.json b/extension.json
index 7c0c45e..dbde3c7 100644
--- a/extension.json
+++ b/extension.json
@@ -36,7 +36,8 @@
]
},
"Hooks": {
-   "BeforePageDisplay": 
"FileAnnotationsHooks::getModulesForFilePage"
+   "BeforePageDisplay": 
"FileAnnotationsHooks::getModulesForFilePage",
+   "SkinTemplateNavigation": 
"FileAnnotationsHooks::addFileAnnotationsTab"
},
"ResourceModules": {
"fileannotations": {
diff --git a/i18n/en.json b/i18n/en.json
index 65e07e0..9b2a0db 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,6 +4,7 @@
},
"fileannotations-desc": "Displays and edits annotations on file pages.",
"file-has-annotations": "There are annotations on this file. Mouse over 
the image to view them.",
+   "fileannotations-tab": "Annotations",
"fileannotation-create": "Add file annotation",
"save-fileannotation": "Save",
"cancel-fileannotation": "Cancel",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 14670e4..4dedd17 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -4,6 +4,7 @@
},
"fileannotations-desc": "Description of the FileAnnotations extension.",
"file-has-annotations": "Note on file page indicating the file has 
annotations.",
+   "fileannotations-tab": "Text for a tab that links to the file 
annotations page from the file page.",
"fileannotation-create": "Text of a button to create a new annotation 
on a file.",
"save-fileannotation": "Text of a button to save a new or edited 
annotation.",
"cancel-fileannotation": "Text of a button that cancels creating or 
editing an annotation.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia042ef423e3352b549954ca057a1a4fa9f0f59fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileAnnotations
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur 

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


[MediaWiki-commits] [Gerrit] Add Http::sendBeacon() - change (mediawiki/core)

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

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

Change subject: Add Http::sendBeacon()
..

Add Http::sendBeacon()

Add a PHP implementation of `navigator.sendBeacon`, part of the JavaScript
Beacon web API. Http::sendBeacon() matches it in signature and behavior,
sending a POST request to the specified URL with the specified payload and
doing so asyncronously, after processing the request.

The intended use-case is for sending a pingback to mediawiki.org post-install
(with the user's consent). That will be implemented in a follow-up commit.

Change-Id: I4de23b1154056b6578aeb79fc5460462135deb91
---
M includes/HttpFunctions.php
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/299203/1

diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index b12f49f..3509384 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -212,6 +212,29 @@
 
return "";
}
+
+   /**
+* Asynchronously transfer small HTTP data from the User Agent to a web 
server.
+*
+* This method closely matches navigator.sendBeacon(), which is part of 
the
+* Beacon web API. See 

+* and 
.
+*
+* If you need to pass advanced options to Http::post, call it directly.
+*
+* @param string $url the URL where the data is to be transmitted.
+* @param mixed $data (optional) data to be transmitted as an array of
+*   key-value pairs or as URL-encoded form data.
+* @return true
+*/
+   public static function sendBeacon( $url, array $data = [] ) {
+   $options = $data ? [ 'postData' => $data ] : [];
+   DeferredUpdates::addCallableUpdate( function () use ( $url, 
$options ) {
+   Http::post( $url, $options );
+   } );
+
+   return true;
+   }
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4de23b1154056b6578aeb79fc5460462135deb91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Make the fundraising 1.27 tests mandatory - change (integration/config)

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

Change subject: Make the fundraising 1.27 tests mandatory
..


Make the fundraising 1.27 tests mandatory

Bug: T138016
Change-Id: Idaebb7259f39c7572bda5ad5c27fc181b249e705
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index cfc2927..f4bf04b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -873,10 +873,6 @@
   - name: mediawiki-core-jsduck-publish
 branch: ^(REL.*|master)$
 
-  # TODO make this voting once fundraising is on mw 1.27 and remove 1.25 test
-  - name: mwext-donationinterfacecore-REL1_27-testextension-zend55
-voting: false
-
   # Job to ease reviews of MW-CS changes
   - name: mw-tools-codesniffer-mwcore-testrun
 voting: false
@@ -2955,9 +2951,9 @@
   - jshint
 test:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
+  - mwext-donationinterfacecore-REL1_27-testextension-zend55
 gate-and-submit:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
-experimental:
   - mwext-donationinterfacecore-REL1_27-testextension-zend55
 
   - name: mediawiki/extensions/DoubleWiki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaebb7259f39c7572bda5ad5c27fc181b249e705
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Make the fundraising 1.27 tests mandatory - change (integration/config)

2016-07-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Make the fundraising 1.27 tests mandatory
..

Make the fundraising 1.27 tests mandatory

Bug: T138016
Change-Id: Idaebb7259f39c7572bda5ad5c27fc181b249e705
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/00/299200/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index cfc2927..f4bf04b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -873,10 +873,6 @@
   - name: mediawiki-core-jsduck-publish
 branch: ^(REL.*|master)$
 
-  # TODO make this voting once fundraising is on mw 1.27 and remove 1.25 test
-  - name: mwext-donationinterfacecore-REL1_27-testextension-zend55
-voting: false
-
   # Job to ease reviews of MW-CS changes
   - name: mw-tools-codesniffer-mwcore-testrun
 voting: false
@@ -2955,9 +2951,9 @@
   - jshint
 test:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
+  - mwext-donationinterfacecore-REL1_27-testextension-zend55
 gate-and-submit:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
-experimental:
   - mwext-donationinterfacecore-REL1_27-testextension-zend55
 
   - name: mediawiki/extensions/DoubleWiki

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

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

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


[MediaWiki-commits] [Gerrit] Replace DonationInterface 1_26 tests with 1_27 tests - change (integration/config)

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

Change subject: Replace DonationInterface 1_26 tests with 1_27 tests
..


Replace DonationInterface 1_26 tests with 1_27 tests

experimentally, anyway

Change-Id: Id8e403a25ef4789483ef2e25cd95d111cb229717
---
M jjb/wm-fundraising.yaml
M zuul/layout.yaml
2 files changed, 30 insertions(+), 5 deletions(-)

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



diff --git a/jjb/wm-fundraising.yaml b/jjb/wm-fundraising.yaml
index 4ed3358..9819a51 100644
--- a/jjb/wm-fundraising.yaml
+++ b/jjb/wm-fundraising.yaml
@@ -64,7 +64,6 @@
 name: donationinterface-fundraising-branches
 branch:
  - REL1_25
- - REL1_26
 jobs:
  - mwext-donationinterfacecore-{branch}-testextension-zend53:
 
@@ -88,6 +87,32 @@
  - mw-teardown-mysql
  - archive-log-dir
 
+- project:
+name: donationinterface-fundraising-branches-php55
+branch:
+ - REL1_27
+jobs:
+ - mwext-donationinterfacecore-{branch}-testextension-zend55:
+
+- job-template:
+name: 'mwext-donationinterfacecore-{branch}-testextension-zend55'
+node: 'contintLabsSlave && phpflavor-php55'
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - assert-phpflavor:
+ phpflavor: 'php55'
+ - prepare-mediawiki-branch:
+ branch: '{branch}'
+ - mw-fetch-composer-dev
+ - mw-run-phpunit-allexts
+publishers:
+ - junit:
+results: 'log/junit*.xml'
+ - mw-teardown-mysql
+ - archive-log-dir
+
 # Parameter:
 # - branch: indicated branch to fall back to / prefer.
 - builder:
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e104479..cfc2927 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -873,8 +873,8 @@
   - name: mediawiki-core-jsduck-publish
 branch: ^(REL.*|master)$
 
-  # TODO make this voting once fundraising is on mw 1.26 and remove 1.25 test
-  - name: mwext-donationinterfacecore-REL1_26-testextension-zend53
+  # TODO make this voting once fundraising is on mw 1.27 and remove 1.25 test
+  - name: mwext-donationinterfacecore-REL1_27-testextension-zend55
 voting: false
 
   # Job to ease reviews of MW-CS changes
@@ -2955,10 +2955,10 @@
   - jshint
 test:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
-  - mwext-donationinterfacecore-REL1_26-testextension-zend53
 gate-and-submit:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
-  - mwext-donationinterfacecore-REL1_26-testextension-zend53
+experimental:
+  - mwext-donationinterfacecore-REL1_27-testextension-zend55
 
   - name: mediawiki/extensions/DoubleWiki
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8e403a25ef4789483ef2e25cd95d111cb229717
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use stylized text wordmark at top of feed. - change (apps...wikipedia)

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

Change subject: Use stylized text wordmark at top of feed.
..


Use stylized text wordmark at top of feed.

Bug: T140375
Change-Id: I4aede416cba4fde9fb2fcc9ddce8155c9ac7a59d
---
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
D app/src/main/res/drawable/feed_header_wordmark.xml
M app/src/main/res/layout/fragment_feed.xml
3 files changed, 28 insertions(+), 238 deletions(-)

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

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



diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index f159dfb..b64b3ae 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -9,12 +9,14 @@
 import android.support.v4.app.Fragment;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.widget.Toolbar;
+import android.text.Html;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.TextView;
 
 import org.wikipedia.BackPressedHandler;
 import org.wikipedia.MainActivityToolbarProvider;
@@ -47,6 +49,7 @@
 @BindView(R.id.feed_swipe_refresh_layout) SwipeRefreshLayout 
swipeRefreshLayout;
 @BindView(R.id.fragment_feed_feed) FeedView feedView;
 @BindView(R.id.feed_toolbar) Toolbar toolbar;
+@BindView(R.id.feed_header_text) TextView headerText;
 private Unbinder unbinder;
 private WikipediaApp app;
 private FeedCoordinator coordinator;
@@ -88,6 +91,7 @@
 View view = inflater.inflate(R.layout.fragment_feed, container, false);
 
 unbinder = ButterKnife.bind(this, view);
+headerText.setText(Html.fromHtml(getString(R.string.wp_stylized)));
 feedView.set(coordinator, feedCallback);
 appBarLayout.addOnOffsetChangedListener(headerOffsetChangedListener);
 searchIconShowThresholdPx = (int) 
getResources().getDimension(R.dimen.view_feed_header_height) - 
DimenUtil.getContentTopOffsetPx(getContext());
diff --git a/app/src/main/res/drawable/feed_header_wordmark.xml 
b/app/src/main/res/drawable/feed_header_wordmark.xml
deleted file mode 100644
index 5bd52a2..000
--- a/app/src/main/res/drawable/feed_header_wordmark.xml
+++ /dev/null
@@ -1,232 +0,0 @@
-
-http://schemas.android.com/apk/res/android;
-android:width="200dp"
-android:height="48dp"
-android:viewportWidth="200"
-android:viewportHeight="48">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_feed.xml 
b/app/src/main/res/layout/fragment_feed.xml
index 8464586..5823dba 100644
--- a/app/src/main/res/layout/fragment_feed.xml
+++ b/app/src/main/res/layout/fragment_feed.xml
@@ -2,6 +2,7 @@
 http://schemas.android.com/apk/res/android;
 xmlns:app="http://schemas.android.com/apk/res-auto;
+xmlns:tools="http://schemas.android.com/tools;
 android:id="@+id/feed_swipe_refresh_layout"
 android:layout_width="match_parent"
 android:layout_height="match_parent">
@@ -29,16 +30,33 @@
 app:statusBarScrim="@color/status_bar_background"
 app:titleEnabled="false">
 
-
+android:gravity="center"
+app:layout_collapseMode="parallax">
+
+
+
+
+
+
 
 https://gerrit.wikimedia.org/r/299188
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4aede416cba4fde9fb2fcc9ddce8155c9ac7a59d
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] nagios_common: add Madhu to sms (ops paging) group - change (operations/puppet)

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

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

Change subject: nagios_common: add Madhu to sms (ops paging) group
..

nagios_common: add Madhu to sms (ops paging) group

This adds Madhu to the Icinga group "sms", which means being paged.
Got to double check the contact name and only makes
sense after adding a phone number to it in the private repo.

Bug:T140422
Change-Id: Ic16d872e33958b2d947eae2e322428a191516ff9
---
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/98/299198/1

diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 09f1052..fdad12e 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -41,7 +41,7 @@
 
 define contactgroup {
 contactgroup_name   sms
-members 
akosiaris,andrew,ariel,bblack,cmjohnson,dzahn,ema,faidon,fgiunchedi,jgreen,mark,otto,volans,robh,springle,tstarling,rush,glavagetto,yuvipanda,jmm,jcrespo,team-operations,gehel
+members 
akosiaris,andrew,ariel,bblack,cmjohnson,dzahn,ema,faidon,fgiunchedi,jgreen,mark,otto,volans,robh,springle,tstarling,rush,glavagetto,yuvipanda,jmm,jcrespo,team-operations,gehel,madhuvishy
 }
 
 define contactgroup {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic16d872e33958b2d947eae2e322428a191516ff9
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] Fix the link to the file page - change (mediawiki...FileAnnotations)

2016-07-15 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Fix the link to the file page
..

Fix the link to the file page

A little hacky, maybe, but this seems like the "best" option.

Bug: T140500
Change-Id: I878b0fd691670da7a96b6a8e8bd02f1659eb4d1e
---
M i18n/en.json
M i18n/qqq.json
M includes/FileAnnotationsContent.php
3 files changed, 15 insertions(+), 6 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 13a0153..65e07e0 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,5 +8,6 @@
"save-fileannotation": "Save",
"cancel-fileannotation": "Cancel",
"edit-fileannotation": "Edit",
-   "delete-fileannotation": "Delete"
+   "delete-fileannotation": "Delete",
+   "fileannotations-go-to-filepage": "It is recommended that you view and 
edit file annotations on [[:$1|the file page]], where they are available in a 
visual format."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c8cfe97..14670e4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,5 +8,6 @@
"save-fileannotation": "Text of a button to save a new or edited 
annotation.",
"cancel-fileannotation": "Text of a button that cancels creating or 
editing an annotation.",
"edit-fileannotation": "Text of a button to begin editing an 
annotation.",
-   "delete-fileannotation": "Text of a button to delete an annotation."
+   "delete-fileannotation": "Text of a button to delete an annotation.",
+   "fileannotations-go-to-filepage": "Appears on the file annotations page 
to encourage users to go to the file page to interact with the content. $1 is 
the file page title, including namespace, suitable for inclusion in a wikilink. 
The message will be parsed. Remember to put a colon (:) in front of the file 
page title, or the message will put the whole image into the page."
 }
diff --git a/includes/FileAnnotationsContent.php 
b/includes/FileAnnotationsContent.php
index 76b3994..be8a52f 100644
--- a/includes/FileAnnotationsContent.php
+++ b/includes/FileAnnotationsContent.php
@@ -61,12 +61,19 @@
parent::fillParserOutput( $title, $revId, $options, 
$generateHtml, $output );
 
if ( $generateHtml && $this->isValid() ) {
+   $fileTitle = Title::makeTitle(
+   NS_FILE,
+   $title->getDBkey()
+   );
+
+   $fileMsg = new Message(
+   'fileannotations-go-to-filepage',
+   [ $fileTitle->getPrefixedDBkey() ]
+   );
+
$output->setText(
-   // TODO message-ify
'' .
-   'It is recommended that you view and 
edit these annotations on ' .
-   'the file page' .
-   ', where they are available in a visual 
format.' .
+   $fileMsg->parse() .
'' .
$output->getText()
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I878b0fd691670da7a96b6a8e8bd02f1659eb4d1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileAnnotations
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur 

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


[MediaWiki-commits] [Gerrit] icinga: let Madhu run commands from webui - change (operations/puppet)

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

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

Change subject: icinga: let Madhu run commands from webui
..

icinga: let Madhu run commands from webui

Icinga cgi.cfg permissions to run commands like ACK, schedule
downtime, comments, custom notifications etc via the web ui,
for Madhu.

I created the icinga contact in private repo too.
Need to double check to format though against LDAP user, always
get it wrong at first attempt. The right LDAP field must match
the Icinga contact.

Bug:T140422
Change-Id: Ie5b8f4c997702e0219cf246545620f8ed5ae7459
---
M modules/icinga/files/cgi.cfg
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/299196/1

diff --git a/modules/icinga/files/cgi.cfg b/modules/icinga/files/cgi.cfg
index 82c958d..a46ca73 100644
--- a/modules/icinga/files/cgi.cfg
+++ b/modules/icinga/files/cgi.cfg
@@ -131,7 +131,7 @@
 # not use authorization.  You may use an asterisk (*) to
 # authorize any user who has authenticated to the web server.
 
-authorized_for_system_information=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel
+authorized_for_system_information=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel,Madhuvishy
 
 
 # CONFIGURATION INFORMATION ACCESS
@@ -142,7 +142,7 @@
 # an asterisk (*) to authorize any user who has authenticated
 # to the web server.
 
-authorized_for_configuration_information=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel
+authorized_for_configuration_information=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel,Madhuvishy
 
 
 
@@ -155,7 +155,7 @@
 # You may use an asterisk (*) to authorize any user who has
 # authenticated to the web server.
 
-authorized_for_system_commands=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel
+authorized_for_system_commands=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel,Madhuvishy
 
 
 # GLOBAL HOST/SERVICE VIEW ACCESS
@@ -181,8 +181,8 @@
 # authorization).  You may use an asterisk (*) to authorize any
 # user who has authenticated to the web server.
 
-authorized_for_all_service_commands=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel
-authorized_for_all_host_commands=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel
+authorized_for_all_service_commands=tim starling,robh,mark 
bergsma,domas,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,catrope,alexandros kosiaris,springle,ori.livneh,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda,Muehlenhoff,Jcrespo,20after4,eevans,mobrovac,gwicke,ppchelko,Ema,Elukey,Volans,Gehel,Madhuvishy

[MediaWiki-commits] [Gerrit] Put News card at the top. - change (apps...wikipedia)

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

Change subject: Put News card at the top.
..


Put News card at the top.

It looks like explicitly setting setNestedScrollingEnabled to false seems to 
solve
the weird scrolling issue I mentioned earlier.

Change-Id: Ibfd2c383af44311e5a318bd2bde140a5b98fbd26
---
M 
app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
M app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
2 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
 
b/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
index f80d1ab..e2ac3cd 100644
--- 
a/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
+++ 
b/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
@@ -86,13 +86,13 @@
 UtcDate date = DateUtil.getUtcRequestDateFor(age);
 List cards = new ArrayList<>();
 AggregatedFeedContent content = response.body();
-if (content.tfa() != null) {
-cards.add(new FeaturedArticleCard(content.tfa(), date, 
site));
-}
 // todo: remove age check when news endpoint provides dated 
content, T139481.
 if (age == 0 && content.news() != null) {
 cards.add(new NewsListCard(content.news(), date, site));
 }
+if (content.tfa() != null) {
+cards.add(new FeaturedArticleCard(content.tfa(), date, 
site));
+}
 if (content.mostRead() != null) {
 cards.add(new MostReadListCard(content.mostRead(), site));
 }
diff --git 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
 
b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
index 65b14cc..965d23a 100644
--- 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
+++ 
b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
@@ -80,6 +80,7 @@
 
R.dimen.view_horizontal_scrolling_list_card_item_margin_horizontal,
 
R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical));
 recyclerView.addOnItemTouchListener(new DontInterceptTouchListener());
+recyclerView.setNestedScrollingEnabled(false);
 }
 
 protected abstract static class RecyclerAdapter

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfd2c383af44311e5a318bd2bde140a5b98fbd26
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add link to information page to 'cross-wiki-upload' tag - change (mediawiki...WikimediaEvents)

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

Change subject: Add link to information page to 'cross-wiki-upload' tag
..


Add link to information page to 'cross-wiki-upload' tag

This change has already been made on Commons [1]. This is to allow
translators to add it to translations too, and to include the link for
languages without translation.

[1] https://commons.wikimedia.org/wiki/MediaWiki:Tag-cross-wiki-upload

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 04504c5..7087ff1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,7 +5,7 @@
]
},
"wikimediaevents-desc": "Logs Wikimedia-specific events using 
EventLogging",
-   "tag-cross-wiki-upload": "Cross-wiki upload",
+   "tag-cross-wiki-upload": "[[Special:MyLanguage/Commons:Cross-wiki media 
upload tool|Cross-wiki upload]]",
"tag-cross-wiki-upload-description": "Files uploaded from inside the 
wikitext and visual editors on other wikis",
"tag-cross-wiki-upload-1": "-",
"tag-cross-wiki-upload-2": "-",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id086f8c57452719571461ae58a88877df7fd65a5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Steinsplitter 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow searching subset of category parents - change (mediawiki...CirrusSearch)

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

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

Change subject: Allow searching subset of category parents
..

Allow searching subset of category parents

The existing incategory feature can be useful for editors, but as a
reader it is often not obvious that a page might be in the
"American comedy musicians" category rather than the "American comedians"
category. This allows wiki administrators to curate a list of categories
that will be considered top level and adds a search keyword

The method of allowing a wiki's administrators to build up a list of
acceptable top level categories is probably not sustainable, but we also
can't possibly list the full tree of categories each page belongs to. An
alternate solution might be to have the message identify a meta-category
("Top level search categories"?) and all categories in that category
would be considered top level.

Another downside is that changes to the definition of a top level
category are not immediately reflected in search. Rather we have to wait
for the page to be reindexed to pick up the new top level category
definition. It's plausible though we could create a job that sees the
change in definition and descends through the category subpages
reindexing everything necessary.

Change-Id: I0ae9863bad985a1413451d8925e558d535225bfb
---
M i18n/en.json
M i18n/qqq.json
M includes/BuildDocument/PageDataBuilder.php
M includes/Maintenance/MappingConfigBuilder.php
M includes/Searcher.php
M includes/Util.php
6 files changed, 88 insertions(+), 6 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 327b96f..cfafe07 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -34,5 +34,6 @@
"cirrussearch-completion-profile-fuzzy": "Similar to normal with typo 
correction (two typos supported).",
"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-empty": "Ranking based solely on query 
dependent features (for debug only)."
+   "cirrussearch-qi-profile-empty": "Ranking based solely on query 
dependent features (for debug only).",
+   "cirrussearch-top-level-categories": "# This message lets you configure 
the categories considered 'top level' for use in the intopcategory: search 
keyword.\n# Each line prefixed with a # will be removed\n# All other lines will 
be treated as a category name. Names must use\n# spaces between words and be 
capitalized the same as the category itself."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a3bd485..a8b124e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -42,5 +42,6 @@
"cirrussearch-completion-profile-fuzzy": "Fuzzy profile for completion 
(search as you type).",
"cirrussearch-qi-profile-classic": "Classic query independent search 
profile (affects fulltext search ranking algorithm).",
"cirrussearch-qi-profile-classic-noboostlinks": "Classic query 
independent search profile without boost links (affects fulltext search ranking 
algorithm).",
-   "cirrussearch-qi-profile-empty": "Empty query independent search 
profile (affects fulltext search ranking algorithm)."
+   "cirrussearch-qi-profile-empty": "Empty query independent search 
profile (affects fulltext search ranking algorithm).",
+   'cirrussearch-top-level-categories": "Settings for the top level 
categories feature.\n This feature is a search keyword that allows filtering to 
a subset of parent categories.""
 }
diff --git a/includes/BuildDocument/PageDataBuilder.php 
b/includes/BuildDocument/PageDataBuilder.php
index 04a1e3d..24fd17c 100644
--- a/includes/BuildDocument/PageDataBuilder.php
+++ b/includes/BuildDocument/PageDataBuilder.php
@@ -60,10 +60,41 @@
 
private function categories() {
$categories = array();
+   $topLevel = array();
+   $endPoints = array_flip( Util::getTopLevelCategories() );
foreach ( array_keys( $this->parserOutput->getCategories() ) as 
$key ) {
-   $categories[] = Category::newFromName( $key 
)->getTitle()->getText();
+   $category = Category::newFromName( $key );
+   $categories[] = $category->getTitle()->getText();
+   $topLevel = array_merge( $topLevel, 
$this->findTopLevelCategory( $category, $endPoints ) );
}
$this->doc->set( 'category', $categories );
+   $this->doc->set( 'top_category', $topLevel );
+   }
+
+   private function 

[MediaWiki-commits] [Gerrit] Dim the title of current wiki if it has 0 notifications - change (mediawiki...Echo)

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

Change subject: Dim the title of current wiki if it has 0 notifications
..


Dim the title of current wiki if it has 0 notifications

Bug: T139646
Change-Id: I827cb43d5badd0a13666226691450a73ddcc85ea
---
M modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
M modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
2 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less 
b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
index 1966d9d..b07752b 100644
--- a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
+++ b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
@@ -12,6 +12,13 @@
}
}
 
+   &-empty {
+   .mw-echo-ui-pageNotificationsOptionWidget-count,
+   .mw-echo-ui-pageNotificationsOptionWidget-title-label {
+   color: @grey-light;
+   }
+   }
+
&-title {
padding: 0.2em 0;
}
diff --git a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js 
b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
index e3283f4..4cc8b41 100644
--- a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
+++ b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
@@ -31,6 +31,7 @@
// Initialization
this.$element
.addClass( 'mw-echo-ui-pageNotificationsOptionWidget' )
+   .toggleClass( 
'mw-echo-ui-pageNotificationsOptionWidget-empty', !this.count )
.append(
$( '' )
.addClass( 
'mw-echo-ui-pageNotificationsOptionWidget-count' )

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

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

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


[MediaWiki-commits] [Gerrit] Always capture cURL verbose output - change (mediawiki...DonationInterface)

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

Change subject: Always capture cURL verbose output
..


Always capture cURL verbose output

Add to log on failure. Also, log verbose output for each attempt
separately for clarity. Use a local variable for the buffer instead
of creating it as a side effect of getting the base options.

Bug: T139698
Change-Id: Ica10820bb55435d5ed7f932618e41a9ae4ad6463
---
M gateway_common/gateway.adapter.php
1 file changed, 21 insertions(+), 21 deletions(-)

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



diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 1fd54b9..044f530 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -164,12 +164,6 @@
public $debugarray;
 
/**
-* @var resource When CurlVerboseLog is set, we write debugging info to
-* this file.
-*/
-   protected $curl_debug_log;
-
-   /**
 * A boolean that will tell us if we've posted to ourselves. A little 
more telling than
 * WebRequest->wasPosted(), as something else could have posted to us.
 * @var boolean
@@ -1179,6 +1173,7 @@
//I chose to return this as a function so it's easy to override.
//TODO: probably this for all the junk I currently have stashed 
in the constructor.
//...maybe.
+
$path = $this->transaction_option( 'path' );
if ( !$path ) {
$path = '';
@@ -1194,13 +1189,8 @@
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_FORBID_REUSE => true,
CURLOPT_POST => 1,
+   CURLOPT_VERBOSE => true
);
-
-   if ( $this->getGlobal( 'CurlVerboseLog' ) ) {
-   $this->curl_debug_log = fopen('php://temp', 'r+');
-   $opts[CURLOPT_VERBOSE] = true;
-   $opts[CURLOPT_STDERR] = $this->curl_debug_log;
-   }
 
return $opts;
}
@@ -1325,6 +1315,11 @@
$curl_opts[CURLOPT_HTTPHEADER] = $headers;
$curl_opts[CURLOPT_POSTFIELDS] = $data;
 
+   // Always capture the cURL output
+   $curlDebugLog = fopen( 'php://temp', 'r+' );
+   $curl_opts[CURLOPT_STDERR] = $curlDebugLog;
+   $enableCurlVerboseLogging = $this->getGlobal( 'CurlVerboseLog' 
);
+
curl_setopt_array( $ch, $curl_opts );
 
// As suggested in the PayPal developer forum sample code, try 
more than once to get a
@@ -1340,8 +1335,16 @@
// Execute the cURL operation
$curl_response = $this->curl_exec( $ch );
 
+   // Always read the verbose output
+   rewind( $curlDebugLog );
+   $logged = fread( $curlDebugLog, 4096 );
+
if ( $curl_response !== false ) {
// The cURL operation was at least successful, 
what happened in it?
+   // Only log verbose output on success if 
configured to do so
+   if ( $enableCurlVerboseLogging ) {
+   $this->logger->info( "cURL verbose 
logging: $logged" );
+   }
 
$headers = $this->curl_getinfo( $ch );
$httpCode = $headers['http_code'];
@@ -1385,7 +1388,10 @@
$errno = $this->curl_errno( $ch );
$err = curl_error( $ch );
 
-   $this->logger->alert( "cURL transaction to 
$gatewayName failed: ($errno) $err" );
+   $this->logger->alert(
+   "cURL transaction to $gatewayName 
failed: ($errno) $err.  " .
+   "cURL verbose logging: $logged"
+   );
}
$tries++;
if ( $tries >= $loopCount ) {
@@ -1395,24 +1401,18 @@
// If we're going to try again, log timing for 
this particular curl attempt and reset
$this->profiler->saveCommunicationStats( 
__FUNCTION__, $this->getCurrentTransaction(), "cURL problems" );
$this->profiler->getStopwatch( __FUNCTION__, 
true );
+   rewind( $curlDebugLog );
}
} while ( $continue ); // End while cURL transaction hasn't 
returned something useful
 
// Clean up and return
curl_close( $ch );
+   fclose( $curlDebugLog );

[MediaWiki-commits] [Gerrit] Fade in/out elements that are moved in the notifications list - change (mediawiki...Echo)

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

Change subject: Fade in/out elements that are moved in the notifications list
..


Fade in/out elements that are moved in the notifications list

Bug: T126214
Change-Id: Iad5df1f56bfbd12cb6f42dd6e73860bdcc27cd68
---
M modules/ui/mw.echo.ui.SortedListWidget.js
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/modules/ui/mw.echo.ui.SortedListWidget.js 
b/modules/ui/mw.echo.ui.SortedListWidget.js
index 9316d78..26841e7 100644
--- a/modules/ui/mw.echo.ui.SortedListWidget.js
+++ b/modules/ui/mw.echo.ui.SortedListWidget.js
@@ -45,6 +45,20 @@
/* Methods */
 
/**
+* @inheritdoc
+*/
+   mw.echo.ui.SortedListWidget.prototype.onItemSortChange = function ( 
item ) {
+   var widget = this;
+
+   item.$element.fadeOut( 400, function () {
+   widget.removeItems( item );
+
+   item.$element.hide();
+   widget.addItems( item );
+   item.$element.fadeIn( 400 );
+   } );
+   };
+   /**
 * Set the group element.
 *
 * If an element is already set, items will be moved to the new element.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad5df1f56bfbd12cb6f42dd6e73860bdcc27cd68
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix zuul being pinned to a specific commit - change (integration/config)

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

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

Change subject: Fix zuul being pinned to a specific commit
..

Fix zuul being pinned to a specific commit

Change-Id: I5f51e6026cfa08566c023b3fdcfbdfe3965f4a91
---
M test-requirements.txt
M tests/test_zuul_scheduler.py
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/94/299194/1

diff --git a/test-requirements.txt b/test-requirements.txt
index 87f87be..746aeda 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,3 +1,3 @@
 nose
 PyYAML
-git+https://gerrit.wikimedia.org/r/p/integration/zuul.git@8c250cfd5585e9e3a6ccbd14d9b77c9afe902036#egg=zuul
+git+https://gerrit.wikimedia.org/r/p/integration/zuul.git@debian/precise-wikimedia#egg=zuul
diff --git a/tests/test_zuul_scheduler.py b/tests/test_zuul_scheduler.py
index 67033f7..18b6161 100644
--- a/tests/test_zuul_scheduler.py
+++ b/tests/test_zuul_scheduler.py
@@ -45,7 +45,7 @@
 cfg.add_section('zuul')
 cfg.set('zuul', 'layout_config', wmf_zuul_layout)
 
-cls.sched = zuul.scheduler.Scheduler()
+cls.sched = zuul.scheduler.Scheduler({})
 # Reporters and Triggers are registered by zuul-server, not the
 # Scheduler class:
 cls.sched.registerTrigger(FakeTrigger(), 'gerrit')

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

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

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


[MediaWiki-commits] [Gerrit] Add diamond collector for rabbitmq stats - change (operations/puppet)

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

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

Change subject: Add diamond collector for rabbitmq stats
..

Add diamond collector for rabbitmq stats

Change-Id: I450c088980804ff5ef58e71f204a08b52abb1fd6
---
A modules/openstack/files/rabbitmq/rabbitmq.py
M modules/openstack/manifests/queue_server.pp
M modules/role/manifests/labs/openstack/nova.pp
3 files changed, 282 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/299193/1

diff --git a/modules/openstack/files/rabbitmq/rabbitmq.py 
b/modules/openstack/files/rabbitmq/rabbitmq.py
new file mode 100644
index 000..76c6aa0
--- /dev/null
+++ b/modules/openstack/files/rabbitmq/rabbitmq.py
@@ -0,0 +1,264 @@
+# coding=utf-8
+
+"""
+Collects data from RabbitMQ through the admin interface
+
+ Notes
+  ** With added support for breaking down queue metrics by vhost, we have
+ attempted to keep results generated by existing configurations from
+ changing. This means that the old behaviour of clobbering queue metrics
+ when a single queue name exists in multiple vhosts still exists if the
+ configuration is not updated. If no vhosts block is defined it will also
+ keep the metric path as it was historically with no vhost name in it.
+
+old path => systems.myServer.rabbitmq.queues.myQueue.*
+new path => systems.myServer.rabbitmq.myVhost.queues.myQueue.*
+
+  ** If a [vhosts] section exists but is empty, then no queues will be polled.
+  ** To poll all vhosts and all queues, add the following.
+  **   [vhosts]
+  **   * = *
+  **
+"""
+
+import diamond.collector
+import re
+from urlparse import urljoin
+from urllib import quote
+import urllib2
+from base64 import b64encode
+
+try:
+import json
+except ImportError:
+import simplejson as json
+
+
+class RabbitMQClient(object):
+"""
+Tiny interface into the rabbit http api
+"""
+
+def __init__(self, host, user, password, timeout=5, scheme="http"):
+self.base_url = '%s://%s/api/' % (scheme, host)
+self.timeout = timeout
+self._authorization = 'Basic ' + b64encode('%s:%s' % (user, password))
+
+def do_call(self, path):
+url = urljoin(self.base_url, path)
+req = urllib2.Request(url)
+req.add_header('Authorization', self._authorization)
+return json.load(urllib2.urlopen(req, timeout=self.timeout))
+
+def get_all_vhosts(self):
+return self.do_call('vhosts')
+
+def get_vhost_names(self):
+return [i['name'] for i in self.get_all_vhosts()]
+
+def get_queues(self, vhost=None):
+path = 'queues'
+if vhost:
+vhost = quote(vhost, '')
+path += '/%s' % vhost
+
+queues = self.do_call(path)
+return queues or []
+
+def get_overview(self):
+return self.do_call('overview')
+
+def get_nodes(self):
+return self.do_call('nodes')
+
+def get_node(self, node):
+return self.do_call('nodes/%s' % node)
+
+
+class RabbitMQCollector(diamond.collector.Collector):
+
+def get_default_config_help(self):
+config_help = super(RabbitMQCollector, self).get_default_config_help()
+config_help.update({
+'host': 'Hostname and port to collect from',
+'user': 'Username',
+'password': 'Password',
+'replace_dot':
+'A value to replace dot in queue names and vhosts names by',
+'replace_slash':
+'A value to replace a slash in queue names and vhosts names by',
+'queues': 'Queues to publish. Leave empty to publish all.',
+'vhosts':
+'A list of vhosts and queues for which we want to collect',
+'queues_ignored':
+'A list of queues or regexes for queue names not to report on.',
+'cluster':
+'If this node is part of a cluster, will collect metrics on the'
+' cluster health'
+})
+return config_help
+
+def get_default_config(self):
+"""
+Returns the default collector settings
+"""
+config = super(RabbitMQCollector, self).get_default_config()
+config.update({
+'path': 'rabbitmq',
+'host': 'localhost:55672',
+'user': 'guest',
+'password': 'guest',
+'replace_dot': False,
+'replace_slash': False,
+'queues_ignored': '',
+'cluster': False,
+'scheme': 'http',
+})
+return config
+
+def collect_health(self):
+health_metrics = [
+'fd_used',
+'fd_total',
+'mem_used',
+'mem_limit',
+'sockets_used',
+'sockets_total',
+'disk_free_limit',
+'disk_free',
+'proc_used',
+

[MediaWiki-commits] [Gerrit] [WIP] Put News card at the top. - change (apps...wikipedia)

2016-07-15 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: [WIP] Put News card at the top.
..

[WIP] Put News card at the top.

working out some kinks...

Change-Id: Ibfd2c383af44311e5a318bd2bde140a5b98fbd26
---
M 
app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
M app/src/main/java/org/wikipedia/feed/news/NewsListCardView.java
M app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
3 files changed, 5 insertions(+), 6 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
 
b/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
index f80d1ab..e2ac3cd 100644
--- 
a/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
+++ 
b/app/src/main/java/org/wikipedia/feed/aggregated/AggregatedFeedContentClient.java
@@ -86,13 +86,13 @@
 UtcDate date = DateUtil.getUtcRequestDateFor(age);
 List cards = new ArrayList<>();
 AggregatedFeedContent content = response.body();
-if (content.tfa() != null) {
-cards.add(new FeaturedArticleCard(content.tfa(), date, 
site));
-}
 // todo: remove age check when news endpoint provides dated 
content, T139481.
 if (age == 0 && content.news() != null) {
 cards.add(new NewsListCard(content.news(), date, site));
 }
+if (content.tfa() != null) {
+cards.add(new FeaturedArticleCard(content.tfa(), date, 
site));
+}
 if (content.mostRead() != null) {
 cards.add(new MostReadListCard(content.mostRead(), site));
 }
diff --git a/app/src/main/java/org/wikipedia/feed/news/NewsListCardView.java 
b/app/src/main/java/org/wikipedia/feed/news/NewsListCardView.java
index d3e82e1..979cc6b 100644
--- a/app/src/main/java/org/wikipedia/feed/news/NewsListCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/news/NewsListCardView.java
@@ -16,8 +16,7 @@
 
 import java.util.List;
 
-public class NewsListCardView extends HorizontalScrollingListCardView
-implements ItemTouchHelperSwipeAdapter.SwipeableView {
+public class NewsListCardView extends HorizontalScrollingListCardView {
 
 public NewsListCardView(@NonNull Context context) {
 super(context);
diff --git 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
 
b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
index 65b14cc..fde47cb 100644
--- 
a/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
+++ 
b/app/src/main/java/org/wikipedia/feed/view/HorizontalScrollingListCardView.java
@@ -79,7 +79,7 @@
 
R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical,
 
R.dimen.view_horizontal_scrolling_list_card_item_margin_horizontal,
 
R.dimen.view_horizontal_scrolling_list_card_item_margin_vertical));
-recyclerView.addOnItemTouchListener(new DontInterceptTouchListener());
+recyclerView.setNestedScrollingEnabled(false);
 }
 
 protected abstract static class RecyclerAdapter

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

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

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


[MediaWiki-commits] [Gerrit] AstroPay signature as staging helper - change (mediawiki...DonationInterface)

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

Change subject: AstroPay signature as staging helper
..


AstroPay signature as staging helper

Start getting rid of some abuses of getTransactionSpecificValue

Bug: T137164
Change-Id: Ic64242201c4dc2250ba5b38f0ab97dbcdddedb8d
---
A astropay_gateway/AstroPaySignature.php
M astropay_gateway/astropay.adapter.php
M astropay_gateway/config/transformers.yaml
M astropay_gateway/config/var_map.yaml
M extension.json
M tests/Adapter/AstroPay/AstroPayTest.php
6 files changed, 53 insertions(+), 39 deletions(-)

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



diff --git a/astropay_gateway/AstroPaySignature.php 
b/astropay_gateway/AstroPaySignature.php
new file mode 100644
index 000..ec97d7c
--- /dev/null
+++ b/astropay_gateway/AstroPaySignature.php
@@ -0,0 +1,43 @@
+getAccountConfig( 'SecretKey' );
+   return strtoupper(
+   hash_hmac( 'sha256', pack( 'A*', $message ), pack( 
'A*', $key ) )
+   );
+   }
+}
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index e79b88f..311b4fd 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -239,35 +239,6 @@
$fields[] = 'payment_submethod';
return $fields;
}
-   /**
-* Overriding @see GatewayAdapter::getTransactionSpecificValue to add a
-* calculated signature.
-* @param string $gateway_field_name
-* @param boolean $token
-* @return mixed
-*/
-   protected function getTransactionSpecificValue( $gateway_field_name, 
$token = false ) {
-   if ( $gateway_field_name === 'control' ) {
-   $message = $this->getMessageToSign();
-   return $this->calculateSignature( $message );
-   }
-   return parent::getTransactionSpecificValue( 
$gateway_field_name, $token );
-   }
-
-   protected function getMessageToSign() {
-   return str_replace( '+', ' ',
-   $this->getData_Staged( 'order_id' ) . 'V'
-   . $this->getData_Staged( 'amount' ) . 'I'
-   . $this->getData_Staged( 'donor_id' ) . '2'
-   . $this->getData_Staged( 'bank_code' ) . '1'
-   . $this->getData_Staged( 'fiscal_number' ) . 'H'
-   . /* bdate omitted */ 'G'
-   . $this->getData_Staged( 'email' ) .'Y'
-   . /* zip omitted */ 'A'
-   . /* street omitted */ 'P'
-   . /* city omitted */ 'S'
-   . /* state omitted */ 'P' );
-   }
 
public function getCurrencies( $options = array() ) {
$country = isset( $options['country'] ) ?
@@ -402,8 +373,10 @@
$message = 
DataValidator::getErrorMessage( 'fiscal_number', 'calculated', $language, 
$country );
} else if ( preg_match( '/invalid control/i', 
$response['desc'] ) ) {
// They think we screwed up the 
signature.  Log what we signed.
-   $signed = $this->getMessageToSign();
-   $signature = 
$this->getTransactionSpecificValue( 'control' );
+   $signed = 
AstroPaySignature::getNewInvoiceMessage(
+   $this->getData_Staged()
+   );
+   $signature = $this->getData_Staged( 
'control' );
$this->logger->error( "$logme Signed 
message: '$signed' Signature: '$signature'" );
} else {
// Some less common error.  Also log 
message at 'error' level
@@ -469,19 +442,12 @@
$data['result'] .
$data['x_amount'] .
$data['x_invoice'];
-   $signature = $this->calculateSignature( $message );
+   $signature = AstroPaySignature::calculateSignature( $this, 
$message );
 
if ( $signature !== $data['x_control'] ) {
$message = 'Bad signature in transaction ' . 
$this->getCurrentTransaction();
$this->logger->error( $message );
throw new ResponseProcessingException( $message, 
ResponseCodes::BAD_SIGNATURE );
}
-   }
-
-   protected function calculateSignature( $message ) {
-   $key = $this->accountInfo['SecretKey'];
-   return strtoupper(
-   hash_hmac( 'sha256', pack( 'A*', $message ), pack( 
'A*', $key ) )
- 

[MediaWiki-commits] [Gerrit] Trim fields before sending to server - change (mediawiki...DonationInterface)

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

Change subject: Trim fields before sending to server
..


Trim fields before sending to server

Makes the logs look nicer

Change-Id: Ie441283b6d05c840dd1bf6c6c08a5fc6df88877c
---
M modules/js/ext.donationInterface.forms.js
M worldpay_gateway/forms/js/esop.js
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/modules/js/ext.donationInterface.forms.js 
b/modules/js/ext.donationInterface.forms.js
index 9ca5fee..5ca9f1b 100644
--- a/modules/js/ext.donationInterface.forms.js
+++ b/modules/js/ext.donationInterface.forms.js
@@ -17,7 +17,15 @@
 */
function submitForm() {
di.forms.disable();
+   di.forms.clean();
$( '#payment-form' )[ 0 ].submit();
+   }
+
+   function cleanInput() {
+   // Trim all the trimmable inputs
+   $( '[type=text], [type=number], [type=email]' ).each( function 
() {
+   $( this ).val( $.trim( this.value ) );
+   } );
}
 
/**
@@ -27,6 +35,7 @@
 */
function callDonateApi( successCallback ) {
di.forms.disable();
+   di.forms.clean();
$( '#paymentContinueBtn' ).removeClass( 'enabled' );
 
var sendData = {
@@ -86,6 +95,7 @@
di.forms = {
disable: disableForm,
enable: enableForm,
+   clean: cleanInput,
// Gateways with more complex form submission can overwrite this
// property with their own submission function.
submit: submitForm,
diff --git a/worldpay_gateway/forms/js/esop.js 
b/worldpay_gateway/forms/js/esop.js
index b96d0e2..131b384 100644
--- a/worldpay_gateway/forms/js/esop.js
+++ b/worldpay_gateway/forms/js/esop.js
@@ -6,6 +6,7 @@
return;
}
di.forms.disable();
+   di.forms.clean();
$( '#paymentContinueBtn' ).removeClass( 'enabled' );
 
var postdata = {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie441283b6d05c840dd1bf6c6c08a5fc6df88877c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add mediawiki.ui.input for all SpecialModifyEntity pages - change (mediawiki...Wikibase)

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

Change subject: Add mediawiki.ui.input for all SpecialModifyEntity pages
..


Add mediawiki.ui.input for all SpecialModifyEntity pages

This is needed in the parent class, so that other pages
like Special:SetLabelDescriptionAliases also get styled.

Bug: T138413
Change-Id: I914d6722eafe60d3b4717e5a0d179627dfdbeba4
---
M repo/includes/Specials/SpecialModifyEntity.php
M repo/includes/Specials/SpecialSetSiteLink.php
2 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/Specials/SpecialModifyEntity.php 
b/repo/includes/Specials/SpecialModifyEntity.php
index 6330b5b..ee00149 100644
--- a/repo/includes/Specials/SpecialModifyEntity.php
+++ b/repo/includes/Specials/SpecialModifyEntity.php
@@ -278,6 +278,9 @@
)
);
 
+   // Add form input styles
+   $this->getOutput()->addModules( 'mediawiki.ui.input' );
+
// Form elements
$this->getOutput()->addHTML( $this->getFormElements( $entity ) 
);
 
diff --git a/repo/includes/Specials/SpecialSetSiteLink.php 
b/repo/includes/Specials/SpecialSetSiteLink.php
index 0fa8521..82df22d 100644
--- a/repo/includes/Specials/SpecialSetSiteLink.php
+++ b/repo/includes/Specials/SpecialSetSiteLink.php
@@ -211,8 +211,6 @@
 * @return string HTML
 */
protected function getFormElements( EntityDocument $entity = null ) {
-   $this->getOutput()->addModules( 'mediawiki.ui.input' );
-
if ( $this->page === null ) {
$this->page = $this->site === null ? '' : 
$this->getSiteLink( $entity, $this->site );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I914d6722eafe60d3b4717e5a0d179627dfdbeba4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [FileAnnotations] Add jenkins tests - change (integration/config)

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

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

Change subject: [FileAnnotations] Add jenkins tests
..

[FileAnnotations] Add jenkins tests

Adds npm and composer-test tests

Also adds extension-unittests-generic

Also add jsonlint in check for non-whitelisted users will be removed when
we are all at nodepool.

Bug: T140499
Change-Id: Ia82488adb34b50be6a4110779d3e775a81a4789f
---
M zuul/layout.yaml
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/91/299191/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e104479..d406936 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -4595,6 +4595,14 @@
 check:
   - jsonlint
 
+  - name: mediawiki/extensions/FileAnnotations
+template:
+  - name: composer-test
+  - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+
   - name: mediawiki/extensions/FilterListUsers
 template:
   - name: composer-test

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

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

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


[MediaWiki-commits] [Gerrit] Move internal-link detection into the InternalLinkAnnotation... - change (mediawiki...VisualEditor)

2016-07-15 Thread DLynch (Code Review)
DLynch has uploaded a new change for review.

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

Change subject: Move internal-link detection into the 
InternalLinkAnnotationWidget
..

Move internal-link detection into the InternalLinkAnnotationWidget

If internal link detection is in the LinkAnnotationInspector, it falls down 
when a valid URL which isn't also a valid page title (e.g. percent-encoded 
titles) is pasted into the input. This is fixed by moving the detection to the 
input's change handler before any validation can occur.

Bug: T119431
Change-Id: I1eb2040dd918fdcc22c28594b5cbad835cf384a8
---
M modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
M modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js
2 files changed, 24 insertions(+), 18 deletions(-)


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

diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
index 193cb7e..9c6e9d2 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkAnnotationInspector.js
@@ -111,24 +111,7 @@
  * @param {ve.dm.MWInternalLinkAnnotation} annotation Annotation
  */
 ve.ui.MWLinkAnnotationInspector.prototype.onInternalLinkChange = function ( 
annotation ) {
-   var targetData,
-   href = annotation ? annotation.getAttribute( 'title' ) : '',
-   // Have to check that this.getFragment() is defined because 
parent class's teardown
-   // invokes setAnnotation( null ) which calls this code after 
fragment is unset
-   htmlDoc = this.getFragment() && 
this.getFragment().getDocument().getHtmlDocument();
-
-   if ( htmlDoc && 
ve.init.platform.getExternalLinkUrlProtocolsRegExp().test( href ) ) {
-   // Check if the 'external' link is in fact a page on the same 
wiki
-   // e.g. http://en.wikipedia.org/wiki/Target -> Target
-   targetData = 
ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref(
-   href,
-   htmlDoc
-   );
-   if ( targetData.isInternal ) {
-   
this.internalAnnotationInput.getTextInputWidget().setValue( targetData.title );
-   return;
-   }
-   }
+   var href = annotation ? annotation.getAttribute( 'title' ) : '';
 
if (
!this.allowProtocolInInternal &&
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js
index 2c80593..5e50dcb 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWInternalLinkAnnotationWidget.js
@@ -82,3 +82,26 @@
var title = 
ve.ui.MWInternalLinkAnnotationWidget.super.prototype.getHref.call( this );
return mw.util.getUrl( title );
 };
+
+/**
+ * @inheritdoc
+ */
+ve.ui.MWInternalLinkAnnotationWidget.prototype.onTextChange = function ( value 
) {
+   var targetData,
+   htmlDoc = this.getElementDocument();
+   // Specific thing we want to check: has a valid URL for an internal page
+   // been pasted into here, in which case we want to convert it to just 
the
+   // page title. This has to happen /here/ because a URL can reference a
+   // valid page while not being a valid Title (e.g. if it contains a "%").
+   if ( ve.init.platform.getExternalLinkUrlProtocolsRegExp().test( value ) 
) {
+   targetData = 
ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref(
+   value,
+   htmlDoc
+   );
+   if ( targetData.isInternal ) {
+   value = targetData.title;
+   this.input.query.setValue( targetData.title );
+   }
+   }
+   return 
ve.ui.MWInternalLinkAnnotationWidget.super.prototype.onTextChange.call( this, 
value );
+};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eb2040dd918fdcc22c28594b5cbad835cf384a8
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] Dim the title of current wiki if it has 0 notifications - change (mediawiki...Echo)

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

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

Change subject: Dim the title of current wiki if it has 0 notifications
..

Dim the title of current wiki if it has 0 notifications

Bug: T139646
Change-Id: I827cb43d5badd0a13666226691450a73ddcc85ea
---
M modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
M modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
2 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less 
b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
index 1966d9d..b07752b 100644
--- a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
+++ b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
@@ -12,6 +12,13 @@
}
}
 
+   &-empty {
+   .mw-echo-ui-pageNotificationsOptionWidget-count,
+   .mw-echo-ui-pageNotificationsOptionWidget-title-label {
+   color: @grey-light;
+   }
+   }
+
&-title {
padding: 0.2em 0;
}
diff --git a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js 
b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
index e3283f4..4cc8b41 100644
--- a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
+++ b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
@@ -31,6 +31,7 @@
// Initialization
this.$element
.addClass( 'mw-echo-ui-pageNotificationsOptionWidget' )
+   .toggleClass( 
'mw-echo-ui-pageNotificationsOptionWidget-empty', !this.count )
.append(
$( '' )
.addClass( 
'mw-echo-ui-pageNotificationsOptionWidget-count' )

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

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

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


[MediaWiki-commits] [Gerrit] Don't assume configured directories end in a slash - change (wikimedia...crm)

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

Change subject: Don't assume configured directories end in a slash
..


Don't assume configured directories end in a slash

Add the slash regardless.

Change-Id: Ie3fc0f09c227102cc692117f0da23d979f0e1d84
---
M sites/all/modules/wmf_audit/BaseAuditProcessor.php
M sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
M sites/all/modules/wmf_audit/worldpay/worldpay_audit.module
3 files changed, 14 insertions(+), 13 deletions(-)

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



diff --git a/sites/all/modules/wmf_audit/BaseAuditProcessor.php 
b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
index af04821..4079b10 100644
--- a/sites/all/modules/wmf_audit/BaseAuditProcessor.php
+++ b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
@@ -513,7 +513,7 @@
}
if ( $this->get_filetype( $file ) === 'recon' ) 
{
$sort_key = 
$this->get_recon_file_sort_key( $file ); // report date or sequence number or 
something
-   $files_by_sort_key[$sort_key][] = 
$files_directory . $file;
+   $files_by_sort_key[$sort_key][] = 
$files_directory . '/' . $file;
}
}
closedir( $handle );
@@ -791,14 +791,14 @@
//This date is not ready yet. Get the zipped version from the 
archive, unzip
//to the working directory, and distill.
$compressed_filename = $this->get_compressed_log_file_name( 
$date );
-   $full_archive_path = wmf_audit_get_log_archive_dir() . 
$compressed_filename;
+   $full_archive_path = wmf_audit_get_log_archive_dir() . '/' . 
$compressed_filename;
$working_directory = $this->get_working_log_dir();
$cleanup = array(); //add files we want to make sure aren't 
there anymore when we're done here.
if ( file_exists( $full_archive_path ) ) {
wmf_audit_echo( "Retrieving $full_archive_path" );
$cmd = "cp $full_archive_path " . $working_directory;
exec( escapeshellcmd( $cmd ), $ret, $errorlevel );
-   $full_compressed_path = $working_directory . 
$compressed_filename;
+   $full_compressed_path = $working_directory . '/' . 
$compressed_filename;
if ( !file_exists( $full_compressed_path ) ) {
wmf_audit_log_error( "FILE PROBLEM: Trying to 
get log archives, and something went wrong with $cmd", 'FILE_MOVE' );
return false;
@@ -811,7 +811,7 @@
exec( escapeshellcmd( $cmd ), $ret, $errorlevel );
//now check to make sure the file you expect, actually 
exists
$uncompressed_file = 
$this->get_uncompressed_log_file_name( $date );
-   $full_uncompressed_path = $working_directory . 
$uncompressed_file;
+   $full_uncompressed_path = $working_directory . '/' . 
$uncompressed_file;
if ( !file_exists( $full_uncompressed_path ) ) {
wmf_audit_log_error( "FILE PROBLEM: Something 
went wrong with uncompressing logs: $cmd : $full_uncompressed_path doesn't 
exist.", 'FILE_UNCOMPRESS' );
} else {
@@ -864,7 +864,7 @@
while ( ( $file = readdir( $handle ) ) !== false ) {
$temp_date = false;
if ( $this->get_filetype( $file ) === 'working_log' ) {
-   $full_path = $working_dir . $file;
+   $full_path = $working_dir . '/' . $file;
$temp_date = $this->get_working_log_file_date( 
$file );
}
if ( !$temp_date ) {
diff --git a/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php 
b/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
index 38325c1..0caf034 100644
--- a/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
+++ b/sites/all/modules/wmf_audit/tests/WorldpayAuditTest.php
@@ -24,9 +24,9 @@
parent::setUp();
self::$messages = array();
$dirs = array(
-   'wmf_audit_log_archive_dir' => __DIR__ . '/data/logs/',
-   'worldpay_audit_recon_completed_dir' => $this->getTempDir(),
-   'worldpay_audit_working_log_dir' => $this->getTempDir(),
+   'wmf_audit_log_archive_dir' => __DIR__ . '/data/logs',
+   'worldpay_audit_recon_completed_dir' => $this->getTempDir() . 
'/completed',
+   'worldpay_audit_working_log_dir' => $this->getTempDir() . 
'/working',
);
 
foreach ( 

[MediaWiki-commits] [Gerrit] Fix license string - change (wikimedia...SmashPig)

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

Change subject: Fix license string
..


Fix license string

Change-Id: I06979d0d835d216ffc63ddb303e48201dc054ab9
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index c6e4b5c..6d864fa 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
 "description": "The open source PHP flexible payments library and 
frontend/backend mediator.",
 "keywords": ["payments", "donations"],
 "homepage": "http://smashpig.org;,
-"license": "GPLv2",
+"license": "GPL-2.0",
 "authors": [
 {
 "name": "Katie Horn",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I06979d0d835d216ffc63ddb303e48201dc054ab9
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Awight 
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] Use stylized text wordmark at top of feed. - change (apps...wikipedia)

2016-07-15 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Use stylized text wordmark at top of feed.
..

Use stylized text wordmark at top of feed.

Bug: T140375
Change-Id: I4aede416cba4fde9fb2fcc9ddce8155c9ac7a59d
---
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
D app/src/main/res/drawable/feed_header_wordmark.xml
M app/src/main/res/layout/fragment_feed.xml
3 files changed, 28 insertions(+), 238 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index f159dfb..b64b3ae 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -9,12 +9,14 @@
 import android.support.v4.app.Fragment;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v7.widget.Toolbar;
+import android.text.Html;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.TextView;
 
 import org.wikipedia.BackPressedHandler;
 import org.wikipedia.MainActivityToolbarProvider;
@@ -47,6 +49,7 @@
 @BindView(R.id.feed_swipe_refresh_layout) SwipeRefreshLayout 
swipeRefreshLayout;
 @BindView(R.id.fragment_feed_feed) FeedView feedView;
 @BindView(R.id.feed_toolbar) Toolbar toolbar;
+@BindView(R.id.feed_header_text) TextView headerText;
 private Unbinder unbinder;
 private WikipediaApp app;
 private FeedCoordinator coordinator;
@@ -88,6 +91,7 @@
 View view = inflater.inflate(R.layout.fragment_feed, container, false);
 
 unbinder = ButterKnife.bind(this, view);
+headerText.setText(Html.fromHtml(getString(R.string.wp_stylized)));
 feedView.set(coordinator, feedCallback);
 appBarLayout.addOnOffsetChangedListener(headerOffsetChangedListener);
 searchIconShowThresholdPx = (int) 
getResources().getDimension(R.dimen.view_feed_header_height) - 
DimenUtil.getContentTopOffsetPx(getContext());
diff --git a/app/src/main/res/drawable/feed_header_wordmark.xml 
b/app/src/main/res/drawable/feed_header_wordmark.xml
deleted file mode 100644
index 5bd52a2..000
--- a/app/src/main/res/drawable/feed_header_wordmark.xml
+++ /dev/null
@@ -1,232 +0,0 @@
-
-http://schemas.android.com/apk/res/android;
-android:width="200dp"
-android:height="48dp"
-android:viewportWidth="200"
-android:viewportHeight="48">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_feed.xml 
b/app/src/main/res/layout/fragment_feed.xml
index 8464586..5823dba 100644
--- a/app/src/main/res/layout/fragment_feed.xml
+++ b/app/src/main/res/layout/fragment_feed.xml
@@ -2,6 +2,7 @@
 http://schemas.android.com/apk/res/android;
 xmlns:app="http://schemas.android.com/apk/res-auto;
+xmlns:tools="http://schemas.android.com/tools;
 android:id="@+id/feed_swipe_refresh_layout"
 android:layout_width="match_parent"
 android:layout_height="match_parent">
@@ -29,16 +30,33 @@
 app:statusBarScrim="@color/status_bar_background"
 app:titleEnabled="false">
 
-
+android:gravity="center"
+app:layout_collapseMode="parallax">
+
+
+
+
+
+
 
 https://gerrit.wikimedia.org/r/299188
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] Add link to information page to 'cross-wiki-upload' tag - change (mediawiki...WikimediaEvents)

2016-07-15 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Add link to information page to 'cross-wiki-upload' tag
..

Add link to information page to 'cross-wiki-upload' tag

This change has already been made on Commons [1]. This is to allow
translators to add it to translations too, and to include the link for
languages without translation.

[1] https://commons.wikimedia.org/wiki/MediaWiki:Tag-cross-wiki-upload

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


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

diff --git a/i18n/en.json b/i18n/en.json
index 04504c5..529c8af 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,7 +5,8 @@
]
},
"wikimediaevents-desc": "Logs Wikimedia-specific events using 
EventLogging",
-   "tag-cross-wiki-upload": "Cross-wiki upload",
+   "tag-cross-wiki-upload": "[[Special:MyLanguage/Commons:Cross-wiki media 
upload tool|Cross-wiki upload]]
+",
"tag-cross-wiki-upload-description": "Files uploaded from inside the 
wikitext and visual editors on other wikis",
"tag-cross-wiki-upload-1": "-",
"tag-cross-wiki-upload-2": "-",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id086f8c57452719571461ae58a88877df7fd65a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
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] [DO NOT MERGE] Random stab in the dark at helping with T132449 - change (mediawiki/vagrant)

2016-07-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: [DO NOT MERGE] Random stab in the dark at helping with T132449
..

[DO NOT MERGE] Random stab in the dark at helping with T132449

Change-Id: Ic60a184a834c8cd45435a386ac90d6c4f1935bac
---
M Gemfile
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/86/299186/1

diff --git a/Gemfile b/Gemfile
index e08627e..e502c5d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -8,6 +8,8 @@
   gem 'rubocop', '~> 0.35.1', require: false
   gem 'puppet-lint', '1.1.0'
   gem 'rake', '~> 10.4.2'
+
+  gem 'mediawiki-vagrant', path: '.'
 end
 
 group :development, :test do

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

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

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


[MediaWiki-commits] [Gerrit] 2.1.0-151-g30a433b-wmf3precise1 - change (integration/zuul)

2016-07-15 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: 2.1.0-151-g30a433b-wmf3precise1
..


2.1.0-151-g30a433b-wmf3precise1

Fix Zuul stalling due to Paramiko 1.7.1 and random generator.

See debian/changelog

Bug: T137525
Change-Id: Iec39b7cc87892be2aa8d56fc72787825bd52d02c
---
M debian/changelog
M debian/control
A debian/patches/0008-Do-not-import-paramiko-before-daemonization.patch
M debian/patches/series
4 files changed, 80 insertions(+), 11 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Hashar: Verified; Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 6f78e89..cfed39d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,21 @@
+zuul (2.1.0-151-g30a433b-wmf3precise1) precise-wikimedia; urgency=medium
+
+  * Fix upstream refactoring of Gerrit connections which caused Paramiko 1.7.1
+on Precise to not be able to get a random number and thus never establish
+SSH connection to Gerrit. Fix T137525.
+[60a4494] Do not import paramiko before daemonization
+  * debian/control: comment have to start with '# '.
+  * debian/changelog: missing extra space in signature of a previous entry.
+
+ -- Antoine Musso   Fri, 15 Jul 2016 15:04:55 +0200
+
 zuul (2.1.0-151-g30a433b-wmf2precise1) precise-wikimedia; urgency=medium
 
   * Pick some upstream patches:
 [9b41a0b] Properly shutdown apscheduler on reconfigure
 [fc1b58a] GerritWatcher: add poll_timeout
 
- -- Antoine Musso  Thu, 02 Jun 2016 15:42:45 +0200
+ -- Antoine Musso   Thu, 02 Jun 2016 15:42:45 +0200
 
 zuul (2.1.0-151-g30a433b-wmf1precise1) precise-wikimedia; urgency=medium
 
diff --git a/debian/control b/debian/control
index 7ecb5e4..da6bb59 100644
--- a/debian/control
+++ b/debian/control
@@ -8,14 +8,14 @@
  dh-virtualenv (>= 0.9),
  openstack-pkg-tools,
  python2.7,
-## Following was Build-Depends-Indep
+# Following was Build-Depends-Indep
 #
 # Dependencies comes from upstream sources, they are not available under
 # Wikimedia Ubuntu Precise distribution and will be provided via dh-virtualenv.
 #
-###
-# requirements.txt
-###
+# #
+#  requirements.txt
+# #
  python-pbr (>= 0.5.21),
 #Build in python 2.7:
 #python-argparse,
@@ -38,9 +38,9 @@
  python-tz,
 #python-babel (>= 1.0),
  python-six (>= 1.6.0),
-###
-# test-requirements.txt
-###
+# #
+#  test-requirements.txt
+# #
 #python-hacking (>= 0.9.2),
 #python-coverage (>= 3.6),
 #python-sphinx (>= 1.0.7+dfsg),
@@ -53,9 +53,9 @@
 #python-testrepository (>= 0.0.17),
 #python-testtools (>= 0.9.32),
 #python-sphinxcontrib.programoutputadded by dh-virtualenv
-###
-# Debian packaging dependencies
-###
+# #
+#  Debian packaging dependencies
+# #
  python-nose
 Standards-Version: 3.9.6
 X-Python-Version: = 2.7
diff --git 
a/debian/patches/0008-Do-not-import-paramiko-before-daemonization.patch 
b/debian/patches/0008-Do-not-import-paramiko-before-daemonization.patch
new file mode 100644
index 000..ea33e88
--- /dev/null
+++ b/debian/patches/0008-Do-not-import-paramiko-before-daemonization.patch
@@ -0,0 +1,57 @@
+From: Antoine Musso 
+Date: Fri, 15 Jul 2016 14:29:39 +0200
+Subject: Do not import paramiko before daemonization
+
+The zuul-server would hang when establishing a Gerrit ssh connection due
+to Random.Crypto() failling to acquire random number from /dev/urandom.
+It would block on read() and never process.
+
+The root cause is the Zuul refactoring of Gerrit connections. The root
+class of all zuul CLI imports zuul.lib.connections globally which
+imports paramiko / Crypto.Random.
+
+When the Server command line invokes the daemonization, python-daemon
+close all file descriptors. Including /dev/urandom. Then the daemonized
+establish the SSH connection and fail to get random number because
+Random.Crypto() locks on read() on a closed file description.
+
+See upstream issue:
+https://github.com/paramiko/paramiko/issues/59
+
+Stackoverflow answers by EarlCrapstone:
+http://stackoverflow.com/questions/20636678/paramiko-inside-python-daemon-causes-ioerror
+
+The fix is in Paramiko 1.11.6, which make it use os.urandom:
+https://github.com/paramiko/paramiko/commit/6f25f49edcea7d23b764d7cf3a84ff12f5f0
+
+Move the zuul.lib.connections import to the method that relies on it:
+ZuulApp.configure.connections().
+
+Bug: T137525
+Change-Id: Iea3288abfde6ff2b7339fae775ad5561009dc129
+---
+ zuul/cmd/__init__.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git 

[MediaWiki-commits] [Gerrit] Do not import paramiko before daemonization - change (integration/zuul)

2016-07-15 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: Do not import paramiko before daemonization
..


Do not import paramiko before daemonization

The zuul-server would hang when establishing a Gerrit ssh connection due
to Random.Crypto() failling to acquire random number from /dev/urandom.
It would block on read() and never process.

The root cause is the Zuul refactoring of Gerrit connections. The root
class of all zuul CLI imports zuul.lib.connections globally which
imports paramiko / Crypto.Random.

When the Server command line invokes the daemonization, python-daemon
close all file descriptors. Including /dev/urandom. Then the daemonized
establish the SSH connection and fail to get random number because
Random.Crypto() locks on read() on a closed file description.

See upstream issue:
https://github.com/paramiko/paramiko/issues/59

Stackoverflow answers by EarlCrapstone:
http://stackoverflow.com/questions/20636678/paramiko-inside-python-daemon-causes-ioerror

The fix is in Paramiko 1.11.6, which make it use os.urandom:
https://github.com/paramiko/paramiko/commit/6f25f49edcea7d23b764d7cf3a84ff12f5f0

Move the zuul.lib.connections import to the method that relies on it:
ZuulApp.configure.connections().

Bug: T137525
Change-Id: Iea3288abfde6ff2b7339fae775ad5561009dc129
---
M zuul/cmd/__init__.py
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Hashar: Verified; Looks good to me, approved



diff --git a/zuul/cmd/__init__.py b/zuul/cmd/__init__.py
index 7ee7900..966d1f7 100644
--- a/zuul/cmd/__init__.py
+++ b/zuul/cmd/__init__.py
@@ -26,8 +26,6 @@
 
 yappi = extras.try_import('yappi')
 
-import zuul.lib.connections
-
 # Do not import modules that will pull in paramiko which must not be
 # imported until after the daemonization.
 # https://github.com/paramiko/paramiko/issues/59
@@ -91,5 +89,8 @@
 logging.basicConfig(level=logging.DEBUG)
 
 def configure_connections(self):
+# See comment at top of file about zuul imports
+import zuul.lib.connections
+
 self.connections = zuul.lib.connections.configure_connections(
 self.config)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea3288abfde6ff2b7339fae775ad5561009dc129
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul
Gerrit-Branch: patch-queue/debian/precise-wikimedia
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] Lower default $wgSquidMaxage from 31 days to 14 days - change (operations/mediawiki-config)

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

Change subject: Lower default $wgSquidMaxage from 31 days to 14 days
..


Lower default $wgSquidMaxage from 31 days to 14 days

Bug: T124954
Change-Id: I8bf7c8dd33123b45dfe454ea4db18ad37d4c775c
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  BBlack: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 989a9b0..80ceeeb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11987,9 +11987,8 @@
 ],
 
 'wgSquidMaxage' => [
-   'default' => 2678400, // 31 days
+   'default' => 14 * 24 * 3600, // 14 days (T124954)
'foundationwiki' => 3600, // 1 hour; template links may be funky
-   'test2wiki' => 14 * 24 * 3600, // 14 days (T124954)
 ],
 
 # abuse filter @{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bf7c8dd33123b45dfe454ea4db18ad37d4c775c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Run DonationInterface LintYaml job via composer-test - change (integration/config)

2016-07-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Run DonationInterface LintYaml job via composer-test
..

Run DonationInterface LintYaml job via composer-test

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/85/299185/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e104479..e1eda51 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2950,6 +2950,7 @@
 template:
   - name: extension-unittests-non-voting
   - name: npm
+  - name: composer-test
 check:
   - jsonlint
   - jshint

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

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

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


[MediaWiki-commits] [Gerrit] Cheap yaml lint job. - change (mediawiki...DonationInterface)

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

Change subject: Cheap yaml lint job.
..


Cheap yaml lint job.

Change-Id: Iaaad8cfd31c02871824b1c018e99d91836637195
---
M composer.json
A tests/LintYaml.php
2 files changed, 53 insertions(+), 0 deletions(-)

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



diff --git a/composer.json b/composer.json
index 1fc4afd..d38cef6 100644
--- a/composer.json
+++ b/composer.json
@@ -42,5 +42,8 @@
"config": {
"optimize-autoloader": true,
"prepend-autoloader": false
+   },
+   "scripts": {
+   "test": "php tests/LintYaml.php"
}
 }
diff --git a/tests/LintYaml.php b/tests/LintYaml.php
new file mode 100644
index 000..340ad44
--- /dev/null
+++ b/tests/LintYaml.php
@@ -0,0 +1,50 @@
+getFilename() === 'tests'
+   || $current->getFilename() === 'vendor'
+   || $current->getFilename() === 'node_modules'
+   ) {
+   return false;
+   }
+
+   // Recurse
+   if ( $current->isDir() ) {
+   return true;
+   }
+
+   // Match .yaml or .yml
+   return preg_match( '/\.ya?ml$/', $current->getFilename() );
+   } );
+
+   $iterator = new RecursiveIteratorIterator( $filter );
+   foreach ( $iterator as $file ) {
+   if ( $file->isFile() ) {
+   $callback( $file->getPathname() );
+   }
+   }
+}
+
+function lintYamlFile( $path ) {
+   $yamlParser = new Parser();
+   try {
+   $data = $yamlParser->parse( file_get_contents( $path ) );
+   } catch ( Exception $ex ) {
+   global $exitStatus;
+   $exitStatus = -1;
+
+   error_log( $path . ': ' . $ex->getMessage() );
+   }
+}
+
+$exitStatus = 0;
+require_once __DIR__ . '/../vendor/autoload.php';
+runForYamlFiles( 'lintYamlFile' );
+exit($exitStatus);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaaad8cfd31c02871824b1c018e99d91836637195
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Deprecate generate-version; this is done by our deployment s... - change (mediawiki...DonationInterface)

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

Change subject: Deprecate generate-version; this is done by our deployment 
scripts.
..


Deprecate generate-version; this is done by our deployment scripts.

Change-Id: I7e2181ccc401c9cc569b06d6ccc857e0124159ae
TODO: The source_version thing should be done via a custom hook.
---
D bin/generate-version
1 file changed, 0 insertions(+), 10 deletions(-)

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



diff --git a/bin/generate-version b/bin/generate-version
deleted file mode 100755
index 5d25ca3..000
--- a/bin/generate-version
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-#
-# This script can be run manually, to populate the .version-stamp file.
-#
-# If the version is not found at runtime, the string "unknown" is used instead.
-
-dest="$(dirname $0)/../.version-stamp"
-head_rev=$(git rev-parse --verify HEAD)
-
-echo -n "$head_rev" > $dest

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e2181ccc401c9cc569b06d6ccc857e0124159ae
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Try a slightly different .gemspec preamble - change (mediawiki/vagrant)

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

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

Change subject: Try a slightly different .gemspec preamble
..

Try a slightly different .gemspec preamble

Bug: T132449
Change-Id: I8d6f46c8b89660f9b44d27980911c9bc26246adc
---
M mediawiki-vagrant.gemspec
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/84/299184/1

diff --git a/mediawiki-vagrant.gemspec b/mediawiki-vagrant.gemspec
index c406848..f80498d 100644
--- a/mediawiki-vagrant.gemspec
+++ b/mediawiki-vagrant.gemspec
@@ -1,4 +1,6 @@
-$LOAD_PATH.push File.expand_path('../lib', __FILE__)
+# coding: utf-8
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
 
 require 'mediawiki-vagrant/version'
 

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

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

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


[MediaWiki-commits] [Gerrit] Add nsp check to 'npm test' command - change (mediawiki...mobileapps)

2016-07-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Add nsp check to 'npm test' command
..

Add nsp check to 'npm test' command

The nsp [node security platform] module provides a way to check a
project's node modules for known vulnerabilities.

Adding an nsp check to our regular test suite will help us keep abreast
of vulnerabilities and make changes immediately when necessary.

Change-Id: I1de849c91119b9d6aa6b7a4c76e5e30b418aa16a
---
M package.json
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/83/299183/1

diff --git a/package.json b/package.json
index 59aa6fe..cae2f66 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
   "main": "./app.js",
   "scripts": {
 "start": "service-runner",
-"test": "mocha",
+"test": "mocha && nsp check",
 "docker-start": "service-runner docker-start",
 "docker-test": "service-runner docker-test",
 "coverage": "istanbul cover _mocha -- -R spec"
@@ -59,6 +59,7 @@
 "mocha": "^2.5.3",
 "mocha-jshint": "^2.3.1",
 "mocha-lcov-reporter": "^1.2.0",
+"nsp": "^2.6.1",
 "sepia": "^2.0.1"
   },
   "deploy": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1de849c91119b9d6aa6b7a4c76e5e30b418aa16a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] Switch to caret semantic versioning - change (wikimedia...SmashPig)

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

Change subject: Switch to caret semantic versioning
..


Switch to caret semantic versioning

There's at least one urgent security update in here...

Change-Id: I50f1e9b6dfe05c4174b3b81fcaa597445712bdb2
---
M composer.json
M composer.lock
2 files changed, 415 insertions(+), 103 deletions(-)

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



diff --git a/composer.json b/composer.json
index 031151a..c6e4b5c 100644
--- a/composer.json
+++ b/composer.json
@@ -24,17 +24,17 @@
 ],
 "require": {
 "coderkungfu/php-queue": "dev-master",
-"fusesource/stomp-php": "2.*",
-"php": ">=5.3.3",
-"phpmailer/phpmailer": "5.2.6",
-"symfony/event-dispatcher": ">=2.1,<2.4-dev",
-"symfony/http-foundation": ">=2.1,<2.4-dev",
-"symfony/yaml": "2.8.3",
+"fusesource/stomp-php": "^2.1.1",
+"php": "^5.3.3",
+"phpmailer/phpmailer": "^5.2",
+"symfony/event-dispatcher": "^2.1",
+"symfony/http-foundation": "^2.1",
+"symfony/yaml": "^2.8",
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master"
 },
"require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9",
-   "phpunit/phpunit": "4.8.*"
+   "jakub-onderka/php-parallel-lint": "^0.9",
+   "phpunit/phpunit": "^4.8"
},
"scripts": {
"test": [
diff --git a/composer.lock b/composer.lock
index f1832e0..b0e07e6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "ecdf8b11e31e5c0587ca94375f3c03b2",
-"content-hash": "d718c925a69add0e5dd2034e9c829a5e",
+"hash": "f4aff0ed773645c4cf71e9492df77ec2",
+"content-hash": "e487898d348e7479cdecca1d3cac335f",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git;,
-"reference": "e7b45a7565e5b51c1561fc0802e2f888351b6367"
+"reference": "073e90318804bd0c5f0a2bf9da2d97794189fde5"
 },
 "require": {
 "clio/clio": "@stable",
@@ -149,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-05-06 21:06:39"
+"time": "2016-07-06 16:43:54"
 },
 {
 "name": "fusesource/stomp-php",
@@ -201,17 +201,59 @@
 "time": "2013-02-23 17:34:44"
 },
 {
-"name": "monolog/monolog",
-"version": "1.19.0",
+"name": "ircmaxell/password-compat",
+"version": "v1.0.4",
 "source": {
 "type": "git",
-"url": "https://github.com/Seldaek/monolog.git;,
-"reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf"
+"url": "https://github.com/ircmaxell/password_compat.git;,
+"reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf;,
-"reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf",
+"url": 
"https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c;,
+"reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c",
+"shasum": ""
+},
+"require-dev": {
+"phpunit/phpunit": "4.*"
+},
+"type": "library",
+"autoload": {
+"files": [
+"lib/password.php"
+]
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"MIT"
+],
+"authors": [
+{
+"name": "Anthony Ferrara",
+"email": "ircmax...@php.net",
+"homepage": "http://blog.ircmaxell.com;
+}
+],
+"description": "A compatibility library for the proposed 
simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash;,
+"homepage": "https://github.com/ircmaxell/password_compat;,
+"keywords": [
+"hashing",
+"password"
+],
+"time": "2014-11-20 16:49:30"
+},
+{
+"name": "monolog/monolog",
+"version": "1.20.0",
+

[MediaWiki-commits] [Gerrit] postgresql: fix user existence check - change (operations/puppet)

2016-07-15 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged.

Change subject: postgresql: fix user existence check
..


postgresql: fix user existence check

Otherwise, it would say that tilerator exists when there's only tileratorui

Change-Id: I010da5bdde6c95214902ff10814f6f534c16b7dd
---
M modules/postgresql/manifests/user.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/postgresql/manifests/user.pp 
b/modules/postgresql/manifests/user.pp
index e86a7c4..1877235 100644
--- a/modules/postgresql/manifests/user.pp
+++ b/modules/postgresql/manifests/user.pp
@@ -43,7 +43,7 @@
 $pg_hba_file = "/etc/postgresql/${pgversion}/main/pg_hba.conf"
 
 # Check if our user exists and store it
-$userexists = "/usr/bin/psql --tuples-only -c \'SELECT rolname FROM 
pg_catalog.pg_roles;\' | /bin/grep \'^ ${user}\'"
+$userexists = "/usr/bin/psql --tuples-only -c \'SELECT rolname FROM 
pg_catalog.pg_roles;\' | /bin/grep -P \'^ ${user}$\'"
 # Check if our user doesn't own databases, so we can safely drop
 $user_dbs = "/usr/bin/psql --tuples-only --no-align -c \'SELECT COUNT(*) 
FROM pg_catalog.pg_database JOIN pg_authid ON pg_catalog.pg_database.datdba = 
pg_authid.oid WHERE rolname = '${user}';\' | grep -e '^0$'"
 $pass_set = "/usr/bin/psql -c \"ALTER ROLE ${user} WITH ${attrs} PASSWORD 
'${password}';\""

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

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

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


[MediaWiki-commits] [Gerrit] Enable gpg keys in gerrit - change (operations/puppet)

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

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

Change subject: Enable gpg keys in gerrit
..

Enable gpg keys in gerrit

Gerrit now supports gpg keys, it will work even if users decide they doint
want to use gpk keys so this is optional but supported now.

Gerrit 2.8 does not support gpg keys so this is disabled there.

Change-Id: Ia8da83e2f01c8ec2907f7e4363b950fd6c07267e
---
M hieradata/hosts/ytterbium.yaml
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/gerrit.config.erb
3 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/299182/1

diff --git a/hieradata/hosts/ytterbium.yaml b/hieradata/hosts/ytterbium.yaml
index b713118..0ea285c 100644
--- a/hieradata/hosts/ytterbium.yaml
+++ b/hieradata/hosts/ytterbium.yaml
@@ -7,3 +7,4 @@
 gerrit::jetty::commitlink: '#q,$2,n,z'
 gerrit::jetty::git_dir: '/var/lib/gerrit2/review_site/git'
 gerrit::jetty::index_type: 'SQL'
+gerrit::jetty::gerritgpg: false
diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index b761be8..f4154366 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -11,6 +11,7 @@
 $changeidlink = '#/q/$1',
 $commitlink = '#/q/$2',
 $index_type  = 'LUCENE',
+$gerritgpg  = true,
 ) {
 
 include nrpe
diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ec75a15..08b7277 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -18,6 +18,10 @@
 type = LDAP
 cookieSecure = true
 registerUrl = 
https://wikitech.wikimedia.org/w/index.php?title=Special:UserLogin=Help%3AGetting+Started=signup
+<%- if @gerritgpg -%>
+[receive]
+enableSignedPush = true
+<%- end -%>
 [ldap]
 server = <% @ldap_hosts.each do |ldap_host| %>ldaps://<%= ldap_host %> <% 
end %>
 accountBase = ou=people,<%= @ldap_base_dn %>

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

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

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


[MediaWiki-commits] [Gerrit] Composer validation fixup - change (wikimedia...php-queue)

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

Change subject: Composer validation fixup
..


Composer validation fixup

Change-Id: I25e80d1dc06c61692500531a83eaecefd8d60796
---
M composer.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index 5e52c7c..f75d7ef 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
 "require": {
 "php": ">=5.3.0",
 "monolog/monolog": "~1.3",
-"clio/clio": "@stable"
+"clio/clio": "0.1.*"
 },
 "require-dev": {
 "jakub-onderka/php-parallel-lint": "0.9",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25e80d1dc06c61692500531a83eaecefd8d60796
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: 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] admin: add an NDA audit helper script - change (operations/puppet)

2016-07-15 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: admin: add an NDA audit helper script
..


admin: add an NDA audit helper script

Hacky Python code currently being used to perform user access and NDA
audits with the WMF's Legal department.

Change-Id: I5a846618854613b2a04d619e308fb58da3bccfe9
---
A modules/admin/data/nda_audit.py
1 file changed, 153 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Looks good to me, but someone else must approve
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/modules/admin/data/nda_audit.py b/modules/admin/data/nda_audit.py
new file mode 100644
index 000..58c0ea5
--- /dev/null
+++ b/modules/admin/data/nda_audit.py
@@ -0,0 +1,153 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2016 Wikimedia Foundation, Inc.
+#
+# This script parses our data.yaml file for all users and enriches the
+# information using information gathered from the production/Labs LDAP tree. It
+# finally outputs the information with non-technical labels into a CSV.
+#
+# It's currently being used to perform user access and NDA audits with the
+# WMF's Legal department.
+
+import sys
+import yaml
+import ldap
+import csv
+
+
+def extract_from_yaml():
+data = open('data.yaml', 'r')
+admins = yaml.safe_load(data)
+
+users = {}
+
+for username, userdata in admins['users'].items():
+if userdata['ensure'] == 'absent':
+continue
+
+groups = []
+for group, groupdata in admins['groups'].items():
+if username in groupdata['members']:
+groups.append(group)
+
+users[username] = {
+'realname': userdata['realname'],
+'uid': userdata['uid'],
+'prod_groups': groups,
+'has_server_access': (len(userdata['ssh_keys']) > 0),
+}
+
+return users
+
+
+def enrich_from_ldap(users):
+# needs some configuration
+ldap_conn = ldap.initialize('ldap://%s:389' % 'localhost')
+ldap_conn.protocol_version = ldap.VERSION3
+
+base_dn = "dc=wikimedia,dc=org"
+people_dn = "ou=people," + base_dn
+groups_dn = "ou=groups," + base_dn
+
+# first fetch all users belonging in a set of special groups
+for group in ('ops', 'nda', 'wmf'):
+ldapdata = ldap_conn.search_s(
+groups_dn,
+ldap.SCOPE_SUBTREE,
+"(&(objectclass=groupOfNames)(cn=" + group + "))",
+attrlist=['member'],
+)
+
+for member_dn in ldapdata[0][1]['member']:
+ldapdata = ldap_conn.search_s(
+member_dn,
+ldap.SCOPE_BASE,
+'(objectclass=*)',
+attrlist=['*', '+'],
+)
+attrs = ldapdata[0][1]
+
+ldapdata = ldap_conn.search_s(
+groups_dn,
+ldap.SCOPE_SUBTREE,
+"(&(objectclass=groupOfNames)(member=" + member_dn + "))",
+attrlist=['cn'],
+)
+groups = [l[1]['cn'][0] for l in ldapdata]
+
+# we handle users that exist in the users dict (i.e. the ones from
+# YAML) below, so skip the lookup for them here. YAML is usually
+# more accurate in terms of e.g. realname.
+username = attrs['uid'][0]
+if username in users:
+continue
+
+users[username] = {
+'realname': attrs['cn'][0],
+'uid': attrs['uidNumber'][0],
+'prod_groups': [],
+'has_server_access': False,
+'email': ','.join(attrs['mail']),
+'has_nda_group': ('nda' in groups),
+'has_wmf_group': ('wmf' in groups),
+'ldap_groups': groups,
+}
+
+# this enriches the information gathered from data.yaml with a few bits
+# from LDAP (mainly the email and LDAP group memberships). This is possible
+# because usernames and uidNumbers match between the two trees.
+for username in users:
+ldapdata = ldap_conn.search_s(
+people_dn,
+ldap.SCOPE_SUBTREE,
+"(&(objectclass=inetOrgPerson)(uid=" + username + "))",
+attrlist=['*', '+']
+)
+attrs = ldapdata[0][1]
+user_dn = ldapdata[0][0]
+
+# this extra lookup will not be needed as soon as we have memberOf
+ldapdata = ldap_conn.search_s(
+groups_dn,
+ldap.SCOPE_SUBTREE,
+"(&(objectclass=groupOfNames)(member=" + user_dn + "))",
+attrlist=['cn'],
+)
+groups = [l[1]['cn'][0] for l in ldapdata]
+
+users[username]['email'] = ','.join(attrs['mail'])
+users[username]['has_nda_group'] = ('nda' in groups)
+users[username]['has_wmf_group'] = ('wmf' in groups)
+users[username]['ldap_groups'] = groups
+
+return users
+
+
+def 

[MediaWiki-commits] [Gerrit] build: Downgrade grunt-jscs to 2.8.0 to avoid cst bug - change (oojs/ui)

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

Change subject: build: Downgrade grunt-jscs to 2.8.0 to avoid cst bug
..


build: Downgrade grunt-jscs to 2.8.0 to avoid cst bug

Bug: T140367
Change-Id: Ice3afeefda8628ec9b0f4f72379770b484a2cb11
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/package.json b/package.json
index d826f42..490582a 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,7 @@
 "grunt-exec": "1.0.0",
 "grunt-file-exists": "0.1.4",
 "grunt-image": "1.5.2",
-"grunt-jscs": "3.0.1",
+"grunt-jscs": "2.8.0",
 "grunt-jsonlint": "1.1.0",
 "grunt-karma": "2.0.0",
 "grunt-promise-q": 
"git://github.com/jdforrester/grunt-promise-q.git#v0.1.1-wmf.1",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice3afeefda8628ec9b0f4f72379770b484a2cb11
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
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] clean up arg parsing, this db host checker will have a numbe... - change (operations/software)

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

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

Change subject: clean up arg parsing, this db host checker will have a number 
of args
..

clean up arg parsing, this db host checker will have a number of args

also add short argument names

Change-Id: Ia2b6f394e0247da5f8014a601d06b530bd61c592
---
M dbtools/db_host_checker.py
1 file changed, 192 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/80/299180/1

diff --git a/dbtools/db_host_checker.py b/dbtools/db_host_checker.py
index 1a85fee..df4366b 100644
--- a/dbtools/db_host_checker.py
+++ b/dbtools/db_host_checker.py
@@ -10,6 +10,7 @@
 import os
 import getopt
 import time
+from string import Template
 from salt.client import LocalClient
 
 
@@ -229,7 +230,7 @@
 fhandle.close()
 
 
-def usage(message=None):
+def usage(args_info, message=None):
 '''
 show usage information for script with optional
 preceding text message
@@ -237,22 +238,30 @@
 if message:
 sys.stderr.write("%s\n\n" % message)
 usage_text = """Usage: python db_host_checker.py
- [--cache path] [--stale num_seconds] [--help]
+ [$cache path] [$stale num_seconds] [$show name] [$verbose] [$help]
+
+This script does some things. It relies on salt to do those things.
+ It will do more things soon.
 
 Options:
-
---cache path to file for caching lists of all known shards and dcs
-default: no caching
---stale number of seconds after which the cache file is considered
-stale and data will be discarded. default: 300
---show  show one of the following:
-shards:   all known shards and their hosts
-dcs:  all known dcs and their hosts
-all:  both of the above
---verbose   print progress messages
---help  display this message
 """
-sys.stderr.write(usage_text)
+options_text = """
+$cachepath to file for caching lists of all known shards and dcs
+  default: $cachedefault
+$stalenumber of seconds after which the cache file is considered
+  stale and data will be discarded. default: $staledefault
+$show show one of the following:
+shards:   all known shards and their hosts
+dcs:  all known dcs and their hosts
+all:  both of the above
+$timeout  number of seconds to wait for salt commands to complete.
+  default: $timeoutdefault
+$verbose  print progress messages
+$help display this message
+"""
+output = format_usage_text(usage_text, args_info)
+output = output + format_usage_text(options_text, args_info, indent=True)
+sys.stderr.write(output)
 sys.exit(1)
 
 
@@ -282,46 +291,183 @@
 print "No dcs found"
 
 
+def display(message):
+'''
+fallback usage message displayer in case the
+user doesn't have one
+'''
+print message
+
+
+def format_usage_text(text, args_info, indent=False):
+'''
+given text with placeholders for argument names  and argument
+default values, suitable for Template (all names are preceded by $),
+fill in and return the text
+
+if indent is True, it is assumed that the text is a list of
+$argname  descriptive-text, and so lines not starting with a $ variable 
will
+be indented so that they maintain their current block formatting
+after the substitutions have been made
+'''
+items = {}
+for name in args_info:
+items[name + "default"] = args_info[name]['default']
+items[name] = '--%s|-%s' % (name, args_info[name]['short'])
+# set up indentation in the text
+if indent:
+lines = text.split('\n')
+# indentation is 4, because we remove a $ and add --|- plus 1 letter
+lines = [("" if line.startswith('$') else "") + line for line in 
lines]
+text = '\n'.join(lines)
+return Template(text).safe_substitute(items)
+
+
+class ParseArgs(object):
+'''
+argument/flag parser with optional usage callback
+'''
+def __init__(self, args_info, usage_cb):
+'''
+args_info:
+
+a hash of option names with 'name', 'default', 'short', 'flag', 'int' 
specified
+'name' is the varname
+'default' is the default value
+'short' is the short option name
+'flag' is True if no value is to be supplied with the opt
+'int' is True if the value is an integer
+
+usage: method which will display a help message for the user
+'''
+self.args_info = args_info
+if usage_cb is None:
+self.usage = display
+else:
+self.usage = usage_cb
+self.args = {}
+
+def process_opt(self, opt, val):
+'''
+given an option name and value as specified on command line,
+for each one, 

[MediaWiki-commits] [Gerrit] limit list of db hosts to be checked by shards and or dcs - change (operations/software)

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

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

Change subject: limit list of db hosts to be checked by shards and or dcs
..

limit list of db hosts to be checked by shards and or dcs

The list of hosts to be checked will now be displayed if
verbose is enabled
Also needed to rename the 'stale' arg to 'old' so we have reasonable
short names for all the arguments

Change-Id: If4a3360f6698a91aeefe4c09475cc710a905572d
---
M dbtools/db_host_checker.py
1 file changed, 52 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/81/299181/1

diff --git a/dbtools/db_host_checker.py b/dbtools/db_host_checker.py
index df4366b..1487dd1 100644
--- a/dbtools/db_host_checker.py
+++ b/dbtools/db_host_checker.py
@@ -54,6 +54,8 @@
 self.salt_client = LocalClient()
 self.cacher = cacher
 self.timeout = timeout
+self.all_shards = None
+self.all_dcs = None
 
 def get_grain(self, target, grain, target_type):
 '''
@@ -84,17 +86,20 @@
 '''
 get all shards known to db servers on cluster
 '''
-results = self.get_grain('mysql_shard:*', 'mysql_shard', 'grain')
-#results = self.get_grain('testgrain:*', 'testgrain', 'grain')
-return results
+if self.all_shards is None:
+self.all_shards = self.get_grain('mysql_shard:*', 'mysql_shard', 
'grain')
+#self.all_shards = self.get_grain('testgrain:*', 'testgrain', 
'grain')
+return self.all_shards
 
 def get_all_dcs(self):
 '''
 get all dcs known for db servers on cluster
 '''
-results = self.get_grain('G@site:* and G@mysql_shard:*', 'site', 
'compound')
-#results = self.get_grain('G@testgrain:* and G@testgrain:*', 
'testgrain', 'compound')
-return results
+if self.all_dcs is None:
+self.all_dcs = self.get_grain('G@site:* and G@mysql_shard:*', 
'site', 'compound')
+#self.all_dcs = self.get_grain('G@testgrain:* and G@testgrain:*',
+#  'testgrain', 'compound')
+return self.all_dcs
 
 def get_all_shards_dcs(self, verbose=False):
 '''
@@ -129,6 +134,20 @@
 self.cacher.write_cache(shards, dcs, verbose)
 return (shards, dcs)
 
+def get_hosts(self, shards, dcs):
+'''
+return list of all hosts in the specified shard(s) and dc(s)
+if shards is None, all shards are included
+if dcs is None, all dcs are included
+'''
+if shards is None:
+hosts = [host for shard in self.all_shards for host in 
self.all_shards[shard]]
+else:
+hosts = [host for shard in shards for host in 
self.all_shards[shard]]
+if dcs is not None:
+hosts = [host for host in hosts for dcenter in self.all_dcs if 
host in self.all_dcs[dcenter]]
+return hosts
+
 
 def get_cache_values(line, name):
 '''
@@ -153,20 +172,20 @@
 '''
 manage cache of shard and dc information for db servers
 '''
-def __init__(self, cachefile, stale):
+def __init__(self, cachefile, old):
 self.cachefile = cachefile
-self.stale_seconds = stale
+self.old_seconds = old
 
-def is_stale(self):
+def is_old(self):
 '''
-return True if cache file is older than stale_seconds
+return True if cache file is older than old_seconds
 or if if doesn't exist or stat fails for some other reason
 '''
 try:
 timestamp = os.stat(self.cachefile).st_mtime
 except Exception:
 return True
-if time.time() - timestamp > self.stale_seconds:
+if time.time() - timestamp > self.old_seconds:
 return True
 else:
 return False
@@ -175,13 +194,13 @@
 '''
 read and return tuple of shards, dcs hashes from cache file
 if such a file has been specified and it is not
-stale, otherwise return empty hashes
+old, otherwise return empty hashes
 '''
 shards = {}
 dcs = {}
-if self.cachefile is None or self.is_stale():
+if self.cachefile is None or self.is_old():
 if verbose:
-print "no cache file being read: stale or not set"
+print "no cache file being read: old or not set"
 return (shards, dcs)
 
 contents = open(self.cachefile).read()
@@ -238,7 +257,9 @@
 if message:
 sys.stderr.write("%s\n\n" % message)
 usage_text = """Usage: python db_host_checker.py
- [$cache path] [$stale num_seconds] [$show name] [$verbose] [$help]
+ [$cache path] [$old num_seconds] [$show name]
+ [$shards name,name...] [$dcs name,name...]
+ [$verbose] [$help]
 
 This script does some things. It 

[MediaWiki-commits] [Gerrit] Parsoid: Move to service::node - change (mediawiki/vagrant)

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

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

Change subject: Parsoid: Move to service::node
..

Parsoid: Move to service::node

Parsoid now relies on service-runner, so we can make it use
service::node in MW-Vagrant. Also, clean up the old, now unused
manifests and templates.

Bug: T140477
Change-Id: If1f74f54c161d3c705ec84e80a9c21588cf7d279
---
M puppet/hieradata/common.yaml
D puppet/modules/mediawiki/manifests/parsoid.pp
D puppet/modules/mediawiki/templates/parsoid.conf.erb
A puppet/modules/parsoid/manifests/init.pp
R puppet/modules/parsoid/templates/localsettings.js.erb
M puppet/modules/restbase/templates/config.yaml.erb
M puppet/modules/role/manifests/iegreview.pp
M puppet/modules/role/manifests/parsoid.pp
M puppet/modules/role/templates/flow/conf.php.erb
M puppet/modules/role/templates/parsoid/vrs.php.erb
M puppet/modules/role/templates/visualeditor/conf.php.erb
M puppet/modules/service/manifests/node.pp
M puppet/modules/service/templates/node/config.yaml.erb
M puppet/modules/service/templates/node/upstart.conf.erb
14 files changed, 113 insertions(+), 118 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/79/299179/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index 38dd04f..2047b25 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -33,7 +33,7 @@
 
 contenttranslation::dir: 
"%{hiera('mediawiki::dir')}/extensions/ContentTranslation"
 contenttranslation::cxserver::dir: "%{hiera('mwv::services_dir')}/cxserver"
-contenttranslation::parsoid_url: 
"http://127.0.0.1:%{::mediawiki::parsoid::port};
+contenttranslation::parsoid_url: "http://127.0.0.1:%{::parsoid::port};
 contenttranslation::parsoid_timeout: 10
 contenttranslation::parsoid_prefix: 'enwiki'
 contenttranslation::view_template: 
"//$1%{hiera('mediawiki::multiwiki::base_domain')}%{::port_fragment}/wiki/$2"
@@ -60,7 +60,7 @@
 contenttranslation::cxserver::proxy: 'null'
 contenttranslation::cxserver::log: /vagrant/logs
 contenttranslation::cxserver::allow_cors: '*'
-contenttranslation::cxserver::parsoid: 
"http://127.0.0.1:%{::mediawiki::parsoid::port};
+contenttranslation::cxserver::parsoid: "http://127.0.0.1:%{::parsoid::port};
 contenttranslation::cxserver::apertium: 'http://apertium.wmflabs.org'
 contenttranslation::cxserver::yandex: 'https://translate.yandex.net'
 contenttranslation::cxserver::yandex_key: 'null'
@@ -232,7 +232,7 @@
 iegreview::cache_dir: /var/cache/iegreview
 iegreview::log_file: /vagrant/logs/iegreview.log
 iegreview::smtp_server: 127.0.0.1
-iegreview::parsoid_url: 
"http://127.0.0.1:%{::mediawiki::parsoid::port}/localhost/;
+iegreview::parsoid_url: "http://127.0.0.1:%{::parsoid::port}/localhost/;
 
 mediawiki::wiki_name: devwiki
 mediawiki::dir: /vagrant/mediawiki
@@ -274,14 +274,12 @@
 mediawiki::mwrepl::default_db_name: "%{hiera('mediawiki::db_name')}"
 mediawiki::mwrepl::script_dir: "%{hiera('mediawiki::multiwiki::script_dir')}"
 
-mediawiki::parsoid::dir: "%{hiera('mwv::services_dir')}/parsoid"
-mediawiki::parsoid::port: 8000
-mediawiki::parsoid::domain: "%{hiera('role::mediawiki::hostname')}"
-mediawiki::parsoid::uri: "http://localhost%{::port_fragment}/w/api.php;
-mediawiki::parsoid::use_php_preprocessor: true
-mediawiki::parsoid::use_selser: true
-mediawiki::parsoid::allow_cors: '*'
-mediawiki::parsoid::workers: 2
+parsoid::port: 8000
+parsoid::domain: "%{hiera('role::mediawiki::hostname')}"
+parsoid::uri: "http://localhost%{::port_fragment}/w/api.php;
+parsoid::use_php_preprocessor: true
+parsoid::use_selser: true
+parsoid::allow_cors: '*'
 
 mysql::host: '127.0.0.1'
 mysql::default_db_name: wiki
diff --git a/puppet/modules/mediawiki/manifests/parsoid.pp 
b/puppet/modules/mediawiki/manifests/parsoid.pp
deleted file mode 100644
index 830d262..000
--- a/puppet/modules/mediawiki/manifests/parsoid.pp
+++ /dev/null
@@ -1,74 +0,0 @@
-# == Class: mediawiki::parsoid
-#
-# Parsoid is a wiki runtime which can translate back and forth between
-# MediaWiki's wikitext syntax and an equivalent HTML / RDFa document model with
-# better support for automated processing and visual editing. Its main user
-# currently is the visual editor project.
-#
-# === Parameters
-#
-# [*dir*]
-#   Install Parsoid to this directory.
-#
-# [*port*]
-#   The Parsoid web service will listen on this port.
-#
-# [*domain*]
-#   The MediaWiki host domain name.
-#
-# [*uri*]
-#   The full URI to the MediaWiki api.php to use.
-#
-# [*use_php_preprocessor*]
-#   If true, use the PHP pre-processor to expand templates via the
-#   MediaWiki API.
-#
-# [*use_selser*]
-#   Use selective serialization.
-#
-# [*allow_cors*]
-#   Domains that should be permitted to make cross-domain requests.
-#   If false or undefined, disables CORS.
-#
-# [*workers*]
-#   Number of worker processes to fork.
-#
-class mediawiki::parsoid(
-$dir,
-$port,
-   

[MediaWiki-commits] [Gerrit] registration: Add test to check extension.json globals are d... - change (mediawiki/core)

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

Change subject: registration: Add test to check extension.json globals are 
documented
..


registration: Add test to check extension.json globals are documented

Verify that all the global settings listed in
ExtensionProcessor::$globalSettings are documented in the extension.json
schema.

Change-Id: If0ed09ed19b92934e869bbd40d8716a83e4b0a30
---
M tests/phpunit/includes/registration/ExtensionProcessorTest.php
1 file changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/registration/ExtensionProcessorTest.php 
b/tests/phpunit/includes/registration/ExtensionProcessorTest.php
index 0120d79..ea86535 100644
--- a/tests/phpunit/includes/registration/ExtensionProcessorTest.php
+++ b/tests/phpunit/includes/registration/ExtensionProcessorTest.php
@@ -414,6 +414,26 @@
]
];
}
+
+   public function testGlobalSettingsDocumentedInSchema() {
+   global $IP;
+   $globalSettings = TestingAccessWrapper::newFromClass(
+   ExtensionProcessor::class )->globalSettings;
+
+   $schema = FormatJson::decode(
+   file_get_contents( "$IP/docs/extension.schema.json" ),
+   true
+   );
+   $missing = [];
+   foreach ( $globalSettings as $global ) {
+   if ( !isset( $schema['properties'][$global] ) ) {
+   $missing[] = $global;
+   }
+   }
+
+   $this->assertEquals( [], $missing,
+   "The following global settings are not documented in 
docs/extension.schema.json" );
+   }
 }
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0ed09ed19b92934e869bbd40d8716a83e4b0a30
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Anomie 
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] Support tokenizing simple HTML comments in the Balancer. - change (mediawiki/core)

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

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

Change subject: Support tokenizing simple HTML comments in the Balancer.
..

Support tokenizing simple HTML comments in the Balancer.

Change-Id: Ib780595b13b7145e99867d16e3c225e6b2b91884
---
M includes/tidy/Balancer.php
M tests/phpunit/includes/tidy/BalancerTest.php
2 files changed, 96 insertions(+), 8 deletions(-)


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

diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php
index 47d1ae8..98299d1 100644
--- a/includes/tidy/Balancer.php
+++ b/includes/tidy/Balancer.php
@@ -43,6 +43,11 @@
 # as soon as possible (usually as soon as the tag is closed) to reduce
 # its memory footprint.
 
+# We've been gradually lifting some of these restrictions to handle
+# non-sanitized output generated by extensions, but we shortcut the tokenizer
+# for speed (primarily by splitting on `<`) and so rely on syntactic
+# well-formedness.
+
 # On the other hand, I've been pretty careful to note with comments in the
 # code the places where this implementation omits features of the spec or
 # depends on the MediaWiki Sanitizer.  Perhaps in the future we'll want to
@@ -677,18 +682,28 @@
}
 
/**
+* Insert a comment at the appropriate place for inserting a node.
+* @param string $value Content of the comment.
+* @see 
https://html.spec.whatwg.org/multipage/syntax.html#insert-a-comment
+*/
+   public function insertComment( $value ) {
+   // Just another type of text node, except for tidy p-wrapping.
+   return $this->insertText( '', true );
+   }
+
+   /**
 * Insert text at the appropriate place for inserting a node.
 * @param string $value
 * @see 
https://html.spec.whatwg.org/multipage/syntax.html#appropriate-place-for-inserting-a-node
 */
-   public function insertText( $value ) {
+   public function insertText( $value, $isComment = false ) {
if (
$this->fosterParentMode &&
$this->currentNode->isA( 
BalanceSets::$tableSectionRowSet )
) {
$this->fosterParent( $value );
} elseif (
-   $this->tidyCompat &&
+   $this->tidyCompat && !$isComment &&
$this->currentNode->isA( BalanceSets::$tidyPWrapSet )
) {
$this->insertHTMLELement( 'mw:p-wrap', [] );
@@ -1723,9 +1738,10 @@
  * - The document is never in "quirks mode".
  * - All occurrences of < and > have been entity escaped, so we
  *   can parse tags by simply splitting on those two characters.
+ *   The character < must not appear inside comments.
  *   Similarly, all attributes have been "cleaned" and are double-quoted
  *   and escaped.
- * - All comments and null characters are assumed to have been removed.
+ * - All null characters are assumed to have been removed.
  * - We don't alter linefeeds after /.
  * - The following elements are disallowed: , , , ,
  *   , , , , , ,
@@ -1755,12 +1771,44 @@
private $stack;
private $strict;
private $tidyCompat;
+   private $allowComments;
 
private $textIntegrationMode = false;
private $pendingTableText;
private $originalInsertionMode;
private $fragmentContext;
private $formElementPointer;
+
+   /**
+* Valid HTML5 comments.
+* Regex borrowed from Tim Starling's "remex-html" project.
+*/
+   const VALID_COMMENT_REGEX = "~ !--
+   ( # 1. Comment match detector
+   > | -> | # Invalid short close
+   ( # 2. Comment contents
+   (?:
+   (?! --> )
+   (?! --!> )
+   (?! --! \z )
+   (?! -- \z )
+   (?! - \z )
+   .
+   )*+
+   )
+   ( # 3. Comment close
+   --> |   # Normal close
+   --!> |  # Comment end bang
+   ( # 4. Indicate matches 
requiring EOF
+   --! |   # EOF in comment end bang state
+   -- |# EOF in comment end state
+   -  |# EOF in comment end dash state
+   # EOF in comment state
+   )
+   )
+

[MediaWiki-commits] [Gerrit] [WIP] Integrate leakcanary into Dev build. - change (apps...wikipedia)

2016-07-15 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: [WIP] Integrate leakcanary into Dev build.
..

[WIP] Integrate leakcanary into Dev build.

This integrates leakcanary[0] into our builds, in the following way:
- For Dev builds, leakcanary will latch onto all of our Activities
  automatically, and I've added code that latches onto each of our
  Fragments and Dialogs individually.
- For non-Dev builds, the code will automatically use a no-op reference
  watcher.

[0] https://github.com/square/leakcanary

Change-Id: I827028322054d767a222ee51265890f56181afab
---
M app/build.gradle
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
M app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
M app/src/main/java/org/wikipedia/page/ExtendedBottomSheetDialogFragment.java
M app/src/main/java/org/wikipedia/page/NoDimBottomSheetDialog.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/gallery/GalleryItemFragment.java
M app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
11 files changed, 68 insertions(+), 0 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index be96f66..17e5298 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -165,6 +165,7 @@
 String butterKnifeVersion = '8.0.1'
 String frescoVersion = '0.10.0'
 String testingSupportVersion = '0.5'
+String leakCanaryVersion = '1.4-beta2'
 
 compile "com.android.support:appcompat-v7:$supportVersion" // includes 
support-v4
 compile "com.android.support:cardview-v7:$supportVersion"
@@ -194,6 +195,10 @@
 
 apt "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
 
+debugCompile 
"com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
+releaseCompile 
"com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
+testCompile 
"com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
+
 testCompile 'junit:junit:4.12'
 testCompile 'org.mockito:mockito-core:1.9.5'
 testCompile 'org.robolectric:robolectric:3.1'
diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index dd71928..0e896e6 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -17,6 +17,8 @@
 import com.facebook.drawee.backends.pipeline.Fresco;
 import 
com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory;
 import com.facebook.imagepipeline.core.ImagePipelineConfig;
+import com.squareup.leakcanary.LeakCanary;
+import com.squareup.leakcanary.RefWatcher;
 import com.squareup.otto.Bus;
 
 import org.mediawiki.api.json.Api;
@@ -96,6 +98,7 @@
 private Site site;
 
 private CrashReporter crashReporter;
+private RefWatcher refWatcher;
 
 public boolean isProdRelease() {
 return ReleaseUtil.isProdRelease();
@@ -162,6 +165,8 @@
 @Override
 public void onCreate() {
 super.onCreate();
+refWatcher = isDevRelease() ? LeakCanary.install(this) : 
RefWatcher.DISABLED;
+
 initExceptionHandling();
 
 // See Javadocs and 
http://developer.android.com/tools/support-library/index.html#rev23-4-0
@@ -199,6 +204,10 @@
 registerReadingListPageObserver();
 }
 
+public RefWatcher getRefWatcher() {
+return refWatcher;
+}
+
 public Bus getBus() {
 return bus;
 }
diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index f159dfb..f6bf29f 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -130,6 +130,12 @@
 }
 
 @Override
+public void onDestroy() {
+super.onDestroy();
+app.getRefWatcher().watch(this);
+}
+
+@Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
 menu.clear();
 if (searchIconVisible) {
diff --git a/app/src/main/java/org/wikipedia/history/HistoryFragment.java 
b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
index 9f3a03d..40fdfff 100644
--- a/app/src/main/java/org/wikipedia/history/HistoryFragment.java
+++ b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
@@ -165,6 +165,12 @@
 }
 
 @Override
+public void onDestroy() {
+super.onDestroy();
+app.getRefWatcher().watch(this);
+}
+
+@Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
 if (!isMenuToBeSetUp()) {
   

[MediaWiki-commits] [Gerrit] Replace unprefixed `box-sizing` property with mixin - change (oojs/ui)

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

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

Change subject: Replace unprefixed `box-sizing` property with mixin
..

Replace unprefixed `box-sizing` property with mixin

Replacing unprefixed `box-sizing` property with corresponding mixin.

Change-Id: Ie4030fa6b78ab7051a2d6d14efe2233875cfc2ee
---
M src/themes/mediawiki/tools.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/76/299176/1

diff --git a/src/themes/mediawiki/tools.less b/src/themes/mediawiki/tools.less
index 5f34151..ef32261 100644
--- a/src/themes/mediawiki/tools.less
+++ b/src/themes/mediawiki/tools.less
@@ -289,7 +289,7 @@
 
.oo-ui-tool-link {
padding: 0.4em 0.625em;
-   box-sizing: border-box;
+   .oo-ui-box-sizing( border-box );
 
.oo-ui-iconElement-icon {
height: 2.5em;

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

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

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


[MediaWiki-commits] [Gerrit] Fix crash after clicking Random card - change (apps...wikipedia)

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

Change subject: Fix crash after clicking Random card
..


Fix crash after clicking Random card

Our output format for /page/random/title is now the standard restbase
/page/title/{title} format.  We were looking for a normalizedtitle
property, but this response doesn't have one.  Luckily, a non-normailzed
title is fine here for our purposes.

Change-Id: I51a794a39887a2b6e7f9413dc010eb64166e95dd
---
M app/src/main/java/org/wikipedia/random/RandomSummaryService.java
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/random/RandomSummaryService.java 
b/app/src/main/java/org/wikipedia/random/RandomSummaryService.java
index cc28eb7..18e6556 100644
--- a/app/src/main/java/org/wikipedia/random/RandomSummaryService.java
+++ b/app/src/main/java/org/wikipedia/random/RandomSummaryService.java
@@ -41,7 +41,7 @@
 CardPageItem item = response.body();
 String namespace = item.namespace() == null ? null
 : item.namespace().toLegacyString();
-PageTitle title = new PageTitle(namespace, 
item.normalizedTitle(), site);
+PageTitle title = new PageTitle(namespace, item.title(), 
site);
 cb.onSuccess(title);
 } else {
 L.v(response.message());

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51a794a39887a2b6e7f9413dc010eb64166e95dd
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] AuthManager: Break AuthPlugin::addUser more explicitly - change (mediawiki/core)

2016-07-15 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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

Change subject: AuthManager: Break AuthPlugin::addUser more explicitly
..

AuthManager: Break AuthPlugin::addUser more explicitly

AuthPlugin::addUser() is intended to only touch the external database
without creating a local user, which isn't possible under AuthManager
without reproducing too much of AuthManager's account creation methods
(and risking breaking things in even more obscure ways) to be
worthwhile.

As it is, either this will fail because the caller already called
User::addToDatabase() or the caller's subsequent User::addToDatabase()
call will fail because we're creating the local user.

So instead, let's just throw an exception unconditionally instead of
pretending it could work.

Bug: T137843
Change-Id: I8a439ea190c752a7fc49de5617e2c64c314c38f0
(cherry picked from commit 677c66b31ecfadc48733396ed7c729847875fe21)
---
M includes/auth/AuthManagerAuthPlugin.php
1 file changed, 7 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/299175/1

diff --git a/includes/auth/AuthManagerAuthPlugin.php 
b/includes/auth/AuthManagerAuthPlugin.php
index 8d85b44..8845858 100644
--- a/includes/auth/AuthManagerAuthPlugin.php
+++ b/includes/auth/AuthManagerAuthPlugin.php
@@ -161,35 +161,13 @@
}
 
public function addUser( $user, $password, $email = '', $realname = '' 
) {
-   global $wgUser;
-
-   $data = [
-   'username' => $user->getName(),
-   'password' => $password,
-   'retype' => $password,
-   'email' => $email,
-   'realname' => $realname,
-   ];
-   if ( $this->domain !== null && $this->domain !== '' ) {
-   $data['domain'] = $this->domain;
-   }
-   $reqs = AuthManager::singleton()->getAuthenticationRequests( 
AuthManager::ACTION_CREATE );
-   $reqs = AuthenticationRequest::loadRequestsFromSubmission( 
$reqs, $data );
-
-   $res = AuthManager::singleton()->beginAccountCreation( $wgUser, 
$reqs, 'null:' );
-   switch ( $res->status ) {
-   case AuthenticationResponse::PASS:
-   return true;
-   case AuthenticationResponse::FAIL:
-   // Hope it's not a PreAuthenticationProvider 
that failed...
-   $msg = $res->message instanceof \Message ? 
$res->message : new \Message( $res->message );
-   $this->logger->info( __METHOD__ . ': 
Authentication failed: ' . $msg->plain() );
-   return false;
-   default:
-   throw new \BadMethodCallException(
-   'AuthManager does not support such 
simplified account creation'
-   );
-   }
+   throw new \BadMethodCallException(
+   'Creation of users via AuthPlugin is not supported with 
'
+   . 'AuthManager. Generally, user creation should be left 
to either '
+   . 'Special:CreateAccount, auto-creation when triggered 
by a '
+   . 'SessionProvider or PrimaryAuthenticationProvider, or 
'
+   . 'User::newSystemUser().'
+   );
}
 
public function strict() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a439ea190c752a7fc49de5617e2c64c314c38f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Anomie 

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


[MediaWiki-commits] [Gerrit] Followup to I23e06ea5d - change (operations/puppet)

2016-07-15 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Followup to I23e06ea5d
..


Followup to I23e06ea5d

Typofix

Change-Id: I1abe963929ffbf51ad2ce31b26d953044d28814a
---
M modules/toollabs/files/maintain-kubeusers
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/toollabs/files/maintain-kubeusers 
b/modules/toollabs/files/maintain-kubeusers
index 8555d96..af62ebb 100755
--- a/modules/toollabs/files/maintain-kubeusers
+++ b/modules/toollabs/files/maintain-kubeusers
@@ -254,7 +254,7 @@
 """
 homepath = os.path.join('/data', 'project', user.name)
 os.makedirs(homepath, mode=0o775, exist_ok=False)
-os.chmod(homepath, 0o775 | stat.I_SGID)
+os.chmod(homepath, 0o775 | stat.S_ISGID)
 os.chown(homepath, int(user.id), int(user.id))
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1abe963929ffbf51ad2ce31b26d953044d28814a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Followup to I23e06ea5d - change (operations/puppet)

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

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

Change subject: Followup to I23e06ea5d
..

Followup to I23e06ea5d

Typofix

Change-Id: I1abe963929ffbf51ad2ce31b26d953044d28814a
---
M modules/toollabs/files/maintain-kubeusers
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/299174/1

diff --git a/modules/toollabs/files/maintain-kubeusers 
b/modules/toollabs/files/maintain-kubeusers
index 8555d96..af62ebb 100755
--- a/modules/toollabs/files/maintain-kubeusers
+++ b/modules/toollabs/files/maintain-kubeusers
@@ -254,7 +254,7 @@
 """
 homepath = os.path.join('/data', 'project', user.name)
 os.makedirs(homepath, mode=0o775, exist_ok=False)
-os.chmod(homepath, 0o775 | stat.I_SGID)
+os.chmod(homepath, 0o775 | stat.S_ISGID)
 os.chown(homepath, int(user.id), int(user.id))
 
 

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

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

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


[MediaWiki-commits] [Gerrit] BsAboutBlueSpice: Using the new BsExtensionManager and an ex... - change (mediawiki...BlueSpiceExtensions)

2016-07-15 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review.

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

Change subject: BsAboutBlueSpice: Using the new BsExtensionManager and an 
extension.json
..

BsAboutBlueSpice: Using the new BsExtensionManager and an extension.json

Change-Id: I74a8cd44e688c237d4f9ad856c4b429d04fb
---
M AboutBlueSpice/AboutBlueSpice.setup.php
A AboutBlueSpice/extension.json
2 files changed, 32 insertions(+), 20 deletions(-)


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

diff --git a/AboutBlueSpice/AboutBlueSpice.setup.php 
b/AboutBlueSpice/AboutBlueSpice.setup.php
index 26ac218..8bc6fdf 100644
--- a/AboutBlueSpice/AboutBlueSpice.setup.php
+++ b/AboutBlueSpice/AboutBlueSpice.setup.php
@@ -1,23 +1,7 @@
  __DIR__ . '/resources',
-   'remoteExtPath' => 'BlueSpiceExtensions/AboutBlueSpice/resources'
+wfLoadExtension( 'BlueSpiceExtensions/AboutBlueSpice' );
+$bsgBSExtensions['AboutBlueSpice'] = array(
+   'className' => 'AboutBlueSpice',
+   'extPath' => '/BlueSpiceExtensions/AboutBlueSpice'
 );
-
-$wgResourceModules['ext.bluespice.aboutbluespice'] = array (
-   'styles' => 'bluespice.aboutbluespice.css',
-   'position' => 'top'
-) + $aResourceModuleTemplate;
-
-unset( $aResoureModuleTemplate );
diff --git a/AboutBlueSpice/extension.json b/AboutBlueSpice/extension.json
new file mode 100644
index 000..392e53a
--- /dev/null
+++ b/AboutBlueSpice/extension.json
@@ -0,0 +1,28 @@
+{
+   "SpecialPages": {
+   "AboutBlueSpice": "SpecialAboutBlueSpice"
+   },
+   "MessagesDirs": {
+   "AboutBlueSpice": [
+   "i18n"
+   ]
+   },
+   "ExtensionMessagesFiles": {
+   "AboutBlueSpiceAlias": 
"includes/specials/SpecialAboutBlueSpice.alias.php"
+   },
+   "AutoloadClasses": {
+   "AboutBlueSpice": "AboutBlueSpice.class.php",
+   "SpecialAboutBlueSpice": 
"includes/specials/SpecialAboutBlueSpice.class.php"
+   },
+   "ResourceModules": {
+   "ext.bluespice.aboutbluespice": {
+   "styles": "bluespice.aboutbluespice.css",
+   "position": "top"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "resources",
+   "remoteExtPath": "BlueSpiceExtensions/AboutBlueSpice/resources"
+   },
+   "manifest_version": 1
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74a8cd44e688c237d4f9ad856c4b429d04fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth 

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


[MediaWiki-commits] [Gerrit] Hygiene: rename string resource - change (apps...wikipedia)

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

Change subject: Hygiene: rename string resource
..


Hygiene: rename string resource

FeedActivity was removed. Update string naming to use Fragment.

Change-Id: Ic7f95b691175693c215487a543872f8acf08bdc4
---
M app/src/main/res/layout/fragment_feed.xml
M app/src/main/res/values/strings_no_translate.xml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/app/src/main/res/layout/fragment_feed.xml 
b/app/src/main/res/layout/fragment_feed.xml
index b7b0a9c..8464586 100644
--- a/app/src/main/res/layout/fragment_feed.xml
+++ b/app/src/main/res/layout/fragment_feed.xml
@@ -44,7 +44,7 @@
 android:id="@+id/feed_toolbar"
 android:layout_width="match_parent"
 android:layout_height="?attr/actionBarSize"
-app:title="@string/activity_feed_title"
+app:title="@string/fragment_feed_title"
 app:background="@color/main_toolbar_background"
 app:layout_collapseMode="pin" />
 
diff --git a/app/src/main/res/values/strings_no_translate.xml 
b/app/src/main/res/values/strings_no_translate.xml
index c101472..7527110 100644
--- a/app/src/main/res/values/strings_no_translate.xml
+++ b/app/src/main/res/values/strings_no_translate.xml
@@ -41,7 +41,7 @@
 
 
 
-@string/feed
+@string/feed
 @string/feed
 @string/reading_list_item_delete_undo
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7f95b691175693c215487a543872f8acf08bdc4
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] tools: Set homedir permissions properly in kube-maintainusers - change (operations/puppet)

2016-07-15 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Set homedir permissions properly in kube-maintainusers
..


tools: Set homedir permissions properly in kube-maintainusers

Otherwise if it created homedirs it was setting them to be
readable and writeable only by root

- Stops toolswatcher, remove all files related
- Reduce runtime sleep from 5min to 1min - this puts a
  bit more load on the LDAP servers but is probably ok
  because we can stop toolswatcher

Bug: T140460
Change-Id: I23e06ea5de8115904e606b1580aa3f7391157559
---
M modules/role/manifests/labs/tools/services.pp
M modules/toollabs/files/maintain-kubeusers
D modules/toollabs/files/toolwatcher
D modules/toollabs/files/toolwatcher.conf
D modules/toollabs/manifests/toolwatcher.pp
5 files changed, 15 insertions(+), 83 deletions(-)

Approvals:
  BryanDavis: Looks good to me, but someone else must approve
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/role/manifests/labs/tools/services.pp 
b/modules/role/manifests/labs/tools/services.pp
index 91803cf..cad62fb 100644
--- a/modules/role/manifests/labs/tools/services.pp
+++ b/modules/role/manifests/labs/tools/services.pp
@@ -37,10 +37,6 @@
 active => ($::fqdn == $active_host),
 }
 
-class { 'toollabs::toolwatcher':
-active => ($::fqdn == $active_host)
-}
-
 class { 'toollabs::admin_web_updater':
 active => ($::fqdn == $active_host)
 }
diff --git a/modules/toollabs/files/maintain-kubeusers 
b/modules/toollabs/files/maintain-kubeusers
index 6ba6a47..8555d96 100755
--- a/modules/toollabs/files/maintain-kubeusers
+++ b/modules/toollabs/files/maintain-kubeusers
@@ -22,6 +22,7 @@
 import random
 import time
 import csv
+import stat
 
 TOOL_ALLOWED_RESOURCES = [
 'pods',
@@ -201,7 +202,7 @@
 
 def write_kubeconfig(user, master):
 """
-Write an appropriate .kube/config for given user to access given master
+Write an appropriate .kube/config for given user to access given master.
 
 See http://kubernetes.io/docs/user-guide/kubeconfig-file/ for format
 """
@@ -232,7 +233,7 @@
 }
 dirpath = os.path.join('/data', 'project', user.name, '.kube')
 path = os.path.join(dirpath, 'config')
-os.makedirs(dirpath, exist_ok=True)
+os.makedirs(dirpath, mode=0o775, exist_ok=False)
 f = os.open(path, os.O_CREAT | os.O_WRONLY | os.O_NOFOLLOW)
 try:
 os.write(f, json.dumps(config, indent=4, 
sort_keys=True).encode('utf-8'))
@@ -245,6 +246,16 @@
 raise
 finally:
 os.close(f)
+
+
+def create_homedir(user):
+"""
+Create homedirs for new users
+"""
+homepath = os.path.join('/data', 'project', user.name)
+os.makedirs(homepath, mode=0o775, exist_ok=False)
+os.chmod(homepath, 0o775 | stat.I_SGID)
+os.chown(homepath, int(user.id), int(user.id))
 
 
 def create_namespace(user):
@@ -285,7 +296,7 @@
 argparser.add_argument('--project', help='Project name to fetch LDAP users 
from',
default='tools')
 argparser.add_argument('--interval', help='Seconds between between runs',
-   default=300)
+   default=60)
 argparser.add_argument('--once', help='Run once and exit',
action='store_true')
 argparser.add_argument('kube_master_url', help='Full URL of Kubernetes 
Master')
@@ -325,6 +336,7 @@
 for uid in new_tools:
 if uid in tools:
 tools[uid].token = generate_pass(64)
+create_homedir(tools[uid])
 write_kubeconfig(tools[uid], args.kube_master_url)
 create_namespace(tools[uid])
 cur_users[uid] = tools[uid]
diff --git a/modules/toollabs/files/toolwatcher 
b/modules/toollabs/files/toolwatcher
deleted file mode 100755
index 35d0d50..000
--- a/modules/toollabs/files/toolwatcher
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Copyright © 2013 Marc-André Pelletier 
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-cd /data/project
-export HOME=/root
-PREFIX=$(cat /etc/wmflabs-project)
-
-while true; do
-# Iterate over all service groups 

[MediaWiki-commits] [Gerrit] [Beta] Change-prop: Adjust the ORES URI in BetaCluster - change (operations/puppet)

2016-07-15 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: [Beta] Change-prop: Adjust the ORES URI in BetaCluster
..


[Beta] Change-prop: Adjust the ORES URI in BetaCluster

Change-Id: If67925417967a00ba278ce37e5527382ec61bab2
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 826591d..d839122 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -18,6 +18,7 @@
 citoid::zotero_port: 1969
 changeprop::purge_host: deployment-cache-text04.deployment-prep.eqiad.wmflabs
 changeprop::concurrency: 20
+changeprop::ores_uri: 
http://deployment-sca03.deployment-prep.eqiad.wmflabs:8081
 graphoid::allowed_domains:
   http:
 - wmflabs.org

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If67925417967a00ba278ce37e5527382ec61bab2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Mark Bergsma 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix crash after clicking Random card - change (apps...wikipedia)

2016-07-15 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Fix crash after clicking Random card
..

Fix crash after clicking Random card

Our output format for /page/random/title is now the standard restbase
/page/title/{title} format.  We were looking for a normalizedtitle
property, but this response doesn't have one.  Luckily, a non-normailzed
title is fine here for our purposes.

Change-Id: I51a794a39887a2b6e7f9413dc010eb64166e95dd
---
M app/src/main/java/org/wikipedia/random/RandomSummaryService.java
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/java/org/wikipedia/random/RandomSummaryService.java 
b/app/src/main/java/org/wikipedia/random/RandomSummaryService.java
index cc28eb7..18e6556 100644
--- a/app/src/main/java/org/wikipedia/random/RandomSummaryService.java
+++ b/app/src/main/java/org/wikipedia/random/RandomSummaryService.java
@@ -41,7 +41,7 @@
 CardPageItem item = response.body();
 String namespace = item.namespace() == null ? null
 : item.namespace().toLegacyString();
-PageTitle title = new PageTitle(namespace, 
item.normalizedTitle(), site);
+PageTitle title = new PageTitle(namespace, item.title(), 
site);
 cb.onSuccess(title);
 } else {
 L.v(response.message());

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

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

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


[MediaWiki-commits] [Gerrit] Use StatsdDataFactory service instead of deprecated RequestC... - change (mediawiki...Echo)

2016-07-15 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review.

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

Change subject: Use StatsdDataFactory service instead of deprecated 
RequestContext method
..

Use StatsdDataFactory service instead of deprecated RequestContext method

Change-Id: Ie291146f67b525d891614c23b17052500fc8aa51
---
M includes/DiscussionParser.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index 571ed87..6242b18 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -1,5 +1,7 @@
 getStats();
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
 
foreach ( $links[NS_USER] as $dbk => $page_id ) {
$user = User::newFromName( $dbk );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie291146f67b525d891614c23b17052500fc8aa51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 

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


[MediaWiki-commits] [Gerrit] BsExtensions: Replaced $GLOBALS['wgAutoloadClasses'] with $w... - change (mediawiki...BlueSpiceExtensions)

2016-07-15 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review.

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

Change subject: BsExtensions: Replaced $GLOBALS['wgAutoloadClasses'] with 
$wgAutoloadClasses
..

BsExtensions: Replaced $GLOBALS['wgAutoloadClasses'] with $wgAutoloadClasses

* $GLOBALS['wgAutoloadClasses'] could not be detected by 
ConvertExtensionToRegistration maintenance script

Change-Id: If6a7f01004b280c0edd54626c75123ade5f3c5df
---
M AboutBlueSpice/AboutBlueSpice.setup.php
M ArticleInfo/ArticleInfo.setup.php
M Authors/Authors.setup.php
M Avatars/Avatars.setup.php
M Blog/Blog.setup.php
M BlueSpiceProjectFeedbackHelper/BlueSpiceProjectFeedbackHelper.setup.php
M CSyntaxHighlight/CSyntaxHighlight.setup.php
M Checklist/Checklist.setup.php
M ContextMenu/ContextMenu.setup.php
M CountThings/CountThings.setup.php
M Dashboards/Dashboards.setup.php
M Emoticons/Emoticons.setup.php
M ExtendedEditBar/ExtendedEditBar.setup.php
M ExtendedSearch/ExtendedSearch.setup.php
M ExtensionInfo/ExtensionInfo.setup.php
M Flexiskin/Flexiskin.setup.php
M FormattingHelp/FormattingHelp.setup.php
M GroupManager/GroupManager.setup.php
M HideTitle/HideTitle.setup.php
M InsertCategory/InsertCategory.setup.php
M InsertFile/InsertFile.setup.php
M InsertLink/InsertLink.setup.php
M InsertMagic/InsertMagic.setup.php
M InterWikiLinks/InterWikiLinks.setup.php
M NamespaceCss/NamespaceCss.setup.php
M NamespaceManager/NamespaceManager.setup.php
M PageAccess/PageAccess.setup.php
M PageTemplates/PageTemplates.setup.php
M PagesVisited/PagesVisited.setup.php
M Preferences/Preferences.setup.php
M RSSFeeder/RSSFeeder.setup.php
M RSSStandards/RSSStandards.setup.php
M Readers/Readers.setup.php
M ResponsibleEditors/ResponsibleEditors.setup.php
M Review/Review.setup.php
M SaferEdit/SaferEdit.setup.php
M SecureFileStore/SecureFileStore.setup.php
M ShoutBox/ShoutBox.setup.php
M SmartList/SmartList.setup.php
M StateBar/StateBar.setup.php
M Statistics/Statistics.setup.php
M TopMenuBarCustomizer/TopMenuBarCustomizer.setup.php
M UEModulePDF/UEModulePDF.setup.php
M UniversalExport/UniversalExport.setup.php
M UserManager/UserManager.setup.php
M UserPreferences/UserPreferences.setup.php
M UserSidebar/UserSidebar.setup.php
M VisualEditor/VisualEditor.setup.php
M WantedArticle/WantedArticle.setup.php
M WatchList/WatchList.setup.php
M WhoIsOnline/WhoIsOnline.setup.php
M WidgetBar/WidgetBar.setup.php
M WikiAdmin/WikiAdmin.setup.php
M examples/BoilerPlate/BoilerPlate.setup.php
54 files changed, 70 insertions(+), 70 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/68/299168/1

diff --git a/AboutBlueSpice/AboutBlueSpice.setup.php 
b/AboutBlueSpice/AboutBlueSpice.setup.php
index 292c7f5..26ac218 100644
--- a/AboutBlueSpice/AboutBlueSpice.setup.php
+++ b/AboutBlueSpice/AboutBlueSpice.setup.php
@@ -2,7 +2,7 @@
 
 BsExtensionManager::registerExtension( 'AboutBlueSpice', BsRUNLEVEL::FULL | 
BsRUNLEVEL::REMOTE );
 
-$GLOBALS['wgAutoloadClasses']['AboutBlueSpice'] = __DIR__ . 
'/AboutBlueSpice.class.php';
+$wgAutoloadClasses['AboutBlueSpice'] = __DIR__ . '/AboutBlueSpice.class.php';
 $wgAutoloadClasses['SpecialAboutBlueSpice'] = __DIR__ . 
'/includes/specials/SpecialAboutBlueSpice.class.php';
 
 $wgMessagesDirs['AboutBlueSpice'] = __DIR__ . '/i18n';
diff --git a/ArticleInfo/ArticleInfo.setup.php 
b/ArticleInfo/ArticleInfo.setup.php
index d958072..26ac3d1 100644
--- a/ArticleInfo/ArticleInfo.setup.php
+++ b/ArticleInfo/ArticleInfo.setup.php
@@ -2,7 +2,7 @@
 
 BsExtensionManager::registerExtension('ArticleInfo', 
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE);
 
-$GLOBALS['wgAutoloadClasses']['ArticleInfo'] = __DIR__ . 
'/ArticleInfo.class.php';
+$wgAutoloadClasses['ArticleInfo'] = __DIR__ . '/ArticleInfo.class.php';
 
 $wgMessagesDirs['ArticleInfo'] = __DIR__ . '/i18n';
 
diff --git a/Authors/Authors.setup.php b/Authors/Authors.setup.php
index 2142422..7da2dcd 100644
--- a/Authors/Authors.setup.php
+++ b/Authors/Authors.setup.php
@@ -13,6 +13,6 @@
'remoteBasePath' => &$GLOBALS['wgScriptPath']
 );
 
-$GLOBALS['wgAutoloadClasses']['Authors'] = __DIR__ . '/Authors.class.php';
+$wgAutoloadClasses['Authors'] = __DIR__ . '/Authors.class.php';
 $wgAutoloadClasses['ViewAuthors'] = __DIR__ . '/views/view.Authors.php';
 $wgAutoloadClasses['ViewAuthorsUserPageProfileImageSetting'] = __DIR__ . 
'/views/view.AuthorsUserPageProfileImageSetting.php';
\ No newline at end of file
diff --git a/Avatars/Avatars.setup.php b/Avatars/Avatars.setup.php
index 1b2d280..2fb5e5c 100644
--- a/Avatars/Avatars.setup.php
+++ b/Avatars/Avatars.setup.php
@@ -4,7 +4,7 @@
 
 $wgMessagesDirs['Avatars'] = __DIR__ . '/i18n';
 
-$GLOBALS['wgAutoloadClasses']['Avatars'] = __DIR__ . '/Avatars.class.php';
+$wgAutoloadClasses['Avatars'] = __DIR__ . '/Avatars.class.php';
 
 $wgHooks['BeforePageDisplay'][] = "Avatars::onBeforePageDisplay";
 
diff --git a/Blog/Blog.setup.php b/Blog/Blog.setup.php
index 

[MediaWiki-commits] [Gerrit] Replace DonationInterface 1_26 tests with 1_27 tests - change (integration/config)

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

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

Change subject: Replace DonationInterface 1_26 tests with 1_27 tests
..

Replace DonationInterface 1_26 tests with 1_27 tests

Change-Id: Id8e403a25ef4789483ef2e25cd95d111cb229717
---
M jjb/wm-fundraising.yaml
M zuul/layout.yaml
2 files changed, 31 insertions(+), 5 deletions(-)


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

diff --git a/jjb/wm-fundraising.yaml b/jjb/wm-fundraising.yaml
index 4ed3358..9f2d6dd 100644
--- a/jjb/wm-fundraising.yaml
+++ b/jjb/wm-fundraising.yaml
@@ -64,7 +64,6 @@
 name: donationinterface-fundraising-branches
 branch:
  - REL1_25
- - REL1_26
 jobs:
  - mwext-donationinterfacecore-{branch}-testextension-zend53:
 
@@ -88,6 +87,33 @@
  - mw-teardown-mysql
  - archive-log-dir
 
+- project:
+name: donationinterface-fundraising-branches-php55
+branch:
+ - REL1_27
+jobs:
+ - mwext-donationinterfacecore-{branch}-testextension-zend55:
+
+- job-template:
+name: 'mwext-donationinterfacecore-{branch}-testextension-zend55'
+node: 'contintLabsSlave && phpflavor-php55'
+concurrent: true
+properties:
+ - throttle-one-per-node
+triggers:
+ - zuul
+builders:
+ - assert-phpflavor:
+ phpflavor: 'php55'
+ - prepare-mediawiki-branch:
+ branch: '{branch}'
+ - mw-run-phpunit-allexts
+publishers:
+ - junit:
+results: 'log/junit*.xml'
+ - mw-teardown-mysql
+ - archive-log-dir
+
 # Parameter:
 # - branch: indicated branch to fall back to / prefer.
 - builder:
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e104479..70048c4 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -873,8 +873,8 @@
   - name: mediawiki-core-jsduck-publish
 branch: ^(REL.*|master)$
 
-  # TODO make this voting once fundraising is on mw 1.26 and remove 1.25 test
-  - name: mwext-donationinterfacecore-REL1_26-testextension-zend53
+  # TODO make this voting once fundraising is on mw 1.27 and remove 1.25 test
+  - name: mwext-donationinterfacecore-REL1_27-testextension-zend55
 voting: false
 
   # Job to ease reviews of MW-CS changes
@@ -2955,10 +2955,10 @@
   - jshint
 test:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
-  - mwext-donationinterfacecore-REL1_26-testextension-zend53
+  - mwext-donationinterfacecore-REL1_27-testextension-zend55
 gate-and-submit:
   - mwext-donationinterfacecore-REL1_25-testextension-zend53
-  - mwext-donationinterfacecore-REL1_26-testextension-zend53
+  - mwext-donationinterfacecore-REL1_27-testextension-zend55
 
   - name: mediawiki/extensions/DoubleWiki
 template:

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

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

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


[MediaWiki-commits] [Gerrit] [Beta] Change-prop: Adjust the ORES URI in BetaCluster - change (operations/puppet)

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

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

Change subject: [Beta] Change-prop: Adjust the ORES URI in BetaCluster
..

[Beta] Change-prop: Adjust the ORES URI in BetaCluster

Change-Id: If67925417967a00ba278ce37e5527382ec61bab2
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/299169/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 826591d..d839122 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -18,6 +18,7 @@
 citoid::zotero_port: 1969
 changeprop::purge_host: deployment-cache-text04.deployment-prep.eqiad.wmflabs
 changeprop::concurrency: 20
+changeprop::ores_uri: 
http://deployment-sca03.deployment-prep.eqiad.wmflabs:8081
 graphoid::allowed_domains:
   http:
 - wmflabs.org

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If67925417967a00ba278ce37e5527382ec61bab2
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] Revert "ext.urlShortener.toolbar: Remove dependency on OOjs UI" - change (mediawiki...UrlShortener)

2016-07-15 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Revert "ext.urlShortener.toolbar: Remove dependency on OOjs UI"
..

Revert "ext.urlShortener.toolbar: Remove dependency on OOjs UI"

This reverts commit f26f740095beae6294f228e0a97b212937150a87.

Change-Id: I60635a5077330d0fcde46d73831149939ca9314e
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A modules/ext.urlShortener.popup.less
M modules/ext.urlShortener.toolbar.js
D modules/ext.urlShortener.toolbar.less
6 files changed, 59 insertions(+), 24 deletions(-)


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

diff --git a/extension.json b/extension.json
index 655e901..9941738 100644
--- a/extension.json
+++ b/extension.json
@@ -75,15 +75,16 @@
"modules/ext.urlShortener.toolbar.js"
],
"styles": [
-   "modules/ext.urlShortener.toolbar.less"
+   "modules/ext.urlShortener.popup.less"
],
"messages": [
"urlshortener-url-input-submitting",
-   "urlshortener-failed-try-again",
"urlshortener-shortened-url-label",
"urlshortener-ratelimit"
],
"dependencies": [
+   "oojs-ui-core",
+   "oojs-ui-widgets",
"mediawiki.api"
]
}
diff --git a/i18n/en.json b/i18n/en.json
index d519683..f6ec43f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,7 +20,6 @@
"urlshortener-toolbox": "Get shortened URL",
"urlshortener-error-badports": "URLs that contain ports are not allowed 
to be shortened",
"urlshortener-error-nouserpass": "URLs that contain a username or 
password are not allowed to be shortened",
-   "urlshortener-failed-try-again": "Failed. Try again?",
"urlshortener-disabled": "Creating new short URLs is temporarily 
disabled.",
"apihelp-shortenurl-description": "Shorten a long URL into a shorter 
one.",
"apihelp-shortenurl-param-url": "URL to be shortened.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4ff39e4..628e636 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -21,7 +21,6 @@
"urlshortener-toolbox": "Text of link in toolbox to get shortened URL",
"urlshortener-error-badports": "Error message shown when the URL cannot 
be shortened because it contains a port (e.g. http://example.org:90/path)",
"urlshortener-error-nouserpass": "Error message shown when the URL 
cannot be shortened because it contains a username or password (e.g. 
http://user:passw...@example.org/)",
-   "urlshortener-failed-try-again": "Generic failure message with option 
to try again",
"urlshortener-disabled": "Error message shown when the extension is 
configured in read-only mode.",
"apihelp-shortenurl-description": 
"{{doc-apihelp-description|shortenurl}}",
"apihelp-shortenurl-param-url": "{{doc-apihelp-param|shortenurl|url}}",
diff --git a/modules/ext.urlShortener.popup.less 
b/modules/ext.urlShortener.popup.less
new file mode 100644
index 000..c674357
--- /dev/null
+++ b/modules/ext.urlShortener.popup.less
@@ -0,0 +1,4 @@
+.ext-urlshortener-popup {
+   left: 100px;
+   z-index: 3; // Monobook puts #content at 2
+}
\ No newline at end of file
diff --git a/modules/ext.urlShortener.toolbar.js 
b/modules/ext.urlShortener.toolbar.js
index 42bac98..07d921b 100644
--- a/modules/ext.urlShortener.toolbar.js
+++ b/modules/ext.urlShortener.toolbar.js
@@ -1,30 +1,65 @@
-( function ( mw, $ ) {
+( function ( mw, $, OO ) {
$( function () {
-   var shortenUrlListItem = $( '#t-urlshortener' ),
-   api = new mw.Api();
+   var popup,
+   popupLink = $( '#t-urlshortener' ),
+   POPUP_WIDTH = 300,
+   POPUP_HEIGHT = 50,
+   api = new mw.Api(),
+   progress = new OO.ui.ProgressBarWidget(),
+   fieldset = new OO.ui.FieldsetLayout();
 
-   shortenUrlListItem.on( 'click', function () {
-   var link = $( this ).find( 'a' );
-   link.text( mw.msg( 'urlshortener-url-input-submitting' 
) );
+   fieldset.addItems( [
+   new OO.ui.FieldLayout( progress,
+   { label: mw.msg( 
'urlshortener-url-input-submitting' ), align: 'top' }
+   )
+   ] );
 
+   /**
+* @param {OO.ui.Widget} widget
+*/
+

[MediaWiki-commits] [Gerrit] Hygiene: use SettingsActivity.newIntent() - change (apps...wikipedia)

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

Change subject: Hygiene: use SettingsActivity.newIntent()
..


Hygiene: use SettingsActivity.newIntent()

Add SettingsActivity.newIntent() and use newIntent() pattern.

Change-Id: I043c4d1ffb613d75d77677e93cd932d0d724db49
---
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
M app/src/main/java/org/wikipedia/settings/SettingsActivity.java
2 files changed, 15 insertions(+), 4 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java 
b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
index fcd5e25..03acb4c 100644
--- a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
+++ b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
@@ -227,17 +227,20 @@
 }
 
 private void launchSettingsActivity() {
-activity.closeNavDrawer();
-activity.startActivityForResult(new Intent().setClass(app, 
SettingsActivity.class),
+startActivityForResult(SettingsActivity.newIntent(app),
 SettingsActivity.ACTIVITY_REQUEST_SHOW_SETTINGS);
 }
 
 private void launchLoginActivity() {
-activity.closeNavDrawer();
-activity.startActivityForResult(LoginActivity.newIntent(app, 
LoginFunnel.SOURCE_NAV),
+startActivityForResult(LoginActivity.newIntent(app, 
LoginFunnel.SOURCE_NAV),
 LoginActivity.REQUEST_LOGIN);
 }
 
+private void startActivityForResult(@NonNull Intent intent, int reqCode) {
+activity.closeNavDrawer();
+activity.startActivityForResult(intent, reqCode);
+}
+
 private void logOut() {
 app.logOut();
 activity.closeNavDrawer();
diff --git a/app/src/main/java/org/wikipedia/settings/SettingsActivity.java 
b/app/src/main/java/org/wikipedia/settings/SettingsActivity.java
index 5356157..c21a7b3 100644
--- a/app/src/main/java/org/wikipedia/settings/SettingsActivity.java
+++ b/app/src/main/java/org/wikipedia/settings/SettingsActivity.java
@@ -1,11 +1,19 @@
 package org.wikipedia.settings;
 
+import android.content.Context;
+import android.content.Intent;
+import android.support.annotation.NonNull;
+
 import org.wikipedia.activity.SingleFragmentActivity;
 
 public class SettingsActivity extends SingleFragmentActivity 
{
 public static final int ACTIVITY_REQUEST_SHOW_SETTINGS = 1;
 public static final int ACTIVITY_RESULT_LANGUAGE_CHANGED = 1;
 
+public static Intent newIntent(@NonNull Context ctx) {
+return new Intent(ctx, SettingsActivity.class);
+}
+
 @Override
 public SettingsFragment createFragment() {
 return SettingsFragment.newInstance();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I043c4d1ffb613d75d77677e93cd932d0d724db49
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add extendSearchParams helper function - change (mediawiki...MobileFrontend)

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

Change subject: Add extendSearchParams helper function
..


Add extendSearchParams helper function

DRY up the Search-, Nearby-, and WatchListGateway gateway classes by
extracting common and Wikibase-related API query parameter generation
logic to the mobile.search.util/extendSearchParams MF module.

Bug: T138788
Change-Id: Icafaac042c1a31a10c996b3f429b47f05c9adef5
---
M extension.json
M resources/mobile.nearby/NearbyGateway.js
M resources/mobile.search.api/SearchGateway.js
A resources/mobile.search.util/extendSearchParams.js
M resources/mobile.watchlist/WatchListGateway.js
A tests/qunit/mobile.search.util/test_extendSearchParams.js
6 files changed, 197 insertions(+), 43 deletions(-)

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



diff --git a/extension.json b/extension.json
index 9bbefd5..da337ca 100644
--- a/extension.json
+++ b/extension.json
@@ -805,6 +805,18 @@
"4": "mobile-frontend-search-feedback-link-text"
}
},
+   "mobile.search.util": {
+   "targets": [
+   "mobile",
+   "desktop"
+   ],
+   "dependencies": [
+   "mobile.startup"
+   ],
+   "scripts": [
+   
"resources/mobile.search.util/extendSearchParams.js"
+   ]
+   },
"mobile.search.api": {
"targets": [
"mobile",
@@ -812,7 +824,8 @@
],
"dependencies": [
"mobile.startup",
-   "mediawiki.Title"
+   "mediawiki.Title",
+   "mobile.search.util"
],
"scripts": [
"resources/mobile.search.api/SearchGateway.js"
@@ -1145,7 +1158,8 @@
"mobile.startup",
"mobile.drawers",
"mobile.ajax",
-   "mobile.toast"
+   "mobile.toast",
+   "mobile.search.util"
],
"scripts": [

"resources/mobile.watchstar/WatchstarGateway.js",
@@ -1217,7 +1231,8 @@
"mediawiki.language",
"mobile.pagelist.scripts",
"mobile.foreignApi",
-   "mobile.messageBox"
+   "mobile.messageBox",
+   "mobile.search.util"
],
"messages": [
"mobile-frontend-nearby-distance",
diff --git a/resources/mobile.nearby/NearbyGateway.js 
b/resources/mobile.nearby/NearbyGateway.js
index 18a2efa..2515e6e 100644
--- a/resources/mobile.nearby/NearbyGateway.js
+++ b/resources/mobile.nearby/NearbyGateway.js
@@ -1,7 +1,8 @@
 ( function ( M, $ ) {
var limit = 50,
Page = M.require( 'mobile.startup/Page' ),
-   ns = mw.config.get( 'wgMFContentNamespace' );
+   ns = mw.config.get( 'wgMFContentNamespace' ),
+   extendSearchParams = M.require( 
'mobile.search.util/extendSearchParams' );
 
/**
 * FIXME: Api should surely know this and return it in response to save 
us the hassle
@@ -122,24 +123,15 @@
d = $.Deferred(),
self = this;
 
-   requestParams = $.extend( {
+   requestParams = extendSearchParams( 'nearby', {
colimit: 'max',
-   prop: [ 'coordinates' ].concat( mw.config.get( 
'wgMFQueryPropModules' ) ),
+   prop: [ 'coordinates' ],
generator: 'geosearch',
ggsradius: range,
ggsnamespace: ns,
ggslimit: limit,
formatversion: 2
-   }, params, mw.config.get( 'wgMFSearchAPIParams' ) );
-
-   // Are Wikibase descriptions enabled?
-   if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).nearby ) {
-   if ( $.inArray( 'pageterms', params.prop ) === 
-1 ) {
-   requestParams.prop.push( 'pageterms' );
-   }
-
-   

[MediaWiki-commits] [Gerrit] Final order of feed cards. - change (apps...wikipedia)

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

Change subject: Final order of feed cards.
..


Final order of feed cards.

Change-Id: Ibc1af8bca678708843875641bf1ab6cc78d44950
---
M app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java 
b/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
index 19c68fe..01f34b2 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
@@ -24,12 +24,14 @@
 init();
 }
 
-addPendingClient(new BecauseYouReadClient());
-addPendingClient(new ContinueReadingClient());
 addPendingClient(new AggregatedFeedContentClient());
+addPendingClient(new ContinueReadingClient());
+if (age == 0) {
+addPendingClient(new MainPageClient());
+}
+addPendingClient(new BecauseYouReadClient());
 if (age == 0) {
 addPendingClient(new RandomClient());
-addPendingClient(new MainPageClient());
 }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc1af8bca678708843875641bf1ab6cc78d44950
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Cleanup localuser records when wiki is missing data - change (mediawiki...CentralAuth)

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

Change subject: Cleanup localuser records when wiki is missing data
..


Cleanup localuser records when wiki is missing data

Under some (undefined) circumstances the localuser table can record that
a user has been attached to a wiki but the wiki's own db is missing
a record for the user. There is a maintenance script to find and cleanup
these dangling records, but that's not of much help for a user who is
effected as they will not be able to authenticate to any wiki until the
next time someone runs the script.

Add logic to catch this problem in the most likely places and proactively
clean up the dangling attachment record. The cleanup is done by running
a job which cleans up the record in a safe manner and clears caches as
appropriate. Using a job makes this cleanup safe for GET requests.

The fact that the error was encountered is logged as this is not
a desired state. The logging uses the PSR-3 logger directly so that
structured log data and a stack trace can be attached.

Bug: T119736
Change-Id: I3d219cfff0dc835faa72d5fe72a80e57235dcb04
---
M extension.json
M includes/CentralAuthHooks.php
A includes/CentralAuthUnattachUserJob.php
M includes/CentralAuthUser.php
A includes/LocalUserNotFoundException.php
5 files changed, 147 insertions(+), 34 deletions(-)

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



diff --git a/extension.json b/extension.json
index 769b703..2b149e9 100644
--- a/extension.json
+++ b/extension.json
@@ -70,7 +70,8 @@
"LocalRenameUserJob": "LocalRenameUserJob",
"LocalUserMergeJob": "LocalUserMergeJob",
"LocalPageMoveJob": "LocalPageMoveJob",
-   "CentralAuthCreateLocalAccountJob": 
"CentralAuthCreateLocalAccountJob"
+   "CentralAuthCreateLocalAccountJob": 
"CentralAuthCreateLocalAccountJob",
+   "CentralAuthUnattachUserJob": "CentralAuthUnattachUserJob"
},
"LogTypes": [
"globalauth",
@@ -194,7 +195,9 @@
"CentralAuthHooks": "includes/CentralAuthHooks.php",
"CentralAuthPreAuthManagerHooks": 
"includes/CentralAuthPreAuthManagerHooks.php",
"CentralAuthSuppressUserJob": "includes/SuppressUserJob.php",
+   "CentralAuthUnattachUserJob": 
"includes/CentralAuthUnattachUserJob.php",
"CentralAuthCreateLocalAccountJob": 
"includes/CreateLocalAccountJob.php",
+   "LocalUserNotFoundException": 
"includes/LocalUserNotFoundException.php",
"WikiSet": "includes/WikiSet.php",
"SpecialCentralAutoLogin": 
"includes/specials/SpecialCentralAutoLogin.php",
"CentralAuthUserArray": "includes/CentralAuthUserArray.php",
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index c01945a..a771366 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -1412,33 +1412,10 @@
$central = CentralAuthUser::getInstance( $user );
 
if ( $central->exists() ) {
-   try {
-   $localPolicyGroups = array_intersect(
-   array_keys( 
$wgCentralAuthGlobalPasswordPolicies ),
-   $central->getLocalGroups()
-   );
-   } catch ( Exception $e ) {
-   // T104615 - race condition in attaching user 
and creating local
-   // wiki account can cause this Exception from
-   // CentralAuthUser::localUserData. Allow the 
password for now, and
-   // we'll catch them next login if their 
password isn't valid.
-   // And T119736 - if localuser table gets out of 
sync, don't
-   // deny logins
-   if ( substr( $e->getMessage(), 0 , 34 )
-   === 'Could not find local user data for'
-   ) {
-   wfDebugLog(
-   'CentralAuth',
-   sprintf( 'Bug T104615 hit for 
%s@%s',
-   $user->getName(),
-   wfWikiId()
-   )
-   );
-   return true;
-   }
-
-   throw $e;
-   }
+   $localPolicyGroups = array_intersect(
+   array_keys( 
$wgCentralAuthGlobalPasswordPolicies ),
+   

[MediaWiki-commits] [Gerrit] Further split $wgMFDisplayWikibaseDescriptions - change (mediawiki...MobileFrontend)

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

Change subject: Further split $wgMFDisplayWikibaseDescriptions
..


Further split $wgMFDisplayWikibaseDescriptions

Add "nearby" and "watchlist" flags, which have the same behaviour as the
"search" flag added in I1e99714 but are specific to the Nearby- and
WatchListGateway gateway classes respectively.

Bug: T138788
Change-Id: I5ded6ae288ce9bcaa654ac85971ae0cc9541ece3
---
M README.md
M extension.json
M resources/mobile.nearby/NearbyGateway.js
M resources/mobile.watchlist/WatchListGateway.js
M tests/browser/LocalSettings.php
5 files changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/README.md b/README.md
index da6ced7..5bf0aae 100644
--- a/README.md
+++ b/README.md
@@ -546,7 +546,9 @@
 
 ```
 $wgMFDisplayWikibaseDescriptions = [
-  'search' => false,
+  'search' => true,
+  'nearby' => true,
+  'watchlist' => false,
   'tagline' => true,
 ];
 ```
@@ -556,6 +558,8 @@
 ```
 [
   'search' => false,
+  'nearby' => false,
+  'watchlist' => false,
   'tagline' => false,
 ]
 ```
diff --git a/extension.json b/extension.json
index 6bcd002..9bbefd5 100644
--- a/extension.json
+++ b/extension.json
@@ -2023,6 +2023,8 @@
"MFDisplayWikibaseDescriptionsAsTaglines": false,
"MFDisplayWikibaseDescriptions": {
"search": false,
+   "nearby": false,
+   "watchlist": false,
"tagline": false
},
"MFRSSFeedLink": false,
diff --git a/resources/mobile.nearby/NearbyGateway.js 
b/resources/mobile.nearby/NearbyGateway.js
index 6d6a56a..18a2efa 100644
--- a/resources/mobile.nearby/NearbyGateway.js
+++ b/resources/mobile.nearby/NearbyGateway.js
@@ -133,7 +133,7 @@
}, params, mw.config.get( 'wgMFSearchAPIParams' ) );
 
// Are Wikibase descriptions enabled?
-   if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).search ) {
+   if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).nearby ) {
if ( $.inArray( 'pageterms', params.prop ) === 
-1 ) {
requestParams.prop.push( 'pageterms' );
}
diff --git a/resources/mobile.watchlist/WatchListGateway.js 
b/resources/mobile.watchlist/WatchListGateway.js
index 7a801c0..6416443 100644
--- a/resources/mobile.watchlist/WatchListGateway.js
+++ b/resources/mobile.watchlist/WatchListGateway.js
@@ -45,7 +45,7 @@
}, this.continueParams, mw.config.get( 
'wgMFSearchAPIParams' ) );
 
// Are Wikibase descriptions enabled?
-   if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).search ) {
+   if ( mw.config.get( 'wgMFDisplayWikibaseDescriptions', 
{} ).watchlist ) {
if ( $.inArray( 'pageterms', params.prop ) === 
-1 ) {
params.prop.push( 'pageterms' );
}
diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
index 522f88d..26f9757 100644
--- a/tests/browser/LocalSettings.php
+++ b/tests/browser/LocalSettings.php
@@ -29,5 +29,7 @@
 $wgMFUseWikibase = true;
 $wgMFDisplayWikibaseDescriptions = [
'search' => true,
+   'nearby' => true,
+   'watchlist' => true,
'tagline' => true,
 ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ded6ae288ce9bcaa654ac85971ae0cc9541ece3
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
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] NamespaceManager: Fixed logic for system namespaces - change (mediawiki...BlueSpiceExtensions)

2016-07-15 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: NamespaceManager: Fixed logic for system namespaces
..

NamespaceManager: Fixed logic for system namespaces

Systemnamespaces were not correctly identified. Now:
* Hid "renameable" flag in edit dialogue
* Changed system namespace heuristics: everything below ID 3000 now
  counts as system namespace
* Changed logic of "renameable" display in NSM panel
* Disabled (non functional) standard filter, as it produced
  strange effects when unhiding the "renameable" column

Change-Id: I5007d9d511cbca1a344bc4e5040f1cc40e586dd6
---
M NamespaceManager/NamespaceManager.class.php
M NamespaceManager/includes/api/BSApiNamespaceStore.php
M NamespaceManager/resources/BS.NamespaceManager/NamespaceDialog.js
M NamespaceManager/resources/BS.NamespaceManager/Panel.js
4 files changed, 17 insertions(+), 5 deletions(-)


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

diff --git a/NamespaceManager/NamespaceManager.class.php 
b/NamespaceManager/NamespaceManager.class.php
index b1cbf55..0740d48 100644
--- a/NamespaceManager/NamespaceManager.class.php
+++ b/NamespaceManager/NamespaceManager.class.php
@@ -243,7 +243,7 @@
'sortable' => true,
'filter' => array(
'type' => 'bool',
-   'value' => true,
+   #'value' => true,
#'active' => true
),
)/*,
diff --git a/NamespaceManager/includes/api/BSApiNamespaceStore.php 
b/NamespaceManager/includes/api/BSApiNamespaceStore.php
index 5b93f96..15605d3 100644
--- a/NamespaceManager/includes/api/BSApiNamespaceStore.php
+++ b/NamespaceManager/includes/api/BSApiNamespaceStore.php
@@ -32,7 +32,7 @@
$aResult[] = array(
'id' => $iNs,
'name' => $sNamespace,
-   'isSystemNS' => isset( 
$bsgSystemNamespaces[$iNs] ) || $iNs < 100, //formaly 'editable'
+   'isSystemNS' => isset( 
$bsgSystemNamespaces[$iNs] ) || $iNs < 3000, //formerly 'editable'
'isTalkNS' => MWNamespace::isTalk( $iNs ),
'pageCount' => $res->numRows(),
'content' => in_array( $iNs, 
$wgContentNamespaces ),
diff --git a/NamespaceManager/resources/BS.NamespaceManager/NamespaceDialog.js 
b/NamespaceManager/resources/BS.NamespaceManager/NamespaceDialog.js
index 336f2aa..9e58ea9 100644
--- a/NamespaceManager/resources/BS.NamespaceManager/NamespaceDialog.js
+++ b/NamespaceManager/resources/BS.NamespaceManager/NamespaceDialog.js
@@ -35,7 +35,7 @@
 
for( var i = 0; i < fieldDefs.length; i++ ) {
var fieldDef = fieldDefs[i];
-   if( fieldDef.type !== 'boolean' || fieldDef.name === 
'editable' ) {
+   if( fieldDef.type !== 'boolean' || fieldDef.name === 
'isSystemNS' ) {
continue;
}
var cbControl =  Ext.create( 'Ext.form.field.Checkbox', 
{
@@ -59,7 +59,7 @@
setData: function( obj ) {
this.currentData = obj;
 
-   if(this.currentData.editable) {
+   if(!this.currentData.isSystemNS) {
this.tfNamespaceName.enable();
}
else {
diff --git a/NamespaceManager/resources/BS.NamespaceManager/Panel.js 
b/NamespaceManager/resources/BS.NamespaceManager/Panel.js
index f119fba..1d9408d 100644
--- a/NamespaceManager/resources/BS.NamespaceManager/Panel.js
+++ b/NamespaceManager/resources/BS.NamespaceManager/Panel.js
@@ -36,7 +36,11 @@
hidden: fieldDef.hidden || false
};
if( fieldDef.type === 'boolean' ) {
-   column.renderer = this.renderIcon;
+   if ( fieldDef.name === 'isSystemNS' ) {
+   column.renderer = 
this.renderInvertedIcon;
+   } else {
+   column.renderer = this.renderIcon;
+   }
column.flex = 0.5;
}
if( i === 0 ){ //Typically the ID column
@@ -65,6 +69,14 @@
}
return icon.format( 'bs-tick.png');
},
+   renderInvertedIcon: function( value ) {
+   //TODO: make CSS class icon
+   var icon = '';
+   if ( value === true ) {
+   return 

[MediaWiki-commits] [Gerrit] Fix possible leak of MainActivity when exiting app. - change (apps...wikipedia)

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

Change subject: Fix possible leak of MainActivity when exiting app.
..


Fix possible leak of MainActivity when exiting app.

It's not 100% clear why this leak occurs, but it appears to be preventable
by making sure that all fragments are popped from the FragmentManager
before closing the activity.
(Observed on API 19)

Bug: T139945
Change-Id: Ib8fe6685ac03261471ae3210fc64c76461a2a670
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
2 files changed, 9 insertions(+), 5 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index 6a8d7ca..9c702d1 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -846,11 +846,13 @@
 && ((BackPressedHandler) getTopFragment()).onBackPressed()) {
 return;
 }
-if (getSupportFragmentManager().getBackStackEntryCount() > 1) {
+if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
 beforeFragmentChanged();
 getSupportFragmentManager().popBackStackImmediate();
 afterFragmentChanged();
-return;
+if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
+return;
+}
 }
 finish();
 }
diff --git 
a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java 
b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
index 1162bcb..2fbc083 100644
--- a/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
+++ b/app/src/main/java/org/wikipedia/MainActivityToolbarCoordinator.java
@@ -40,9 +40,11 @@
 }
 }
 
-private void setActivityToolbar(Toolbar toolbar) {
+private void setActivityToolbar(@Nullable Toolbar toolbar) {
 activity.setSupportActionBar(toolbar);
-activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
-
activity.getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp);
+if (activity.getSupportActionBar() != null) {
+activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+
activity.getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_menu_white_24dp);
+}
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8fe6685ac03261471ae3210fc64c76461a2a670
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update restbase to f2e0e91 - change (mediawiki...deploy)

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

Change subject: Update restbase to f2e0e91
..


Update restbase to f2e0e91

List of changes:
f2e0e91 Fix random redirect title path (#638)
xxx Update node module dependencies

Change-Id: Ibd593c7d0728419066a2224aaa1e587a4ab19d84
---
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
M 
node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/cassandra-driver/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/restbase-mod-table-spec/node_modules/routeswitch/node_modules/async/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M restbase
11 files changed, 27 insertions(+), 28 deletions(-)

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



diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index bf54ad8..d6a67e7 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme;,
   "_id": "content-type@1.0.1",
-  "_shasum": "19a89242ffaf55ddd74d0214fa512d231ad77f85",
+  "_shasum": "139ac7c83ca99d60cb405091b8c6ef4c59a2da07",
   "_from": "git+https://github.com/wikimedia/content-type.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b;
 }
diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index dfd85a7..f1840e6 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "b921d81810648c16df41ef902547297094531950",
+  "_shasum": "7f3c21fe0bb33d625f6a670550063688488ed596",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 6c4af12..429798e 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -60,7 +60,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.1.4",
-  "_shasum": "b293995dac969a254e82d3823b42970f62bdeff3",
+  "_shasum": "f7d46df695ab66fe8ac685da5277782c5670e914",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#7bef30a93a3b81c55cb95d3ce9e0f9f53d5d8262;
 }
diff --git a/node_modules/json-stable-stringify/package.json 
b/node_modules/json-stable-stringify/package.json
index 3e2821b..f1a51bf 100644
--- a/node_modules/json-stable-stringify/package.json
+++ b/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "9479fadf56e7b6c293763c3f8f747616371ff2ca",
+  "_shasum": "2e147c95213075135d49b3c1e30e19e7facfa17d",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
 
b/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
index 34968ae..9ba16e9 100644
--- 
a/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
+++ 
b/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
@@ -3,8 +3,7 @@
 var base64url = module.exports;
 
 base64url.unescape = function unescape (str) {
-  return (str + Array(5 - str.length % 4)
-.join('='))
+  return (str + 

[MediaWiki-commits] [Gerrit] Update restbase to f2e0e91 - change (mediawiki...deploy)

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

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

Change subject: Update restbase to f2e0e91
..

Update restbase to f2e0e91

List of changes:
f2e0e91 Fix random redirect title path (#638)
xxx Update node module dependencies

Change-Id: Ibd593c7d0728419066a2224aaa1e587a4ab19d84
---
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
M 
node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/cassandra-driver/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/restbase-mod-table-spec/node_modules/routeswitch/node_modules/async/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M restbase
11 files changed, 27 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/65/299165/1

diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index bf54ad8..d6a67e7 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme;,
   "_id": "content-type@1.0.1",
-  "_shasum": "19a89242ffaf55ddd74d0214fa512d231ad77f85",
+  "_shasum": "139ac7c83ca99d60cb405091b8c6ef4c59a2da07",
   "_from": "git+https://github.com/wikimedia/content-type.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b;
 }
diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index dfd85a7..f1840e6 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "b921d81810648c16df41ef902547297094531950",
+  "_shasum": "7f3c21fe0bb33d625f6a670550063688488ed596",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 6c4af12..429798e 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -60,7 +60,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues;
   },
   "_id": "swagger-ui@2.1.4",
-  "_shasum": "b293995dac969a254e82d3823b42970f62bdeff3",
+  "_shasum": "f7d46df695ab66fe8ac685da5277782c5670e914",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#7bef30a93a3b81c55cb95d3ce9e0f9f53d5d8262;
 }
diff --git a/node_modules/json-stable-stringify/package.json 
b/node_modules/json-stable-stringify/package.json
index 3e2821b..f1a51bf 100644
--- a/node_modules/json-stable-stringify/package.json
+++ b/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues;
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "9479fadf56e7b6c293763c3f8f747616371ff2ca",
+  "_shasum": "2e147c95213075135d49b3c1e30e19e7facfa17d",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f;
 }
diff --git 
a/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
 
b/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
index 34968ae..9ba16e9 100644
--- 
a/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
+++ 
b/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/node_modules/ecdsa-sig-formatter/node_modules/base64-url/index.js
@@ -3,8 +3,7 @@
 var base64url = module.exports;
 
 base64url.unescape = function unescape (str) {
-  

[MediaWiki-commits] [Gerrit] Include icinga alerts for zookeeper - change (operations/puppet)

2016-07-15 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Include icinga alerts for zookeeper
..


Include icinga alerts for zookeeper

Alert on process running and if num client connections gets too high.

Bug: T137302
Change-Id: I6f5c5cc00bb51f814e5a496d9c9e14cea63c1eb6
---
M modules/role/manifests/zookeeper/server.pp
1 file changed, 26 insertions(+), 2 deletions(-)

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



diff --git a/modules/role/manifests/zookeeper/server.pp 
b/modules/role/manifests/zookeeper/server.pp
index 5777a67..c52c306 100644
--- a/modules/role/manifests/zookeeper/server.pp
+++ b/modules/role/manifests/zookeeper/server.pp
@@ -33,7 +33,6 @@
 }
 
 include role::zookeeper::client
-
 class { '::zookeeper::server': }
 
 ferm::service { 'zookeeper':
@@ -43,9 +42,34 @@
 srange => '($INTERNAL)',
 }
 
+$group_prefix = "zookeeper.cluster.${cluster_name}."
 # Use jmxtrans for sending metrics to ganglia
 class { 'zookeeper::jmxtrans':
-group_prefix => "zookeeper.cluster.${cluster_name}.",
+group_prefix => $group_prefix,
 statsd   => hiera('statsd', undef),
 }
+
+if $::realm == 'production' {
+# Alert if Zookeeper Server is not running.
+nrpe::monitor_service { 'zookeeper':
+description  => 'Zookeeper Server',
+nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C 
java -a "org.apache.zookeeper.server.quorum.QuorumPeerMain 
/etc/zookeeper/conf/zoo.cfg"',
+critical => true,
+}
+
+# jmxtrans statsd writer emits fqdns in keys
+# by substituting '.' with '_' and suffixing the jmx port.
+$graphite_broker_key = 
regsubst("${::fqdn}_${::zookeeper::jmxtrans::jmx_port}", '\.', '_', 'G')
+
+# Alert if NumAliveConnections approaches max client connections
+# Alert if any Kafka Broker replica lag is too high
+monitoring::graphite_threshold { 'zookeeper-client-connections':
+description => 'Zookeeper Alive Client Connections too high',
+metric  => 
"${group_prefix}zookeeper.${graphite_broker_key}.zookeeper.NumAliveConnections",
+# Warn if we go over 50% of max
+warning => $::zookeeper::max_client_connections * 0.5,
+# Critical if we go over 90% of max
+critical=> $::zookeeper::max_client_connections * 0.9,
+}
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f5c5cc00bb51f814e5a496d9c9e14cea63c1eb6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Minor tweaks to 2.12.2 package - change (operations...gerrit)

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

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

Change subject: Minor tweaks to 2.12.2 package
..

Minor tweaks to 2.12.2 package

- Bring in all plugins, makes the install step easier (--batch works now)
- Update init script from upstream

Change-Id: I022e6890ebe0c1a4fde94390c4c4db302ef43393
---
M debian/changelog
M debian/gerrit.init
M debian/install
A plugins/commit-message-length-validator.jar
A plugins/download-commands.jar
R plugins/its-phabricator.jar
A plugins/replication.jar
A plugins/reviewnotes.jar
A plugins/singleusergroup.jar
9 files changed, 54 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/gerrit 
refs/changes/64/299164/1

diff --git a/debian/changelog b/debian/changelog
index d6fe864..62810b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gerrit (2.12.2-wmf.1) jessie-wikimedia; urgency=low
+
+  * Bring in all installed plugins rather than expecting the install to extract
+  * Update init file from 2.12.2 default
+
+ -- Chad Horohoe   Fri, 15 Jul 2016 15:22:28 +
+
 gerrit (2.12.2) jessie-wikimedia; urgency=low
 
   * Updating to Gerrit 2.12.2
diff --git a/debian/gerrit.init b/debian/gerrit.init
index d43c322..7e6f943 100755
--- a/debian/gerrit.init
+++ b/debian/gerrit.init
@@ -47,7 +47,7 @@
 
 usage() {
 me=`basename "$0"`
-echo >&2 "Usage: $me {start|stop|restart|check|status|run|supervise} [-d 
site]"
+echo >&2 "Usage: $me 
{start|stop|restart|check|status|run|supervise|threads} [-d site]"
 exit 1
 }
 
@@ -61,6 +61,13 @@
   PID=`cat $1`
   ps -p $PID >/dev/null 2>/dev/null || return 1
   return 0
+}
+
+thread_dump() {
+  test -f $1 || return 1
+  PID=`cat $1`
+  $JSTACK $PID || return 1
+  return 0;
 }
 
 get_config() {
@@ -119,7 +126,7 @@
 ##
 # See if there's a default configuration file
 ##
-if test -f /etc/default/gerritcodereview ; then 
+if test -f /etc/default/gerritcodereview ; then
   . /etc/default/gerritcodereview
 fi
 
@@ -150,20 +157,9 @@
 # Try to determine GERRIT_SITE if not set
 ##
 if test -z "$GERRIT_SITE" ; then
-  GERRIT_SITE_1=`dirname "$0"`
-
-  ##
-  # As last resort assume we started the script from
-  # the bin directory of the Gerrit installation
-  ##
-  if [ "$GERRIT_SITE_1" = "." ]; then
-  GERRIT_SITE_1=`pwd`
-  fi
-
-  GERRIT_SITE_1=`dirname "$GERRIT_SITE_1"`
-
-  if test -f "${GERRIT_SITE_1}/${GERRIT_INSTALL_TRACE_FILE}" ; then 
-GERRIT_SITE=${GERRIT_SITE_1} 
+  GERRIT_SITE_1=`dirname "$0"`/..
+  if test -f "${GERRIT_SITE_1}/${GERRIT_INSTALL_TRACE_FILE}" ; then
+GERRIT_SITE=${GERRIT_SITE_1}
   fi
 fi
 
@@ -171,10 +167,11 @@
 # No GERRIT_SITE yet? We're out of luck!
 ##
 if test -z "$GERRIT_SITE" ; then
-echo >&2 "** ERROR: GERRIT_SITE not set" 
+echo >&2 "** ERROR: GERRIT_SITE not set"
 exit 1
 fi
 
+INITIAL_DIR=`pwd`
 if cd "$GERRIT_SITE" ; then
   GERRIT_SITE=`pwd`
 else
@@ -227,7 +224,7 @@
 "
 for N in java jdk jre ; do
   for L in $JAVA_LOCATIONS ; do
-test -d "$L" || continue 
+test -d "$L" || continue
 find $L -name "$N" ! -type d | grep -v threads | while read J ; do
   test -x "$J" || continue
   VERSION=`eval "$J" -version 2>&1`
@@ -264,8 +261,12 @@
 if test -z "$JAVA" ; then
   echo >&2 "Cannot find a JRE or JDK. Please set JAVA_HOME or"
   echo >&2 "container.javaHome in $GERRIT_SITE/etc/gerrit.config"
-  echo >&2 "to a >=1.6 JRE"
+  echo >&2 "to a >=1.7 JRE"
   exit 1
+fi
+
+if test -z "$JSTACK"; then
+  JSTACK="$JAVA_HOME/bin/jstack"
 fi
 
 #
@@ -336,6 +337,11 @@
 if test "`get_config --bool container.slave`" = "true" ; then
   RUN_ARGS="$RUN_ARGS --slave"
 fi
+DAEMON_OPTS=`get_config --get-all container.daemonOpt`
+if test -n "$DAEMON_OPTS" ; then
+  RUN_ARGS="$RUN_ARGS $DAEMON_OPTS"
+fi
+
 if test -n "$JAVA_OPTIONS" ; then
   RUN_ARGS="$JAVA_OPTIONS $RUN_ARGS"
 fi
@@ -363,7 +369,7 @@
   start)
 printf '%s' "Starting Gerrit Code Review: "
 
-if test 1 = "$NO_START" ; then 
+if test 1 = "$NO_START" ; then
   echo "Not starting gerrit - NO_START=1 in /etc/default/gerritcodereview"
   exit 0
 fi
@@ -388,7 +394,7 @@
   echo >&2 "fatal: start-stop-daemon failed"
   rc=1
 fi
-exit $rc 
+exit $rc
   fi
 else
   if test -f "$GERRIT_PID" ; then
@@ -400,7 +406,7 @@
 fi
   fi
 
-  if test $UID = 0 -a -n "$GERRIT_USER" ; then 
+  if test $UID = 0 -a -n "$GERRIT_USER" ; then
 touch "$GERRIT_PID"
 chown $GERRIT_USER 

  1   2   >