[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Removed unused assoc data parsing

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

Change subject: Removed unused assoc data parsing
..


Removed unused assoc data parsing

Change-Id: I5682c074bc72f87aa4d003b1b1d84577df3cd5ac
---
M includes/JCContent.php
1 file changed, 4 insertions(+), 13 deletions(-)

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



diff --git a/includes/JCContent.php b/includes/JCContent.php
index 9257b49..276188b 100644
--- a/includes/JCContent.php
+++ b/includes/JCContent.php
@@ -25,8 +25,6 @@
private $status;
/** @var bool */
private $thorough;
-   /** If false, JSON parsing will use stdClass instead of array for 
"{...}" */
-   protected $useAssocParsing = false;
/** @var JCContentView|null contains an instance of the view class */
private $view = null;
 
@@ -119,23 +117,16 @@
private function parse() {
$rawText = $this->getNativeData();
$parseOpts = FormatJson::STRIP_COMMENTS + 
FormatJson::TRY_FIXING;
-   if ( $this->useAssocParsing ) {
-   $parseOpts += FormatJson::FORCE_ASSOC;
-   }
$status = FormatJson::parse( $rawText, $parseOpts );
if ( !$status->isOK() ) {
$this->status = $status;
return;
}
$data = $status->getValue();
-   if ( !$this->useAssocParsing ) {
-   // @fixme: HACK - need a deep clone of the data
-   // @fixme: but doing (object)(array)$data will 
re-encode empty [] as {}
-   // @performance: re-encoding is likely faster than 
stripping comments in PHP twice
-   $this->rawData = FormatJson::decode( 
FormatJson::encode( $data, FormatJson::ALL_OK ), true );
-   } else {
-   $this->rawData = $data;
-   }
+   // @fixme: HACK - need a deep clone of the data
+   // @fixme: but doing (object)(array)$data will re-encode empty 
[] as {}
+   // @performance: re-encoding is likely faster than stripping 
comments in PHP twice
+   $this->rawData = FormatJson::decode( FormatJson::encode( $data, 
FormatJson::ALL_OK ), true );
$this->data = $this->validate( $data );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5682c074bc72f87aa4d003b1b1d84577df3cd5ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: Yurik 
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] mediawiki...Graph[master]: Removed Graph\Content unused class

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

Change subject: Removed Graph\Content unused class
..


Removed Graph\Content unused class

Related patch - I7c8af650515477b3c3eaea0d072da8c218645529
Technically its not a blocker, but it would be good to merge
and deploy the other patch first.

Change-Id: I9201e79ed316608e2510f55039ce571b544e464d
---
M extension.json
D includes/Content.php
2 files changed, 0 insertions(+), 57 deletions(-)

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



diff --git a/extension.json b/extension.json
index b46e34c..886f8ad 100644
--- a/extension.json
+++ b/extension.json
@@ -20,7 +20,6 @@
"Graph\\ParserTag": "includes/ParserTag.php",
"Graph\\Sandbox": "includes/Sandbox.php",
"Graph\\Store": "includes/Store.php",
-   "Graph\\Content": "includes/Content.php",
"Graph\\Hooks": "includes/Graph.hooks.php"
},
"APIModules": {
diff --git a/includes/Content.php b/includes/Content.php
deleted file mode 100644
index c343961..000
--- a/includes/Content.php
+++ /dev/null
@@ -1,56 +0,0 @@
-' . $this->getNativeData() . '';
-   }
-
-   protected function fillParserOutput( Title $title, $revId, 
ParserOptions $options, $generateHtml,
-   
 ParserOutput &$output ) {
-   /** @var $wgParser Parser */
-   global $wgParser;
-   $text = $this->getNativeData();
-   $parser = $wgParser->getFreshParser();
-   $text = $parser->preprocess( $text, $title, $options, $revId );
-
-   if ( $generateHtml ) {
-   $tag = new ParserTag( $parser, $options, $output );
-   $html = $tag->buildHtml( $text, $title, 
$parser->getRevisionId() );
-   } else {
-   $html = '';
-   }
-   $output->setText( $html );
-
-   // Since we invoke parser manually, the ParserAfterParse never 
gets called, do it manually
-   ParserTag::finalizeParserOutput( $parser, $title, $output );
-   }
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9201e79ed316608e2510f55039ce571b544e464d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Ferdbold 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Align demo to color palette

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

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

Change subject: Align demo to color palette
..

Align demo to color palette

Aligning demo to overhauled color palette, also including `#222` as
body color to make comparison with normal UI environment easier.

Change-Id: Ib5c274415a5ac39cc6dfc01a8eb7a8e7616dca06
---
M demos/styles/demo.css
1 file changed, 22 insertions(+), 16 deletions(-)


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

diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index 81f9a32..8dfdefb 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -1,10 +1,10 @@
 body {
+   color: #222;
font-size: 0.8em;
font-family: sans-serif;
 }
 
 /* Layout */
-
 .oo-ui-demo-menu > .oo-ui-widget {
display: inline-block;
vertical-align: middle;
@@ -109,7 +109,7 @@
 .oo-ui-demo-console-expanded {
width: 100%;
background-color: #fff;
-   border-color: #aaa;
+   border-color: #a2a9b1;
margin: 0.5em 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@@ -128,25 +128,31 @@
 }
 
 .oo-ui-demo-console-toggle::after {
+   content: '→';
+   background-color: #f8f9fa;
+   color: #222;
position: relative;
display: inline-block;
width: 1.6em;
-   background: #f9f9f9;
-   border-radius: 50%;
+   border-radius: 2px;
line-height: 1.6;
-   color: #999;
text-align: center;
-   content: '→';
+   -webkit-transition: background-color 100ms, color 100ms, transform 
100ms;
+   -moz-transition: background-color 100ms, color 100ms, transform 100ms;
+   transition: background-color 100ms, color 100ms, transform 100ms;
 }
 
 .oo-ui-demo-console-toggle:hover::after,
 .oo-ui-demo-console-expanded .oo-ui-demo-console-toggle::after {
-   background: #eee;
-   color: #333;
+   background: #fff;
+   color: #444;
 }
 
 .oo-ui-demo-console-expanded .oo-ui-demo-console-toggle::after {
-   content: '↑';
+   -webkit-transform: rotate( -90deg );
+   -moz-transform: rotate( -90deg );
+   -ms-transform: rotate( -90deg );
+   transform: rotate( -90deg );
 }
 
 .oo-ui-demo-console-collapsed .oo-ui-demo-console-log,
@@ -156,7 +162,7 @@
 }
 
 .oo-ui-demo-console-log {
-   border: 1px solid #eee;
+   border: 1px solid #a2a9b1;
border-width: 0 0 1px 0;
max-height: 5em;
overflow: auto;
@@ -201,6 +207,8 @@
 }
 
 .oo-ui-demo-console-label::before {
+   content: '→';
+   color: #00f;
display: block;
position: absolute;
top: 0;
@@ -208,8 +216,6 @@
bottom: 0;
width: 20px;
text-align: center;
-   content: '→';
-   color: #00f;
 }
 
 .oo-ui-demo-console-input {
@@ -224,6 +230,8 @@
 }
 
 .oo-ui-demo-console-submit {
+   background: #f8f9fa;
+   color: #222;
display: inline-block;
width: 20px;
line-height: 1.6;
@@ -232,13 +240,11 @@
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-   background: #f9f9f9;
-   color: #888;
cursor: pointer;
 }
 
 .oo-ui-demo-console-submit:hover {
-   background: #eee;
-   color: #333;
+   background: #fff;
+   color: #444;
 }
 /* stylelint-enable selector-pseudo-element-colon-notation */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5c274415a5ac39cc6dfc01a8eb7a8e7616dca06
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] labs...stewardbots[master]: Add COPYING file

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

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

Change subject: Add COPYING file
..

Add COPYING file

The README indicates that the project is licensed under GPLv3. Add
a COPYING file with the contents of
https://www.gnu.org/licenses/gpl-3.0.txt to make this more obvious.

Change-Id: I89c95bf944a6a8359e4151c0b1ae0c6daf675400
---
A COPYING
1 file changed, 674 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/stewardbots 
refs/changes/18/319018/1

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the mak

[MediaWiki-commits] [Gerrit] labs...stewardbots[master]: StewardBot: ratelimit @steward pings

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

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

Change subject: StewardBot: ratelimit @steward pings
..

StewardBot: ratelimit @steward pings

Sometimes people get a bit impatient when trying to contact the
Stewards. Add a bit of protection for ping spam by rate limiting the
pings sent by a single user to one per fifteen minutes.

Change-Id: Ic2bf1f55222ddadda923f58f8ac37853ac1abf57
---
M StewardBot/StewardBot.py
1 file changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/stewardbots 
refs/changes/19/319019/1

diff --git a/StewardBot/StewardBot.py b/StewardBot/StewardBot.py
index 4612e79..e3a4055 100644
--- a/StewardBot/StewardBot.py
+++ b/StewardBot/StewardBot.py
@@ -69,6 +69,9 @@
 self.randmess = False
 self.listen = True
 self.badsyntax = "Unrecognized command. Type @help for more info."
+self.ignore_attention = {}
+self.attention_delay = 900  # 15 minutes
+self.execute_every(self.attention_delay, do_clean_ignore_attention)
 SingleServerIRCBot.__init__(self, [(self.server, 6667)], 
self.nickname, self.nickname)
 
 def on_error(self, c, e):
@@ -251,6 +254,17 @@
 
 def attention(self, nick, channel=None, reason=None):
 if self.notify:
+now = time.time()
+if nick in self.ignore_attention:
+if self.ignore_attention[nick] > now:
+print "[%s] ignoring attention from %s until @%d" % (
+time.strftime("%d.%m.%Y %H:%M:%S"),
+nick,
+self.ignore_attention[nick]
+)
+return
+self.ignore_attention[nick] = now + self.attention_delay
+
 if not channel or channel==self.channel:
 self.msg("Stewards: Attention requested by %s ( %s )" % (nick, 
" ".join(self.steward)))
 else:
@@ -259,6 +273,13 @@
 if reason: messg+=" with the following reason: " + reason
 self.msg(messg)
 
+def do_clean_ignore_attention(self):
+"""Clean expired items out of the ignore_attention cache."""
+now = time.time()
+for nick in self.ignore_attention.keys():
+if self.ignore_attention[nick] <= now:
+del self.ignore_attention[nick]
+
 def do_privileged(self, cmd, target, nick):
 if cmd.lower().startswith("list"):
 who=re.sub("(?i)^list", "", cmd).strip(" ")

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2bf1f55222ddadda923f58f8ac37853ac1abf57
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/stewardbots
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Document diff/DifferenceEngine.php function

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

Change subject: Document diff/DifferenceEngine.php function
..


Document diff/DifferenceEngine.php function

Change-Id: I999824d8ce569de93fe4c9a889edea582d07611c
---
M includes/diff/DifferenceEngine.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 16e9a44..73408ab 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -882,6 +882,10 @@
return $result;
};
 
+   /**
+* @param Status $status
+* @throws FatalError
+*/
$error = function( $status ) {
throw new FatalError( $status->getWikiText() );
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I999824d8ce569de93fe4c9a889edea582d07611c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Set gift field on import for contributions over 99.

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

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

Change subject: Set gift field on import for contributions over 99.
..

Set gift field on import for contributions over 99.

I need to confirm if this is correct - ie. do we want to set the field for all 
contributions or
only those in the major gifts realm?

Note that the fields in the data set have defaults but if nothing is inserted 
into ANY field
in the set then the default will not kick in as it is at the mysql level.

Bug: T138361
Change-Id: I4cbc5bec3e31edfd8eba3e24ac6a4bcc8ff8c1b8
---
M sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 28 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/17/319017/1

diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
index 58b5b01..fa8e1fb 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
@@ -70,22 +70,37 @@
  * Process an ordinary (one-time) donation message
  */
 public function testDonation() {
-$message = new TransactionMessage();
+$message = new TransactionMessage(array('gross' => 400, 
'original_gross' => 400, 'original_currency' => 'USD'));
 $message2 = new TransactionMessage();
+$message3 = new TransactionMessage(array('gross' => 600, 
'original_gross' => 600, 'original_currency' => 'USD'));
 
 exchange_rate_cache_set( 'USD', $message->get( 'date' ), 1 );
 exchange_rate_cache_set( $message->get( 'currency' ), $message->get( 
'date' ), 3 );
 
 $this->queueConsumer->processMessage( $message->getBody() );
 $this->queueConsumer->processMessage( $message2->getBody() );
+$this->queueConsumer->processMessage( $message3->getBody() );
 
-$contributions = wmf_civicrm_get_contributions_from_gateway_id( 
$message->getGateway(), $message->getGatewayTxnId() );
-$this->assertEquals( 1, count( $contributions ) );
+$contribution = civicrm_api3('Contribution', 'getsingle', array(
+  wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message->getGatewayTxnId(),
+  'return' => array(wmf_civicrm_get_custom_field_name('Campaign'), 
'total_amount'),
+));
+
$this->assertEmpty($contribution[wmf_civicrm_get_custom_field_name('campaign')] 
);
 
-$contributions2 = wmf_civicrm_get_contributions_from_gateway_id( 
$message2->getGateway(), $message2->getGatewayTxnId() );
-$this->assertEquals( 1, count( $contributions2 ) );
+$contribution2 = civicrm_api3('Contribution', 'getsingle', array(
+  wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message2->getGatewayTxnId(),
+  'return' => array(wmf_civicrm_get_custom_field_name('Campaign'), 
'total_amount'),
+));
 
-$this->assertNotEquals( $contributions[0]['contact_id'], 
$contributions2[0]['contact_id'] );
+$this->assertEquals('Benefactor Gift', 
$contribution2[wmf_civicrm_get_custom_field_name('campaign')] );
+
+$this->assertNotEquals( $contribution['contact_id'], 
$contribution2['contact_id'] );
+
+$contribution3 = civicrm_api3('Contribution', 'getsingle', array(
+  wmf_civicrm_get_custom_field_name('gateway_txn_id') => 
$message3->getGatewayTxnId(),
+  'return' => array(wmf_civicrm_get_custom_field_name('Campaign')),
+));
+$this->assertEquals('Community Gift', 
$contribution3[wmf_civicrm_get_custom_field_name('Campaign')]);
 }
 
 /**
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 068e9b3..e7b5890 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -375,9 +375,16 @@
 * NOTE: the custom field for "Gift_Information" indicates that check 
number is stored here.  It is not.
 */
 $custom_field_defaults = array(
+// Contribution_comments field does not appear to exist & is quietly 
ignored I believe.
 'Contribution_Comments' => '',
 'gateway_account' => '',
 );
+if ($contribution['total_amount'] >= 1000) {
+$custom_field_defaults['Campaign'] = 'Benefactor Gift';
+}
+   elseif ($contribution['total_amount'] >= 500) {
+   $custom_field_defaults['Campaign'] = 'Community Gift';
+   }
 
 // Legacy field names which do not match the message field names
 $custom_name_mangle = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cbc5bec3e31edfd8eba

[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Move labstore secondary cluster hiera config to eqiad.yaml

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

Change subject: nfs: Move labstore secondary cluster hiera config to eqiad.yaml
..


nfs: Move labstore secondary cluster hiera config to eqiad.yaml

Need move this to a dedicated hiera file along with all other drbd config soon

Change-Id: I65b64befe8183817d94c86385316f3564563e71b
---
M hieradata/eqiad.yaml
M modules/role/manifests/labs/nfs/secondary.pp
2 files changed, 14 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 8c53f2e..66bab39 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -166,6 +166,19 @@
   hostname: ldap-labs.eqiad.wikimedia.org
   secondary_hostname: ldap-labs.codfw.wikimedia.org
 
+labstore_secondary_drbd_resource_config:
+  test:
+port: '7790'
+device: '/dev/drbd1'
+disk: '/dev/misc/test'
+  tools:
+port: '7791'
+device: '/dev/drbd4'
+disk: '/dev/tools/tools-project'
+  others:
+port: '7792'
+device: '/dev/drbd3'
+disk: '/dev/misc/others'
 # Configure regular backups of the analytics-meta MySQL instance
 # in the Analytics Cluster to back up via rsync to
 # analytics1002.  This works because the analytics1002 has the
diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index 2fb365b..76d37de 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -50,7 +50,7 @@
 
 $subnet_gateway_ip = '10.64.37.1'
 
-$drbd_resource_config = hiera('drbd_resource_config', {})
+$drbd_resource_config = hiera('labstore_secondary_drbd_resource_config', 
{})
 $drbd_resources = keys($drbd_resource_config)
 
 labstore::drbd::resource { $drbd_resources:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65b64befe8183817d94c86385316f3564563e71b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Move labstore secondary cluster hiera config to eqiad.yaml

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

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

Change subject: nfs: Move labstore secondary cluster hiera config to eqiad.yaml
..

nfs: Move labstore secondary cluster hiera config to eqiad.yaml

Need move this to a dedicated hiera file along with all other drbd config soon

Change-Id: I65b64befe8183817d94c86385316f3564563e71b
---
M hieradata/eqiad.yaml
M modules/role/manifests/labs/nfs/secondary.pp
2 files changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/319016/1

diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 8c53f2e..66bab39 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -166,6 +166,19 @@
   hostname: ldap-labs.eqiad.wikimedia.org
   secondary_hostname: ldap-labs.codfw.wikimedia.org
 
+labstore_secondary_drbd_resource_config:
+  test:
+port: '7790'
+device: '/dev/drbd1'
+disk: '/dev/misc/test'
+  tools:
+port: '7791'
+device: '/dev/drbd4'
+disk: '/dev/tools/tools-project'
+  others:
+port: '7792'
+device: '/dev/drbd3'
+disk: '/dev/misc/others'
 # Configure regular backups of the analytics-meta MySQL instance
 # in the Analytics Cluster to back up via rsync to
 # analytics1002.  This works because the analytics1002 has the
diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index 2fb365b..76d37de 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -50,7 +50,7 @@
 
 $subnet_gateway_ip = '10.64.37.1'
 
-$drbd_resource_config = hiera('drbd_resource_config', {})
+$drbd_resource_config = hiera('labstore_secondary_drbd_resource_config', 
{})
 $drbd_resources = keys($drbd_resource_config)
 
 labstore::drbd::resource { $drbd_resources:

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: [VERY WIP] Change continuation

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

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

Change subject: [VERY WIP] Change continuation
..

[VERY WIP] Change continuation

The first part of my approach to having multiple changes in flight.
This code allows clients to submit changes based on top of previously
submitted changes before they've seen a confirmation/rejection
by rebasing them as they come in and storing the result of the previous rebase.

Still needs integration, testing, and a proof by induction for
the iterative part (i.e. the reuse of the rebase result); the base case
is easier to prove, that proof is in the comments already.

Change-Id: I76c77a74ee750c75e2aa218081a3956045f88485
---
M rebaser/Rebaser.js
M rebaser/server.js
2 files changed, 46 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/15/319015/1

diff --git a/rebaser/Rebaser.js b/rebaser/Rebaser.js
index a758b43..fcfbaab 100644
--- a/rebaser/Rebaser.js
+++ b/rebaser/Rebaser.js
@@ -31,7 +31,7 @@
  * @return {Object} return.selections Each author ID (key) mapped to rebased 
ve.dm.Selection
  */
 Rebaser.prototype.applyChange = function ( doc, remoteAuthor, remote, 
selection ) {
-   var state, change, selections, local, resolved, author, newState;
+   var state, change, selections, local, rebases, resolved, author, 
newState;
 
if ( !this.stateForDoc.has( doc ) ) {
this.stateForDoc.set( doc, {
@@ -41,7 +41,8 @@
remote.storeStart,
new remote.store.constructor()
),
-   selections: {}
+   selections: {},
+   continueBases: new Map()
} );
}
state = this.stateForDoc.get( doc );
@@ -52,12 +53,14 @@
throw new Error( 'Remote start ' + remote.start + ' is beyond 
committed history' );
}
local = change.mostRecent( remote.transactionStart, remote.storeStart );
-   resolved = change.constructor.static.rebaseChanges( local, remote )[ 1 
];
+   rebases = change.constructor.static.rebaseChanges( local, remote );
+   resolved = rebases[ 1 ];
if ( !resolved ) {
return null;
}
change.store.merge( resolved.store );
Array.prototype.push.apply( change.transactions, resolved.transactions 
);
+   state.continueBases.set( author, rebases[ 0 ] );
for ( author in selections ) {
if ( author === remoteAuthor ) {
continue;
@@ -73,4 +76,34 @@
return newState;
 };
 
+Rebaser.prototype.continueChange = function ( doc, author, change ) {
+   var basePlusNew, rebases,
+   state = this.stateForDoc.get( doc ),
+   allChanges = state.change,
+   base = state.continueBases.get( author );
+   if ( !base ) {
+   return null;
+   }
+
+   // The author has submitted a change (B) on top of a previous change 
(A).
+   // The committed history is X, followed by A' (=A/X), followed by Y. We 
have to find B',
+   // which is B rebased to follow Y.
+   // Let cb = X\A, then B' = B/(-A+X+A/X+Y) = B/(X\A + Y) = B/(cb + Y).
+   // We can now set cb := (cb + Y)\B and that will allow us to rebase a C 
based on B the same way.
+   // TODO prove that last statement with some kind of induction proof
+
+   // base is the other side of the most recent rebase we did for this 
author (cb)
+   // basePlusNew is base plus any other changes that happened after this 
author's last change (cb + Y)
+   basePlusNew = allChanges.mostRecent( base.transactionStart, 
base.storeStart );
+   rebases = ve.dm.Change.static.rebaseChanges( basePlusNew, change );
+   if ( !rebases[ 0 ] ) {
+   // Clear this author's continue base, so that future 
continuations will fail until
+   // a successful rebase happens
+   state.continueBases.delete( author );
+   return null;
+   }
+   state.continueBases.set( author, rebases[ 0 ] ); // (cb + Y)\B
+   return rebases[ 1 ]; // B/(cb + Y))
+};
+
 module.exports = Rebaser;
diff --git a/rebaser/server.js b/rebaser/server.js
index 066af67..0f85ce4 100644
--- a/rebaser/server.js
+++ b/rebaser/server.js
@@ -62,6 +62,16 @@
change = ve.dm.Change.static.deserialize( 
data.change, true );
selection = ve.dm.Selection.static.newFromJSON( 
null, data.selection );
console.log( 'receive ' + summarize( 
data.author, change, selection ) );
+   if ( data.continuation ) {
+   change = rebaser.continueChange( 
docName, data.author, change );
+   if ( !

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Rename decile value options.

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

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

Change subject: Rename decile value options.
..

Rename decile value options.

Rosie revised the values back to numeric. Reflecting back for dev dbs

Bug: T147965
Change-Id: I2dcc3b88e4673d5f4c778004ff58303d84abb53a
---
M sites/all/modules/wmf_civicrm/update_custom_fields.php
1 file changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/14/319014/1

diff --git a/sites/all/modules/wmf_civicrm/update_custom_fields.php 
b/sites/all/modules/wmf_civicrm/update_custom_fields.php
index 8a3600a..e53eead 100644
--- a/sites/all/modules/wmf_civicrm/update_custom_fields.php
+++ b/sites/all/modules/wmf_civicrm/update_custom_fields.php
@@ -341,15 +341,17 @@
   'note_columns' => 60,
   'note_rows' => 4,
   'option_values' => array(
-'A' => 'A',
-'B' => 'B',
-'C' => 'C',
-'D' => 'D',
-'E' => 'E',
-'F' => 'F',
-'G' => 'G',
-'H' => 'H',
-'I' => 'I',
+'1' => 'A',
+'2' => 'B',
+'3' => 'C',
+'4' => 'D',
+'5' => 'E',
+'6' => 'F',
+'7' => 'G',
+'8' => 'H',
+'9' => 'I',
+'10' => 'J',
+'11' => 'J',
   )
 ),
 'Voter_Party' => array(

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix contacts who have no primary address.

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

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

Change subject: Fix contacts who have no primary address.
..

Fix contacts who have no primary address.

I went to check no more were being created & realised that I hadn't checked 
address
- turns out there around 7000. There was only one phone one.

I think there is still a permutation of the underlying issue. I did a batch 
dedupe
through the UI and some manual ones & generated 4 with no primary email.

However, I have not figured out why yet. Diminishing returns - it's something
even more obscure than the last round.

Bug: T143062
Change-Id: Ie1c32078586830eb760ac0e7e4a72e762d4c7905
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/13/319013/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 7157eac..503b16f 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2338,3 +2338,30 @@
   require_once('update_7310.php');
   _wmf_civicrm_update_7310_add_zip_geo();
 }
+
+/**
+ * Fix contacts who have no primary address- this has arisen from the dedupes.
+ *
+ * I did this on emails before and but I just checked and there are around 
7000 addresses
+ *
+ * Bug: T143062
+ */
+function wmf_civicrm_update_7315() {
+  civicrm_initialize();
+  $entity = 'address';
+  CRM_Core_DAO::executeQuery("
+CREATE TEMPORARY TABLE civicrm_{$entity}_updates
+ SELECT id FROM
+  (
+SELECT contact_id, sum(is_primary) as c, e.id
+FROM civicrm_{$entity} e
+INNER JOIN civicrm_contact c ON c.id = contact_id AND is_deleted = 0
+GROUP BY contact_id HAVING c = 0
+  ) as i
+  ");
+
+  CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_{$entity}_updates ADD INDEX 
index_id(id)");
+  CRM_Core_DAO::executeQuery("UPDATE civicrm_email e INNER JOIN 
civicrm_{$entity}_updates u ON e.id = u.id
+SET e.is_primary = 1
+  ");
+}

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Update polestar - do not disable edit window.

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

Change subject: Update polestar - do not disable edit window.
..


Update polestar - do not disable edit window.

Change-Id: I8835b4a3da6b87d09e172f94667bb8dcf45e0dc0
---
M polestar/scripts/app.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/polestar/scripts/app.js b/polestar/scripts/app.js
index 0e5e11e..fa3f053 100644
--- a/polestar/scripts/app.js
+++ b/polestar/scripts/app.js
@@ -29,4 +29,4 @@
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-"use 
strict";angular.module("polestar",["vlui","ngSanitize","ngTouch","ngDragDrop","zeroclipboard","Chronicle","LocalStorageModule","720kb.tooltips","ngOrderObjectBy","angular-google-analytics"]).constant("_",window._).constant("vl",window.vl).constant("vg",window.vg).constant("ZSchema",window.ZSchema).constant("Tether",window.Tether).constant("Drop",window.Drop).constant("Blob",window.Blob).constant("URL",window.URL).constant("jsondiffpatch",window.jsondiffpatch).config(["consts",function(e){window.vg.util.extend(e,{appId:"polestar",initialSpec:window.initialSpec||void
 
0,logToWebSql:!1})}]).config(["vl",function(e){e.config.defaultConfig.countTitle="COUNT"}]).config(["uiZeroclipConfigProvider",function(e){e.setZcConf({swfPath:"bower_components/zeroclipboard/dist/ZeroClipboard.swf"})}]).config(["localStorageServiceProvider",function(e){e.setPrefix("polestar")}]).decorator("Dataset",["$q","vg","$delegate",function(e,a,t){var
 o=t.update;return t.getUpdate=function(t,n){return 
t.url?e(function(e,o){a.util.load({url:t.url},function(e,a){e?console.log(e):n(t,a)}),e()}):o(t)},t}]),angular.module("polestar").directive("vlSpecEditor",["Spec",function(e){return{templateUrl:"components/vlSpecEditor/vlSpecEditor.html",restrict:"E",scope:{},link:function(a){a.Spec=e,a.parseShorthand=e.parseShorthand,a.parseVegalite=function(a){e.reset(JSON.parse(a))]),angular.module("polestar").directive("vgSpecEditor",["Spec",function(e){return{templateUrl:"components/vgSpecEditor/vgSpecEditor.html",restrict:"E",scope:{},link:function(a){a.Spec=e}}}]),angular.module("polestar").directive("nullFilterDirective",["Spec",function(e){return{templateUrl:"components/nullfilterdirective/nullfilterdirective.html",restrict:"E",scope:{},link:function(a,t,o){a.Spec=e,a.updateFilter=function(){e.update()]),angular.module("polestar").directive("lyraExport",function(){return{template:'Export to 
lyra',restrict:"E",replace:!0,scope:{},controller:["$scope","$timeout","Spec","Alerts",function(e,a,t,o){e["export"]=function(){var
 e=t.vgSpec;e||o.add("No vega spec 
present."),e.marks[0]["lyra.groupType"]="layer";var 
n="http://idl.cs.washington.edu/projects/lyra/app/",i=window.open(n,"_blank");a(function(){o.add("Please
 check whether lyra loaded the vega spec correctly. This feature is 
experimental and may not 
work.",5e3),i.postMessage({spec:e},n)},5e3)}}]}}),angular.module("polestar").directive("jsonInput",["JSON3",function(e){return{restrict:"A",require:"ngModel",scope:{},link:function(a,t,o,n){var
 i=function(a){return e.stringify(a,null,"  
",80)};n.$formatters.push(i)}}}]),angular.module("polestar").directive("configurationEditor",function(){return{templateUrl:"components/configurationeditor/configurationeditor.html",restrict:"E",scope:{},controller:["$scope","Config",function(e,a){e.Config=a}]}}),angular.module("polestar").service("Spec",["_","vg","vl","ZSchema","Alerts","Config","Dataset","Schema","Pills","consts",function(e,a,t,o,n,i,s,c,d,r){function
 l(t){for(var o in t)e.isObject(t[o])&&l(t[o]),(null===t[o]||void 
0===t[o]||e.isObject(t[o])&&0===a.util.keys(t[o]).length&&"bin"!==o||t[o]===[])&&delete
 t[o]}function p(e){return{}}function g(e,a,o){var 
n=a.type,i=t.channel.getSupportedRole(o),s=i.dimension&&!i.measure;a.field&&s?"count"===a.aggregate?a={}:n!==t.type.QUANTITATIVE||a.bin?n!==t.type.TEMPORAL||a.timeUnit||(a.timeUnit=r.defaultTimeFn):(a.aggregate=void
 0,a.bin={maxbins:t.bin.MAXBINS_DEFAULT}):a.field||(a={});var 
d=p(o),l=c.getChannelSchema(o).properties;for(var g in 
l)a[g]&&("value"===g&&a.field?delete d[g]:d[g]=a[g]);e[o]=d}var 
u={spec:null,chart:{vlSpec:null,encoding:null,shorthand:null,vgSpec:null}};return
 
u._removeEmptyFieldDefs=function(a){a.encoding=e.omit(a.encoding,function(e,o){return!e||void
 0===e.field&&void 
0===e.value||a.mark&&!t.channel.supportMark(o,a.mark)})},u.parseShorthand=function(e){var
 
a=t.shorthand.parseShorthand(e,null,i.config);u.reset(a)},u.reset=function(a){var
 
o={data:i.data,mark:"point",encoding:e.keys(c.schema.definitions.Encoding.properties).reduce(function(e,a){return
 
e[a]={},e},{}),config:i.config};a&&(o=t.util.mergeDeep(o,a)),u.spec=o},u.update=function(s){s=e.cloneDeep(s||u.spec),u._removeEmptyFieldDef

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Show polestar on screen when invoked.

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

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

Change subject: Show polestar on screen when invoked.
..

Show polestar on screen when invoked.

Change-Id: I9bbdab15b91bb856daad04206871e81d67dadf24
---
M wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/12/319012/1

diff --git a/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
index b8a72a1..7040b86 100644
--- a/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
@@ -40,6 +40,7 @@
} ).height( '98vh' );
 
$element.append( $container );
+   window.setTimeout( function() { $container.scrollIntoView(); }, 
50);
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bbdab15b91bb856daad04206871e81d67dadf24
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
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] wikidata...gui[master]: Update polestar - do not disable edit window.

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

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

Change subject: Update polestar - do not disable edit window.
..

Update polestar - do not disable edit window.

Change-Id: I8835b4a3da6b87d09e172f94667bb8dcf45e0dc0
---
M polestar/scripts/app.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/11/319011/1

diff --git a/polestar/scripts/app.js b/polestar/scripts/app.js
index 0e5e11e..fa3f053 100644
--- a/polestar/scripts/app.js
+++ b/polestar/scripts/app.js
@@ -29,4 +29,4 @@
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-"use 
strict";angular.module("polestar",["vlui","ngSanitize","ngTouch","ngDragDrop","zeroclipboard","Chronicle","LocalStorageModule","720kb.tooltips","ngOrderObjectBy","angular-google-analytics"]).constant("_",window._).constant("vl",window.vl).constant("vg",window.vg).constant("ZSchema",window.ZSchema).constant("Tether",window.Tether).constant("Drop",window.Drop).constant("Blob",window.Blob).constant("URL",window.URL).constant("jsondiffpatch",window.jsondiffpatch).config(["consts",function(e){window.vg.util.extend(e,{appId:"polestar",initialSpec:window.initialSpec||void
 
0,logToWebSql:!1})}]).config(["vl",function(e){e.config.defaultConfig.countTitle="COUNT"}]).config(["uiZeroclipConfigProvider",function(e){e.setZcConf({swfPath:"bower_components/zeroclipboard/dist/ZeroClipboard.swf"})}]).config(["localStorageServiceProvider",function(e){e.setPrefix("polestar")}]).decorator("Dataset",["$q","vg","$delegate",function(e,a,t){var
 o=t.update;return t.getUpdate=function(t,n){return 
t.url?e(function(e,o){a.util.load({url:t.url},function(e,a){e?console.log(e):n(t,a)}),e()}):o(t)},t}]),angular.module("polestar").directive("vlSpecEditor",["Spec",function(e){return{templateUrl:"components/vlSpecEditor/vlSpecEditor.html",restrict:"E",scope:{},link:function(a){a.Spec=e,a.parseShorthand=e.parseShorthand,a.parseVegalite=function(a){e.reset(JSON.parse(a))]),angular.module("polestar").directive("vgSpecEditor",["Spec",function(e){return{templateUrl:"components/vgSpecEditor/vgSpecEditor.html",restrict:"E",scope:{},link:function(a){a.Spec=e}}}]),angular.module("polestar").directive("nullFilterDirective",["Spec",function(e){return{templateUrl:"components/nullfilterdirective/nullfilterdirective.html",restrict:"E",scope:{},link:function(a,t,o){a.Spec=e,a.updateFilter=function(){e.update()]),angular.module("polestar").directive("lyraExport",function(){return{template:'Export to 
lyra',restrict:"E",replace:!0,scope:{},controller:["$scope","$timeout","Spec","Alerts",function(e,a,t,o){e["export"]=function(){var
 e=t.vgSpec;e||o.add("No vega spec 
present."),e.marks[0]["lyra.groupType"]="layer";var 
n="http://idl.cs.washington.edu/projects/lyra/app/",i=window.open(n,"_blank");a(function(){o.add("Please
 check whether lyra loaded the vega spec correctly. This feature is 
experimental and may not 
work.",5e3),i.postMessage({spec:e},n)},5e3)}}]}}),angular.module("polestar").directive("jsonInput",["JSON3",function(e){return{restrict:"A",require:"ngModel",scope:{},link:function(a,t,o,n){var
 i=function(a){return e.stringify(a,null,"  
",80)};n.$formatters.push(i)}}}]),angular.module("polestar").directive("configurationEditor",function(){return{templateUrl:"components/configurationeditor/configurationeditor.html",restrict:"E",scope:{},controller:["$scope","Config",function(e,a){e.Config=a}]}}),angular.module("polestar").service("Spec",["_","vg","vl","ZSchema","Alerts","Config","Dataset","Schema","Pills","consts",function(e,a,t,o,n,i,s,c,d,r){function
 l(t){for(var o in t)e.isObject(t[o])&&l(t[o]),(null===t[o]||void 
0===t[o]||e.isObject(t[o])&&0===a.util.keys(t[o]).length&&"bin"!==o||t[o]===[])&&delete
 t[o]}function p(e){return{}}function g(e,a,o){var 
n=a.type,i=t.channel.getSupportedRole(o),s=i.dimension&&!i.measure;a.field&&s?"count"===a.aggregate?a={}:n!==t.type.QUANTITATIVE||a.bin?n!==t.type.TEMPORAL||a.timeUnit||(a.timeUnit=r.defaultTimeFn):(a.aggregate=void
 0,a.bin={maxbins:t.bin.MAXBINS_DEFAULT}):a.field||(a={});var 
d=p(o),l=c.getChannelSchema(o).properties;for(var g in 
l)a[g]&&("value"===g&&a.field?delete d[g]:d[g]=a[g]);e[o]=d}var 
u={spec:null,chart:{vlSpec:null,encoding:null,shorthand:null,vgSpec:null}};return
 
u._removeEmptyFieldDefs=function(a){a.encoding=e.omit(a.encoding,function(e,o){return!e||void
 0===e.field&&void 
0===e.value||a.mark&&!t.channel.supportMark(o,a.mark)})},u.parseShorthand=function(e){var
 
a=t.shorthand.parseShorthand(e,null,i.config);u.reset(a)},u.reset=function(a){var
 
o={data:i.data,mark:"point",encoding:e.keys(c.schema.definitions.Encoding.properties).reduce(function(e,a){return
 
e[a]={},e},{}),config:i.config};a&&(o=t.util.mergeDeep(o,a)),u.spec=o},u.update=function(s){s=e

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Local geocoding for US addresses

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

Change subject: Local geocoding for US addresses
..


Local geocoding for US addresses

Sets latitude, longitude, and time zone for US addresses in a
civicrm_pre hook. Time zone is stored as UTC offset as that's
what the civicrm_address table expects.

Uses a zip code database released under CC-BY.

Bug: T148578
Change-Id: I03f00c016ee15f01206833df3fc52cabe0b735b8
---
M sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
A sites/all/modules/wmf_civicrm/update_7310.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
4 files changed, 43,343 insertions(+), 3 deletions(-)

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




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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Limit concurrent connections by client IP

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

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

Change subject: Limit concurrent connections by client IP
..

Limit concurrent connections by client IP

Bug: T108488
Change-Id: I079e0a5d19e54cce72ea54aeed512315fec4825f
---
M modules/wdqs/templates/nginx.erb
1 file changed, 13 insertions(+), 1 deletion(-)


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

diff --git a/modules/wdqs/templates/nginx.erb b/modules/wdqs/templates/nginx.erb
index 2fef012..4599016 100644
--- a/modules/wdqs/templates/nginx.erb
+++ b/modules/wdqs/templates/nginx.erb
@@ -3,7 +3,9 @@
 '"$request" $status $body_bytes_sent '
 '"$http_referer" "$http_user_agent" '
 '$request_time '
-'$upstream_response_time';
+'$upstream_response_time $http_x_client_ip $remote_addr';
+
+limit_conn_zone $http_x_client_ip zone=byaddr:10m;
 
 server {
 listen 80 default_server;
@@ -26,6 +28,12 @@
 if (-f /var/lib/nginx/wdqs/maintenance) {
 return 503;
 }
+   # Rate limit error
+error_page 429 @rate_limit;
+location @rate_limit {
+echo Rate limit exceeded;
+echo_flush;
+}
 
 location / {
 root <%= @package_dir %>/gui;
@@ -47,6 +55,10 @@
 location /bigdata/namespace/wdq/sparql {
 proxy_pass http://localhost:;
 
+# Allow only 3 connections per IP
+limit_conn byaddr 3;
+limit_conn_status 429;
+
 proxy_set_header Host $http_host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Test with node 4 & 6

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

Change subject: Test with node 4 & 6
..


Test with node 4 & 6

Change-Id: I29ce0c8152189723eec20d63011877a0822ac098
---
M .travis.yml
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/.travis.yml b/.travis.yml
index 563d7a0..461fd8f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,10 +3,10 @@
 node_js:
 # Keep this around until we deprecate and remove it.
 - "0.10.25"
-# Current production value.
-- "4.4.6"
-# Production, next
-- "4.6.0"
+# Production
+- "4"
+# Next LTS
+- "6"
 # From the nvm docs, "this installs the latest version of node".
 - "node"
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29ce0c8152189723eec20d63011877a0822ac098
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...graphoid[master]: Test node 6 & latest

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

Change subject: Test node 6 & latest
..


Test node 6 & latest

Change-Id: I49517351e8cd14a529b4236e982174f33aa6debe
---
M .travis.yml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/.travis.yml b/.travis.yml
index f33adc7..34ca0bf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,4 +6,5 @@
   - "0.10"
   - "0.12"
   - "4"
-  - "5"
+  - "6"
+  - "node"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49517351e8cd14a529b4236e982174f33aa6debe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...graphoid[master]: Test node 6 & latest

2016-10-31 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Test node 6 & latest
..

Test node 6 & latest

Change-Id: I49517351e8cd14a529b4236e982174f33aa6debe
---
M .travis.yml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/graphoid 
refs/changes/09/319009/1

diff --git a/.travis.yml b/.travis.yml
index f33adc7..34ca0bf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,4 +6,5 @@
   - "0.10"
   - "0.12"
   - "4"
-  - "5"
+  - "6"
+  - "node"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49517351e8cd14a529b4236e982174f33aa6debe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/graphoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] mediawiki...citoid[master]: Test node 6 & latest

2016-10-31 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Test node 6 & latest
..

Test node 6 & latest

Change-Id: I982f898f9db7f33e1f4551fc18122b8bbd4421cb
---
M .travis.yml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid 
refs/changes/08/319008/1

diff --git a/.travis.yml b/.travis.yml
index f33adc7..34ca0bf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,4 +6,5 @@
   - "0.10"
   - "0.12"
   - "4"
-  - "5"
+  - "6"
+  - "node"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I982f898f9db7f33e1f4551fc18122b8bbd4421cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add in NewsletterDiffEngine to explore history

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

Change subject: Add in NewsletterDiffEngine to explore history
..


Add in NewsletterDiffEngine to explore history

Bug: T138462
Change-Id: I2dcc79762f8e129996e8f5f5dd6c568b0144102e
---
M extension.json
A includes/content/NewsletterDiffEngine.php
2 files changed, 65 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 740310f..6876d65 100644
--- a/extension.json
+++ b/extension.json
@@ -83,6 +83,7 @@
"ApiNewsletterSubscribe": 
"includes/api/ApiNewsletterSubscribe.php",
"NewsletterContent": "includes/content/NewsletterContent.php",
"NewsletterContentHandler": 
"includes/content/NewsletterContentHandler.php",
+   "NewsletterDiffEngine": 
"includes/content/NewsletterDiffEngine.php",
"NewsletterDeletionUpdate": 
"includes/content/NewsletterDeletionUpdate.php",
"EchoNewsletterUserLocator": 
"includes/Echo/EchoNewsletterUserLocator.php",
"EchoNewsletterFormatter": 
"includes/Echo/EchoNewsletterFormatter.php",
diff --git a/includes/content/NewsletterDiffEngine.php 
b/includes/content/NewsletterDiffEngine.php
new file mode 100644
index 000..939c81d
--- /dev/null
+++ b/includes/content/NewsletterDiffEngine.php
@@ -0,0 +1,64 @@
+generateTextDiffBody(
+   $old->getDescription(), $new->getDescription()
+   );
+
+   if ( $descDiff ) {
+   if ( trim( $descDiff ) !== '' ) {
+   $output .= Html::openElement( 'tr' );
+   $output .= Html::openElement( 'td',
+   [ 'colspan' => 4, 'id' => 
'mw-newsletter-diffdescheader' ] );
+   $output .= Html::element( 'h4', [],
+   $this->msg( 
'newsletter-diff-descheader' )->text() );
+   $output .= Html::closeElement( 'td' );
+   $output .= Html::closeElement( 'tr' );
+   $output .= $descDiff;
+   }
+   }
+
+   $mainPageDiff = $this->generateTextDiffBody(
+   $old->getMainPage(), $new->getMainPage()
+   );
+
+   if ( $mainPageDiff ) {
+   if( trim( $mainPageDiff ) !== '' ) {
+   $output .= Html::openElement( 'tr' );
+   $output .= Html::openElement( 'td',
+   [ 'colspan' => 4, 'id' => 
'mw-newsletter-diffmainpageheader' ] );
+   $output .= Html::element( 'h4', [],
+   $this->msg( 
'newsletter-diff-mainpageheader' )->text() );
+   $output .= Html::closeElement( 'td' );
+   $output .= Html::closeElement( 'tr' );
+   $output .= $mainPageDiff;
+   }
+   }
+
+   $publishersDiff = $this->generateTextDiffBody(
+   implode( $old->getPublishers(), "\n" ),
+   implode( $new->getPublishers(), "\n" )
+   );
+
+   if ( trim( $publishersDiff ) !== '' ) {
+   $output .= Html::openElement( 'tr' );
+   $output .= Html::openElement( 'td',
+   [ 'colspan' => 4, 'id' => 
'mw-massmessage-diffpublishersheader' ] );
+   $output .= Html::element( 'h4', [],
+   $this->msg( 'massmessage-diff-publishersheader' 
)->text() );
+   $output .= Html::closeElement( 'td' );
+   $output .= Html::closeElement( 'tr' );
+   $output .= $publishersDiff;
+   }
+
+   return $output;
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dcc79762f8e129996e8f5f5dd6c568b0144102e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add in NewsletterDiffEngine to explore history

2016-10-31 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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

Change subject: Add in NewsletterDiffEngine to explore history
..

Add in NewsletterDiffEngine to explore history

Bug: T138462
Change-Id: I2dcc79762f8e129996e8f5f5dd6c568b0144102e
---
M Newsletter.hooks.php
M extension.json
M includes/NewsletterEditPage.php
A includes/content/NewsletterDiffEngine.php
4 files changed, 69 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/07/319007/1

diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 193808e..2410d69 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -166,10 +166,9 @@
$newsletter = Newsletter::newFromName( 
$article->getTitle()->getText() );
if ( $newsletter ) {
// A newsletter exists in that title, lets redirect to 
manage page
-   $editPage = new NewsletterEditPage( 
$article->getContext(), $newsletter, $user );
-   $editPage->edit();
-
-   return false;
+   $title = SpecialPage::getTitleFor( 'Newsletter', 
$newsletter->getId() . '/' .
+   'manage' );
+   $out->redirect( $title->getFullURL() );
}
 
$editPage = new NewsletterEditPage( $article->getContext() );
diff --git a/extension.json b/extension.json
index 740310f..6876d65 100644
--- a/extension.json
+++ b/extension.json
@@ -83,6 +83,7 @@
"ApiNewsletterSubscribe": 
"includes/api/ApiNewsletterSubscribe.php",
"NewsletterContent": "includes/content/NewsletterContent.php",
"NewsletterContentHandler": 
"includes/content/NewsletterContentHandler.php",
+   "NewsletterDiffEngine": 
"includes/content/NewsletterDiffEngine.php",
"NewsletterDeletionUpdate": 
"includes/content/NewsletterDeletionUpdate.php",
"EchoNewsletterUserLocator": 
"includes/Echo/EchoNewsletterUserLocator.php",
"EchoNewsletterFormatter": 
"includes/Echo/EchoNewsletterFormatter.php",
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index aab3708..4a35ac6 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -10,11 +10,10 @@
 
public function __construct( IContextSource $context, Newsletter 
$newsletter = null, User $user = null) {
$this->context = $context;
-   $this->user = $context->getUser();
+   $this->user = $user ? : $context->getUser();
$this->title = $context->getTitle();
$this->out = $context->getOutput();
$this->newsletter = $newsletter;
-   $this->user = $user;
}
 
public function edit() {
diff --git a/includes/content/NewsletterDiffEngine.php 
b/includes/content/NewsletterDiffEngine.php
new file mode 100644
index 000..939c81d
--- /dev/null
+++ b/includes/content/NewsletterDiffEngine.php
@@ -0,0 +1,64 @@
+generateTextDiffBody(
+   $old->getDescription(), $new->getDescription()
+   );
+
+   if ( $descDiff ) {
+   if ( trim( $descDiff ) !== '' ) {
+   $output .= Html::openElement( 'tr' );
+   $output .= Html::openElement( 'td',
+   [ 'colspan' => 4, 'id' => 
'mw-newsletter-diffdescheader' ] );
+   $output .= Html::element( 'h4', [],
+   $this->msg( 
'newsletter-diff-descheader' )->text() );
+   $output .= Html::closeElement( 'td' );
+   $output .= Html::closeElement( 'tr' );
+   $output .= $descDiff;
+   }
+   }
+
+   $mainPageDiff = $this->generateTextDiffBody(
+   $old->getMainPage(), $new->getMainPage()
+   );
+
+   if ( $mainPageDiff ) {
+   if( trim( $mainPageDiff ) !== '' ) {
+   $output .= Html::openElement( 'tr' );
+   $output .= Html::openElement( 'td',
+   [ 'colspan' => 4, 'id' => 
'mw-newsletter-diffmainpageheader' ] );
+   $output .= Html::element( 'h4', [],
+   $this->msg( 
'newsletter-diff-mainpageheader' )->text() );
+   $output .= Html::closeElement( 'td' );
+   $output .= Html::closeElement( 'tr' );
+   $output .= $mainPageDiff;
+   }
+   }
+
+   $publishersDiff = $this->generat

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: MF Beta: Don't move first paragraph before infobox

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

Change subject: MF Beta: Don't move first paragraph before infobox
..


MF Beta: Don't move first paragraph before infobox

Let's fix all known issues and then re-enable the feature
in beta.

Bug: T145216
Bug: T149389
Change-Id: I319d751176039c984479037bccabf7a8d849cdfe
---
M wmf-config/InitialiseSettings.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 215b5ea..c9c1f72 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14618,6 +14618,15 @@
'HTML' => [],
],
 ],
+
+'wgMFShowFirstParagraphBeforeInfobox' => [
+   // T145216#2757310
+   'default' => [
+   'base' => false,
+   'beta' => false
+   ]
+],
+
 'wgMFLazyLoadImages' => [
// T142399
'default' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Show up NewsletterEditPage for editing Newsletter content

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

Change subject: Show up NewsletterEditPage for editing Newsletter content
..


Show up NewsletterEditPage for editing Newsletter content

* kill the Special:Newsletter/id/manage functionality
* links from the newsletetrpager directly redirects to the Newsletter:Foo
* fixed links in navigation and other subtitles

Bug: T138462
Change-Id: I4c8c7b9a65dd628d1889bc5c837df50ae8334d59
---
M Newsletter.hooks.php
M i18n/en.json
M i18n/qqq.json
M includes/NewsletterEditPage.php
M includes/NewsletterValidator.php
M includes/content/NewsletterContent.php
M includes/content/NewsletterContentHandler.php
M includes/specials/SpecialNewsletter.php
M includes/specials/pagers/NewsletterTablePager.php
9 files changed, 311 insertions(+), 279 deletions(-)

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



diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 2410d69..193808e 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -166,9 +166,10 @@
$newsletter = Newsletter::newFromName( 
$article->getTitle()->getText() );
if ( $newsletter ) {
// A newsletter exists in that title, lets redirect to 
manage page
-   $title = SpecialPage::getTitleFor( 'Newsletter', 
$newsletter->getId() . '/' .
-   'manage' );
-   $out->redirect( $title->getFullURL() );
+   $editPage = new NewsletterEditPage( 
$article->getContext(), $newsletter, $user );
+   $editPage->edit();
+
+   return false;
}
 
$editPage = new NewsletterEditPage( $article->getContext() );
diff --git a/i18n/en.json b/i18n/en.json
index a328f01..1c348bd 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -67,6 +67,7 @@
"newsletter-manage-remove-self-publisher": "Are you sure that you want 
to remove yourself from the publishers?",
"newsletter-manage-newsletter-success": "The newsletter have been 
modified.",
"newsletter-manage-newsletter-nochanges": "No changes were made to the 
existing newsletter.",
+   "newsletter-manage-summary": "Summary of the change:",
"newsletter-delete": "Delete newsletter",
"newsletter-delete-text": "This interface can be used to delete the 
\"$1\" newsletter. Please confirm that you intend to do this. This 
action cannot be undone.",
"newsletter-delete-reason": "Reason",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ed510ab..2849c90 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -74,6 +74,7 @@
"newsletter-manage-remove-self-publisher": "Confirmation message shown 
on Special:Newsletter's manage form if the user removes themselves from the 
publishers' list.",
"newsletter-manage-newsletter-success": "Success message shown on 
Special:Newsletter's manage form when the publishers have been modfied.",
"newsletter-manage-newsletter-nochanges": "Message shown on 
Special:Newsletter if no changes were made to the existing publishers' list.",
+   "newsletter-manage-summary": "Edit summary for updating fields in 
Special:Newsletter's manage form",
"newsletter-delete": "Header message shown on 
Special:Newsletter//delete.\n\nSee also:\n* 
{{msg-mw|newsletter-view}}\n*{{msg-mw|newsletter-subscribe}}",
"newsletter-delete-text": "Introductory message shown on 
Special:Newsletter//delete.\n\nParameters:\n* $1 - Name of the newsletter 
for the specified id.",
"newsletter-delete-reason": "Label of text field on 
Special:Newsletter//delete\n{{Identical|Reason}}",
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index d752b3f..aab3708 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -8,28 +8,46 @@
 
protected $newsletter;
 
-   public function __construct( IContextSource $context ) {
+   public function __construct( IContextSource $context, Newsletter 
$newsletter = null, User $user = null) {
$this->context = $context;
$this->user = $context->getUser();
$this->title = $context->getTitle();
$this->out = $context->getOutput();
+   $this->newsletter = $newsletter;
+   $this->user = $user;
}
 
public function edit() {
if ( wfReadOnly() ) {
throw new ReadOnlyError;
}
-
$this->createNew = !$this->title->exists();
+   if ( !$this->createNew ) {
+   // A newsletter exists, lets open the edit page
+   if ( $this->user->isBlocked() ) {
+   throw new UserBlockedError( 
$this->user->getBlock() );
+   }
 
-   $permErrors = $this->

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Turn off revision number in graph img srv

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

Change subject: Turn off revision number in graph img srv
..


Turn off revision number in graph img srv

This will force graph service to use title instead
of the revision number, thus keeping cache hit rate
much higher. Eventually the graphoid service should
stop requiring the revid.

Change-Id: I2848183fe9621a41d566c595fcdf4014232fa102
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37c6718..215b5ea 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14455,7 +14455,7 @@
 // %3\$s = revid
 // %4\$s = hash
 'wgGraphImgServiceUrl' => [
-   'default' => "/api/rest_v1/page/graph/png/%2\$s/%3\$s/%4\$s.png",
+   'default' => "/api/rest_v1/page/graph/png/%2\$s/0/%4\$s.png",
'private' => false,
 ],
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Fix hiera variable access for drbd config

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

Change subject: nfs: Fix hiera variable access for drbd config
..


nfs: Fix hiera variable access for drbd config

Change-Id: I6343688a575cb671fd4139470ea65496c8c8ff48
---
M modules/role/manifests/labs/nfs/secondary.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index 4c320e4..2fb365b 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -50,7 +50,7 @@
 
 $subnet_gateway_ip = '10.64.37.1'
 
-$drbd_resource_config = hiera({}, 'drbd_resource_config')
+$drbd_resource_config = hiera('drbd_resource_config', {})
 $drbd_resources = keys($drbd_resource_config)
 
 labstore::drbd::resource { $drbd_resources:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6343688a575cb671fd4139470ea65496c8c8ff48
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Madhuvishy 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: LABS: Enable tabular data lua support

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

Change subject: LABS: Enable tabular data lua support
..


LABS: Enable tabular data lua support

Bug: T148745
Change-Id: I649a4867e41d491c66168d4685e8dec10dacf535
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 14403a0..d6c46cc 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -192,6 +192,7 @@
'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
];
}
+   $wgJsonConfigEnableLuaSupport = true;
 }
 
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Fix hiera variable access for drbd config

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

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

Change subject: nfs: Fix hiera variable access for drbd config
..

nfs: Fix hiera variable access for drbd config

Change-Id: I6343688a575cb671fd4139470ea65496c8c8ff48
---
M modules/role/manifests/labs/nfs/secondary.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index 4c320e4..2fb365b 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -50,7 +50,7 @@
 
 $subnet_gateway_ip = '10.64.37.1'
 
-$drbd_resource_config = hiera({}, 'drbd_resource_config')
+$drbd_resource_config = hiera('drbd_resource_config', {})
 $drbd_resources = keys($drbd_resource_config)
 
 labstore::drbd::resource { $drbd_resources:

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Removed unused wmgUseGraphWithNamespace support

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

Change subject: Removed unused wmgUseGraphWithNamespace support
..


Removed unused wmgUseGraphWithNamespace support

This feature is not used anywhere, and will be removed
from the code.

Change-Id: I7c8af650515477b3c3eaea0d072da8c218645529
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 3c8cc4b..57d844c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3080,15 +3080,6 @@
],
];
 
-   if ( $wmgUseGraphWithNamespace ) {
-   $wgJsonConfigModels['Graph.JsonConfig'] = 'Graph\Content';
-   $wgJsonConfigs['Graph.JsonConfig'] = [
-   'namespace' => 484,
-   'nsName' => 'Graph',
-   'isLocal' => true,
-   ];
-   }
-
if ( $wmgUseGraphWithJsonNamespace ) {
$wgJsonConfigModels['Json.JsonConfig'] = null;
$wgJsonConfigs['Json.JsonConfig'] = [
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 06addb0..37c6718 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14459,10 +14459,6 @@
'private' => false,
 ],
 
-'wmgUseGraphWithNamespace' => [
-   'default' => false,
-],
-
 'wmgUseGraphWithJsonNamespace' => [
'default' => false,
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c8af650515477b3c3eaea0d072da8c218645529
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Create patroller usergroup for enwiki

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

Change subject: Create patroller usergroup for enwiki
..


Create patroller usergroup for enwiki

The patroller usergroup is given 'patrol'. Admins can add/remove
the patroller usergroup. The removal from autoconfirmed and
reviewer will be done in a later commit to give time to populate
the new group.

Bug: T149019
Change-Id: I18a9e5d47ff306c1ea7033eb469fbdb19d1f772d
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 64b9f2d..06addb0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7792,6 +7792,7 @@
'move-subpages' => true,
'move' => true,
],
+   'patroller' => [ 'patrol' => true ], // T149019
],
'+enwikibooks' => [
// 'rollbacker' => array( 'rollback' => true ),
@@ -9304,7 +9305,7 @@
],
'+enwiki' => [
'bureaucrat' => [ 'accountcreator', 'flow-bot' ],
-   'sysop' => [ 'abusefilter', 'accountcreator', 'autoreviewer', 
'confirmed', 'filemover', 'reviewer', 'rollbacker', 'templateeditor', 
'massmessage-sender', 'extendedconfirmed', 'extendedmover' ], // T126607, 
T133981
+   'sysop' => [ 'abusefilter', 'accountcreator', 'autoreviewer', 
'confirmed', 'filemover', 'reviewer', 'rollbacker', 'templateeditor', 
'massmessage-sender', 'extendedconfirmed', 'extendedmover', 'patroller' ], // 
T126607, T133981, T149019
],
'+enwikibooks' => [
'sysop' => [ 'transwiki', 'uploader' ],
@@ -9989,7 +9990,7 @@
],
'+enwiki' => [
'bureaucrat' => [ 'ipblock-exempt', 'accountcreator', 'sysop', 
'flow-bot' ],
-   'sysop' => [ 'rollbacker', 'accountcreator', 'abusefilter', 
'autoreviewer', 'confirmed', 'reviewer', 'filemover', 'templateeditor', 
'massmessage-sender', 'extendedconfirmed', 'extendedmover' ], // T126607, 
T133981
+   'sysop' => [ 'rollbacker', 'accountcreator', 'abusefilter', 
'autoreviewer', 'confirmed', 'reviewer', 'filemover', 'templateeditor', 
'massmessage-sender', 'extendedconfirmed', 'extendedmover', 'patroller' ], // 
T126607, T133981, T149019
],
'+enwikibooks' => [
'sysop' => [ 'transwiki', 'uploader', ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18a9e5d47ff306c1ea7033eb469fbdb19d1f772d
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Cenarium 
Gerrit-Reviewer: Andy M. Wang 
Gerrit-Reviewer: Cenarium 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Move drbd resource config to hiera

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

Change subject: nfs: Move drbd resource config to hiera
..


nfs: Move drbd resource config to hiera

Change-Id: I709edf75763aea07c38f50106cd58a3b5076ff82
---
M hieradata/role/common/labs/nfs/secondary.yaml
M modules/role/manifests/labs/nfs/secondary.pp
2 files changed, 17 insertions(+), 21 deletions(-)

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



diff --git a/hieradata/role/common/labs/nfs/secondary.yaml 
b/hieradata/role/common/labs/nfs/secondary.yaml
index 57889f4..2db65d4 100644
--- a/hieradata/role/common/labs/nfs/secondary.yaml
+++ b/hieradata/role/common/labs/nfs/secondary.yaml
@@ -12,3 +12,16 @@
 debdeploy::grains:
   debdeploy-labsnfs:
 value: standard
+drbd_resource_config:
+  test:
+port: '7790'
+device: '/dev/drbd1'
+disk: '/dev/misc/test'
+  tools:
+port: '7791'
+device: '/dev/drbd4'
+disk: '/dev/tools/tools-project'
+  others:
+port: '7792'
+device: '/dev/drbd3'
+disk: '/dev/misc/others'
diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index f4a5b72..4c320e4 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -50,31 +50,14 @@
 
 $subnet_gateway_ip = '10.64.37.1'
 
-$drbd_resource_config = {
-test   => {
-port   => '7790',
-device => '/dev/drbd1',
-disk   => '/dev/misc/test',
-},
-tools  => {
-port   => '7791',
-device => '/dev/drbd4',
-disk   => '/dev/tools/tools-project',
-},
-others => {
-port   => '7792',
-device => '/dev/drbd3',
-disk   => '/dev/misc/others',
-},
-}
-
+$drbd_resource_config = hiera({}, 'drbd_resource_config')
 $drbd_resources = keys($drbd_resource_config)
 
 labstore::drbd::resource { $drbd_resources:
 drbd_cluster => $drbd_cluster,
-port => $drbd_resource_config[$title][port],
-device   => $drbd_resource_config[$title][device],
-disk => $drbd_resource_config[$title][disk],
+port => $drbd_resource_config[$title]['port'],
+device   => $drbd_resource_config[$title]['device'],
+disk => $drbd_resource_config[$title]['disk'],
 require  => Interface::Ip['drbd-replication'],
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix possible memory leak in BottomSheetPresenter.

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

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

Change subject: Fix possible memory leak in BottomSheetPresenter.
..

Fix possible memory leak in BottomSheetPresenter.

I've observed a memory leak in API 23, which seems to be caused by our
BottomSheetPresenter holding on to a reference of FragmentManager.

This patch updates the Presenter to hold only a weak reference to the
FragmentManager, which fixes this leak.

Change-Id: I930ef47b5ae39f32cdd7659e00ac09780f1ad88d
---
M app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetPresenter.java
1 file changed, 12 insertions(+), 4 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetPresenter.java 
b/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetPresenter.java
index c7664e3..62490a6 100644
--- a/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetPresenter.java
+++ b/app/src/main/java/org/wikipedia/page/ExclusiveBottomSheetPresenter.java
@@ -5,18 +5,23 @@
 import android.support.v4.app.DialogFragment;
 import android.support.v4.app.FragmentManager;
 
+import java.lang.ref.WeakReference;
+
 public class ExclusiveBottomSheetPresenter {
 private static final String BOTTOM_SHEET_FRAGMENT_TAG = 
"bottom_sheet_fragment";
-private FragmentManager fragmentManager;
+private WeakReference fragmentManager;
 private Dialog currentDialog;
 
 public ExclusiveBottomSheetPresenter(FragmentManager fragmentManager) {
-this.fragmentManager = fragmentManager;
+this.fragmentManager = new WeakReference<>(fragmentManager);
 }
 
 public void show(DialogFragment dialog) {
+if (fragmentManager.get() == null) {
+return;
+}
 dismiss();
-dialog.show(fragmentManager, BOTTOM_SHEET_FRAGMENT_TAG);
+dialog.show(fragmentManager.get(), BOTTOM_SHEET_FRAGMENT_TAG);
 }
 
 public void show(Dialog dialog) {
@@ -32,7 +37,10 @@
 }
 
 public void dismiss() {
-DialogFragment dialog = (DialogFragment) 
fragmentManager.findFragmentByTag(BOTTOM_SHEET_FRAGMENT_TAG);
+if (fragmentManager.get() == null) {
+return;
+}
+DialogFragment dialog = (DialogFragment) 
fragmentManager.get().findFragmentByTag(BOTTOM_SHEET_FRAGMENT_TAG);
 if (dialog != null) {
 dialog.dismiss();
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I930ef47b5ae39f32cdd7659e00ac09780f1ad88d
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] VisualEditor/VisualEditor[master]: Extract DM document from node instead of passing it as argument

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

Change subject: Extract DM document from node instead of passing it as argument
..


Extract DM document from node instead of passing it as argument

Change-Id: I9ce3d51b399c77378a8e79c27447873e32a0a651
---
M src/dm/ve.dm.VisualDiff.js
M src/ve.DiffTreeNode.js
2 files changed, 5 insertions(+), 7 deletions(-)

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



diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js
index 7368e1c..adf90b3 100644
--- a/src/dm/ve.dm.VisualDiff.js
+++ b/src/dm/ve.dm.VisualDiff.js
@@ -409,8 +409,8 @@
return cleanDiff;
}
 
-   oldDocChildTree = new this.treeDiffer.Tree( oldDocChild, 
ve.DiffTreeNode, { doc: this.oldDoc } );
-   newDocChildTree = new this.treeDiffer.Tree( newDocChild, 
ve.DiffTreeNode, { doc: this.newDoc } );
+   oldDocChildTree = new this.treeDiffer.Tree( oldDocChild, 
ve.DiffTreeNode );
+   newDocChildTree = new this.treeDiffer.Tree( newDocChild, 
ve.DiffTreeNode );
 
treeDiff = new this.treeDiffer.Differ( oldDocChildTree, newDocChildTree 
)
.transactions[ oldDocChildTree.orderedNodes.length - 1 ][ 
newDocChildTree.orderedNodes.length - 1 ];
diff --git a/src/ve.DiffTreeNode.js b/src/ve.DiffTreeNode.js
index 69bfb9a..c09b846 100644
--- a/src/ve.DiffTreeNode.js
+++ b/src/ve.DiffTreeNode.js
@@ -16,11 +16,11 @@
  * @param {Object} node Node of any type
  * @param {Object} config
  */
-ve.DiffTreeNode = function ( node, config ) {
+ve.DiffTreeNode = function ( node ) {
// Parent constructor
-   ve.DiffTreeNode.parent.call( this, node );
+   ve.DiffTreeNode.super.apply( this, arguments );
 
-   this.doc = config.doc;
+   this.doc = node.getDocument();
 };
 
 /* Inheritance */
@@ -38,7 +38,6 @@
  * @return {boolean} The nodes are equal
  */
 ve.DiffTreeNode.prototype.isEqual = function ( otherNode ) {
-
if ( this.node instanceof ve.dm.ContentBranchNode && otherNode.node 
instanceof ve.dm.ContentBranchNode ) {
return JSON.stringify( this.doc.getData( 
this.node.getOuterRange() ) ) ===
JSON.stringify( otherNode.doc.getData( 
otherNode.node.getOuterRange() ) );
@@ -46,7 +45,6 @@
return ( this.node.element.type === otherNode.node.element.type 
&&
ve.compare( this.node.element.attributes, 
otherNode.node.element.attributes ) );
}
-
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ce3d51b399c77378a8e79c27447873e32a0a651
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Move drbd resource config to hiera

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

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

Change subject: nfs: Move drbd resource config to hiera
..

nfs: Move drbd resource config to hiera

Change-Id: I709edf75763aea07c38f50106cd58a3b5076ff82
---
M hieradata/role/common/labs/nfs/secondary.yaml
M modules/role/manifests/labs/nfs/secondary.pp
2 files changed, 14 insertions(+), 18 deletions(-)


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

diff --git a/hieradata/role/common/labs/nfs/secondary.yaml 
b/hieradata/role/common/labs/nfs/secondary.yaml
index 57889f4..2db65d4 100644
--- a/hieradata/role/common/labs/nfs/secondary.yaml
+++ b/hieradata/role/common/labs/nfs/secondary.yaml
@@ -12,3 +12,16 @@
 debdeploy::grains:
   debdeploy-labsnfs:
 value: standard
+drbd_resource_config:
+  test:
+port: '7790'
+device: '/dev/drbd1'
+disk: '/dev/misc/test'
+  tools:
+port: '7791'
+device: '/dev/drbd4'
+disk: '/dev/tools/tools-project'
+  others:
+port: '7792'
+device: '/dev/drbd3'
+disk: '/dev/misc/others'
diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index f4a5b72..ba1cf66 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -50,24 +50,7 @@
 
 $subnet_gateway_ip = '10.64.37.1'
 
-$drbd_resource_config = {
-test   => {
-port   => '7790',
-device => '/dev/drbd1',
-disk   => '/dev/misc/test',
-},
-tools  => {
-port   => '7791',
-device => '/dev/drbd4',
-disk   => '/dev/tools/tools-project',
-},
-others => {
-port   => '7792',
-device => '/dev/drbd3',
-disk   => '/dev/misc/others',
-},
-}
-
+$drbd_resource_config = hiera({}, 'drbd_resource_config')
 $drbd_resources = keys($drbd_resource_config)
 
 labstore::drbd::resource { $drbd_resources:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Rename some impressionDiet variables

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

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

Change subject: Rename some impressionDiet variables
..

Rename some impressionDiet variables

Implementing awight's TODOs from I7d1c2b6672d5ef12405d1f43a36ea3f5e01da21c

Bug: T121178
Change-Id: I32f693f075fcf1d55439f5a85cae12000398ac26
---
M resources/subscribing/ext.centralNotice.impressionDiet.js
1 file changed, 44 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/03/319003/1

diff --git a/resources/subscribing/ext.centralNotice.impressionDiet.js 
b/resources/subscribing/ext.centralNotice.impressionDiet.js
index c9de6d0..b88d6f9 100644
--- a/resources/subscribing/ext.centralNotice.impressionDiet.js
+++ b/resources/subscribing/ext.centralNotice.impressionDiet.js
@@ -26,12 +26,14 @@
/**
 * Object with data used to determine whether to hide the banner
 * Properties:
-*   seenCount: Total number of impressions seen by this 
user
-*   waitCount: Number of impressions we've waited for on 
this cycle
-*   waitUntil: Timestamp (ms) until we can show another 
banner
-*   waitSeenCount: Number of impressions seen this cycle
+*   seenCount:Total number of impressions seen by this 
user
+*   skippedThisCycle: Number of initial impressions we've 
skipped this cycle
+*   nextCycleStart:   Unix timestamp after which we can show 
more banners
+*   seenThisCycle:Number of impressions seen this cycle
 */
counts,
+
+   now = new Date().getTime(),
 
STORAGE_KEY = 'impression_diet',
 
@@ -80,30 +82,29 @@
counts = getCounts();
}
 
-   if ( counts.waitUntil < new Date().getTime()
-   && counts.waitSeenCount >= mixinParams.maximumSeen
+   if ( now > counts.nextCycleStart
+   && counts.seenThisCycle >= mixinParams.maximumSeen
) {
// We're beyond the wait period, and have nothing to do 
except
// maybe start a new cycle.
 
if ( mixinParams.restartCycleDelay !== 0 ) {
// Begin a new cycle by clearing counters.
-   counts.waitCount = 0;
-   counts.waitSeenCount = 0;
+   counts.skippedThisCycle = 0;
+   counts.seenThisCycle = 0;
}
}
 
// Compare counts against campaign settings and decide whether 
to
// show a banner
 
-   if ( counts.waitSeenCount < mixinParams.maximumSeen ) {
+   if ( counts.seenThisCycle < mixinParams.maximumSeen ) {
// You haven't seen the maximum count of banners per 
cycle!
 
-   if ( counts.waitCount < mixinParams.skipInitial ) {
+   if ( counts.skippedThisCycle < mixinParams.skipInitial 
) {
// Skip initial impressions.
hide = 'waitimps';
-   // TODO: rename skippedThisCycle
-   counts.waitCount += 1;
+   counts.skippedThisCycle += 1;
} else {
// Show a banner--you win!
hide = false;
@@ -118,17 +119,14 @@
cn.cancelBanner( hide );
} else {
// Count shown impression.
-   // TODO: rename seenThisCycle
-   counts.waitSeenCount += 1;
+   counts.seenThisCycle += 1;
counts.seenCount += 1;
 
// Reset the wait timer on every impression.  The 
configured delay
// is the minumum amount of time allowed between the 
final impression
// and the start of the next cycle.
-   //
-   // TODO: rename: nextCycleAt
 
-   counts.waitUntil = new Date().getTime() +
+   counts.nextCycleStart = now +
( mixinParams.restartCycleDelay * 1000 );
}
 
@@ -139,9 +137,28 @@
function getZeroedCounts() {
return {
seenCount: 0,
-   waitCount: 0,
-   waitUntil: 0,
-   waitSeenCount: 0
+   skippedThisCycle: 0,
+   nextCycleStart: 0,
+   seen

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove #rebuildTree calls and ensure #getDocumentNode is used

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

Change subject: Remove #rebuildTree calls and ensure #getDocumentNode is used
..


Remove #rebuildTree calls and ensure #getDocumentNode is used

Change-Id: I2e95ea905f15196c7825d45172350d776e6159b8
---
M demos/ve/ve.demo.SurfaceContainer.js
M src/dm/ve.dm.VisualDiff.js
M src/ui/elements/ve.ui.DiffElement.js
3 files changed, 4 insertions(+), 10 deletions(-)

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



diff --git a/demos/ve/ve.demo.SurfaceContainer.js 
b/demos/ve/ve.demo.SurfaceContainer.js
index 251be23..1ba1f68 100644
--- a/demos/ve/ve.demo.SurfaceContainer.js
+++ b/demos/ve/ve.demo.SurfaceContainer.js
@@ -83,7 +83,6 @@
diffButton.on( 'click', function () {
var windowManager = new OO.ui.WindowManager( { factory: 
ve.ui.windowFactory } );
$( 'body' ).append( windowManager.$element );
-   container.target.oldDoc.rebuildTree();
windowManager.openWindow( 'diff' );
} );
 
@@ -290,7 +289,6 @@
 
dmDoc = this.surface.getModel().getDocument();
this.target.oldDoc = dmDoc.cloneFromRange( new ve.Range( 0, 
dmDoc.data.getLength() ) );
-   // rebuildTree is called when getDiff is run
 
this.$surfaceWrapper.empty().append( this.surface.$element.parent() )
.hide().slideDown().promise().done( function () {
diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js
index 7368e1c..611e7eb 100644
--- a/src/dm/ve.dm.VisualDiff.js
+++ b/src/dm/ve.dm.VisualDiff.js
@@ -21,10 +21,8 @@
 
this.oldDoc = oldDoc.cloneFromRange();
this.newDoc = newDoc.cloneFromRange();
-   this.oldDoc.rebuildTree();
-   this.newDoc.rebuildTree();
-   this.oldDocNode = oldDoc.documentNode;
-   this.newDocNode = newDoc.documentNode;
+   this.oldDocNode = oldDoc.getDocumentNode();
+   this.newDocNode = newDoc.getDocumentNode();
this.oldDocChildren = this.oldDocNode.children;
this.newDocChildren = this.newDocNode.children;
this.treeDiffer = treeDiffer;
diff --git a/src/ui/elements/ve.ui.DiffElement.js 
b/src/ui/elements/ve.ui.DiffElement.js
index 7ccd650..cb88dee 100644
--- a/src/ui/elements/ve.ui.DiffElement.js
+++ b/src/ui/elements/ve.ui.DiffElement.js
@@ -28,10 +28,8 @@
// Documents
this.oldDoc = visualDiff.oldDoc;
this.newDoc = visualDiff.newDoc;
-   this.oldDoc.rebuildTree();
-   this.newDoc.rebuildTree();
-   this.oldDocChildren = this.oldDoc.documentNode.children;
-   this.newDocChildren = this.newDoc.documentNode.children;
+   this.oldDocChildren = this.oldDoc.getDocumentNode().children;
+   this.newDocChildren = this.newDoc.getDocumentNode().children;
 
// Diff
this.oldToNew = diff.docChildrenOldToNew;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e95ea905f15196c7825d45172350d776e6159b8
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use order id as error reference when possible

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

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

Change subject: Use order id as error reference when possible
..

Use order id as error reference when possible

If for some reason it doesn't exist, fall back to ct_id.

Bug: T149137
Change-Id: I60c25e0e75a54b66eef191d0d412f7fef630ba34
---
M gateway_forms/mustache/error_form.html.mustache
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/gateway_forms/mustache/error_form.html.mustache 
b/gateway_forms/mustache/error_form.html.mustache
index 7e7817f..bb57e17 100644
--- a/gateway_forms/mustache/error_form.html.mustache
+++ b/gateway_forms/mustache/error_form.html.mustache
@@ -19,7 +19,10 @@
 
 {{ l10n "donate_interface-donate-error-thank-you-for-your-support" 
}}
 
-
+{{# order_id }}{{! Use the full order id as reference if we have 
one }}
+{{ l10n "donate_interface-error-reference" . }}
+{{/order_id}}{{^ order_id }}{{! Otherwise fall back to contribution 
tracking ID }}
 {{ l10n "donate_interface-error-reference" 
contribution_tracking_id }}
+{{/order_id}}
 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Added TextContentHandler::getMerge3Format()

2016-10-31 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Added TextContentHandler::getMerge3Format()
..

Added TextContentHandler::getMerge3Format()

Allows serialization format override by the derived classes.

Change-Id: Id691ca595c9c43b671cd1f446ab18758cf9887a5
---
M RELEASE-NOTES-1.29
M includes/content/TextContentHandler.php
2 files changed, 16 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/319001/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 5a38cf9..7f1a13e 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -8,6 +8,7 @@
 === Configuration changes in 1.29 ===
 
 === New features in 1.29 ===
+* Added TextContentHandler::getMerge3Format() to allow serialization format 
override
 
 === External library changes in 1.29 ===
 
diff --git a/includes/content/TextContentHandler.php 
b/includes/content/TextContentHandler.php
index 09cdcee..812ec94 100644
--- a/includes/content/TextContentHandler.php
+++ b/includes/content/TextContentHandler.php
@@ -70,7 +70,7 @@
$this->checkModelID( $myContent->getModel() );
$this->checkModelID( $yourContent->getModel() );
 
-   $format = $this->getDefaultFormat();
+   $format = $this->getMerge3Format();
 
$old = $this->serializeContent( $oldContent, $format );
$mine = $this->serializeContent( $myContent, $format );
@@ -92,6 +92,20 @@
}
 
/**
+* The format used for the 3-way merge
+*
+* This default implementation will return the same format as
+* returned by the ContentHandler::getMergeFormat()
+*
+* @since 1.29
+*
+* @return string The name of the serialization format as a MIME type
+*/
+   public function getMerge3Format() {
+   return $this->getDefaultFormat();
+   }
+
+   /**
 * Returns the name of the associated Content class, to
 * be used when creating new objects. Override expected
 * by subclasses.

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update treeDiffer library & remove all but dist, licence & r...

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

Change subject: Update treeDiffer library & remove all but dist, licence & 
readme
..


Update treeDiffer library & remove all but dist, licence & readme

Change-Id: Ia86a5f14bc53fc4b71fb0140dd6fad1a67b79369
---
M build/modules.json
M demos/ve/desktop.html
D lib/treeDiffer/.jscsrc
D lib/treeDiffer/.jshintrc
R lib/treeDiffer/treeDiffer-dist.js
D lib/treeDiffer/treeDiffer.Tree.js
D lib/treeDiffer/treeDiffer.TreeNode.js
D lib/treeDiffer/treeDiffer.js
M tests/index.html
9 files changed, 179 insertions(+), 231 deletions(-)

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



diff --git a/build/modules.json b/build/modules.json
index 985893b..fcbf15b 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -23,10 +23,7 @@
},
"treeDiffer": {
"scripts": [
-   "lib/treeDiffer/treeDiffer.js",
-   "lib/treeDiffer/treeDiffer.TreeNode.js",
-   "lib/treeDiffer/treeDiffer.Tree.js",
-   "lib/treeDiffer/treeDiffer.Differ.js"
+   "lib/treeDiffer/treeDiffer-dist.js"
]
},
"diffMatchPatch": {
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index f4384fa..7b88b5d 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -488,10 +488,7 @@

 

-   
-   
-   
-   
+   
 


diff --git a/lib/treeDiffer/.jscsrc b/lib/treeDiffer/.jscsrc
deleted file mode 100644
index 592765f..000
--- a/lib/treeDiffer/.jscsrc
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "jsDoc": {
-   "checkAnnotations": {
-   "preset": "jsduck5",
-   "extra": {
-   "source": true,
-   "see": true
-   }
-   },
-   "checkParamNames": true,
-   "checkRedundantAccess": true,
-   "checkRedundantReturns": true,
-   "checkTypes": "strictNativeCase",
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-   },
-
-   "excludeFiles": [
-   "coverage/**",
-   "dist/**",
-   "docs/**",
-   "lib/**",
-   "node_modules/**"
-   ]
-}
diff --git a/lib/treeDiffer/.jshintrc b/lib/treeDiffer/.jshintrc
deleted file mode 100644
index f9b7abd..000
--- a/lib/treeDiffer/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": "nofunc",
-   "futurehostile": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-
-   "strict": false,
-
-   // Relaxing
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "treeDiffer": false
-   }
-}
diff --git a/lib/treeDiffer/treeDiffer.Differ.js 
b/lib/treeDiffer/treeDiffer-dist.js
similarity index 67%
rename from lib/treeDiffer/treeDiffer.Differ.js
rename to lib/treeDiffer/treeDiffer-dist.js
index bb620e4..4240dcd 100644
--- a/lib/treeDiffer/treeDiffer.Differ.js
+++ b/lib/treeDiffer/treeDiffer-dist.js
@@ -1,4 +1,173 @@
 /*!
+ * treeDiffer Namespace for treeDiffer.js
+ *
+ * Released under the MIT license
+ */
+
+window.treeDiffer = {};
+
+/*!
+ * treeDiffer.TreeNode
+ *
+ * Released under the MIT license
+ */
+
+/**
+ * TreeNode
+ *
+ * Abstract TreeNode class for Trees to be diffed. It should be extended,
+ * then a Tree should be built by passing the root node and the name of
+ * the new class into the Tree constructor.
+ *
+ * @class
+ * @constructor
+ * @param {Object} node Object representing a node to be wrapped
+ */
+treeDiffer.TreeNode = function ( node ) {
+   this.node = node;
+   this.children = [];
+   this.index = null;
+   this.leftmost = null;
+};
+
+/**
+ * Add a node to the list of this node's children
+ *
+ * @param {treeDiffer.TreeNode} child
+ */
+treeDiffer.TreeNode.prototype.addChild = function ( child ) {
+   this.children.push( child );
+   child.parent = this;
+};
+
+/**
+ * Check if another TreeNode is equal to this node. Conditions for equality
+ * will depend on the use case.
+ */
+treeDiffer.TreeNode.prototype.isEqual = null;
+
+/**
+ * Get the children of the original node wrapped by this tree node. How to
+ * find and filter children will depend on the use case.
+ */
+treeDiffer.TreeNode.prototype.getOriginalNodeChildren = null;
+
+/*!
+ * treeDiffer.Tree
+ *
+ * Released under the MIT license
+ 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Increase password requirements on enwiki for "Abuse filter e...

2016-10-31 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Increase password requirements on enwiki for "Abuse filter 
editors"
..

Increase password requirements on enwiki for "Abuse filter editors"

Bug: T121186
Change-Id: I5d7e0e46fff44f58d6e46e1cf7268ebc8b50e444
---
M wmf-config/CommonSettings.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 3c8cc4b..94416f6 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -371,9 +371,15 @@
 if ( $wgDBname === 'labswiki' || $wgDBname === 'labtestwiki' ) {
$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 10;
 } else {
+   $groupsToSecure = [ 'bureaucrat', 'sysop', 'checkuser', 'oversight' ]
+
+   if ( $wgDBname === 'enwiki' ) {
+   $groupsToSecure[] = 'abusefilter';
+   }
+
// See password policy RFC on meta
// 
[[m:Requests_for_comment/Password_policy_for_users_with_certain_advanced_permissions]]
-   foreach ( [ 'bureaucrat', 'sysop', 'checkuser', 'oversight' ] as $group 
) {
+   foreach ( $groupsToSecure as $group ) {
$wgPasswordPolicy['policies'][$group]['MinimalPasswordLength'] 
= 8;

$wgPasswordPolicy['policies'][$group]['MinimumPasswordLengthToLogin'] = 1;

$wgPasswordPolicy['policies'][$group]['PasswordCannotBePopular'] = 1;

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix typo in getModifiedRanges

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

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

Change subject: Fix typo in getModifiedRanges
..

Fix typo in getModifiedRanges

Change-Id: I90c117babf26c0b411971956064fddb8b4c28b60
---
M src/dm/ve.dm.Surface.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/97/318997/1

diff --git a/src/dm/ve.dm.Surface.js b/src/dm/ve.dm.Surface.js
index 7e6ac5f..9bcb981 100644
--- a/src/dm/ve.dm.Surface.js
+++ b/src/dm/ve.dm.Surface.js
@@ -998,13 +998,14 @@
  * @return {ve.Range[]} Modified ranges
  */
 ve.dm.Surface.prototype.getModifiedRanges = function () {
-   var ranges = [],
+   var doc = this.getDocument(),
+   ranges = [],
compactRanges = [],
lastRange = null;
 
this.getHistory().forEach( function ( stackItem ) {
stackItem.transactions.forEach( function ( tx ) {
-   var newRange = tx.getModifiedRange( this.documentModel 
);
+   var newRange = tx.getModifiedRange( doc );
// newRange will by null for no-ops
if ( newRange ) {
// Translate previous ranges by the current 
transaction

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90c117babf26c0b411971956064fddb8b4c28b60
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Test with node 4 & 6

2016-10-31 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Test with node 4 & 6
..

Test with node 4 & 6

Change-Id: I29ce0c8152189723eec20d63011877a0822ac098
---
M .travis.yml
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/.travis.yml b/.travis.yml
index 563d7a0..461fd8f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,10 +3,10 @@
 node_js:
 # Keep this around until we deprecate and remove it.
 - "0.10.25"
-# Current production value.
-- "4.4.6"
-# Production, next
-- "4.6.0"
+# Production
+- "4"
+# Next LTS
+- "6"
 # From the nvm docs, "this installs the latest version of node".
 - "node"
 

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix behaviour of attribute change in getModifiedRange

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

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

Change subject: Fix behaviour of attribute change in getModifiedRange
..

Fix behaviour of attribute change in getModifiedRange

Attributes modify the open element tag, so they should be
described as modifying a collapsed range.

Change-Id: Idb2f57e3f0cbe141e8325d5263ffeeb7ee72acc5
---
M src/dm/ve.dm.Transaction.js
M tests/dm/ve.dm.Transaction.test.js
2 files changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/98/318998/1

diff --git a/src/dm/ve.dm.Transaction.js b/src/dm/ve.dm.Transaction.js
index 11cb1a0..3a2a0a9 100644
--- a/src/dm/ve.dm.Transaction.js
+++ b/src/dm/ve.dm.Transaction.js
@@ -1164,6 +1164,14 @@
oldOffset += op.length;
break;
 
+   case 'attribute':
+   if ( start === undefined ) {
+   start = offset;
+   }
+   // Attribute changes modify the element to 
their right but don't move the cursor
+   end = offset + 1;
+   break;
+
default:
if ( start === undefined ) {
// This is the first non-retain 
operation, set start to right before it
@@ -1173,6 +1181,7 @@
offset += op.insert.length;
oldOffset += op.remove.length;
}
+
// Set end, so it'll end up being right after 
the last non-retain operation
if ( op.insertedDataLength ) {
end = start + op.insertedDataLength;
diff --git a/tests/dm/ve.dm.Transaction.test.js 
b/tests/dm/ve.dm.Transaction.test.js
index e89073a..1f79757 100644
--- a/tests/dm/ve.dm.Transaction.test.js
+++ b/tests/dm/ve.dm.Transaction.test.js
@@ -1953,7 +1953,7 @@
[ 'pushRetain', 5 ],
[ 'pushReplaceElementAttribute', 
'style', 'bullet', 'number' ]
],
-   range: new ve.Range( 5 ),
+   range: new ve.Range( 5, 6 ),
msg: 'single attribute change'
},
{
@@ -1962,7 +1962,7 @@
[ 'pushRetain', 42 ],
[ 'pushReplaceElementAttribute', 
'style', 'bullet', 'number' ]
],
-   range: new ve.Range( 0, 42 ),
+   range: new ve.Range( 0, 43 ),
msg: 'two attribute changes'
}
];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb2f57e3f0cbe141e8325d5263ffeeb7ee72acc5
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Test with node 6 & latest

2016-10-31 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Test with node 6 & latest
..

Test with node 6 & latest

Change-Id: Ie4b651f5ce082cd3d53c6ddcd342f4c5d456e6a6
---
M .travis.yml
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/.travis.yml b/.travis.yml
index f33adc7..fa7f265 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,4 +6,5 @@
   - "0.10"
   - "0.12"
   - "4"
-  - "5"
+  - "6"
+  = "node"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove the donation link feature from Minerva Beta skin

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

Change subject: Remove the donation link feature from Minerva Beta skin
..


Remove the donation link feature from Minerva Beta skin

On Minerva Beta skin there is a possibility to show "Donate" link on page 
footer.
This feature was never used and fundraising team is not going to use it soon, 
so it's
mostly a dead code.

Changes:
 - removed $wgMFDonationUrl config variable
 - remove donate button
 - remove lang entry

Bug: T148196
Change-Id: I9fdc72cc53ae0114c2ef76fce0b775b9aa30d79a
---
M README.md
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/skins/MinervaTemplateBeta.php
5 files changed, 2 insertions(+), 22 deletions(-)

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



diff --git a/README.md b/README.md
index 5ca2504..93f5359 100644
--- a/README.md
+++ b/README.md
@@ -561,13 +561,6 @@
 * Type: `Boolean`
 * Default: `false`
 
- $wgMFDonationUrl
-
-Optional string to mobile friendly url for donation page.
-
-* Type: `Boolean`
-* Default: `false`
-
  $wgMFContentNamespace
 
 The content namespace(s) that *Special:Nearby* and *Special:Random* should use.
diff --git a/extension.json b/extension.json
index 06cf152..12f2190 100644
--- a/extension.json
+++ b/extension.json
@@ -2009,7 +2009,6 @@
"MobileFrontendLogo": false,
"MFTrademarkSitename": false,
"MFEnableBeta": false,
-   "MFDonationUrl": false,
"MFContentNamespace": 0,
"MFDefaultSkinClass": "SkinMinerva",
"MinervaPageActions": [
diff --git a/i18n/en.json b/i18n/en.json
index b08110b..90fd10d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -385,7 +385,6 @@
"apihelp-parse-param-mobileformat": "Return parse output in a format 
suitable for mobile devices.",
"apihelp-parse-param-noimages": "Disable images in mobile output.",
"apihelp-parse-param-mainpage": "Apply mobile main page 
transformations.",
-   "mobile-frontend-donate-button-label": "Donate",
"mobile-frontend-meta-data-issues-categories": "About this category",
"mobile-frontend-loading-message": "Loading…",
"mobile-frontend-console-recruit": "\\o/ Hey! This is open source 
software and we need volunteers to help us build this thing, make it better and 
fix any bugs that you might be seeing in this JavaScript console!\n\nYou can 
find our backlog @ https://phabricator.wikimedia.org/project/profile/67/";,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 810a520..72a0400 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -385,7 +385,6 @@
"apihelp-parse-param-mobileformat": 
"{{doc-apihelp-param|parse|mobileformat}}",
"apihelp-parse-param-noimages": "{{doc-apihelp-param|parse|noimages}}",
"apihelp-parse-param-mainpage": "{{doc-apihelp-param|parse|mainpage}}",
-   "mobile-frontend-donate-button-label": "Message for donation button in 
mobile interface at bottom of page.\n{{Identical|Donate}}",
"mobile-frontend-meta-data-issues-categories": "Label to appear in 
button that opens issue overlay on categories.",
"mobile-frontend-loading-message": "Hidden text existing for 
accessibility reasons for intermediate loaders.\n{{Identical|Loading}}",
"mobile-frontend-console-recruit": "Message that is displayed in the 
JavaScript console aimed at developers in an attempt to recruit volunteers. The 
\\o/ emoticon is a man with his arms in the air with the purpose of drawing 
attention to the message. If this doesn't translate into the destination 
language feel free to omit it or use something more applicable.",
diff --git a/includes/skins/MinervaTemplateBeta.php 
b/includes/skins/MinervaTemplateBeta.php
index 9710a0e..5f7d721 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -46,21 +46,11 @@
 
/**
 * Get page secondary actions
+*
+* @return array An array of button definitions
 */
protected function getSecondaryActions() {
-   $donationUrl = $this->getSkin()->getMFConfig()->get( 
'MFDonationUrl' );
-
$result = parent::getSecondaryActions();
-
-   if ( $donationUrl && !$this->isSpecialPage ) {
-   $result['donation'] = [
-   'attributes' => [
-   'href' => $donationUrl,
-   ],
-   'label' => $this->getMsg( 
'mobile-frontend-donate-button-label' )->text()
-   ];
-   }
-
$result += $this->getCategoryButton();
 
return $result;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9fdc72cc5

[MediaWiki-commits] [Gerrit] analytics/aqs[master]: Travis test with node 4, 6 & latest.

2016-10-31 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Travis test with node 4, 6 & latest.
..

Travis test with node 4, 6 & latest.

Change-Id: I6865e689c2821536ab442b8ebe642c791128f3e6
---
M .travis.yml
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/aqs 
refs/changes/95/318995/1

diff --git a/.travis.yml b/.travis.yml
index 61cc69e..8e433f9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,8 @@
 language: node_js
 node_js:
-- "0.10"
-- "0.12"
-- "4.2"
-- "5"
+- "4"
+- "6"
+- "node"
 
 sudo: false
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6865e689c2821536ab442b8ebe642c791128f3e6
Gerrit-PatchSet: 1
Gerrit-Project: analytics/aqs
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: New deferred action "ApiMovePage"

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

Change subject: New deferred action "ApiMovePage"
..


New deferred action "ApiMovePage"

Originally implemented by Josef Konrad

Change-Id: Ifcd06fe5e08fc0757a996aac3c4852189f0749d6
---
M extension.json
M i18n/deferred/en.json
M i18n/deferred/qqq.json
A resources/bluespice.extjs/BS/action/APIMovePage.js
4 files changed, 55 insertions(+), 3 deletions(-)

Approvals:
  Mglaser: Looks good to me, approved
  Pwirth: Looks good to me, but someone else must approve
  Raimond Spekking: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index c766532..7384f99 100644
--- a/extension.json
+++ b/extension.json
@@ -259,7 +259,8 @@
 "bs-deferred-batch-status",
 "bs-deferred-action-apiaddcategories-description",
 "bs-deferred-action-apisetcategories-description",
-"bs-deferred-action-apiremovecategories-description"
+"bs-deferred-action-apiremovecategories-description",
+"bs-deferred-action-apimovepage-description"
 ]
 },
 "ext.bluespice.extjs.BS.portal.css": {
diff --git a/i18n/deferred/en.json b/i18n/deferred/en.json
index 4fb62a2..cc35426 100644
--- a/i18n/deferred/en.json
+++ b/i18n/deferred/en.json
@@ -17,5 +17,6 @@
"bs-deferred-batch-status": "Status",
"bs-deferred-action-apiaddcategories-description": "Add categories to 
'$1'.",
"bs-deferred-action-apiremovecategories-description": "Remove 
categories from '$1'.",
-   "bs-deferred-action-apisetcategories-description": "Set categories on 
'$1'."
+   "bs-deferred-action-apisetcategories-description": "Set categories on 
'$1'.",
+   "bs-deferred-action-apimovepage-description": "Move \"$1\" to \"$2\"."
 }
diff --git a/i18n/deferred/qqq.json b/i18n/deferred/qqq.json
index e545372..dbd9c98 100644
--- a/i18n/deferred/qqq.json
+++ b/i18n/deferred/qqq.json
@@ -18,5 +18,6 @@
"bs-deferred-batch-status": "Title of the column that shows the current 
state of the actions on the batch\n{{Identical|Status}}",
"bs-deferred-action-apiaddcategories-description": "Description of an 
action that adds a set of categories to existing set of categories on a 
page.\n\nParameters:\n* $1 - The page title that is being modified",
"bs-deferred-action-apiremovecategories-description": "Description of 
an action that removes a set of categories  to a page.\n\nParameters:\n* $1 - 
The page title that is being modified",
-   "bs-deferred-action-apisetcategories-description": "Description of an 
action that adds a set of categories  to a page with removing existing 
ones.\n\nParameters:\n* $1 - The page title that is being modified"
+   "bs-deferred-action-apisetcategories-description": "Description of an 
action that adds a set of categories  to a page with removing existing 
ones.\n\nParameters:\n* $1 - The page title that is being modified",
+   "bs-deferred-action-apimovepage-description": "Description of an action 
that moves a page.\n\nParameters:\n* $1 - The source page title to be moved 
from\n* $2 - The target page title to be moved to"
 }
diff --git a/resources/bluespice.extjs/BS/action/APIMovePage.js 
b/resources/bluespice.extjs/BS/action/APIMovePage.js
new file mode 100644
index 000..1d24983
--- /dev/null
+++ b/resources/bluespice.extjs/BS/action/APIMovePage.js
@@ -0,0 +1,49 @@
+Ext.define( 'BS.action.APIMovePage', {
+   extend: 'BS.action.Base',
+
+   //Custom config
+   sourceTitle: '',
+   targetTitle: '',
+   reason: '',
+
+   execute: function(){
+   var me = this;
+   var dfd = $.Deferred();
+   this.actionStatus = BS.action.Base.STATUS_RUNNING;
+   var move = {
+   source: me.sourceTitle,
+   target: me.targetTitle,
+   reason: me.reason
+   };
+
+   var movePageAPI = new mw.Api();
+   movePageAPI.postWithToken( 'csrf', {
+   action: 'move',
+   from: this.sourceTitle,
+   to: this.targetTitle,
+   reason: this.reason,
+   movetalk: '',
+   noredirect: ''
+   })
+   .fail(function( move, errResp ){
+   me.actionStatus = BS.action.Base.STATUS_ERROR;
+   dfd.reject( me, move, errResp );
+   })
+   .done(function( resp, jqXHR ){
+   if( !resp.move.from || !resp.move.to ) {
+   me.actionStatus = 
BS.action.Base.STATUS_ERROR;
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Add script to manage NFS server on labstore secondary c...

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

Change subject: nfs: Add script to manage NFS server on labstore secondary 
cluster
..


nfs: Add script to manage NFS server on labstore secondary cluster

Change-Id: I395d2e487459c0aa6ddf315b88db0450b1e1c43d
---
M modules/role/manifests/labs/nfs/secondary.pp
A modules/role/templates/labs/nfs/nfs-manage.sh.erb
2 files changed, 92 insertions(+), 17 deletions(-)

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



diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index fd058c4..f4a5b72 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -45,31 +45,47 @@
 'labstore1005' => 'eth1.labstore1005.eqiad.wmnet',
 }
 
-labstore::drbd::resource {'test':
-drbd_cluster => $drbd_cluster,
-port => '7790',
-device   => '/dev/drbd1',
-disk => '/dev/misc/test',
-require  => Interface::Ip['drbd-replication'],
+# Floating IP assigned to drbd primary(active NFS server). Should come 
from hiera
+$cluster_ip = '10.64.37.18'
+
+$subnet_gateway_ip = '10.64.37.1'
+
+$drbd_resource_config = {
+test   => {
+port   => '7790',
+device => '/dev/drbd1',
+disk   => '/dev/misc/test',
+},
+tools  => {
+port   => '7791',
+device => '/dev/drbd4',
+disk   => '/dev/tools/tools-project',
+},
+others => {
+port   => '7792',
+device => '/dev/drbd3',
+disk   => '/dev/misc/others',
+},
 }
 
-labstore::drbd::resource {'tools':
-drbd_cluster => $drbd_cluster,
-port => '7791',
-device   => '/dev/drbd4',
-disk => '/dev/tools/tools-project',
-require  => Interface::Ip['drbd-replication'],
-}
+$drbd_resources = keys($drbd_resource_config)
 
-labstore::drbd::resource {'others':
+labstore::drbd::resource { $drbd_resources:
 drbd_cluster => $drbd_cluster,
-port => '7792',
-device   => '/dev/drbd3',
-disk => '/dev/misc/others',
+port => $drbd_resource_config[$title][port],
+device   => $drbd_resource_config[$title][device],
+disk => $drbd_resource_config[$title][disk],
 require  => Interface::Ip['drbd-replication'],
 }
 
 class { 'labstore::monitoring::drbd':
 drbd_role  => $drbd_role,
 }
+
+file { '/usr/local/sbin/nfs-manage':
+content => template('labs/nfs/nfs-manage.sh.erb'),
+mode=> '0744',
+owner   => 'root',
+group   => 'root',
+}
 }
diff --git a/modules/role/templates/labs/nfs/nfs-manage.sh.erb 
b/modules/role/templates/labs/nfs/nfs-manage.sh.erb
new file mode 100644
index 000..bfbd557
--- /dev/null
+++ b/modules/role/templates/labs/nfs/nfs-manage.sh.erb
@@ -0,0 +1,59 @@
+#!/bin/bash
+# NFS management script for labstore HA cluster
+# This should be used to bring up a node as the active NFS server (primary 
DRBD)
+# node, or to stop NFS and make a node DRBD secondary - which may be needed 
prior
+# to rebooting a node, or during failovers.
+#
+# Usage:
+# ./nfs-manage [up|down|status]
+# up - Makes node DRBD primary, assigns floating IP, mounts drbd devices onto
+# fileserver, runs nfs-exportd, and starts NFS server
+# down - Stop NFS server, unmounts drbd devices, makes node drbd secondary, 
removes
+# floating IP assignment
+# status - Display mount and drbd status
+
+CMD="$1"
+
+case $CMD in
+up)
+echo "Bringing nfs and drbd up"
+/usr/sbin/drbd-overview
+drbd_roles=$(/sbin/drbdadm role all)
+if [[ $drbd_roles == *"Primary"* ]]
+then
+echo "One or all of the drbd resources in this cluster are already 
primary, not bringing this node up"
+exit 1
+else
+/sbin/drbdadm primary all
+/bin/ip address add <%= @cluster_ip %>/24 dev eth0
+/usr/sbin/arping -c 3 -S <%= @cluster_ip -%> -i eth0 <%= 
@subnet_gateway_ip -%>
+<% @drbd_resource_config.each do |resource, config| -%>
+mount <%= config['device'] -%> <%= config['disk'] -%>
+<% end -%>
+/usr/sbin/drbd-overview
+/usr/bin/timeout 10s sudo -u nfsmanager nfs-exportd
+/usr/local/sbin/nfs-manage-binds
+/sbin/service nfs-kernel-server start
+fi
+;;
+down)
+echo "Taking down drbd and nfs"
+/usr/sbin/drbd-overview
+/sbin/service nfs-kernel-server stop
+/usr/local/sbin/nfs-manage-binds -binds | \
+xargs --no-run-if-empty /bin/umount -f
+<% @drbd_resource_config.eac

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Turn off revision number in graph img srv

2016-10-31 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Turn off revision number in graph img srv
..

Turn off revision number in graph img srv

This will force graph service to use title instead
of the revision number, thus keeping cache hit rate
much higher. Eventually the graphoid service should
stop requiring the revid.

Change-Id: I2848183fe9621a41d566c595fcdf4014232fa102
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 64b9f2d..747ede8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14454,7 +14454,7 @@
 // %3\$s = revid
 // %4\$s = hash
 'wgGraphImgServiceUrl' => [
-   'default' => "/api/rest_v1/page/graph/png/%2\$s/%3\$s/%4\$s.png",
+   'default' => "/api/rest_v1/page/graph/png/%2\$s/0/%4\$s.png",
'private' => false,
 ],
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Add non-MySQL database support

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

Change subject: Add non-MySQL database support
..


Add non-MySQL database support

Created patch files for other database types.
Note that some types, such as Oracle, are
not guaranteed to work, since not even MW
core works with them yet anyway.

Bug: T67658
Change-Id: Ie9ce8a4d1140d16017c1aa83865f79d8b0986528
---
M OATHAuth.hooks.php
A sql/mssql/tables.sql
A sql/oracle/tables.sql
A sql/postgres/tables.sql
4 files changed, 57 insertions(+), 2 deletions(-)

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



diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php
index e5f5c05..7aa3e9a 100644
--- a/OATHAuth.hooks.php
+++ b/OATHAuth.hooks.php
@@ -122,8 +122,19 @@
case 'sqlite':
$updater->addExtensionTable( 'oathauth_users', 
"$base/sql/mysql/tables.sql" );
$updater->addExtensionUpdate( [ [ __CLASS__, 
'schemaUpdateOldUsersFromInstaller' ] ] );
-   $updater->dropExtensionField( 'oathauth_users', 
'secret_reset',
-   
"$base/sql/mysql/patch-remove_reset.sql" );
+   $updater->dropExtensionField(
+   'oathauth_users',
+   'secret_reset',
+   "$base/sql/mysql/patch-remove_reset.sql"
+   );
+   break;
+
+   case 'oracle':
+   $updater->addExtensionTable( 'oathauth_users', 
"$base/sql/oracle/tables.sql" );
+   break;
+
+   case 'postgres':
+   $updater->addExtensionTable( 'oathauth_users', 
"$base/sql/postgres/tables.sql" );
break;
}
 
diff --git a/sql/mssql/tables.sql b/sql/mssql/tables.sql
new file mode 100644
index 000..f4db281
--- /dev/null
+++ b/sql/mssql/tables.sql
@@ -0,0 +1,10 @@
+CREATE TABLE /*_*/oathauth_users (
+   -- User ID
+   id INT NOT NULL PRIMARY KEY IDENTITY(0,1),
+
+   -- Secret key
+   secret NVARCHAR(255) NULL DEFAULT NULL,
+
+   -- Scratch tokens
+   scratch_tokens varbinary(511) NULL DEFAULT NULL
+);
diff --git a/sql/oracle/tables.sql b/sql/oracle/tables.sql
new file mode 100644
index 000..51bf328
--- /dev/null
+++ b/sql/oracle/tables.sql
@@ -0,0 +1,15 @@
+define mw_prefix='{$wgDBprefix}';
+
+CREATE SEQUENCE oathauth_users_id_seq;
+CREATE TABLE &mw_prefix.oathauth_users (
+   -- User ID
+   id NUMBER NOT NULL,
+
+   -- Secret key
+   secret VARCHAR2(255) NULL,
+
+   -- Scratch tokens
+   scratch_tokens varbinary(511) NULL
+
+);
+ALTER TABLE &mw_prefix.oathauth_users ADD CONSTRAINT 
&mw_prefix.oathauth_users_pk PRIMARY KEY (id);
\ No newline at end of file
diff --git a/sql/postgres/tables.sql b/sql/postgres/tables.sql
new file mode 100644
index 000..35dabed
--- /dev/null
+++ b/sql/postgres/tables.sql
@@ -0,0 +1,19 @@
+BEGIN;
+SET client_min_messages = 'ERROR';
+
+DROP SEQUENCE IF EXISTS oathauth_users_id_seq CASCADE;
+
+CREATE SEQUENCE oathauth_users_id_seq MINVALUE 0 START WITH 0;
+CREATE TABLE oathauth_users (
+   -- User ID
+   id INTEGER NOT NULL PRIMARY KEY DEFAULT 
nextval('oathauth_users_id_seq'),
+
+   -- Secret key
+   secret TEXT NULL,
+
+   -- Scratch tokens
+   scratch_tokens TEXT NULL
+
+);
+
+COMMIT;
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9ce8a4d1140d16017c1aa83865f79d8b0986528
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 
Gerrit-Reviewer: Jjanes 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (977d3ad)

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

Change subject: Update VE core submodule to master (977d3ad)
..


Update VE core submodule to master (977d3ad)

New changes:
f564149 ve.dm.Transaction: add 'author' field
4032768 Remove jshint comment, no rule required
3705e38 Remove comment about jscs empty blocks rule
09c48db Remove comment about jscs binary space rule
1f2fcde Allow shallow clone of whole document
b8c3673 build: Update eslint-config-wikimedia to 0.2.0 and make a pass
f31a1f8 Re-use eslint.main for eslint.fix
78acdbe Add LICENCE.txt for classList lib
0d92f39 jsduck: Move UnicodeJS and OOUI into Upstream
d0c4225 Remove rules which have been moved upstream
31126aa Fix ve.test.utils.createSurfaceFromHtml
a1036e0 Make it possible to see visual diffs in VE core
3a1bc70 Diff style tweaks
977d3ad build: Move diffing code to its own module for slimness

Change-Id: I82da0beb9bdb05f482ddfa76b4f95563d2499f1e
---
M .jsduck/categories.json
M .jsduck/eg-iframe.html
M .jsduck/mw-categories.json
M jsduck.json
M lib/ve
5 files changed, 134 insertions(+), 85 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 71cb11e..9655985 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -40,6 +40,20 @@
]
},
{
+   "name": "VisualEditor (core) unused parts",
+   "groups": [
+   {
+   "name": "Visual Diffing",
+   "classes": [
+   "ve.dm.VisualDiff",
+   "ve.DiffTreeNode",
+   "ve.ui.DiffDialog",
+   "ve.ui.DiffElement"
+   ]
+   }
+   ]
+   },
+   {
"name": "Upstream (MediaWiki)",
"groups": [
{
@@ -180,90 +194,6 @@
]
},
{
-   "name": "UnicodeJS",
-   "groups": [
-   {
-   "name": "UnicodeJS",
-   "classes": [
-   "unicodeJS",
-   "unicodeJS.TextString",
-   "unicodeJS.wordbreak",
-   "unicodeJS.graphemebreak",
-   "unicodeJS.characterclass"
-   ]
-   }
-   ]
-   },
-   {
-   "name": "OOjs UI",
-   "groups": [
-   {
-   "name": "General",
-   "classes": [
-   "OO.ui",
-   "OO.ui.Element",
-   "OO.ui.HtmlSnippet",
-   "OO.ui.Toolbar",
-   "OO.ui.Window",
-   "OO.ui.Dialog",
-   "OO.ui.WindowManager",
-   "OO.ui.Process",
-   "OO.ui.Error",
-   "OO.ui.ActionSet"
-   ]
-   },
-   {
-   "name": "Factories",
-   "classes": [
-   "OO.ui.*Factory"
-   ]
-   },
-   {
-   "name": "Tools",
-   "classes": [
-   "OO.ui.*Tool"
-   ]
-   },
-   {
-   "name": "Mixins",
-   "classes": [
-   "OO.ui.mixin",
-   "OO.ui.mixin.*"
-   ]
-   },
-   {
-   "name": "Layouts",
-   "classes": [
-   "OO.ui.*Layout"
-   ]
-   },
-   {
-   "name": "Tool groups",
-   "classes": [
-   "OO.ui.*ToolGroup"
-   ]
-   },
-   {
-   "name": "Widgets",
-   "classes": [
-  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: nfs-manage-binds add option to list bind mounts

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

Change subject: labstore: nfs-manage-binds add option to list bind mounts
..


labstore: nfs-manage-binds add option to list bind mounts

This prints active bind mounts under the root of the /exp
tree which may be using the filesystem.

Change-Id: I945296c950c83fedce0c2ac2f191b732de9b18d3
---
M modules/labstore/files/nfs-manage-binds
1 file changed, 41 insertions(+), 4 deletions(-)

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



diff --git a/modules/labstore/files/nfs-manage-binds 
b/modules/labstore/files/nfs-manage-binds
index f24f398..0caa4d4 100644
--- a/modules/labstore/files/nfs-manage-binds
+++ b/modules/labstore/files/nfs-manage-binds
@@ -13,25 +13,30 @@
 :param recurse: bool
 """
 try:
+if not os.path.exists(dir):
+logging.info('mkdir %s' % dir)
 if recurse:
 os.makedirs(dir)
 else:
 os.mkdir(dir)
-logging.debug('mkdir %s' % dir)
 except OSError:
 if not os.path.exists(dir):
 raise
+
 
 def is_mount(path):
 """ confirm a path is a mountpoint
 :param src: str
 """
 try:
+cmd = ['/bin/findmnt', path]
+logging.debug(' '.join(cmd))
 with open(os.devnull, 'w') as null:
 subprocess.check_call(['/bin/findmnt', path], stdout=null)
 return True
 except subprocess.CalledProcessError:
 return False
+
 
 def bind_mount(src, dst):
 """ bind mount two paths on disk
@@ -39,7 +44,7 @@
 :param dst: str
 """
 
-if is_mount(src):
+if is_mount(dst):
 logging.debug("%s is already a mountpoint" % src)
 return
 
@@ -49,6 +54,7 @@
 subprocess.check_call(bind)
 except subprocess.CalledProcessError:
 logging.error("bind mount %s %s failed" % (src, dst))
+
 
 def create_binding(target, export, force=False):
 """ manage bind state on disk (with possible inline creations)
@@ -66,6 +72,23 @@
 bind_mount(target, export)
 else:
 logging.warning("no bind on %s as %s does not exist" % (export, 
target))
+
+
+def get_binds():
+""" find all bindmounts under /exp
+:note: we assume /exp is the root for exported binds
+:returns: list
+"""
+
+cmd = ['/bin/findmnt', '-n', '-r', '-o', 'target']
+logging.debug(' '.join(cmd))
+mnt_targets = subprocess.check_output(cmd).decode()
+bind_mounts = []
+for mnt in mnt_targets.split():
+if mnt.startswith('/exp'):
+bind_mounts.append(mnt.strip())
+return bind_mounts
+
 
 def main():
 
@@ -89,6 +112,12 @@
 action='store_true'
 )
 
+argparser.add_argument(
+'-binds',
+help='Display active binds (this operation will exit post)',
+action='store_true'
+)
+
 args = argparser.parse_args()
 
 logging.basicConfig(
@@ -109,6 +138,14 @@
 logging.exception('Could not load projects config file from %s', 
args.config_path)
 sys.exit(1)
 
+if args.binds:
+binds = get_binds()
+if not binds:
+sys.exit(1)
+for b in binds:
+print(b)
+sys.exit(0)
+
 srv_root = args.disk_path
 # get dict of path_on_disk:share_name to create in descending order
 public_inverse = {v.split(' ')[0]: k for k, v in config['public'].items()}
@@ -128,8 +165,8 @@
 
 device_path_default = '/srv/misc'
 device_paths = {
- 'tools': '/srv/tools',
-  'maps': '/srv/maps',
+'tools': '/srv/tools',
+'maps': '/srv/maps',
 }
 
 for project in sorted(config['private']):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I945296c950c83fedce0c2ac2f191b732de9b18d3
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: add zareen to *-privatedata-users, researchers

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

Change subject: admin: add zareen to *-privatedata-users, researchers
..


admin: add zareen to *-privatedata-users, researchers

quote: "Zareen needs access to event logging and weblogs.
She also needs to be able two write hadoop jobs against
the weblogs or transfer event logs to hadoop for larger operations."

Bug: T149211
Change-Id: I6c6ab9f57cfbeaa06618803204c531917367179b
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 8f82e98..babbc01 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -112,7 +112,7 @@
   jminor, asherman, etonkovidova, sbisson, addshore, matmarex, 
elukey,
   nikerabbit, nschaaf, dstrine, joewalsh, mpany, hjiang, jsamra, 
bcohn,
   jdittrich, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro, debt,
-  samwalton9]
+  samwalton9, zareen]
   ldap-admins:
 gid: 715
 description: ldap admins
@@ -180,7 +180,7 @@
 members: [ezachte, milimetric, dartar, yurik, halfak, awight, dr0ptp4kt, 
nuria,
   leila, ellery, nettrom, mforns, bmansurov, tbayer, joal,
   madhuvishy, tjones, legoktm, dcausse, bearloga, dpatrick, 
atgomez, dstrine,
-  joewalsh, marktraceur, mtizzoni, panisson, paolotti, ciro, 
melodykramer]
+  joewalsh, marktraceur, mtizzoni, panisson, paolotti, ciro, 
melodykramer, zareen]
   statistics-users:
 gid: 726
 description: Access statistics number crunching hosts. NO PRIVS.
@@ -231,7 +231,8 @@
   dcausse, bd808, tjones, mobrovac, jgirault, jdrewniak, ejegg, 
jdcc, ori,
   bmansurov, atgomez, amire80, kartik, pcoombe, foks, mpany, 
hjiang, jsamra, bcohn,
   jdlrobson, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro,
-  psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon]
+  psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon,
+  zareen]
   analytics-admins:
 gid: 732
 description: Admin access to analytics cluster.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c6ab9f57cfbeaa06618803204c531917367179b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Elukey 
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] wikimedia...crm[master]: Trim whitespace when comparing names for conflicts.

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

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

Change subject: Trim whitespace when comparing names for conflicts.
..

Trim whitespace when comparing names for conflicts.

I haven't got a ticket for this but it's just something I noticed in review 
dedupes
- some have preceding or trailing spaces. Stripping them here means they pass
the casing check & merge (without the spaces)

Change-Id: I362f2cc8ef625f2ac7485ca70d9e759d5f24ba8d
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/93/318993/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 30ea8d1..c04126c 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2250,6 +2250,11 @@
   if (!in_array(str_replace('move_', '', $fieldName), 
$fieldsToResolveCasingFor)) {
 return FALSE;
   }
+  // Let's get rid of any preceding or trailing spaces.
+  $valueToKeep = trim($valueToKeep);
+  $valueToOverwrite = trim($valueToOverwrite);
+  $moveFieldValue = trim($moveFieldValue);
+
   if (strtoupper($valueToKeep) != strtoupper($valueToOverwrite)) {
 return FALSE;
   }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: add zareen to *-privatedata-users, researchers

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

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

Change subject: admin: add zareen to *-privatedata-users, researchers
..

admin: add zareen to *-privatedata-users, researchers

Bug: T149211
Change-Id: I6c6ab9f57cfbeaa06618803204c531917367179b
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/318992/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 11122dc..b32e1f2 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -112,7 +112,7 @@
   jminor, asherman, etonkovidova, sbisson, addshore, matmarex, 
elukey,
   nikerabbit, nschaaf, dstrine, joewalsh, mpany, hjiang, jsamra, 
bcohn,
   jdittrich, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro, debt,
-  samwalton9]
+  samwalton9, zareen]
   ldap-admins:
 gid: 715
 description: ldap admins
@@ -180,7 +180,7 @@
 members: [ezachte, milimetric, dartar, yurik, halfak, awight, dr0ptp4kt, 
nuria,
   leila, ellery, nettrom, mforns, bmansurov, tbayer, joal,
   madhuvishy, tjones, legoktm, dcausse, bearloga, dpatrick, 
atgomez, dstrine,
-  joewalsh, marktraceur, mtizzoni, panisson, paolotti, ciro, 
melodykramer]
+  joewalsh, marktraceur, mtizzoni, panisson, paolotti, ciro, 
melodykramer, zareen]
   statistics-users:
 gid: 726
 description: Access statistics number crunching hosts. NO PRIVS.
@@ -231,7 +231,8 @@
   dcausse, bd808, tjones, mobrovac, jgirault, jdrewniak, ejegg, 
jdcc, ori,
   bmansurov, atgomez, amire80, kartik, pcoombe, foks, mpany, 
hjiang, jsamra, bcohn,
   jdlrobson, chelsyx, ovasileva, mtizzoni, panisson, paolotti, 
ciro,
-  psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon]
+  psinger, flemmerich, mkroetzsch, akrausetud, filippo, nschaaf, 
pmiazga, faidon,
+  zareen]
   analytics-admins:
 gid: 732
 description: Admin access to analytics cluster.

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: nfs-manage-binds add option to list bind mounts

2016-10-31 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: labstore: nfs-manage-binds add option to list bind mounts
..

labstore: nfs-manage-binds add option to list bind mounts

This prints active bind mounts under the root of the /exp
tree which may be using the filesystem.

Change-Id: I945296c950c83fedce0c2ac2f191b732de9b18d3
---
M modules/labstore/files/nfs-manage-binds
1 file changed, 38 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/318991/1

diff --git a/modules/labstore/files/nfs-manage-binds 
b/modules/labstore/files/nfs-manage-binds
index f24f398..60daedb 100644
--- a/modules/labstore/files/nfs-manage-binds
+++ b/modules/labstore/files/nfs-manage-binds
@@ -13,25 +13,29 @@
 :param recurse: bool
 """
 try:
+logging.debug('mkdir %s' % dir)
 if recurse:
 os.makedirs(dir)
 else:
 os.mkdir(dir)
-logging.debug('mkdir %s' % dir)
 except OSError:
 if not os.path.exists(dir):
 raise
+
 
 def is_mount(path):
 """ confirm a path is a mountpoint
 :param src: str
 """
 try:
+cmd = ['/bin/findmnt', path]
+logging(' '.join(cmd))
 with open(os.devnull, 'w') as null:
 subprocess.check_call(['/bin/findmnt', path], stdout=null)
 return True
 except subprocess.CalledProcessError:
 return False
+
 
 def bind_mount(src, dst):
 """ bind mount two paths on disk
@@ -50,6 +54,7 @@
 except subprocess.CalledProcessError:
 logging.error("bind mount %s %s failed" % (src, dst))
 
+
 def create_binding(target, export, force=False):
 """ manage bind state on disk (with possible inline creations)
 :param target: str
@@ -66,6 +71,22 @@
 bind_mount(target, export)
 else:
 logging.warning("no bind on %s as %s does not exist" % (export, 
target))
+
+
+def get_binds():
+""" find all active bind mount targets under /exp
+:note: we assume /exp is the root for exported binds
+:returns: list
+"""
+cmd = ['/bin/findmnt', '-n', '-r', '-o', 'target']
+logging.debug(' '.join(cmd))
+mnt_targets = subprocess.check_output(cmd).decode()
+bind_mounts = []
+for mnt in mnt_targets.split():
+if mnt.startswith('/exp'):
+bind_mounts.append(mnt.strip())
+return bind_mounts
+
 
 def main():
 
@@ -89,6 +110,12 @@
 action='store_true'
 )
 
+argparser.add_argument(
+'-binds',
+help='Display active binds (this operation will exit post)',
+action='store_true'
+)
+
 args = argparser.parse_args()
 
 logging.basicConfig(
@@ -109,6 +136,14 @@
 logging.exception('Could not load projects config file from %s', 
args.config_path)
 sys.exit(1)
 
+if args.binds:
+binds = get_binds()
+if not binds:
+sys.exit(1)
+for b in binds:
+print(b)
+sys.exit(0)
+
 srv_root = args.disk_path
 # get dict of path_on_disk:share_name to create in descending order
 public_inverse = {v.split(' ')[0]: k for k, v in config['public'].items()}
@@ -128,8 +163,8 @@
 
 device_path_default = '/srv/misc'
 device_paths = {
- 'tools': '/srv/tools',
-  'maps': '/srv/maps',
+'tools': '/srv/tools',
+'maps': '/srv/maps',
 }
 
 for project in sorted(config['private']):

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Ex:OATHAuth on officewiki

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

Change subject: Enable Ex:OATHAuth on officewiki
..


Enable Ex:OATHAuth on officewiki

Also make it available to all users

Bug: T135889
Change-Id: Ide6c38a1edc6efcc7e43141f6f7c271c6acf55a0
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 11 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 110d384..3c8cc4b 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3143,8 +3143,11 @@
 
 if ( $wmgUseOATHAuth ) {
wfLoadExtension( 'OATHAuth' );
-   // Roll this feature out to specific groups initially
-   $wgGroupPermissions['*']['oathauth-enable'] = false;
+
+   if ( $wmgOATHAuthDisableRight ) {
+   $wgGroupPermissions['*']['oathauth-enable'] = false;
+   }
+
if ( $wmgUseCentralAuth ) {
$wgOATHAuthDatabase = 'centralauth';
}
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5a106b7..64b9f2d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17616,6 +17616,12 @@
'private' => false,
'fishbowl' => false,
'nonglobal' => false,
+   'officewiki' => true,
+],
+
+'wmgOATHAuthDisableRight' => [
+   'default' => true, // Roll out to specific groups
+   'officewiki' => false,
 ],
 
 'wmgWatchlistDefault' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide6c38a1edc6efcc7e43141f6f7c271c6acf55a0
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: CSteipp 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dpatrick 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Prune unused log parameters

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

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

Change subject: Prune unused log parameters
..

Prune unused log parameters

Change-Id: Ifc4541112b76f03c3b72027cf37fa7b145d91415
---
M includes/Banner.php
M includes/BannerMessageGroup.php
M includes/Campaign.php
M special/SpecialCentralNotice.php
4 files changed, 7 insertions(+), 14 deletions(-)


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

diff --git a/includes/Banner.php b/includes/Banner.php
index 359295c..757f1cd 100644
--- a/includes/Banner.php
+++ b/includes/Banner.php
@@ -941,7 +941,7 @@
$this->initializeDbForNewBanner( $db );
}
$this->saveBannerInternal( $db );
-   $this->logBannerChange( $action, $user, array(), 
$summary );
+   $this->logBannerChange( $action, $user, $summary );
 
$db->endAtomic( __METHOD__ );
 
@@ -1073,7 +1073,7 @@
} else {
// Log the removal of the banner
// FIXME: this log line will display changes with 
inverted sense
-   $bannerObj->logBannerChange( 'removed', $user, array(), 
$summary );
+   $bannerObj->logBannerChange( 'removed', $user, $summary 
);
 
// Delete banner record from the CentralNotice 
cn_templates table
$dbw = CNDatabase::getDb();
@@ -1351,6 +1351,7 @@
$banner->setMixins( $mixins );
 
$banner->save( $user, $summary );
+   return null;
}
 
/**
@@ -1358,11 +1359,9 @@
 *
 * @param string $action 'created', 'modified', or 'removed'
 * @param User   $user   The user causing the change
-* @param array  $beginSettings  Banner settings before changes 
(optional)
 * @param string $summarySummary (comment) for this action
 */
-   function logBannerChange(
-   $action, $user, $beginSettings = array(), $summary = null ) {
+   function logBannerChange( $action, $user, $summary = null ) {
 
ChoiceDataProvider::invalidateCache();
 
diff --git a/includes/BannerMessageGroup.php b/includes/BannerMessageGroup.php
index e0de58a..adb3e0d 100644
--- a/includes/BannerMessageGroup.php
+++ b/includes/BannerMessageGroup.php
@@ -160,7 +160,7 @@
) {
// Finally an object we can deal with directly and it's 
in the right state!
$collection = $group->initCollection( $code );
-   $collection->loadTranslations( DB_MASTER );
+   $collection->loadTranslations();
$keys = $collection->getMessageKeys();
 
// Now copy each key into the MW namespace
diff --git a/includes/Campaign.php b/includes/Campaign.php
index ca3c0e9..48c213c 100644
--- a/includes/Campaign.php
+++ b/includes/Campaign.php
@@ -905,7 +905,7 @@
'throttle'  => $throttle,
);
Campaign::logCampaignChange( 'created', $not_id, $user,
-   $beginSettings, $endSettings, array(), array(), 
$summary );
+   $beginSettings, $endSettings, $summary );
 
return $not_id;
}
@@ -1322,16 +1322,13 @@
 * @param $user User causing the change
 * @param $beginSettingsarray of campaign settings before changes 
(optional)
 * @param $endSettings  array of campaign settings after changes 
(optional)
-* @param $beginAssignments array of banner assignments before changes 
(optional)
-* @param $endAssignments   array of banner assignments after changes 
(optional)
 * @param $summary  string Change summary provided by the user
 *
 * @return integer: ID of log entry (or null)
 */
static function logCampaignChange(
$action, $campaignId, $user, $beginSettings = array(),
-   $endSettings = array(), $beginAssignments = array(),
-   $endAssignments = array(), $summary = null
+   $endSettings = array(), $summary = null
) {
ChoiceDataProvider::invalidateCache();
 
@@ -1340,7 +1337,6 @@
$summary = '';
}
 
-   // TODO prune unused parameters
// Only log the change if it is done by an actual user (rather 
than a testing script)
if ( $user->getId() > 0 ) { // User::getID returns 0 for 
anonymous or non-existant users
$dbw = CNDatabase::getDb( DB_MASTER );
diff --git a/special/SpecialCentralNotice.ph

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Revert "EditPage: Show EditFilterMergedContent hook errors i...

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

Change subject: Revert "EditPage: Show EditFilterMergedContent hook errors in 
an errorbox"
..


Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox"

This reverts commit a02a7ff8eab9d589d77c03d4b4c58fc4a05e65c8.

Bug: T149473
Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
---
M includes/EditPage.php
1 file changed, 2 insertions(+), 22 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 770a74e..059af97 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1641,7 +1641,7 @@
// being set. This is used by ConfirmEdit to 
display a captcha
// without any error message cruft.
} else {
-   $this->hookError = $this->formatStatusErrors( 
$status );
+   $this->hookError = $status->getWikiText();
}
// Use the existing $status->value if the hook set it
if ( !$status->value ) {
@@ -1651,33 +1651,13 @@
} elseif ( !$status->isOK() ) {
# ...or the hook could be expecting us to produce an 
error
// FIXME this sucks, we should just use the Status 
object throughout
-   $this->hookError = $this->formatStatusErrors( $status );
+   $this->hookError = $status->getWikiText();
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR_EXPECTED;
return false;
}
 
return true;
-   }
-
-   /**
-* Wrap status errors in an errorbox for increased visiblity
-*
-* @param Status $status
-* @return string
-*/
-   private function formatStatusErrors( Status $status ) {
-   $errmsg = $status->getHTML(
-   'edit-error-short',
-   'edit-error-long',
-   $this->context->getLanguage()
-   );
-   return <<
-{$errmsg}
-
-
-ERROR;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Remove ambiguity when using GoneIfEmptyTextView.

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

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

Change subject: Remove ambiguity when using GoneIfEmptyTextView.
..

Remove ambiguity when using GoneIfEmptyTextView.

I've noticed that in the current Feed, we have a regression:
In the list of trending articles, if an article does not have a
description, the title should become vertically centered, whereas it now
incorrectly stays near the top of the list item.

This is because the description field is a GoneIfEmptyTextView. This
component very deceptively exposes a setText(String) function, which
does NOT override the super function setText(CharSequence). This can lead
to all kinds of subtle visual bugs like this.

This patch finally patches this inconsistency once and for all, by making
this component use a TextWatcher, and update its visibility based on the
text content that is fed into it.

Change-Id: I0d1675b801b17df36aa5d61d9200d596e1c35c1d
---
M app/src/main/java/org/wikipedia/views/GoneIfEmptyTextView.java
1 file changed, 23 insertions(+), 6 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/views/GoneIfEmptyTextView.java 
b/app/src/main/java/org/wikipedia/views/GoneIfEmptyTextView.java
index 26d9ec5..8edede0 100644
--- a/app/src/main/java/org/wikipedia/views/GoneIfEmptyTextView.java
+++ b/app/src/main/java/org/wikipedia/views/GoneIfEmptyTextView.java
@@ -3,33 +3,50 @@
 import android.annotation.TargetApi;
 import android.content.Context;
 import android.os.Build;
-import android.support.annotation.Nullable;
+import android.text.Editable;
+import android.text.TextWatcher;
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.TextView;
 
-import org.wikipedia.util.StringUtil;
-
 public class GoneIfEmptyTextView extends TextView {
 public GoneIfEmptyTextView(Context context) {
 super(context);
+init();
 }
 
 public GoneIfEmptyTextView(Context context, AttributeSet attrs) {
 super(context, attrs);
+init();
 }
 
 public GoneIfEmptyTextView(Context context, AttributeSet attrs, int 
defStyleAttr) {
 super(context, attrs, defStyleAttr);
+init();
 }
 
 @TargetApi(Build.VERSION_CODES.LOLLIPOP)
 public GoneIfEmptyTextView(Context context, AttributeSet attrs, int 
defStyleAttr, int defStyleRes) {
 super(context, attrs, defStyleAttr, defStyleRes);
+init();
 }
 
-public void setText(@Nullable String text) {
-super.setText(text);
-setVisibility(StringUtil.emptyIfNull(text).equals("") ? View.GONE : 
View.VISIBLE);
+private void init() {
+addTextChangedListener(new EmptyTextWatcher());
+}
+
+private class EmptyTextWatcher implements TextWatcher {
+@Override
+public void beforeTextChanged(CharSequence charSequence, int i, int 
i1, int i2) {
+}
+
+@Override
+public void onTextChanged(CharSequence charSequence, int i, int i1, 
int i2) {
+}
+
+@Override
+public void afterTextChanged(Editable editable) {
+setVisibility(editable.length() == 0 ? View.GONE : View.VISIBLE);
+}
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d1675b801b17df36aa5d61d9200d596e1c35c1d
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] wikipedia...ProveIt[master]: Match more specific templates first

2016-10-31 Thread Sophivorus (Code Review)
Sophivorus has submitted this change and it was merged.

Change subject: Match more specific templates first
..


Match more specific templates first

For example, match "Cite books" before "Cite book"

Bug: T148235
Change-Id: I5a795160d4a482669766be6266fa12d19298bc4b
---
M proveit.js
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/proveit.js b/proveit.js
index 8e1b623..16fa27f 100755
--- a/proveit.js
+++ b/proveit.js
@@ -335,12 +335,15 @@
});
 
// Search for the main template of the reference
-   var templateName,
+   var templateTitles = Object.keys( proveit.templateData 
).sort().reverse(), // Match "Cite books" before "Cite book"
+   templateTitle,
+   templateName,
templateRegex,
indexStart;
-   for ( var templateTitle in proveit.templateData ) {
+   for ( var i = 0; i < templateTitles.length; i++ ) {
+   templateTitle = templateTitles[ i ];
templateName = templateTitle.substring( 
templateTitle.indexOf( ':' ) + 1 ); // Remove the namespace
-   templateRegex = new RegExp( '{{\\s*' + templateName, 
'i' );
+   templateRegex = new RegExp( '{{\\s*' + templateName + 
'[\\s|]', 'i' );
indexStart = referenceContent.search( templateRegex );
if ( indexStart > -1 ) {
reference.template = templateName;
@@ -355,7 +358,7 @@
// knowing there may be subtemplates and other 
templates after the main template
var indexEnd = referenceContent.length,
templateLevel = 0;
-   for ( var i = indexStart; i < indexEnd; i++ ) {
+   for ( i = indexStart; i < indexEnd; i++ ) {
if ( referenceContent[ i ] + referenceContent[ 
i + 1 ] === '{{' ) {
templateLevel++;
i++; // We speed up the loop to avoid 
multiple matches when two or more templates are found together

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a795160d4a482669766be6266fa12d19298bc4b
Gerrit-PatchSet: 3
Gerrit-Project: wikipedia/gadgets/ProveIt
Gerrit-Branch: master
Gerrit-Owner: Sophivorus 
Gerrit-Reviewer: Sophivorus 

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


[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Support for multiple templates

2016-10-31 Thread Sophivorus (Code Review)
Sophivorus has submitted this change and it was merged.

Change subject: Support for multiple templates
..


Support for multiple templates

Bug: T148884
Change-Id: I5bde89e5422b392b420c04e659ea96a93cb6315b
---
M proveit.js
1 file changed, 47 insertions(+), 36 deletions(-)

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



diff --git a/proveit.js b/proveit.js
index f19cae4..8e1b623 100755
--- a/proveit.js
+++ b/proveit.js
@@ -275,7 +275,7 @@
var i, j, reference, referenceItem;
for ( i = 0; i < matches.length; i++ ) {
// Turn all the matches into reference objects
-   reference = proveit.makeReference( matches[ i ] 
);
+   reference = proveit.parseReference( matches[ i 
] );
 
// For each reference, check the citations 
array for citations to it
for ( j = 0; j < citations.length; j++ ) {
@@ -311,8 +311,8 @@
 * @param {string} wikitext of the reference
 * @return {object} reference object
 */
-   makeReference: function ( referenceString ) {
-   // Extract the name, if any
+   parseReference: function ( referenceString ) {
+   // Extract the reference name, if any
// Three patterns: ,  and 
var referenceName = null,
match = referenceString.match( 
/<[\s]*ref[\s]*name[\s]*=[\s]*(?:(?:\"(.*?)\")|(?:\'(.*?)\')|(?:(.*?)))[\s]*>/i 
);
@@ -320,7 +320,7 @@
referenceName = match[1] || match[2] || match[3];
}
 
-   // Extract the index
+   // Get the index
var referenceIndex = proveit.getTextbox().val().indexOf( 
referenceString );
 
// Extract the content
@@ -334,31 +334,44 @@
'content': referenceContent
});
 
-   // Determine if the reference uses a template by getting all 
the registered template names and searching for a match
-   var registeredTemplatesArray = [];
-   for ( var registeredTemplate in proveit.templateData ) {
-   registeredTemplate = registeredTemplate.substring( 
registeredTemplate.indexOf( ':' ) + 1 ); // Remove the namespace
-   registeredTemplatesArray.push( registeredTemplate );
+   // Search for the main template of the reference
+   var templateName,
+   templateRegex,
+   indexStart;
+   for ( var templateTitle in proveit.templateData ) {
+   templateName = templateTitle.substring( 
templateTitle.indexOf( ':' ) + 1 ); // Remove the namespace
+   templateRegex = new RegExp( '{{\\s*' + templateName, 
'i' );
+   indexStart = referenceContent.search( templateRegex );
+   if ( indexStart > -1 ) {
+   reference.template = templateName;
+   break;
+   }
}
-   var registeredTemplatesDisjunction = 
registeredTemplatesArray.join( '|' ),
-   regExp = new RegExp( '{{(' + 
registeredTemplatesDisjunction + ')([\\s\\S]*)}}', 'i' ); // We use [\s\S]* 
instead of .* to match newlines
-   match = referenceContent.match( regExp );
 
-   // If there's a match, add the template data to the reference
-   if ( match ) {
-   reference.templateString = match[0];
+   // The rest of the code is for when a main template was found
+   if ( reference.template ) {
 
-   // Extract and the template name and normalize it
-   var template = match[1];
-   registeredTemplatesArray.forEach( function ( 
registeredTemplate ) {
-   if ( template.toLowerCase() === 
registeredTemplate.toLowerCase() ) {
-   template = registeredTemplate;
+   // Figure out the indexEnd by searching for the closing 
"}}"
+   // knowing there may be subtemplates and other 
templates after the main template
+   var indexEnd = referenceContent.length,
+   templateLevel = 0;
+   for ( var i = indexStart; i < indexEnd; i++ ) {
+   if ( referenceContent[ i ] + referenceContent[ 
i + 1 ] === '{{' ) {
+   templateLevel++;
+   i++; // We speed up the loop to avoid 
multiple matches when two or more templates are found together
+   } else if ( referenceConten

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't parse

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

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

Change subject: Don't parse 
..

Don't parse 

Which means we can't check if a parser limit was exceeded while trying
to expand the content of a tag, but that's probably not a huge loss.
It'll just result in potentially strange output rather than an exception.

Bug: T149622
Change-Id: I7910dfa0f61b1cc9168c7ed1498b2bda27c47f0e
---
M includes/parser/Parser.php
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/85/318985/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 669e9fc1..27c9535 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3801,11 +3801,10 @@
return $attrText;
}
 
+   // We can't safely check if the expansion for $content resulted 
in an
+   // error, because the content could happen to be the error 
string
+   // (T149622).
$content = !isset( $params['inner'] ) ? null : $frame->expand( 
$params['inner'] );
-   if ( substr( $content, 0, $errorLen ) === $errorStr ) {
-   // See above
-   return $content;
-   }
 
$marker = self::MARKER_PREFIX . "-$name-"
. sprintf( '%08X', $this->mMarkerIndex++ ) . 
self::MARKER_SUFFIX;

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update treeDiffer library & remove all but dist, licence & r...

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

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

Change subject: Update treeDiffer library & remove all but dist, licence & 
readme
..

Update treeDiffer library & remove all but dist, licence & readme

Change-Id: Ia86a5f14bc53fc4b71fb0140dd6fad1a67b79369
---
M build/modules.json
M demos/ve/desktop.html
D lib/treeDiffer/.jscsrc
D lib/treeDiffer/.jshintrc
R lib/treeDiffer/treeDiffer-dist.js
D lib/treeDiffer/treeDiffer.Tree.js
D lib/treeDiffer/treeDiffer.TreeNode.js
D lib/treeDiffer/treeDiffer.js
M tests/index.html
9 files changed, 179 insertions(+), 231 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/84/318984/1

diff --git a/build/modules.json b/build/modules.json
index 985893b..fcbf15b 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -23,10 +23,7 @@
},
"treeDiffer": {
"scripts": [
-   "lib/treeDiffer/treeDiffer.js",
-   "lib/treeDiffer/treeDiffer.TreeNode.js",
-   "lib/treeDiffer/treeDiffer.Tree.js",
-   "lib/treeDiffer/treeDiffer.Differ.js"
+   "lib/treeDiffer/treeDiffer-dist.js"
]
},
"diffMatchPatch": {
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index f4384fa..7b88b5d 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -488,10 +488,7 @@

 

-   
-   
-   
-   
+   
 


diff --git a/lib/treeDiffer/.jscsrc b/lib/treeDiffer/.jscsrc
deleted file mode 100644
index 592765f..000
--- a/lib/treeDiffer/.jscsrc
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "jsDoc": {
-   "checkAnnotations": {
-   "preset": "jsduck5",
-   "extra": {
-   "source": true,
-   "see": true
-   }
-   },
-   "checkParamNames": true,
-   "checkRedundantAccess": true,
-   "checkRedundantReturns": true,
-   "checkTypes": "strictNativeCase",
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-   },
-
-   "excludeFiles": [
-   "coverage/**",
-   "dist/**",
-   "docs/**",
-   "lib/**",
-   "node_modules/**"
-   ]
-}
diff --git a/lib/treeDiffer/.jshintrc b/lib/treeDiffer/.jshintrc
deleted file mode 100644
index f9b7abd..000
--- a/lib/treeDiffer/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": "nofunc",
-   "futurehostile": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-
-   "strict": false,
-
-   // Relaxing
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "treeDiffer": false
-   }
-}
diff --git a/lib/treeDiffer/treeDiffer.Differ.js 
b/lib/treeDiffer/treeDiffer-dist.js
similarity index 67%
rename from lib/treeDiffer/treeDiffer.Differ.js
rename to lib/treeDiffer/treeDiffer-dist.js
index bb620e4..4240dcd 100644
--- a/lib/treeDiffer/treeDiffer.Differ.js
+++ b/lib/treeDiffer/treeDiffer-dist.js
@@ -1,4 +1,173 @@
 /*!
+ * treeDiffer Namespace for treeDiffer.js
+ *
+ * Released under the MIT license
+ */
+
+window.treeDiffer = {};
+
+/*!
+ * treeDiffer.TreeNode
+ *
+ * Released under the MIT license
+ */
+
+/**
+ * TreeNode
+ *
+ * Abstract TreeNode class for Trees to be diffed. It should be extended,
+ * then a Tree should be built by passing the root node and the name of
+ * the new class into the Tree constructor.
+ *
+ * @class
+ * @constructor
+ * @param {Object} node Object representing a node to be wrapped
+ */
+treeDiffer.TreeNode = function ( node ) {
+   this.node = node;
+   this.children = [];
+   this.index = null;
+   this.leftmost = null;
+};
+
+/**
+ * Add a node to the list of this node's children
+ *
+ * @param {treeDiffer.TreeNode} child
+ */
+treeDiffer.TreeNode.prototype.addChild = function ( child ) {
+   this.children.push( child );
+   child.parent = this;
+};
+
+/**
+ * Check if another TreeNode is equal to this node. Conditions for equality
+ * will depend on the use case.
+ */
+treeDiffer.TreeNode.prototype.isEqual = null;
+
+/**
+ * Get the children of the original node wrapped by this tree node. How to
+ * find and filter children will depend on the use case.
+ */
+treeDiffer.TreeNode.prototype.getOriginalNodeChildren = null;
+
+/*!
+ * treeDiffer.Tree
+ *
+ * Released under the MIT license
+ */
+
+/**
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Revert "EditPage: Show EditFilterMergedContent hook errors i...

2016-10-31 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

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

Change subject: Revert "EditPage: Show EditFilterMergedContent hook errors in 
an errorbox"
..

Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox"

This reverts commit a02a7ff8eab9d589d77c03d4b4c58fc4a05e65c8.

Bug: T149473
Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
---
M includes/EditPage.php
1 file changed, 2 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/318983/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 770a74e..059af97 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1641,7 +1641,7 @@
// being set. This is used by ConfirmEdit to 
display a captcha
// without any error message cruft.
} else {
-   $this->hookError = $this->formatStatusErrors( 
$status );
+   $this->hookError = $status->getWikiText();
}
// Use the existing $status->value if the hook set it
if ( !$status->value ) {
@@ -1651,33 +1651,13 @@
} elseif ( !$status->isOK() ) {
# ...or the hook could be expecting us to produce an 
error
// FIXME this sucks, we should just use the Status 
object throughout
-   $this->hookError = $this->formatStatusErrors( $status );
+   $this->hookError = $status->getWikiText();
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR_EXPECTED;
return false;
}
 
return true;
-   }
-
-   /**
-* Wrap status errors in an errorbox for increased visiblity
-*
-* @param Status $status
-* @return string
-*/
-   private function formatStatusErrors( Status $status ) {
-   $errmsg = $status->getHTML(
-   'edit-error-short',
-   'edit-error-long',
-   $this->context->getLanguage()
-   );
-   return <<
-{$errmsg}
-
-
-ERROR;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rename JobQueueDB::getSlaveDB() to getReplicaDB()

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

Change subject: Rename JobQueueDB::getSlaveDB() to getReplicaDB()
..


Rename JobQueueDB::getSlaveDB() to getReplicaDB()

Change-Id: I7a88c4876e76836c92cc0b45b4e72124a087121c
---
M includes/jobqueue/JobQueueDB.php
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index aa01768..84b2a0b 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -69,7 +69,7 @@
 * @return bool
 */
protected function doIsEmpty() {
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
try {
$found = $dbr->selectField( // unclaimed job
'job', '1', [ 'job_cmd' => $this->type, 
'job_token' => '' ], __METHOD__
@@ -94,7 +94,7 @@
}
 
try {
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
$size = (int)$dbr->selectField( 'job', 'COUNT(*)',
[ 'job_cmd' => $this->type, 'job_token' => '' ],
__METHOD__
@@ -123,7 +123,7 @@
return $count;
}
 
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
try {
$count = (int)$dbr->selectField( 'job', 'COUNT(*)',
[ 'job_cmd' => $this->type, "job_token != 
{$dbr->addQuotes( '' )}" ],
@@ -154,7 +154,7 @@
return $count;
}
 
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
try {
$count = (int)$dbr->selectField( 'job', 'COUNT(*)',
[
@@ -566,7 +566,7 @@
 * @return Iterator
 */
protected function getJobIterator( array $conds ) {
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
try {
return new MappedIterator(
$dbr->select( 'job', self::selectFields(), 
$conds ),
@@ -594,7 +594,7 @@
}
 
protected function doGetSiblingQueuesWithJobs( array $types ) {
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
// @note: this does not check whether the jobs are claimed or 
not.
// This is useful so JobQueueGroup::pop() also sees queues that 
only
// have stale jobs. This lets recycleAndDeleteStaleJobs() 
re-enqueue
@@ -611,7 +611,7 @@
}
 
protected function doGetSiblingQueueSizes( array $types ) {
-   $dbr = $this->getSlaveDB();
+   $dbr = $this->getReplicaDB();
$res = $dbr->select( 'job', [ 'job_cmd', 'COUNT(*) AS count' ],
[ 'job_cmd' => $types ], __METHOD__, [ 'GROUP BY' => 
'job_cmd' ] );
 
@@ -737,7 +737,7 @@
 * @throws JobQueueConnectionError
 * @return DBConnRef
 */
-   protected function getSlaveDB() {
+   protected function getReplicaDB() {
try {
return $this->getDB( DB_REPLICA );
} catch ( DBConnectionError $e ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a88c4876e76836c92cc0b45b4e72124a087121c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: Collect image size from Resource Timing (when supported)

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

Change subject: Collect image size from Resource Timing (when supported)
..


Collect image size from Resource Timing (when supported)

There's a hack to make sure we don't get Resource Timing from
modern Firefox and it's not 100% clean.

Bug: T144786
Change-Id: If163d5742f8f1726dce757bb74f42e9dad50b6b5
---
M modules/collectors/ext.PerformanceInspector.imagesize.js
1 file changed, 51 insertions(+), 9 deletions(-)

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



diff --git a/modules/collectors/ext.PerformanceInspector.imagesize.js 
b/modules/collectors/ext.PerformanceInspector.imagesize.js
index bab3dfa..ced9ada 100644
--- a/modules/collectors/ext.PerformanceInspector.imagesize.js
+++ b/modules/collectors/ext.PerformanceInspector.imagesize.js
@@ -1,10 +1,6 @@
 ( function ( mw, $ ) {
/**
-   Collect image information. Make a ajax request per image and 
check the size from the response header.
-   In the future lets use the ResourceTiming API to fetch 
size for images, that will make
-   the inspector faster. We did try it out but Firefox has 
a bug where local cached assets
-   are not included, meaning using it we would miss images 
for Firefox users:
-   https://bugzilla.mozilla.org/show_bug.cgi?id=1113676
+   Collect image information. Make a ajax request per image or use 
Resource Timinng API and check the size from the response header.
*/
var imageSizeCollector = function runImageSizeCollector() {
var warningLimitInBytes = 100,
@@ -14,6 +10,24 @@
images = [],
humanSize = module.exports.humanSize;
 
+   function isResourceTimingWithSizeSupported() {
+   var wp = window.performance;
+   // Right now we don't support Firefox, we did try it 
out but Firefox
+   // has a bug where local cached assets are not 
included, meaning using it
+   // we would miss images for Firefox users:
+   // https://bugzilla.mozilla.org/show_bug.cgi?id=1113676
+   // we have have at least Resource Timing V1
+   if ( wp && wp.getEntriesByType( 'resource' ).length > 0 
) {
+   // do we have support size but not nextHop?
+   // Then we are sure we are not FF but in the 
long run this
+   // check is evil, Chrome and others will 
support nextHop soon.
+   if ( wp.getEntriesByType( 'resource' )[ 0 
].encodedBodySize && !wp.getEntriesByType( 'resource' )[ 0 ].nextHopProtocol ) {
+   return true;
+   }
+   }
+   return false;
+   }
+
function getImageName( name ) {
if ( name.length > maxImageNameLength ) {
return name.substr( 0, maxImageNameLength - 1 );
@@ -21,9 +35,26 @@
return name;
}
 
+   function isImage( name ) {
+   return ( name.match( /\.(jpeg|jpg|gif|png)$/i ) !== 
null );
+   }
+
+   function fetchUsingRT() {
+   var resources = window.performance.getEntriesByType( 
'resource' ),
+   images = [],
+   i;
+
+   for ( i = 0; i < resources.length; i++ ) {
+   if ( isImage( resources[ i ].name ) ) {
+   images.push( { url: resources[ i ].name,
+   contentLength: resources[ i 
].encodedBodySize } );
+   }
+   }
+   return images;
+   }
+
function fetchUsingAjax() {
-   var deferred = new $.Deferred(),
-   img = document.getElementsByTagName( 'img' ),
+   var img = document.getElementsByTagName( 'img' ),
promises = [],
i;
function fetchContent( url ) {
@@ -36,11 +67,22 @@
};
} );
}
-
for ( i = 0; i < img.length; i++ ) {
if ( img[ i ].currentSrc && img[ i 
].currentSrc.indexOf( 'data:image' ) === -1  ) {
promises.push( fetchContent( img[ i 
].currentSrc ) );
}
+   }
+

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: build: Move diffing code to its own module for slimness

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

Change subject: build: Move diffing code to its own module for slimness
..


build: Move diffing code to its own module for slimness

Change-Id: I0e8d59019d8429a4b6308504141ac93d8740a4d4
---
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M tests/index.html
4 files changed, 52 insertions(+), 50 deletions(-)

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



diff --git a/build/modules.json b/build/modules.json
index 8cee086..985893b 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -225,9 +225,7 @@
"unicodejs",
"rangefix",
"spark-md5",
-   "dom-classlist-shim",
-   "treeDiffer",
-   "diffMatchPatch"
+   "dom-classlist-shim"
]
},
"visualEditor.core": {
@@ -247,7 +245,6 @@
"src/ve.Document.js",
"src/ve.EventSequencer.js",
"src/ve.Scheduler.js",
-   "src/ve.DiffTreeNode.js",
{ "file": "src/ve.Filibuster.js", "debug": true },
"src/dm/ve.dm.js",
"src/dm/ve.dm.Model.js",
@@ -288,7 +285,6 @@
"src/dm/ve.dm.DocumentSynchronizer.js",
"src/dm/ve.dm.IndexValueStore.js",
"src/dm/ve.dm.Converter.js",
-   "src/dm/ve.dm.VisualDiff.js",
"src/dm/selections/ve.dm.LinearSelection.js",
"src/dm/selections/ve.dm.NullSelection.js",
"src/dm/selections/ve.dm.TableSelection.js",
@@ -508,9 +504,7 @@

"src/ui/datatransferhandlers/ve.ui.PlainTextFileTransferHandler.js",

"src/ui/datatransferhandlers/ve.ui.HTMLFileTransferHandler.js",

"src/ui/datatransferhandlers/ve.ui.UrlStringTransferHandler.js",
-   "src/ui/dialogs/ve.ui.DiffDialog.js",
"src/ui/elements/ve.ui.PreviewElement.js",
-   "src/ui/elements/ve.ui.DiffElement.js",

"src/ui/windowmanagers/ve.ui.ToolbarDialogWindowManager.js",
"src/ui/widgets/ve.ui.AlignWidget.js",
"src/ui/widgets/ve.ui.LanguageSearchWidget.js",
@@ -566,7 +560,6 @@
"src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css",
"src/ui/styles/dialogs/ve.ui.ProgressDialog.css",

"src/ui/styles/dialogs/ve.ui.SpecialCharacterDialog.css",
-   "src/ui/styles/elements/ve.ui.DiffElement.css",
"src/ui/styles/tools/ve.ui.FormatTool.css",
"src/ui/styles/widgets/ve.ui.LanguageInputWidget.css",
"src/ui/styles/widgets/ve.ui.LanguageSearchWidget.css",
@@ -594,6 +587,22 @@
"styleGroup": "ve",
"dependencies": [
"visualEditor.base.build"
+   ]
+   },
+   "visualEditor.diffing": {
+   "scripts": [
+   "src/ve.DiffTreeNode.js",
+   "src/dm/ve.dm.VisualDiff.js",
+   "src/ui/dialogs/ve.ui.DiffDialog.js",
+   "src/ui/elements/ve.ui.DiffElement.js"
+   ],
+   "styles": [
+   "src/ui/styles/elements/ve.ui.DiffElement.css"
+   ],
+   "dependencies": [
+   "visualEditor.core.build",
+   "treeDiffer",
+   "diffMatchPatch"
]
},
"visualEditor.test": {
@@ -723,7 +732,8 @@
"oojs-ui-apex",
"visualEditor.core",
"visualEditor.desktop.build",
-   "visualEditor.theme.apex"
+   "visualEditor.theme.apex",
+   "visualEditor.diffing"
]
},
"visualEditor.desktop.build": {
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index dd01429..f4384fa 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -49,7 +49,6 @@



-   



@@ -80,6 +79,9 @@



+
+   
+   
 


@@ -159,15 +161,6 @@


 
-   
-   
-   
-   
-   
-
-   
-   
-



@@ -196,7 +189,6 @

[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Match specific subtemplate before general templates

2016-10-31 Thread Sophivorus (Code Review)
Sophivorus has uploaded a new change for review.

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

Change subject: Match specific subtemplate before general templates
..

Match specific subtemplate before general templates

Bug: T148235
Change-Id: I5a795160d4a482669766be6266fa12d19298bc4b
---
M proveit.js
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikipedia/gadgets/ProveIt 
refs/changes/82/318982/1

diff --git a/proveit.js b/proveit.js
index 8e1b623..fa41230 100755
--- a/proveit.js
+++ b/proveit.js
@@ -335,10 +335,13 @@
});
 
// Search for the main template of the reference
-   var templateName,
+   var templateTitles = Object.keys( proveit.templateData 
).sort().reverse(), // Reverse the order to match "Cite book:Sub" before "Cite 
book"
+   templateTitle,
+   templateName,
templateRegex,
indexStart;
-   for ( var templateTitle in proveit.templateData ) {
+   for ( var i = 0; i < templateTitles.length; i++ ) {
+   templateTitle = templateTitles[ i ];
templateName = templateTitle.substring( 
templateTitle.indexOf( ':' ) + 1 ); // Remove the namespace
templateRegex = new RegExp( '{{\\s*' + templateName, 
'i' );
indexStart = referenceContent.search( templateRegex );
@@ -355,7 +358,7 @@
// knowing there may be subtemplates and other 
templates after the main template
var indexEnd = referenceContent.length,
templateLevel = 0;
-   for ( var i = indexStart; i < indexEnd; i++ ) {
+   for ( i = indexStart; i < indexEnd; i++ ) {
if ( referenceContent[ i ] + referenceContent[ 
i + 1 ] === '{{' ) {
templateLevel++;
i++; // We speed up the loop to avoid 
multiple matches when two or more templates are found together

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a795160d4a482669766be6266fa12d19298bc4b
Gerrit-PatchSet: 1
Gerrit-Project: wikipedia/gadgets/ProveIt
Gerrit-Branch: master
Gerrit-Owner: Sophivorus 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ssh: Disable 2fa for labs

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

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

Change subject: ssh: Disable 2fa for labs
..

ssh: Disable 2fa for labs

Bug: T147998
Change-Id: Iaa94a6ca4ab09016a037f4d19e03e1e43a46c4da
---
M hieradata/labs.yaml
M modules/ssh/manifests/server.pp
M modules/ssh/templates/sshd_config.erb
3 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/318981/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index 5bd49e6..6ee7ef9 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -112,6 +112,9 @@
 nrpe::allowed_hosts: '10.68.16.195' # icinga
 
 ssh::server::disable_agent_forwarding: false
+# No 2fa in labs, and enabling it turns on PAM auth via 
ChallengeResponseAuthentication
+# Disable to protect from botspam (and bots accidentally guessing labs 
instance root pws)
+ssh::server::enable_2fa: false
 labs_puppet_master: "labs-puppetmaster-eqiad.wikimedia.org"
 puppetmaster: "labs-puppetmaster-eqiad.wikimedia.org"
 saltmaster: "labs-puppetmaster-eqiad.wikimedia.org"
diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index de56f28..7bd172f 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -7,6 +7,9 @@
 $disable_nist_kex = true, # Allow labs projects to temporarily opt out of 
nist kex disabling
 $explicit_macs = true, # Allow labs projects to temporarily opt out of 
more secure MACs
 $enable_hba = false,
+# Allow labs to turn off ChallengeResponseAuthentication, since we don't 
have 2fa there
+# This turns off password based ssh, saves us from botspam
+$enable_2fa = true,
 $disable_agent_forwarding = true,
 ) {
 package { 'openssh-server':
diff --git a/modules/ssh/templates/sshd_config.erb 
b/modules/ssh/templates/sshd_config.erb
index c006127..7b160f9 100644
--- a/modules/ssh/templates/sshd_config.erb
+++ b/modules/ssh/templates/sshd_config.erb
@@ -75,9 +75,11 @@
 # To enable empty passwords, change to yes (NOT RECOMMENDED)
 PermitEmptyPasswords no
 
+<% if @enable_2fa %>
 # Change to yes to enable challenge-response passwords (beware issues with
 # some PAM modules and threads)
 ChallengeResponseAuthentication yes
+<% end %>
 
 # Globally deny logon via password, only allow SSH-key login.  
 PasswordAuthentication no  

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix picture of the day caption being single-line.

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

Change subject: Fix picture of the day caption being single-line.
..


Fix picture of the day caption being single-line.

I've noticed that the caption shown on top of the picture of the day is
overflowing onto multiple lines, despite having the attribute of
maxLines="1". This seems to be fixable by removing the textIsSelectable
attribute, which isn't particularly necessary, since the user may click
the card itself, and select the text from the full-screen gallery caption.

Change-Id: Ife44dd4f48e8be93d0605f8fc137d899f9d739f0
---
M app/src/main/res/layout/view_card_featured_image.xml
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/res/layout/view_card_featured_image.xml 
b/app/src/main/res/layout/view_card_featured_image.xml
index 72e94eb..9bb59ce 100644
--- a/app/src/main/res/layout/view_card_featured_image.xml
+++ b/app/src/main/res/layout/view_card_featured_image.xml
@@ -35,7 +35,6 @@
 style="@style/RtlAwareTextView"
 android:background="#4c00"
 android:textColor="@android:color/white"
-android:textIsSelectable="true"
 tools:text="Description of featured image here"
 android:ellipsize="end"
 android:maxLines="1" />

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife44dd4f48e8be93d0605f8fc137d899f9d739f0
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] operations/puppet[production]: check_ssl: append (RSA|ECDSA) to name if authalg specified

2016-10-31 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: check_ssl: append (RSA|ECDSA) to name if authalg specified
..


check_ssl: append (RSA|ECDSA) to name if authalg specified

Change-Id: I13ebd5ae73480f9c4ede2d645d2cf9467a3035d5
---
M modules/nagios_common/files/check_commands/check_ssl
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/modules/nagios_common/files/check_commands/check_ssl 
b/modules/nagios_common/files/check_commands/check_ssl
index 1e23735..9ddcfca 100755
--- a/modules/nagios_common/files/check_commands/check_ssl
+++ b/modules/nagios_common/files/check_commands/check_ssl
@@ -273,6 +273,17 @@
 my $ssl  = $client->_get_ssl_object;
 my $x509 = Net::SSLeay::get_peer_certificate($ssl);
 
+# append (RSA) or (ECDSA) to the certificate if an authalg was picked
+if ( defined $ng->authalg ) {
+my $pubkey = Net::SSLeay::X509_get_pubkey($x509);
+my $type = Net::SSLeay::OBJ_nid2sn(Net::SSLeay::EVP_PKEY_id($pubkey));
+if ( $type eq 'rsaEncryption' ) {
+$name .= ' (RSA)';
+} elsif ( $type eq 'id-ecPublicKey' ) {
+$name .= ' (ECDSA)';
+}
+}
+
 my $notBefore = str2time(
 Net::SSLeay::P_ASN1_UTCTIME_put2string(
 Net::SSLeay::X509_get_notBefore($x509)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13ebd5ae73480f9c4ede2d645d2cf9467a3035d5
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: check_ssl: support OCSP Stapling

2016-10-31 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: check_ssl: support OCSP Stapling
..


check_ssl: support OCSP Stapling

New option "-o off|valid|must-staple" (default off)

valid: Actually check OCSP and fail hard if it's not valid (may
check externally over the network if not stapled? not sure)
must-staple: As above, but require stapling
off: Do not ask for stapling or verify OCSP (default)

Time remaining to the stapling nextUpdate stamp are also checked
with the default warning at 3 days out and the default critical at
1 day out.  (Our current vendor serves 4-day responses).

Bug: T148490
Change-Id: I02ab77d2bbc2f0966a2b49c3c6982898fa7755c1
---
M modules/nagios_common/files/check_commands/check_ssl
1 file changed, 44 insertions(+), 0 deletions(-)

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



diff --git a/modules/nagios_common/files/check_commands/check_ssl 
b/modules/nagios_common/files/check_commands/check_ssl
index 1c0b1eb..1e23735 100755
--- a/modules/nagios_common/files/check_commands/check_ssl
+++ b/modules/nagios_common/files/check_commands/check_ssl
@@ -102,6 +102,22 @@
 );
 
 $ng->arg(
+spec=> 'ocsp|o=s',
+help=> 'OCSP checking: off, valid, must-staple (default: valid)',
+default => 'off',
+);
+$ng->arg(
+spec=> 'ocspwarn=i',
+help=> 'Warning threshold for OCSP staple validity in seconds 
(default: %s)',
+default => 86400*3,
+);
+$ng->arg(
+spec=> 'ocspcrit=i',
+help=> 'Critical threshold for OCSP staple validity in seconds 
(default: %s)',
+default => 86400*1,
+);
+
+$ng->arg(
 spec=> 'warning|w=i',
 help=> 'min validity days left to issue a WARNING (default: %s)',
 default => 30,
@@ -167,11 +183,39 @@
 $sopts{'SSL_ca_file'} = $ng->rootcert;
 }
 
+if ( $ng->ocsp eq 'valid' ) {
+$sopts{'SSL_ocsp_mode'} = 
SSL_OCSP_FAIL_HARD|SSL_OCSP_FULL_CHAIN|SSL_OCSP_TRY_STAPLE;
+}
+elsif ( $ng->ocsp eq 'must-staple' ) {
+$sopts{'SSL_ocsp_mode'} = 
SSL_OCSP_FAIL_HARD|SSL_OCSP_FULL_CHAIN|SSL_OCSP_MUST_STAPLE;
+}
+elsif ( $ng->ocsp eq 'off' ) {
+$sopts{'SSL_ocsp_mode'} = SSL_OCSP_NO_STAPLE;
+}
+else {
+nagios_exit( UNKNOWN, 'Invalid OCSP setting: ' . $ng->ocsp );
+}
+
 # we use IO::Socket::SSL for its verify hostname routines that are
 # complicated enough to handles SANs, wildcards etc., depending on the 
given
 # protocol (e.g. RFC 2818 rules for HTTPS)
 $client = IO::Socket::SSL->new(%sopts)
   or nagios_exit( CRITICAL, 'failed to connect or SSL handshake:' . $@ );
+
+if ( $ng->ocsp eq 'must-staple' ) {
+my $now = time;
+my $nextupdate = ${*$client}{'_SSL_ocsp_verify'}->[1];
+my $ocsp_timeleft = $nextupdate - $now;
+if ($ocsp_timeleft < $ng->ocspcrit ) {
+push(@crit, "OCSP staple validity for $cn has $ocsp_timeleft 
seconds left");
+}
+elsif ( $ocsp_timeleft < $ng->ocspwarn ) {
+push(@warn, "OCSP staple validity for $cn has $ocsp_timeleft 
seconds left");
+}
+else {
+push(@ok, "OCSP staple validity for $cn has $ocsp_timeleft seconds 
left");
+}
+}
 }
 
 sub ssl_verify {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02ab77d2bbc2f0966a2b49c3c6982898fa7755c1
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove the donation link feature from Minerva Beta skin

2016-10-31 Thread Pmiazga (Code Review)
Pmiazga has uploaded a new change for review.

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

Change subject: Remove the donation link feature from Minerva Beta skin
..

Remove the donation link feature from Minerva Beta skin

On Minerva Beta skin there is a possibility to show "Donate" link on page 
footer.
This feature was never used and fundraising team is not going to use it soon, 
so it's
mostly a dead code.

Changes:
 - removed $wgMFDonationUrl config variable
 - remove donate button
 - remove lang entry

Bug: T148196
Change-Id: I9fdc72cc53ae0114c2ef76fce0b775b9aa30d79a
---
M README.md
M extension.json
M i18n/qqq.json
M includes/skins/MinervaTemplateBeta.php
4 files changed, 0 insertions(+), 31 deletions(-)


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

diff --git a/README.md b/README.md
index 5ca2504..93f5359 100644
--- a/README.md
+++ b/README.md
@@ -561,13 +561,6 @@
 * Type: `Boolean`
 * Default: `false`
 
- $wgMFDonationUrl
-
-Optional string to mobile friendly url for donation page.
-
-* Type: `Boolean`
-* Default: `false`
-
  $wgMFContentNamespace
 
 The content namespace(s) that *Special:Nearby* and *Special:Random* should use.
diff --git a/extension.json b/extension.json
index 06cf152..12f2190 100644
--- a/extension.json
+++ b/extension.json
@@ -2009,7 +2009,6 @@
"MobileFrontendLogo": false,
"MFTrademarkSitename": false,
"MFEnableBeta": false,
-   "MFDonationUrl": false,
"MFContentNamespace": 0,
"MFDefaultSkinClass": "SkinMinerva",
"MinervaPageActions": [
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 810a520..72a0400 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -385,7 +385,6 @@
"apihelp-parse-param-mobileformat": 
"{{doc-apihelp-param|parse|mobileformat}}",
"apihelp-parse-param-noimages": "{{doc-apihelp-param|parse|noimages}}",
"apihelp-parse-param-mainpage": "{{doc-apihelp-param|parse|mainpage}}",
-   "mobile-frontend-donate-button-label": "Message for donation button in 
mobile interface at bottom of page.\n{{Identical|Donate}}",
"mobile-frontend-meta-data-issues-categories": "Label to appear in 
button that opens issue overlay on categories.",
"mobile-frontend-loading-message": "Hidden text existing for 
accessibility reasons for intermediate loaders.\n{{Identical|Loading}}",
"mobile-frontend-console-recruit": "Message that is displayed in the 
JavaScript console aimed at developers in an attempt to recruit volunteers. The 
\\o/ emoticon is a man with his arms in the air with the purpose of drawing 
attention to the message. If this doesn't translate into the destination 
language feel free to omit it or use something more applicable.",
diff --git a/includes/skins/MinervaTemplateBeta.php 
b/includes/skins/MinervaTemplateBeta.php
index 9710a0e..1dab2e1 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -43,26 +43,4 @@
],
];
}
-
-   /**
-* Get page secondary actions
-*/
-   protected function getSecondaryActions() {
-   $donationUrl = $this->getSkin()->getMFConfig()->get( 
'MFDonationUrl' );
-
-   $result = parent::getSecondaryActions();
-
-   if ( $donationUrl && !$this->isSpecialPage ) {
-   $result['donation'] = [
-   'attributes' => [
-   'href' => $donationUrl,
-   ],
-   'label' => $this->getMsg( 
'mobile-frontend-donate-button-label' )->text()
-   ];
-   }
-
-   $result += $this->getCategoryButton();
-
-   return $result;
-   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Cleanup, new array syntax

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

Change subject: Cleanup, new array syntax
..


Cleanup, new array syntax

Change-Id: I3ae95d5c2ebf1a91576508964d2ab5ed799d8ceb
---
M JsonConfig.namespaces.php
M extension.json
M includes/JCApi.php
M includes/JCCache.php
M includes/JCContentHandler.php
M includes/JCDefaultContentView.php
M includes/JCDefaultObjContentView.php
M includes/JCLuaLibrary.php
M includes/JCObjContent.php
M includes/JCSingleton.php
M includes/JCUtils.php
M includes/JCValidators.php
M tests/manual/TestAllConfigs.php
M tests/manual/TestNoValidation.php
M tests/manual/TestObjectContent.php
M tests/manual/TestZeroContent.php
M tests/phpunit/JCObjContentTest.php
17 files changed, 252 insertions(+), 253 deletions(-)

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



diff --git a/JsonConfig.namespaces.php b/JsonConfig.namespaces.php
index 2d67e55..ce3629f 100644
--- a/JsonConfig.namespaces.php
+++ b/JsonConfig.namespaces.php
@@ -10,16 +10,16 @@
  * @license GNU General Public Licence 2.0 or later
  */
 
-$namespaceNames = array();
+$namespaceNames = [];
 
-$namespaceNames['en'] = array(
+$namespaceNames['en'] = [
482 => 'Config',
483 => 'Config_talk',
486 => 'Data',
487 => 'Data_talk',
-);
+];
 
-$namespaceNames['vi'] = array(
+$namespaceNames['vi'] = [
482 => 'Cấu_hình',
483 => 'Thảo_luận_Cấu_hình',
-);
+];
diff --git a/extension.json b/extension.json
index cd7b05b..c791a43 100644
--- a/extension.json
+++ b/extension.json
@@ -75,30 +75,6 @@
"remoteExtPath": "JsonConfig/modules"
},
"Hooks": {
-   "CanonicalNamespaces": [
-   "JsonConfig\\JCSingleton::onCanonicalNamespaces"
-   ],
-   "ScribuntoExternalLibraries": [
-   "JsonConfig\\JCLuaLibrary::onScribuntoExternalLibraries"
-   ],
-   "ContentHandlerDefaultModelFor": [
-   
"JsonConfig\\JCSingleton::onContentHandlerDefaultModelFor"
-   ],
-   "ContentHandlerForModelID": [
-   "JsonConfig\\JCSingleton::onContentHandlerForModelID"
-   ],
-   "CodeEditorGetPageLanguage": [
-   "JsonConfig\\JCSingleton::onCodeEditorGetPageLanguage"
-   ],
-   "EditFilterMergedContent": [
-   "JsonConfig\\JCSingleton::onEditFilterMergedContent"
-   ],
-   "BeforePageDisplay": [
-   "JsonConfig\\JCSingleton::onBeforePageDisplay"
-   ],
-   "MovePageIsValidMove": [
-   "JsonConfig\\JCSingleton::onMovePageIsValidMove"
-   ],
"AbortMove": [
"JsonConfig\\JCSingleton::onAbortMove"
],
@@ -108,9 +84,33 @@
"ArticleUndelete": [
"JsonConfig\\JCSingleton::onArticleUndelete"
],
+   "BeforePageDisplay": [
+   "JsonConfig\\JCSingleton::onBeforePageDisplay"
+   ],
+   "CanonicalNamespaces": [
+   "JsonConfig\\JCSingleton::onCanonicalNamespaces"
+   ],
+   "CodeEditorGetPageLanguage": [
+   "JsonConfig\\JCSingleton::onCodeEditorGetPageLanguage"
+   ],
+   "ContentHandlerDefaultModelFor": [
+   
"JsonConfig\\JCSingleton::onContentHandlerDefaultModelFor"
+   ],
+   "ContentHandlerForModelID": [
+   "JsonConfig\\JCSingleton::onContentHandlerForModelID"
+   ],
+   "EditFilterMergedContent": [
+   "JsonConfig\\JCSingleton::onEditFilterMergedContent"
+   ],
+   "MovePageIsValidMove": [
+   "JsonConfig\\JCSingleton::onMovePageIsValidMove"
+   ],
"PageContentSaveComplete": [
"JsonConfig\\JCSingleton::onPageContentSaveComplete"
],
+   "ScribuntoExternalLibraries": [
+   "JsonConfig\\JCLuaLibrary::onScribuntoExternalLibraries"
+   ],
"TitleMoveComplete": [
"JsonConfig\\JCSingleton::onTitleMoveComplete"
],
diff --git a/includes/JCApi.php b/includes/JCApi.php
index 8967be6..9806feb 100644
--- a/includes/JCApi.php
+++ b/includes/JCApi.php
@@ -2,7 +2,6 @@
 namespace JsonConfig;
 
 use ApiBase;
-use MWNamespace;
 
 /**
  * Allows JsonConfig to be manipulated via API
@@ -11,7 +10,7 @@
 
private static function addStatusConf( $conf ) {
// explicitly list values to avoid accidental exposure of 
private data
-   $res = array(
+   $res = [
  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: check_ssl: add --sans argument

2016-10-31 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: check_ssl: add --sans argument
..


check_ssl: add --sans argument

This adds an optional verification step which takes a list of
comma-separated SAN elements as --sans, and checks that the
server's certificate SAN list contains all of them.

Change-Id: I920a1fe55dc97ebd5c7682a141e056b1403e95d3
---
M modules/nagios_common/files/check_commands/check_ssl
1 file changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/modules/nagios_common/files/check_commands/check_ssl 
b/modules/nagios_common/files/check_commands/check_ssl
index bb3c287..1c0b1eb 100755
--- a/modules/nagios_common/files/check_commands/check_ssl
+++ b/modules/nagios_common/files/check_commands/check_ssl
@@ -96,6 +96,10 @@
 spec => 'issuer|i=s',
 help => 'issuer name to match against',
 );
+$ng->arg(
+spec => 'sans=s',
+help => 'comma-separated list of SAN elements that must be present',
+);
 
 $ng->arg(
 spec=> 'warning|w=i',
@@ -199,6 +203,21 @@
 if ( $ng->issuer && $issuer !~ /\Q$ng->{issuer}\E/ ) {
 push @crit, "Certificate issuer $issuer didn't match argument";
 }
+
+if ( defined $ng->sans ) {
+my @check_sans = split(/,/, $ng->sans);
+my %cert_sans = map { $_ => 1 } @sans;
+my $bad = 0;
+foreach my $check_san (@check_sans) {
+if ( !exists $cert_sans{$check_san} ) {
+push(@crit, "Certificate $name SAN $check_san not found in 
cert SAN list: $sans");
+$bad = 1;
+}
+}
+if ( !$bad ) {
+push(@ok, "Certificate $name contains all required SANs: $sans");
+}
+}
 }
 
 sub ssl_expiry_check {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I920a1fe55dc97ebd5c7682a141e056b1403e95d3
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: check_ssl: clean up ssl_verify/_subject_matches

2016-10-31 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: check_ssl: clean up ssl_verify/_subject_matches
..


check_ssl: clean up ssl_verify/_subject_matches

ssl_subject_matches was giving incorrect verbose output for the
SAN list (only showing the final element of the SAN list), because
it lacked the transformation already done on the same data in
ssl_verify above it.  Fix this up by merging the two functions
(which are called sequentially anyways) and having them share
common correct data for SAN and names arrays and strings.

Change-Id: I3af922b63b42a57d91d6f9adad014765b562c53c
---
M modules/nagios_common/files/check_commands/check_ssl
1 file changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/modules/nagios_common/files/check_commands/check_ssl 
b/modules/nagios_common/files/check_commands/check_ssl
index eef0b27..bb3c287 100755
--- a/modules/nagios_common/files/check_commands/check_ssl
+++ b/modules/nagios_common/files/check_commands/check_ssl
@@ -171,29 +171,27 @@
 }
 
 sub ssl_verify {
-my $name = $client->peer_certificate('commonName');
-my @sans = $client->peer_certificate('subjectAltNames');
+my $name= $client->peer_certificate('commonName');
+my $subject = $client->peer_certificate('subject');
+my $issuer  = $client->peer_certificate('issuer');
+my @sans= $client->peer_certificate('subjectAltNames');
 
 # handle Net::SSLeay's list of tuples (get even elements, ignore odd)
 @sans = @sans[ grep { $_ & 1 } 1 .. $#sans ];
+my $sans = join(q{, }, @sans);
 
 # commonName + SANs-except-commonName
 my @names = ( $name, grep { !/^\Q$name\E$/ } @sans );
+my $names = join(q{, }, @names);
 
 unless ( $ng->noverify ) {
 $client->verify_hostname( $cn, $ng->protocol )
-  or push @crit, "failed to verify $cn against " . join( ', ', @names 
);
+  or push @crit, "failed to verify $cn against $names";
 }
-}
-
-sub ssl_subject_matches {
-my $subject = $client->peer_certificate('subject');
-my $issuer  = $client->peer_certificate('issuer');
-my $sans= $client->peer_certificate('subjectAltNames');
 
 push @verbose, "Certificate subject: $subject";
 push @verbose, "Certificate issuer: $issuer";
-push @verbose, "Certificate SANs: $sans" if defined $sans;
+push @verbose, "Certificate SANs: $sans";
 
 if ( $ng->subject && $subject !~ /\Q$ng->{subject}\E/ ) {
 push @crit, "Certificate subject $subject didn't match argument";
@@ -247,7 +245,6 @@
 init;
 ssl_connect;
 ssl_verify;
-ssl_subject_matches;
 ssl_expiry_check;
 
 print join( "\n", @verbose ), "\n" if $ng->verbose;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3af922b63b42a57d91d6f9adad014765b562c53c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...JSBreadCrumbs[master]: Fixed a null issue for leading descriptor. Updating user var...

2016-10-31 Thread Kevstoy (Code Review)
Kevstoy has submitted this change and it was merged.

Change subject: Fixed a null issue for leading descriptor. Updating user 
variable for leading descriptor message.
..


Fixed a null issue for leading descriptor.
Updating user variable for leading descriptor message.

Change-Id: I8fad59c204025edaaa22d30d9f05159f89f45186
---
M JSBreadCrumbs.hooks.php
M JSBreadCrumbs.php
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/JSBreadCrumbs.hooks.php b/JSBreadCrumbs.hooks.php
index 96acc94..0e248e5 100644
--- a/JSBreadCrumbs.hooks.php
+++ b/JSBreadCrumbs.hooks.php
@@ -53,7 +53,7 @@

$outPage->addJsConfigVars('wgJSBreadCrumbsPervasiveWikiFarm', 
$wgUser->getOption ("jsbreadcrumbs-pervasivewikifarm" ));
$outPage->addJsConfigVars('wgJSBreadCrumbsSeparator', 
$separator);
$outPage->addJsConfigVars('wgJSBreadCrumbsCookiePath', 
$wgJSBreadCrumbsCookiePath);
-   
$outPage->addJsConfigVars('wgJSBreadCrumbsLeadingDescription', wfMessage( 
"jsbreadcrumbs-leading-description" )->escaped());
+   
$outPage->addJsConfigVars('wgJSBreadCrumbsLeadingDescription', 
$wgUser->getOption( "jsbreadcrumbs-leading-description" ));

$outPage->addJsConfigVars('wgJSBreadCrumbsShowSiteName', $wgUser->getOption( 
"jsbreadcrumbs-showsite" ));
 
 
diff --git a/JSBreadCrumbs.php b/JSBreadCrumbs.php
index b875a0f..5bbfc2c 100644
--- a/JSBreadCrumbs.php
+++ b/JSBreadCrumbs.php
@@ -30,6 +30,7 @@
 $wgDefaultUserOptions['jsbreadcrumbs-showsite'] = false;
 $wgDefaultUserOptions['jsbreadcrumbs-pervasivewikifarm'] = false;
 $wgDefaultUserOptions['jsbreadcrumbs-numberofcrumbs'] = 5;
+$wgDefaultUserOptions['jsbreadcrumbs-leading-description'] = "Last Pages 
Viewed";
 
 // Sets Credits
 $wgExtensionCredits['other'][] = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fad59c204025edaaa22d30d9f05159f89f45186
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/JSBreadCrumbs
Gerrit-Branch: master
Gerrit-Owner: Kevstoy 
Gerrit-Reviewer: Kevstoy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix picture of the day caption being single-line.

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

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

Change subject: Fix picture of the day caption being single-line.
..

Fix picture of the day caption being single-line.

I've noticed that the caption shown on top of the picture of the day is
overflowing onto multiple lines, despite having the attribute of
maxLines="1". This seems to be fixable by removing the textIsSelectable
attribute, which isn't particularly necessary, since the user may click
the card itself, and select the text from the full-screen gallery caption.

Change-Id: Ife44dd4f48e8be93d0605f8fc137d899f9d739f0
---
M app/src/main/res/layout/view_card_featured_image.xml
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/res/layout/view_card_featured_image.xml 
b/app/src/main/res/layout/view_card_featured_image.xml
index 72e94eb..9bb59ce 100644
--- a/app/src/main/res/layout/view_card_featured_image.xml
+++ b/app/src/main/res/layout/view_card_featured_image.xml
@@ -35,7 +35,6 @@
 style="@style/RtlAwareTextView"
 android:background="#4c00"
 android:textColor="@android:color/white"
-android:textIsSelectable="true"
 tools:text="Description of featured image here"
 android:ellipsize="end"
 android:maxLines="1" />

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife44dd4f48e8be93d0605f8fc137d899f9d739f0
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] operations/mediawiki-config[master]: MF Beta: Don't move first paragraph before infobox

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

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

Change subject: MF Beta: Don't move first paragraph before infobox
..

MF Beta: Don't move first paragraph before infobox

Let's fix all known issues and then re-enable the feature
in beta.

Bug: T145216
Bug: T149389
Change-Id: I319d751176039c984479037bccabf7a8d849cdfe
---
M wmf-config/InitialiseSettings.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5a106b7..97e7c76 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14621,6 +14621,15 @@
'HTML' => [],
],
 ],
+
+'wgMFShowFirstParagraphBeforeInfobox' => [
+   // T145216#2757310
+   'default' => [
+   'base' => false,
+   'beta' => false
+   ]
+],
+
 'wgMFLazyLoadImages' => [
// T142399
'default' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: LABS: Enable tabular data lua support

2016-10-31 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: LABS: Enable tabular data lua support
..

LABS: Enable tabular data lua support

Bug: T148745
Change-Id: I649a4867e41d491c66168d4685e8dec10dacf535
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 14403a0..d6c46cc 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -192,6 +192,7 @@
'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
];
}
+   $wgJsonConfigEnableLuaSupport = true;
 }
 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Handle banner loader errors on client

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

Change subject: Handle banner loader errors on client
..


Handle banner loader errors on client

Bug: T149107
Change-Id: Iab80d0462becf1e7a7a2d9f2df662c7a68aed8bf
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
M special/SpecialBannerLoader.php
M tests/qunit/subscribing/ext.centralNotice.display.tests.js
4 files changed, 59 insertions(+), 11 deletions(-)

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



diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 5536e05..ba4777d 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -153,10 +153,14 @@
);
 
// The returned javascript will call 
mw.centralNotice.insertBanner()
+   // or mw.centralNotice.handleBannerLoaderError() (if an error 
was
+   // handled on the server).
$.ajax( {
url: url.toString(),
dataType: 'script',
cache: true
+   } ).fail( function ( jqXHR, status, error ) {
+   cn.handleBannerLoaderError( status + ': ' + error );
} );
}
 
@@ -309,6 +313,20 @@
}
 
/**
+* Stuff we have to do following the call to fetch a banner (successful
+* or not)
+*/
+   function processAfterBannerFetch() {
+
+   // If we're testing a banner, don't call 
Special:RecordImpression or
+   // run mixin hooks.
+   if ( !cn.internal.state.getData().testingBanner ) {
+   runPostBannerMixinHooks();
+   recordImpression();
+   }
+   }
+
+   /**
 * CentralNotice base public object, exposed as mw.centralNotice. Note:
 * other CN modules may add properties to this object, and we add some
 * dynamically. These additional properties are:
@@ -402,12 +420,7 @@
state.setBannerShown();
}
 
-   // If we're testing a banner, don't call 
Special:RecordImpression or
-   // run mixin hooks.
-   if ( !state.getData().testingBanner ) {
-   runPostBannerMixinHooks();
-   recordImpression();
-   }
+   processAfterBannerFetch();
},
 
/**
@@ -531,6 +544,16 @@
} );
},
 
+   /**
+* Handle a banner loader error, with an optional message
+* @param {string} [msg]
+*/
+   handleBannerLoaderError: function ( msg ) {
+   cn.internal.state.setBannerLoaderError( msg );
+   bannerLoadedDeferredObj.reject( 
cn.internal.state.getData() );
+   processAfterBannerFetch();
+   },
+
hideBannerWithCloseButton: function () {
// Hide the banner element
$( '#centralNotice' ).hide();
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index a2b11fb..2d18e1f 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -31,7 +31,8 @@
NO_BANNER_AVAILABLE: new Status( 'no_banner_available', 
3 ),
BANNER_CHOSEN: new Status( 'banner_chosen', 4 ),
BANNER_LOADED_BUT_HIDDEN: new Status( 
'banner_loaded_but_hidden', 5 ),
-   BANNER_SHOWN: new Status( 'banner_shown', 6 )
+   BANNER_SHOWN: new Status( 'banner_shown', 6 ),
+   BANNER_LOADER_ERROR: new Status( 'banner_loader_error', 
7 )
},
 
// Until T114078 is closed, we minify banner history logs. This 
lookup
@@ -363,6 +364,17 @@
},
 
/**
+* Set a banner loader error, with an optional message
+* @param {string} [msg]
+*/
+   setBannerLoaderError: function ( msg ) {
+   if ( msg ) {
+   state.data.errorMsg = msg;
+   }
+   setStatus( STATUSES.BANNER_LOADER_ERROR );
+   },
+
+   /**
 * Register that the current page view is included in a test.
 *
 * @param {string} identifier A string to identify the test. 
Should not contain
di

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Tools for creating unit conversion config

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

Change subject: Tools for creating unit conversion config
..


Tools for creating unit conversion config

Change-Id: I7845e1fb3b5f862799462428481d63ab8e7afdd6
Bug: T117032
---
M composer.json
M lib/tests/phpunit/Units/UnitStorageTest.php
M lib/tests/phpunit/Units/testunits.json
A repo/maintenance/SPARQLClient.php
A repo/maintenance/SPARQLException.php
A repo/maintenance/updateUnits.php
A repo/tests/phpunit/maintenance/UpdateUnitsTest.php
7 files changed, 616 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index 41cea68..3ecb84b 100644
--- a/composer.json
+++ b/composer.json
@@ -26,7 +26,7 @@
"data-values/common": "~0.3.0",
"data-values/geo": "~1.0",
"data-values/interfaces": "~0.2.0|~0.1.5",
-   "data-values/number": "~0.7.0",
+   "data-values/number": "~0.8.0",
"data-values/time": "~0.8.4",
"data-values/validators": "~0.1.0",
"data-values/data-types": "~0.5.0",
diff --git a/lib/tests/phpunit/Units/UnitStorageTest.php 
b/lib/tests/phpunit/Units/UnitStorageTest.php
index 6951547..2b78b37 100644
--- a/lib/tests/phpunit/Units/UnitStorageTest.php
+++ b/lib/tests/phpunit/Units/UnitStorageTest.php
@@ -9,7 +9,7 @@
 use RuntimeException;
 
 /**
- * @covers Wikibase\Lib\UnitConverter
+ * @covers \Wikibase\Lib\UnitConverter
  *
  * @group Wikibase
  *
@@ -46,7 +46,7 @@
$this->assertEquals( [ 'factor' => '22.234', 'unit' => 'Q1' ],
$storage->getConversion( 'Q2' ) );
$this->assertEquals( [ 'factor' => '1', 'unit' => 'Q3' ], 
$storage->getConversion( 'Q3' ) );
-   $this->assertEquals( [ 'factor' => 
'0.000243885945', 'unit' => 'Q3' ],
+   $this->assertArraySubset( [ 'factor' => 
'0.000243885945', 'unit' => 'Q3' ],
$storage->getConversion( 'Q4' ) );
$this->assertNull( $storage->getConversion( 'Q5' ) );
 
diff --git a/lib/tests/phpunit/Units/testunits.json 
b/lib/tests/phpunit/Units/testunits.json
index e1cc307..20c191e 100644
--- a/lib/tests/phpunit/Units/testunits.json
+++ b/lib/tests/phpunit/Units/testunits.json
@@ -13,6 +13,7 @@
   ],
   "Q4": {
 "factor": "0.000243885945",
-"unit": "Q3"
+"unit": "Q3",
+"otherdata": "should be ignored"
   }
 }
diff --git a/repo/maintenance/SPARQLClient.php 
b/repo/maintenance/SPARQLClient.php
new file mode 100644
index 000..87da2ba
--- /dev/null
+++ b/repo/maintenance/SPARQLClient.php
@@ -0,0 +1,97 @@
+endpoint = $url;
+   $this->baseURL = $baseURL;
+   }
+
+   /**
+* Query SPARQL endpoint
+* @param string $sparql query
+* @param bool   $rawData Whether to return only values or full data 
objects
+* @return array List of results, one row per array element
+*   Each row will contain fields indexed by variable name.
+* @throws SPARQLException
+*/
+   public function query( $sparql, $rawData = false ) {
+   $url = $this->endpoint . '?' . http_build_query( [ "query" => 
$sparql, "format" => "json" ] );
+   $options = [ 'method' => 'GET', 'timeout' => self::TIMEOUT ];
+   $request = MWHttpRequest::factory( $url, $options, __METHOD__ );
+   $status = $request->execute();
+   if ( !$status->isOK() ) {
+   throw new SPARQLException( "HTTP error: 
{$status->getWikiText()}" );
+   }
+   $result = $request->getContent();
+   $data = json_decode( $result, true );
+   if ( !$data ) {
+   throw new SPARQLException( "HTTP request failed, 
response:\n$result" );
+   }
+
+   return $this->extractData( $data, $rawData );
+   }
+
+   /**
+* Get list of IDs satisfying the query
+* @param string $sparql query
+* @param string $item variable name designating the needed element
+* @return string[]|false List of IDs from query
+*/
+   public function getIDs( $sparql, $item ) {
+   $data = $this->query( $sparql, false );
+   if ( $data ) {
+   return array_map( function ( $row ) use ( $item ) {
+   return str_replace( $this->baseURL, '', 
$row[$item] );
+   }, $data );
+   }
+   return [];
+   }
+
+   /**
+* Extract data from SPARQL response format
+* @param array $data SPARQL result
+* @param bool  $rawData Whether to return only values or full data 
objects
+* @return array List of results, one row per element.

[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Adds a grrrit-wm restarting command for you to type in irc

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

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

Change subject: Adds a grrrit-wm restarting command for you to type in irc
..

Adds a grrrit-wm restarting command for you to type in irc

Bug: T149609
Change-Id: Ie8bfeab1374036d5a2049c8faf5ae99cb0237195
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit 
refs/changes/76/318976/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8bfeab1374036d5a2049c8faf5ae99cb0237195
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
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] wikipedia...ProveIt[master]: Support for multiple templates

2016-10-31 Thread Sophivorus (Code Review)
Sophivorus has uploaded a new change for review.

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

Change subject: Support for multiple templates
..

Support for multiple templates

Bug: T148884
Change-Id: I5bde89e5422b392b420c04e659ea96a93cb6315b
---
M proveit.js
1 file changed, 47 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikipedia/gadgets/ProveIt 
refs/changes/75/318975/1

diff --git a/proveit.js b/proveit.js
index f19cae4..8e1b623 100755
--- a/proveit.js
+++ b/proveit.js
@@ -275,7 +275,7 @@
var i, j, reference, referenceItem;
for ( i = 0; i < matches.length; i++ ) {
// Turn all the matches into reference objects
-   reference = proveit.makeReference( matches[ i ] 
);
+   reference = proveit.parseReference( matches[ i 
] );
 
// For each reference, check the citations 
array for citations to it
for ( j = 0; j < citations.length; j++ ) {
@@ -311,8 +311,8 @@
 * @param {string} wikitext of the reference
 * @return {object} reference object
 */
-   makeReference: function ( referenceString ) {
-   // Extract the name, if any
+   parseReference: function ( referenceString ) {
+   // Extract the reference name, if any
// Three patterns: ,  and 
var referenceName = null,
match = referenceString.match( 
/<[\s]*ref[\s]*name[\s]*=[\s]*(?:(?:\"(.*?)\")|(?:\'(.*?)\')|(?:(.*?)))[\s]*>/i 
);
@@ -320,7 +320,7 @@
referenceName = match[1] || match[2] || match[3];
}
 
-   // Extract the index
+   // Get the index
var referenceIndex = proveit.getTextbox().val().indexOf( 
referenceString );
 
// Extract the content
@@ -334,31 +334,44 @@
'content': referenceContent
});
 
-   // Determine if the reference uses a template by getting all 
the registered template names and searching for a match
-   var registeredTemplatesArray = [];
-   for ( var registeredTemplate in proveit.templateData ) {
-   registeredTemplate = registeredTemplate.substring( 
registeredTemplate.indexOf( ':' ) + 1 ); // Remove the namespace
-   registeredTemplatesArray.push( registeredTemplate );
+   // Search for the main template of the reference
+   var templateName,
+   templateRegex,
+   indexStart;
+   for ( var templateTitle in proveit.templateData ) {
+   templateName = templateTitle.substring( 
templateTitle.indexOf( ':' ) + 1 ); // Remove the namespace
+   templateRegex = new RegExp( '{{\\s*' + templateName, 
'i' );
+   indexStart = referenceContent.search( templateRegex );
+   if ( indexStart > -1 ) {
+   reference.template = templateName;
+   break;
+   }
}
-   var registeredTemplatesDisjunction = 
registeredTemplatesArray.join( '|' ),
-   regExp = new RegExp( '{{(' + 
registeredTemplatesDisjunction + ')([\\s\\S]*)}}', 'i' ); // We use [\s\S]* 
instead of .* to match newlines
-   match = referenceContent.match( regExp );
 
-   // If there's a match, add the template data to the reference
-   if ( match ) {
-   reference.templateString = match[0];
+   // The rest of the code is for when a main template was found
+   if ( reference.template ) {
 
-   // Extract and the template name and normalize it
-   var template = match[1];
-   registeredTemplatesArray.forEach( function ( 
registeredTemplate ) {
-   if ( template.toLowerCase() === 
registeredTemplate.toLowerCase() ) {
-   template = registeredTemplate;
+   // Figure out the indexEnd by searching for the closing 
"}}"
+   // knowing there may be subtemplates and other 
templates after the main template
+   var indexEnd = referenceContent.length,
+   templateLevel = 0;
+   for ( var i = indexStart; i < indexEnd; i++ ) {
+   if ( referenceContent[ i ] + referenceContent[ 
i + 1 ] === '{{' ) {
+   templateLevel++;
+   i++; // We speed up the loop to avoid 
multiple matches when two or more templates are found to

[MediaWiki-commits] [Gerrit] operations/puppet[production]: nfs: Wait 10s between nfs-exportsd restarts

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

Change subject: nfs: Wait 10s between nfs-exportsd restarts
..


nfs: Wait 10s between nfs-exportsd restarts

To help recover from 'transient' wikitech outages

Change-Id: Ic2bf9ab901d2ca4dae88e2d9ee571bb67a131ed6
---
M modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb 
b/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
index e742401..73fe642 100644
--- a/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
+++ b/modules/labstore/templates/initscripts/nfs-exportd.systemd.erb
@@ -5,3 +5,4 @@
 ExecStart=/usr/local/bin/nfs-exportd --interval 60
 Restart=on-failure
 User=nfsmanager
+RestartSec=10

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2bf9ab901d2ca4dae88e2d9ee571bb67a131ed6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Grant clush user complete sudo rights for everything

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

Change subject: tools: Grant clush user complete sudo rights for everything
..


tools: Grant clush user complete sudo rights for everything

Also include toollabs::infrastructure explicitly, to
deny non root / non-admin users access.

SCARY

Change-Id: I99b067b2a76feb0281ac881d7052cceefd790a37
---
M modules/role/manifests/toollabs/clush/master.pp
1 file changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/modules/role/manifests/toollabs/clush/master.pp 
b/modules/role/manifests/toollabs/clush/master.pp
index b189a4f..db2cf76 100644
--- a/modules/role/manifests/toollabs/clush/master.pp
+++ b/modules/role/manifests/toollabs/clush/master.pp
@@ -15,10 +15,9 @@
 #
 # This will run it on all the k8s-workers, collect the output
 # from them all (the -b option), dedupes them and displays them. You can 
specify fanout with -f - the default is 16.
-#
-# Right now the user has no sudo rights, but this will probably
-# change!
 class role::toollabs::clush::master {
+include ::toollabs::infrastructure
+
 class { '::clush::master':
 username => 'clushuser',
 }
@@ -76,4 +75,10 @@
 mode=> '0444',
 content => ini($groups_config),
 }
+
+# Give it complete sudo rights
+sudo::user { 'clushuser':
+ensure => present,
+privileges => 'ALL = (ALL) NOPASSWD: ALL',
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I99b067b2a76feb0281ac881d7052cceefd790a37
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: fix permissions on changepw script, let all users run it

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

Change subject: fix permissions on changepw script, let all users run it
..


fix permissions on changepw script, let all users run it

Any user (on salt masters) should be able to run this script,
avoiding the need for sudo rules for this. It doesnt allow anything
more than the existing access, since you still need to know the
mgmt password to do anything. (just like when you'd SSH to it directly)

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

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



diff --git a/modules/mgmt/manifests/init.pp b/modules/mgmt/manifests/init.pp
index 0a7a896..8347955 100644
--- a/modules/mgmt/manifests/init.pp
+++ b/modules/mgmt/manifests/init.pp
@@ -7,7 +7,7 @@
 ensure => present,
 }
 file { '/usr/local/bin/changepw':
-mode   => '0500',
+mode   => '0555',
 owner  => 'root',
 group  => 'root',
 source => 'puppet:///modules/mgmt/changepw',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: secondary cluster setup eth1 using interface::manual

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

Change subject: labstore: secondary cluster setup eth1 using interface::manual
..


labstore: secondary cluster setup eth1 using interface::manual

sets interface to come up on boot

Change-Id: I50df27749c7e83823c2192da119fa64536cb40b4
---
M modules/role/manifests/labs/nfs/secondary.pp
1 file changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index e6208bb..fd058c4 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -11,24 +11,32 @@
 # Enable RPS to balance IRQs over CPUs
 interface::rps { $monitor: }
 
+interface::manual{ 'eth1':
+interface => 'eth1',
+}
+
 if $::hostname == 'labstore1005' {
+# Define DRBD role for this host, should come from hiera
+$drbd_role = 'secondary'
+
 interface::ip { 'drbd-replication':
 interface => 'eth1',
 address   => '10.64.37.26',
 prefixlen => '24',
+require   => Interface::Manual['eth1'],
 }
-# Define DRBD role for this host, should come from hiera
-$drbd_role = 'secondary'
 }
 
 if $::hostname == 'labstore1004' {
+# Define DRBD role for this host, should come from hiera
+$drbd_role = 'primary'
+
 interface::ip { 'drbd-replication':
 interface => 'eth1',
 address   => '10.64.37.25',
 prefixlen => '24',
+require   => Interface::Manual['eth1'],
 }
-# Define DRBD role for this host, should come from hiera
-$drbd_role = 'primary'
 }
 
 # TODO: hiera this

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Added SimpleStyleParser::parseObject()

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

Change subject: Added SimpleStyleParser::parseObject()
..


Added SimpleStyleParser::parseObject()

Allows validation of the data that has already
been json-parsed.

Change-Id: I5d2dbe0f5b3b973309bdc5a00aefcb947a110aa4
---
M includes/SimpleStyleParser.php
1 file changed, 31 insertions(+), 23 deletions(-)

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



diff --git a/includes/SimpleStyleParser.php b/includes/SimpleStyleParser.php
index 28f1299..d773ef2 100644
--- a/includes/SimpleStyleParser.php
+++ b/includes/SimpleStyleParser.php
@@ -54,20 +54,31 @@
if ( $input !== '' && $input !== null ) {
$status = FormatJson::parse( $input, 
FormatJson::TRY_FIXING | FormatJson::STRIP_COMMENTS );
if ( $status->isOK() ) {
-   $json = $status->getValue();
-   if ( !is_array( $json ) ) {
-   $json = [ $json ];
-   }
-   $status = $this->validateContent( $json );
-   if ( $status->isOK() ) {
-   $this->sanitize( $json );
-   $status = $this->normalize( $json );
-   }
+   $status = $this->parseObject( 
$status->getValue() );
} else {
$status = Status::newFatal( 
'kartographer-error-json', $status->getMessage() );
}
}
 
+   return $status;
+   }
+
+   /**
+* Validate parsed GeoJSON data object
+*
+* @param array|object $data
+* @return Status
+*/
+   public function parseObject( $data ) {
+   if ( !is_array( $data ) ) {
+   $data = [ $data ];
+   }
+   $status = $this->validateContent( $data );
+   if ( $status->isOK() ) {
+   $this->sanitize( $data );
+   $status = $this->normalize( $data );
+   return $status;
+   }
return $status;
}
 
@@ -152,22 +163,19 @@
foreach ( $json as &$element ) {
$this->sanitize( $element );
}
-   return;
-   } elseif ( !is_object( $json ) ) {
-   return;
-   }
-
-   foreach ( array_keys( get_object_vars( $json ) ) as $prop ) {
-   // https://phabricator.wikimedia.org/T134719
-   if ( $prop[0] === '_' ) {
-   unset( $json->$prop );
-   } else {
-   $this->sanitize( $json->$prop );
+   } elseif ( is_object( $json ) ) {
+   foreach ( array_keys( get_object_vars( $json ) ) as 
$prop ) {
+   // https://phabricator.wikimedia.org/T134719
+   if ( $prop[0] === '_' ) {
+   unset( $json->$prop );
+   } else {
+   $this->sanitize( $json->$prop );
+   }
}
-   }
 
-   if ( property_exists( $json, 'properties' ) && is_object( 
$json->properties ) ) {
-   $this->sanitizeProperties( $json->properties );
+   if ( property_exists( $json, 'properties' ) && 
is_object( $json->properties ) ) {
+   $this->sanitizeProperties( $json->properties );
+   }
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d2dbe0f5b3b973309bdc5a00aefcb947a110aa4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: fix permissions on changepw script, let all users run it

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

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

Change subject: fix permissions on changepw script, let all users run it
..

fix permissions on changepw script, let all users run it

Any user (on salt masters) should be able to run this script,
avoiding the need for sudo rules for this. It doesnt allow anything
more than the existing access, since you still need to know the
mgmt password to do anything. (just like when you'd SSH to it directly)

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


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

diff --git a/modules/mgmt/manifests/init.pp b/modules/mgmt/manifests/init.pp
index 0a7a896..8347955 100644
--- a/modules/mgmt/manifests/init.pp
+++ b/modules/mgmt/manifests/init.pp
@@ -7,7 +7,7 @@
 ensure => present,
 }
 file { '/usr/local/bin/changepw':
-mode   => '0500',
+mode   => '0555',
 owner  => 'root',
 group  => 'root',
 source => 'puppet:///modules/mgmt/changepw',

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: LABS: Enable tabular remote access to tabular data

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

Change subject: LABS: Enable tabular remote access to tabular data
..


LABS: Enable tabular remote access to tabular data

Bug: T148745
Change-Id: I85db0f4a2c4a3306d4d710056864eac4b8efb25f
---
M wmf-config/CommonSettings-labs.php
M wmf-config/InitialiseSettings-labs.php
2 files changed, 14 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 25fe21c..14403a0 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -169,7 +169,7 @@
 
 
 // Enable Tabular data namespace on Commons - T148745
-if ( $wgDBname == 'commonswiki' ) {
+if ( $wmgEnableTabularData ) {
// Safety: before extension.json, these values were initialized by 
JsonConfig.php
if ( !isset( $wgJsonConfigModels ) ) {
$wgJsonConfigModels = [];
@@ -184,8 +184,14 @@
'nsName' => 'Data',
// page name must end in ".tab", and contain at least one symbol
'pattern' => '/.\.tab$/',
-   'store' => true,
];
+   if ( $wgDBname == 'commonswiki' ) {
+   $wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
+   } else {
+   $wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
+   'url' => 
'https://commons.wikimedia.beta.wmflabs.org/w/api.php'
+   ];
+   }
 }
 
 
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 244d3b9..4e3f003 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -573,5 +573,11 @@
'mode' => 'packed', // T141349
],
],
+
+   // Enable Tabular data namespace on Commons - T148745
+   'wmgEnableTabularData' => [
+   'default' => true,
+   ],
+
];
 } # wmflLabsSettings()

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: create shell account for Zareen Farooqui

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

Change subject: admin: create shell account for Zareen Farooqui
..


admin: create shell account for Zareen Farooqui

Create shell user for Zareen Farooqui, requested for her
internship projects with the Reading team.

quote: "Zareen needs access to event logging and weblogs.
She also needs to be able two write hadoop jobs against the
weblogs or transfer event logs to hadoop for larger operations.

UID matches existing Labs/Wikitech user. Key is different from Labs key.

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

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 19e3f43..8f82e98 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -2169,3 +2169,11 @@
 ssh_keys:
   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCsS1WgYh+EeHalBKDkWmlvhzfoWPFQcg6OYWKkWhraOd6mhGjDfaF6vst9xC4PCtvudDBMImNIrzLAT3uWoZxuLUIpsGLvIfPLk/vRtfQFN/L//ItSaOshFRVmVfEvVeNbmQKrgcfLvp2rmuJvf/1qJXNAgGIZK54xw3xjriZ/uem8xBZOJ9a7jcyUYlD8fk0rNcv2vpzQIY6ZiFJq8lYf8bja70IuBTPb93gmlCnE6r6wCb6PAWByL3zZJVffFi+A+DEMSNZ6bjEu6iQA1iQCcIPxXS8DTr0Zj+J1TeyqYUvuXmzqJb+xmOqv74fAqPu8A7YxX89LCExj5AzP+0Xr
 raynor@DellE6540
 uid: 15700
+  zareen:
+ensure: present
+gid: 500
+name: zareen
+realname: Zareen Farooqui
+ssh_keys:
+  - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDKJFKzMQRJcDPrtRBIi7/b8hWbngR59UA3VCHZXbWVaNCKe+mOz9gXUvmAmeSr29p5vnmAP7tafnWYktvYbqGV02e1x5P09fvAWOvOaQob/A7/5shTGwtVxsip3/Ky2viP5Kycb8THbRHOtOt0DmeUVrWlhwie5M9AeKSWmTVJOivoME8g//nIlq7cXTCYyv+NHFSDIPKDmvlLbVFFdBbhYdDWlT6DQvTPFjTAyD23pltRBDo2WwufnSZB1sQ7spg+6+SN7e2fIcRiGXv8ar8fjwiolLtNz2I5nsLoBsb6q0ZHSwOdta4EhnkmswMrjNAgo6ayImKzXMeG35dvHvZh
 ZareenFarooqui@ZAREENs-MacBook.local
+uid: 15813

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I236906df140b62239c0e843243c0809c5b380787
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Jkatz 
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] mediawiki...parsoid[master]: Don't expose dev routes in production

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

Change subject: Don't expose dev routes in production
..


Don't expose dev routes in production

 * Also, make /version public

Bug: T114629
Change-Id: Ia12ec226085b4bca4ee8ab12b1a60355cc401f51
---
M lib/api/ParsoidService.js
M lib/api/routes.js
M lib/api/views/home.html
M lib/config/ParsoidConfig.js
4 files changed, 21 insertions(+), 11 deletions(-)

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



diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js
index 7aa1bb5..eafeb3e 100644
--- a/lib/api/ParsoidService.js
+++ b/lib/api/ParsoidService.js
@@ -169,16 +169,19 @@
 
app.get('/', routes.home);
app.get('/robots.txt', routes.robots);
+   app.get('/version', routes.version);
+   app.get('/_version', routes.version);  // for backwards compat.
 
// private routes
-   app.get('/_version', routes.version);
-   app.get('/_html/:prefix?/:title?', i, p, routes.html2wtForm);
-   app.get('/_wikitext/:prefix?/:title?', i, p, routes.wt2htmlForm);
-   app.get('/_rt/:prefix?/:title?', i, p, routes.roundtripTesting);
-   app.get('/_rtve/:prefix?/:title?', i, p, routes.roundtripTestingNL);
-   app.get('/_rtselser/:prefix?/:title?', i, p, routes.roundtripSelser);
-   app.get('/_rtform/:prefix?/:title?', i, p, routes.getRtForm);
-   app.post('/_rtform/:prefix?/:title?', i, p, routes.postRtForm);
+   if (parsoidConfig.devAPI) {
+   app.get('/_html/:prefix?/:title?', i, p, routes.html2wtForm);
+   app.get('/_wikitext/:prefix?/:title?', i, p, 
routes.wt2htmlForm);
+   app.get('/_rt/:prefix?/:title?', i, p, routes.roundtripTesting);
+   app.get('/_rtve/:prefix?/:title?', i, p, 
routes.roundtripTestingNL);
+   app.get('/_rtselser/:prefix?/:title?', i, p, 
routes.roundtripSelser);
+   app.get('/_rtform/:prefix?/:title?', i, p, routes.getRtForm);
+   app.post('/_rtform/:prefix?/:title?', i, p, routes.postRtForm);
+   }
 
// v3 API routes
app.get('/:domain/v3/page/:format/:title/:revision?', v3, u, p, a, 
routes.v3Get);
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 9a56651..4da5f5e 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -241,7 +241,7 @@
// Routes
 
routes.home = function(req, res) {
-   res.render('home');
+   res.render('home', { dev: parsoidConfig.devAPI });
};
 
// robots.txt: no indexing.
diff --git a/lib/api/views/home.html b/lib/api/views/home.html
index 36e093d..4e7e9f2 100644
--- a/lib/api/views/home.html
+++ b/lib/api/views/home.html
@@ -1,9 +1,11 @@
 Welcome to the https://www.mediawiki.org/wiki/Parsoid";>Parsoid web service.
-See https://www.mediawiki.org/wiki/Parsoid#The_Parsoid_web_API";>the API 
documentation on mediawiki.org.
+See https://www.mediawiki.org/wiki/Parsoid#The_Parsoid_web_API_.2B_DOM_Spec";>the
 API documentation on mediawiki.org.
+{{#if dev}}
 There are also some convenient tools for experiments. These are 
not part of the public API.
 
Round-trip test pages, for example: /_rt/mediawiki/Parsoid
WikiText -> HTML DOM -> WikiText 
round-trip form
WikiText -> HTML DOM 
form
HTML DOM -> WikiText 
form
-
\ No newline at end of file
+
+{{/if}}
\ No newline at end of file
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 2e6b83b..4b73ce8 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -642,6 +642,11 @@
  */
 ParsoidConfig.prototype.strictAcceptCheck = false;
 
+/**
+ * @property {boolean} Expose development routes in the HTTP API.
+ */
+ParsoidConfig.prototype.devAPI = false;
+
 
 if (typeof module === "object") {
module.exports.ParsoidConfig = ParsoidConfig;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia12ec226085b4bca4ee8ab12b1a60355cc401f51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Only relocate immediate descendant paragraphs

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

Change subject: Only relocate immediate descendant paragraphs
..


Only relocate immediate descendant paragraphs

Only those paragraphs that are immediate descendants of the section
container element (`div`, currently) should be considered for
relocation.

This only affects beta users.

Bug: T149561
Change-Id: I6fe72dda191a82a06ecc40723b777d3a259ca096
---
M includes/MobileFormatter.php
M tests/phpunit/MobileFormatterTest.php
2 files changed, 20 insertions(+), 1 deletion(-)

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



diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index 6bb39d6..32e5d9d 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -210,7 +210,7 @@
// Find infoboxes and paragraphs that have text content, i.e. 
paragraphs
// that are not empty nor are wrapper paragraphs that contain 
span#coordinates.
$infoboxAndParagraphs = $xPath->query(
-   './/table[contains(@class,"infobox")] | 
.//p[string-length(text()) > 0]',
+   './/table[contains(@class,"infobox")] | 
./p[string-length(text()) > 0]',
$leadSectionBody
);
// We need both an infobox and a paragraph and the first 
element of our query result
diff --git a/tests/phpunit/MobileFormatterTest.php 
b/tests/phpunit/MobileFormatterTest.php
index dbd46a4..4c2c5f7 100644
--- a/tests/phpunit/MobileFormatterTest.php
+++ b/tests/phpunit/MobileFormatterTest.php
@@ -593,6 +593,25 @@
 
$enableSections, false, false, false, true,
],
+
+   [
+   // Minimal test case for T149561: `p` elements 
should be immediate
+   // descendants of the section container element 
(`div`, currently).
+
+   '' .
+   'SURPRISE 
PARAGRAPH' .
+   'paragraph 1',
+
+   $this->makeSectionHtml(
+   0,
+   'paragraph 1' .
+   '' .
+   'SURPRISE 
PARAGRAPH'
+   ),
+
+   $enableSections, false, false, false, true,
+   ],
+
];
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fe72dda191a82a06ecc40723b777d3a259ca096
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Don't expose dev routes in production

2016-10-31 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Don't expose dev routes in production
..

Don't expose dev routes in production

 * Also, make /version public

Bug: T114629
Change-Id: Ia12ec226085b4bca4ee8ab12b1a60355cc401f51
---
M lib/api/ParsoidService.js
M lib/api/routes.js
M lib/api/views/home.html
M lib/config/ParsoidConfig.js
4 files changed, 21 insertions(+), 11 deletions(-)


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

diff --git a/lib/api/ParsoidService.js b/lib/api/ParsoidService.js
index 7aa1bb5..eafeb3e 100644
--- a/lib/api/ParsoidService.js
+++ b/lib/api/ParsoidService.js
@@ -169,16 +169,19 @@
 
app.get('/', routes.home);
app.get('/robots.txt', routes.robots);
+   app.get('/version', routes.version);
+   app.get('/_version', routes.version);  // for backwards compat.
 
// private routes
-   app.get('/_version', routes.version);
-   app.get('/_html/:prefix?/:title?', i, p, routes.html2wtForm);
-   app.get('/_wikitext/:prefix?/:title?', i, p, routes.wt2htmlForm);
-   app.get('/_rt/:prefix?/:title?', i, p, routes.roundtripTesting);
-   app.get('/_rtve/:prefix?/:title?', i, p, routes.roundtripTestingNL);
-   app.get('/_rtselser/:prefix?/:title?', i, p, routes.roundtripSelser);
-   app.get('/_rtform/:prefix?/:title?', i, p, routes.getRtForm);
-   app.post('/_rtform/:prefix?/:title?', i, p, routes.postRtForm);
+   if (parsoidConfig.devAPI) {
+   app.get('/_html/:prefix?/:title?', i, p, routes.html2wtForm);
+   app.get('/_wikitext/:prefix?/:title?', i, p, 
routes.wt2htmlForm);
+   app.get('/_rt/:prefix?/:title?', i, p, routes.roundtripTesting);
+   app.get('/_rtve/:prefix?/:title?', i, p, 
routes.roundtripTestingNL);
+   app.get('/_rtselser/:prefix?/:title?', i, p, 
routes.roundtripSelser);
+   app.get('/_rtform/:prefix?/:title?', i, p, routes.getRtForm);
+   app.post('/_rtform/:prefix?/:title?', i, p, routes.postRtForm);
+   }
 
// v3 API routes
app.get('/:domain/v3/page/:format/:title/:revision?', v3, u, p, a, 
routes.v3Get);
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 9a56651..4da5f5e 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -241,7 +241,7 @@
// Routes
 
routes.home = function(req, res) {
-   res.render('home');
+   res.render('home', { dev: parsoidConfig.devAPI });
};
 
// robots.txt: no indexing.
diff --git a/lib/api/views/home.html b/lib/api/views/home.html
index 36e093d..4e7e9f2 100644
--- a/lib/api/views/home.html
+++ b/lib/api/views/home.html
@@ -1,9 +1,11 @@
 Welcome to the https://www.mediawiki.org/wiki/Parsoid";>Parsoid web service.
-See https://www.mediawiki.org/wiki/Parsoid#The_Parsoid_web_API";>the API 
documentation on mediawiki.org.
+See https://www.mediawiki.org/wiki/Parsoid#The_Parsoid_web_API_.2B_DOM_Spec";>the
 API documentation on mediawiki.org.
+{{#if dev}}
 There are also some convenient tools for experiments. These are 
not part of the public API.
 
Round-trip test pages, for example: /_rt/mediawiki/Parsoid
WikiText -> HTML DOM -> WikiText 
round-trip form
WikiText -> HTML DOM 
form
HTML DOM -> WikiText 
form
-
\ No newline at end of file
+
+{{/if}}
\ No newline at end of file
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 2e6b83b..4b73ce8 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -642,6 +642,11 @@
  */
 ParsoidConfig.prototype.strictAcceptCheck = false;
 
+/**
+ * @property {boolean} Expose development routes in the HTTP API.
+ */
+ParsoidConfig.prototype.devAPI = false;
+
 
 if (typeof module === "object") {
module.exports.ParsoidConfig = ParsoidConfig;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Error if sensitive AuthManager parameters are in the qu...

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

Change subject: API: Error if sensitive AuthManager parameters are in the query 
string
..


API: Error if sensitive AuthManager parameters are in the query string

There was only 1 hit in the feature usage log in the past 30 days for
this code path, so this should be good to go.

ApiLogin, on the other hand, received 27048 hits over the same time
period. So let's not do that one just yet.

Change-Id: I1ae3b928fda9ddc94c8182155637920713dd404d
---
M RELEASE-NOTES-1.29
M includes/api/ApiAuthManagerHelper.php
2 files changed, 5 insertions(+), 7 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 6c53809..5a38cf9 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -20,6 +20,10 @@
 === Bug fixes in 1.29 ===
 
 === Action API changes in 1.29 ===
+* Submitting sensitive authentication request parameters to action=clientlogin,
+  action=createaccount, action=linkaccount, and action=changeauthenticationdata
+  in the query string is now an error. They should be submitted in the POST
+  body instead.
 
 === Action API internal changes in 1.29 ===
 
diff --git a/includes/api/ApiAuthManagerHelper.php 
b/includes/api/ApiAuthManagerHelper.php
index 1a42ccc..6fafebf 100644
--- a/includes/api/ApiAuthManagerHelper.php
+++ b/includes/api/ApiAuthManagerHelper.php
@@ -173,13 +173,7 @@
$this->module->getMain()->markParamsUsed( array_keys( $data ) );
 
if ( $sensitive ) {
-   try {
-   $this->module->requirePostedParameters( 
array_keys( $sensitive ), 'noprefix' );
-   } catch ( UsageException $ex ) {
-   // Make this a warning for now, upgrade to an 
error in 1.29.
-   $this->module->setWarning( $ex->getMessage() );
-   $this->module->logFeatureUsage( 
$this->module->getModuleName() . '-params-in-query-string' );
-   }
+   $this->module->requirePostedParameters( array_keys( 
$sensitive ), 'noprefix' );
}
 
return AuthenticationRequest::loadRequestsFromSubmission( 
$reqs, $data );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ae3b928fda9ddc94c8182155637920713dd404d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: secondary cluster setup eth1 using interface::manual

2016-10-31 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: labstore: secondary cluster setup eth1 using interface::manual
..

labstore: secondary cluster setup eth1 using interface::manual

sets interface to come up on boot

Change-Id: I50df27749c7e83823c2192da119fa64536cb40b4
---
M modules/role/manifests/labs/nfs/secondary.pp
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/318973/1

diff --git a/modules/role/manifests/labs/nfs/secondary.pp 
b/modules/role/manifests/labs/nfs/secondary.pp
index e6208bb..7fa4d2c 100644
--- a/modules/role/manifests/labs/nfs/secondary.pp
+++ b/modules/role/manifests/labs/nfs/secondary.pp
@@ -11,24 +11,32 @@
 # Enable RPS to balance IRQs over CPUs
 interface::rps { $monitor: }
 
+interface::manual{ 'eth1':
+interface => 'eth1',
+}
+
 if $::hostname == 'labstore1005' {
+# Define DRBD role for this host, should come from hiera
+$drbd_role = 'secondary'
+
 interface::ip { 'drbd-replication':
 interface => 'eth1',
 address   => '10.64.37.26',
 prefixlen => '24',
+require   => Interface::Manual['eth1'],
 }
-# Define DRBD role for this host, should come from hiera
-$drbd_role = 'secondary'
 }
 
 if $::hostname == 'labstore1004' {
+# Define DRBD role for this host, should come from hiera
+$drbd_role = 'primary'
+
 interface::ip { 'drbd-replication':
 interface => 'eth1',
 address   => '10.64.37.25',
 prefixlen => '24',
+require=> Interface::Manual['eth1'],
 }
-# Define DRBD role for this host, should come from hiera
-$drbd_role = 'primary'
 }
 
 # TODO: hiera this

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Replace check_sslxNN with check_ssl_unified

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

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

Change subject: Replace check_sslxNN with check_ssl_unified
..

Replace check_sslxNN with check_ssl_unified

This is just a config rather than a separate script, and connects
only once per authalg while validating OCSP and the full unified
SAN list.

Change-Id: Ie09fc1ac3e0de63110a3c6c0307b75a41fb18e1c
---
A modules/nagios_common/files/check_commands/check_ssl_unified.cfg
M modules/nagios_common/manifests/commands.pp
M modules/role/manifests/cache/ssl/unified.pp
3 files changed, 23 insertions(+), 2 deletions(-)


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

diff --git a/modules/nagios_common/files/check_commands/check_ssl_unified.cfg 
b/modules/nagios_common/files/check_commands/check_ssl_unified.cfg
new file mode 100644
index 000..dd69989
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_ssl_unified.cfg
@@ -0,0 +1,11 @@
+# special Wikimedia-specific checks that checks our cache terminators' 
"unified"
+# certificate with OCSP stapling and SAN list verification, separately for
+# different authalgs (RSA and ECDSA).  The arguments are:
+# $ARG1$ - Auth algorithm (RSA or ECDSA)
+# $ARG2$ - CN to send in SNI and verify against
+# $ARG3$ - Comma-separated list of SAN elements which must be present in 
SubjectAltNames of the server cert.
+
+define command{
+command_namecheck_ssl_unified
+command_line$USER1$/check_ssl -H $HOSTADDRESS$ -p 443 -o must-staple 
--authalg '$ARG1$' --cn '$ARG2$' --sans '$ARG3$'
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index 4788f5d..288dba6 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -93,6 +93,7 @@
 'ping',
 'procs',
 'vsz',
+'check_ssl_unified',
 ] :
 require=> File["${config_dir}/commands"],
 config_dir => $config_dir,
diff --git a/modules/role/manifests/cache/ssl/unified.pp 
b/modules/role/manifests/cache/ssl/unified.pp
index 0bec282..070e474 100644
--- a/modules/role/manifests/cache/ssl/unified.pp
+++ b/modules/role/manifests/cache/ssl/unified.pp
@@ -3,9 +3,18 @@
 $labs_subjects = ['beta.wmflabs.org'],
 ) {
 if ( $::realm == 'production' ) {
+
+$check_cn = 'en.wikipedia.org'
+$check_sans = 
'wikipedia.org,mediawiki.org,wikibooks.org,wikidata.org,wikimedia.org,wikimediafoundation.org,wikinews.org,wikiquote.org,wikisource.org,wikiversity.org,wikivoyage.org,wiktionary.org,w.wiki,*.wikipedia.org,*.mediawiki.org,*.wikibooks.org,*.wikidata.org,*.wikimedia.org,*.wikimediafoundation.org,*.wikinews.org,*.wikiquote.org,*.wikisource.org,*.wikiversity.org,*.wikivoyage.org,*.wiktionary.org,*.m.wikipedia.org,*.m.mediawiki.org,*.m.wikibooks.org,*.m.wikidata.org,*.m.wikimedia.org,*.m.wikimediafoundation.org,*.m.wikinews.org,*.m.wikiquote.org,*.m.wikisource.org,*.m.wikiversity.org,*.m.wikivoyage.org,*.m.wiktionary.org,*.zero.wikipedia.org'
+
 monitoring::service { 'https':
-description   => 'HTTPS',
-check_command => 'check_sslxNN',
+description   => 'HTTPS Unified ECDSA',
+check_command => 
"check_ssl_unified!ECDSA!${check_cn}!${check_sans}",
+}
+
+monitoring::service { 'https':
+description   => 'HTTPS Unified RSA',
+check_command => "check_ssl_unified!RSA!${check_cn}!${check_sans}",
 }
 
 tlsproxy::localssl { 'unified':

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

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

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


  1   2   3   >