[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Don't show confirm dialog when switching to NWE

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

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

Change subject: Don't show confirm dialog when switching to NWE
..

Don't show confirm dialog when switching to NWE

Bug: T148099
Change-Id: Icd756dc31ef8628795915ea972bb0ded385532ed
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git 
a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
index 4cdfad2..8836380 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
@@ -105,6 +105,14 @@
 /**
  * @inheritdoc
  */
+ve.init.mw.DesktopWikitextArticleTarget.prototype.editSource = function () {
+   // Don't bother with a confirm dialog when switching to the new 
wikitext editor
+   this.switchToWikitextEditor( true, false );
+};
+
+/**
+ * @inheritdoc
+ */
 ve.init.mw.DesktopWikitextArticleTarget.prototype.onWindowPopState = function 
( e ) {
var veaction, mode;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd756dc31ef8628795915ea972bb0ded385532ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/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...VisualEditor[master]: Prevent edit source from acting twice

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

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

Change subject: Prevent edit source from acting twice
..

Prevent edit source from acting twice

Bug: T148309
Change-Id: I5ef3f4b7cbc7298e89aa531c174657b1d1bccdf6
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 5ff7a63..6e12059 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -584,7 +584,7 @@
}
if ( active ) {
targetPromise.done( function ( target ) {
-   if ( target.mode === 'source' ) {
+   if ( mode === 'visual' && target.mode 
=== 'source' ) {
target.switchToVisualEditor();
}
} );
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 9e50509..c908104 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -1076,7 +1076,7 @@
return;
}
 
-   if ( target.getSurface() && !target.deactivating ) {
+   if ( target.getSurface() && !target.deactivating && target.mode 
!== 'source' ) {
target.editSource();
 
if ( target.getSurface().getModel().hasBeenModified() 
|| target.fromEditedState ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ef3f4b7cbc7298e89aa531c174657b1d1bccdf6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/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] operations/mediawiki-config[master]: Reverting I75cf5954ac8d68e607975e7b1b77170915ffe4d1

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

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

Change subject: Reverting I75cf5954ac8d68e607975e7b1b77170915ffe4d1
..

Reverting I75cf5954ac8d68e607975e7b1b77170915ffe4d1

It was meant to be temporary.

Bug: T148352
Change-Id: Iacfebe512fb791a81be8b0d415163dfb0bab93ab
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3bf427d..eb2c1e7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -167,7 +167,6 @@
'tenwiki' => 'en',
'transitionteamwiki' => 'en',
'usabilitywiki' => 'en',
-   'votewiki' => 'fa', // T132667
'wikimania' => 'en',
'wikimaniateamwiki' => 'en',
'zerowiki' => 'en',

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: New icons for bigger/smaller

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

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

Change subject: New icons for bigger/smaller
..

New icons for bigger/smaller

Change-Id: I2720719300616927342124848fb6f27151551d3b
---
M src/themes/apex/images/icons/bigger-ltr.svg
M src/themes/apex/images/icons/bigger-rtl.svg
M src/themes/apex/images/icons/smaller-ltr.svg
M src/themes/apex/images/icons/smaller-rtl.svg
M src/themes/mediawiki/images/icons/bigger-ltr.svg
M src/themes/mediawiki/images/icons/bigger-rtl.svg
M src/themes/mediawiki/images/icons/smaller-ltr.svg
M src/themes/mediawiki/images/icons/smaller-rtl.svg
8 files changed, 24 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/90/316290/1

diff --git a/src/themes/apex/images/icons/bigger-ltr.svg 
b/src/themes/apex/images/icons/bigger-ltr.svg
index 6d95fc6..fffbcdd 100644
--- a/src/themes/apex/images/icons/bigger-ltr.svg
+++ b/src/themes/apex/images/icons/bigger-ltr.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/apex/images/icons/bigger-rtl.svg 
b/src/themes/apex/images/icons/bigger-rtl.svg
index 807cdd9..7b903c4 100644
--- a/src/themes/apex/images/icons/bigger-rtl.svg
+++ b/src/themes/apex/images/icons/bigger-rtl.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/apex/images/icons/smaller-ltr.svg 
b/src/themes/apex/images/icons/smaller-ltr.svg
index 82d16af..9431252 100644
--- a/src/themes/apex/images/icons/smaller-ltr.svg
+++ b/src/themes/apex/images/icons/smaller-ltr.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/apex/images/icons/smaller-rtl.svg 
b/src/themes/apex/images/icons/smaller-rtl.svg
index 7466f48..d2d2858 100644
--- a/src/themes/apex/images/icons/smaller-rtl.svg
+++ b/src/themes/apex/images/icons/smaller-rtl.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/mediawiki/images/icons/bigger-ltr.svg 
b/src/themes/mediawiki/images/icons/bigger-ltr.svg
index 6d95fc6..fffbcdd 100644
--- a/src/themes/mediawiki/images/icons/bigger-ltr.svg
+++ b/src/themes/mediawiki/images/icons/bigger-ltr.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/mediawiki/images/icons/bigger-rtl.svg 
b/src/themes/mediawiki/images/icons/bigger-rtl.svg
index 807cdd9..7b903c4 100644
--- a/src/themes/mediawiki/images/icons/bigger-rtl.svg
+++ b/src/themes/mediawiki/images/icons/bigger-rtl.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/mediawiki/images/icons/smaller-ltr.svg 
b/src/themes/mediawiki/images/icons/smaller-ltr.svg
index 82d16af..9431252 100644
--- a/src/themes/mediawiki/images/icons/smaller-ltr.svg
+++ b/src/themes/mediawiki/images/icons/smaller-ltr.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 
diff --git a/src/themes/mediawiki/images/icons/smaller-rtl.svg 
b/src/themes/mediawiki/images/icons/smaller-rtl.svg
index 7466f48..d2d2858 100644
--- a/src/themes/mediawiki/images/icons/smaller-rtl.svg
+++ b/src/themes/mediawiki/images/icons/smaller-rtl.svg
@@ -1,7 +1,6 @@
 
 http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
-
-
-
-
+
+
+
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2720719300616927342124848fb6f27151551d3b
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] analytics/wikistats[master]: Update svn.wikimedia.org links to phabricator

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

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

Change subject: Update svn.wikimedia.org links to phabricator
..

Update svn.wikimedia.org links to phabricator

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


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats 
refs/changes/89/316289/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d440abb153390ad870e34923c0040ad9dcf0684
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T147742: Trim template target after stripping comments

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

Change subject: T147742: Trim template target after stripping comments
..


T147742: Trim template target after stripping comments

* Updated an existing test + fixed up blacklist.

Change-Id: If69246776b165f833ae58fdaf72eaced0fd2f255
---
M lib/wt2html/tt/TemplateHandler.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 33 insertions(+), 24 deletions(-)

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



diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index b26cea1..adac655 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -421,8 +421,11 @@
if (tgtInfo.isStr && !tgtInfo.isSimpleTgt) {
// resolvabilityInfo found a new target based on the target 
tokens. This
// happens when the target contains special characters, 
specially quotes.
-   // For an example look at T96090.
-   target = tgtInfo.newTarget;
+   // For an example, look at T96090.
+
+   // Without a trim(), we get bug T147742 because
+   // the prefix === target check below fails!
+   target = tgtInfo.newTarget.trim();
pieces = target.split(':');
prefix = pieces[0].trim();
lowerPrefix = prefix.toLowerCase();
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index e283b6a..98db18c 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -283,7 +283,7 @@
 add("wt2wt", " inside  (bug 13238)", 
"\n\n\n\n\n\nnowikiFoo");
 add("wt2wt", " and  preference (first one wins)", 
"\n\n\n\n\n\n\n\nnowiki\n\n\n\n");
 add("wt2wt", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded 
content", "{{echo| }}a\n\n{{echo|\n }}a\n\n{{echo|\n b}}\n\n{{echo|a\n 
}}b\n\n{{echo|a\n}}\n b\n");
-add("wt2wt", "Templates: Handle comments in the target", "{{echo\n\n|foo}}\n\n{{echo\n|foo}}\n\n{{echo|foo}}\n\n{{echo|foo}}");
+add("wt2wt", "Templates: Handle comments in the target", "{{echo\n\n|foo}}\n\n{{echo\n\n  |foo}}\n\n{{echo\n|foo}}\n\n{{echo|foo}}\n\n{{echo|foo}}");
 add("wt2wt", "4. Indent-Pre and extension tags", " a ");
 add("wt2wt", "Definition lists: self-closed tag", ";onetwo : two-line 
fun");
 add("wt2wt", "Definition Lists: colons occurring in tags", 
";a:b\n;'''a:b'''\n;a:b\n;a:b\n;a:b\n;a\n:b\n;{{echo|a:b}}\n;{{echo|''a:b''}}\n;;;''a:b''\n");
@@ -397,7 +397,7 @@
 add("html2html", " with forbidden attribute values (bug 3202)", "Narrow screen goodies\n");
 add("html2html", " inside  (bug 13238)", "nowiki>\n\n
 \n\nnowiki>Foo/nowiki>\n");
 add("html2html", " and  preference (first one wins)", "nowiki>\n\n/nowiki>\n/pre>\n\n\npre>\nnowiki>\n/pre>\n\n/pre>\n");
-add("html2html", "Templates: Handle comments in the target", "foo\n\nfoo\n\nfoo\n\nfoo");
+add("html2html", "Templates: Handle comments in the target", "foo\n\nfoo\n\nfoo\n\nfoo\n\nfoo");
 add("html2html", "Templates: Handle comments in parameter names (bug 67657)", 
"foo\n\nfoo\n\nfoo\n\nfoo");
 add("html2html", "Templates: Other wikitext in parameter names (bug 67657)", 
"foo");
 add("html2html", "2g. Indented table markup mixed with indented pre content 
(proposed in bug 6200)", "  \n \nText that should be rendered preformatted  
\n|}\n");
@@ -673,7 +673,7 @@
 add("html2wt", "Templates: Strip leading and trailing whitespace from 
named-param values", "a\n\nb\n\nc\n\n* d\n");
 add("html2wt", "Templates: Don't strip whitespace from positional-param 
values", "a \n\nb \n\n c \n\n\n\n d\n\n\n\n e\n\n\n\n* f\n\n\n g\n");
 add("html2wt", "Templates: Handle empty comment-and-ws-only lines correctly", 
"foo\nbar\n");
-add("html2wt", "Templates: Handle comments in the target", "{{echo |foo}}\n\n{{echo|foo}}\n\n{{echo|foo}}\n\n{{echo|foo}}");
+add("html2wt", "Templates: Handle comments in the target", "{{echo |foo}}\n\n{{echo |foo}}\n\n{{echo|foo}}\n\n{{echo|foo}}\n\n{{echo|foo}}");
 add("html2wt", "Templates: Handle comments in parameter names (bug 67657)", 
"{{echo|1 =foo}}\n\n{{echo| 
1=foo}}\n\n{{echo|1=foo}}\n\n{{echo|1=foo}}");
 add("html2wt", "1a. Indent-Pre and Comments", " a\n\nc\n");
 add("html2wt", "1b. Indent-Pre and Comments", " a\n\nc\n");
@@ -1343,25 +1343,25 @@
 add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded 
content [0,0,0,0,0,0,0,0,0,0,0,4,0,0,0]", "{{echo| }}a\n\n{{echo|\n 
}}a\n\n{{echo|\n b}}\n\n{{echo|a\n }}b\nbt5yrxqcb1d78pvi{{echo|a\n}} b");
 add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded 
content [0,0,0,0,4,0,0,0,0,0,0,0,0,0,[2]]", "{{echo| }}a\n\n{{echo|\n 
}}a\n4kifb531krdd9529{{echo|\n b}}\n\n{{echo|a\n }}b\n\n{{echo|a\n}} 
7ujkiku3nn7mn29b");
 add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded 
content 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update.php should allow for a wiki parameter

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

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

Change subject: Update.php should allow for a wiki parameter
..

Update.php should allow for a wiki parameter

Bug: T147817
Change-Id: I984d64db5ed4622e5976c0162a9ea8f386f58a39
---
M maintenance/Maintenance.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/316288/1

diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 1cb5eef..3bf6e63 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -475,6 +475,7 @@
$this->addOption( 'server', "The protocol and server name to 
use in URLs, e.g. " .
"http://en.wikipedia.org. This is sometimes necessary 
because " .
"server name detection may fail in command line 
scripts.", false, true );
+   $this->addOption( 'domain', "Domain name for the wiki being 
updated (only used for wiki families)", false, true );
$this->addOption( 'profiler', 'Profiler output format (usually 
"text")', false, true );
 
# Save generic options to display them separately in help
@@ -927,6 +928,11 @@
 * Handle the special variables that are global to all scripts
 */
protected function loadSpecialVars() {
+   global $serverName;
+
+   if ( $this->hasOption( 'domain' ) ) {
+   $serverName = $this->getOption( 'domain' );
+   }
if ( $this->hasOption( 'dbuser' ) ) {
$this->mDbUser = $this->getOption( 'dbuser' );
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Replace css valign with vertical-align

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

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

Change subject: Replace css valign with vertical-align
..

Replace css valign with vertical-align

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4409c8420225356fcd279884ca64fbfcf2e1c0cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] mediawiki...Athena[master]: Update of SQL files to reflect all the changes in the databa...

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

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

Change subject: Update of SQL files to reflect all the changes in the database 
that happened "on the fly" during development
..

Update of SQL files to reflect all the changes in the database that
happened "on the fly" during development

Change-Id: I66d26375621296a5bd04dc6040674113a0d2a3bd
---
M AthenaHooks.php
M sql/athena_logs.sql
D sql/athena_probability.postgres.sql
D sql/athena_probability.sql
4 files changed, 75 insertions(+), 21 deletions(-)


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

diff --git a/AthenaHooks.php b/AthenaHooks.php
index 93f3cb9..e751f51 100644
--- a/AthenaHooks.php
+++ b/AthenaHooks.php
@@ -54,7 +54,6 @@
 * @return bool
 */
static function createTables( $updater ) {
-   $updater->addExtensionUpdate( array( 'addTable', 
'athena_weighting', __DIR__ . '/sql/athena_probability.sql', true ) );
$updater->addExtensionUpdate( array( 'addTable', 'athena_log', 
__DIR__ . '/sql/athena_logs.sql', true ) );
 
return true;
diff --git a/sql/athena_logs.sql b/sql/athena_logs.sql
index 840027e..c6043cc 100644
--- a/sql/athena_logs.sql
+++ b/sql/athena_logs.sql
@@ -82,3 +82,78 @@
   `ac_p_linksandnotspam` double unsigned NOT NULL,
   `ac_p_linksgivennotspam` double unsigned NOT NULL
 );
+
+--
+-- Table structure for table `athena_stats`
+--
+CREATE TABLE athena_stats (
+  `as_id` int(10) unsigned PRIMARY KEY auto_increment,
+  `as_name` varbinary(255) NOT NULL default '',
+  `as_value` integer unsigned NOT NULL default 0,
+  `as_updated` timestamp NOT NULL default CURRENT_TIMESTAMP
+);
+
+INSERT INTO `athena_stats` (`as_id`, `as_name`, `as_value`, `as_updated`) 
VALUES
+(1, 'pages', 0, '-00-00 00:00:00'),
+(2, 'spam', 0, '-00-00 00:00:00'),
+(3, 'notspam', 0, '-00-00 00:00:00'),
+(4, 'difflang', 0, '-00-00 00:00:00'),
+(5, 'samelang', 0, '-00-00 00:00:00'),
+(6, 'deleted', 0, '-00-00 00:00:00'),
+(7, 'notdeleted', 0, '-00-00 00:00:00'),
+(8, 'wanted', 0, '-00-00 00:00:00'),
+(9, 'notwanted', 0, '-00-00 00:00:00'),
+(10, 'userother', 0, '-00-00 00:00:00'),
+(11, 'anon', 0, '-00-00 00:00:00'),
+(12, 'user1', 0, '-00-00 00:00:00'),
+(13, 'user5', 0, '-00-00 00:00:00'),
+(14, 'user30', 0, '-00-00 00:00:00'),
+(15, 'user60', 0, '-00-00 00:00:00'),
+(16, 'user12', 0, '-00-00 00:00:00'),
+(17, 'user24', 0, '-00-00 00:00:00'),
+(18, 'titlelength', 0, '-00-00 00:00:00'),
+(19, 'nottitlelength', 0, '-00-00 00:00:00'),
+(20, 'nsmain', 0, '-00-00 00:00:00'),
+(21, 'nstalk', 0, '-00-00 00:00:00'),
+(22, 'nsuser', 0, '-00-00 00:00:00'),
+(23, 'nsusertalk', 0, '-00-00 00:00:00'),
+(24, 'nsother', 0, '-00-00 00:00:00'),
+(25, 'syntaxnone', 0, '-00-00 00:00:00'),
+(26, 'syntaxbasic', 0, '-00-00 00:00:00'),
+(27, 'syntaxcomplex', 0, '-00-00 00:00:00'),
+(28, 'brokenspambot', 0, '-00-00 00:00:00'),
+(29, 'links0', 0, '-00-00 00:00:00'),
+(30, 'links5', 0, '-00-00 00:00:00'),
+(31, 'links20', 0, '-00-00 00:00:00'),
+(32, 'links50', 0, '-00-00 00:00:00'),
+(33, 'spamanddifflang', 0, '-00-00 00:00:00'),
+(34, 'spamandsamelang', 0, '-00-00 00:00:00'),
+(35, 'spamanddeleted', 0, '-00-00 00:00:00'),
+(36, 'spamandnotdeleted', 0, '-00-00 00:00:00'),
+(37, 'spamandwanted', 0, '-00-00 00:00:00'),
+(38, 'spamandnotwanted', 0, '-00-00 00:00:00'),
+(39, 'spamanduserother', 0, '-00-00 00:00:00'),
+(40, 'spamandanon', 0, '-00-00 00:00:00'),
+(41, 'spamanduser1', 0, '-00-00 00:00:00'),
+(42, 'spamanduser5', 0, '-00-00 00:00:00'),
+(43, 'spamanduser30', 0, '-00-00 00:00:00'),
+(44, 'spamanduser60', 0, '-00-00 00:00:00'),
+(45, 'spamanduser12', 0, '-00-00 00:00:00'),
+(46, 'spamanduser24', 0, '-00-00 00:00:00'),
+(47, 'spamandtitlelength', 0, '-00-00 00:00:00'),
+(48, 'spamandnottitlelength', 0, '-00-00 00:00:00'),
+(49, 'spamandnsmain', 0, '-00-00 00:00:00'),
+(50, 'spamandnstalk', 0, '-00-00 00:00:00'),
+(51, 'spamandnsuser', 0, '-00-00 00:00:00'),
+(52, 'spamandnsusertalk', 0, '-00-00 00:00:00'),
+(53, 'spamandnsother', 0, '-00-00 00:00:00'),
+(54, 'spamandsyntaxnone', 0, '-00-00 00:00:00'),
+(55, 'spamandsyntaxbasic', 0, '-00-00 00:00:00'),
+(56, 'spamandsyntaxcomplex', 0, '-00-00 00:00:00'),
+(57, 'spamandbrokenspambot', 0, '-00-00 00:00:00'),
+(58, 'spamandlinks0', 0, '-00-00 00:00:00'),
+(59, 'spamandlinks5', 0, '-00-00 00:00:00'),
+(60, 'spamandlinks20', 0, '-00-00 00:00:00'),
+(61, 'spamandlinks50', 0, '-00-00 00:00:00'),
+(62, 'nsfile', 0, '-00-00 00:00:00'),
+(63, 'spamandnsfile', 0, '-00-00 00:00:00');
diff --git a/sql/athena_probability.postgres.sql 
b/sql/athena_probability.postgres.sql
deleted 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Travis-CI: stop notifying build status to #mediawiki-core

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

Change subject: Travis-CI: stop notifying build status to #mediawiki-core
..


Travis-CI: stop notifying build status to #mediawiki-core

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

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



diff --git a/.travis.yml b/.travis.yml
index 9062194..9738605 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,7 +55,6 @@
   email: false
   irc:
 channels:
-  - "chat.freenode.net#mediawiki-core"
   - "chat.freenode.net#mediawiki-feed"
 on_success: change
 on_failure: change

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4897f3b54fca2a6d5c45b9fac937f59db78e864f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Ori.livneh 
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/core[master]: Travis-CI: stop notifying build status to #mediawiki-core

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

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

Change subject: Travis-CI: stop notifying build status to #mediawiki-core
..

Travis-CI: stop notifying build status to #mediawiki-core

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


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

diff --git a/.travis.yml b/.travis.yml
index 9062194..9738605 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,7 +55,6 @@
   email: false
   irc:
 channels:
-  - "chat.freenode.net#mediawiki-core"
   - "chat.freenode.net#mediawiki-feed"
 on_success: change
 on_failure: change

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4897f3b54fca2a6d5c45b9fac937f59db78e864f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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...CollaborationKit[master]: Creating basic editing interface for CollaborationHubContent.

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

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

Change subject: Creating basic editing interface for CollaborationHubContent.
..

Creating basic editing interface for CollaborationHubContent.

There is still more work to be done. Also, the editing interface uses OOjs UI 
because I will be added some extra features using OOjs UI so it makes more 
sense to have the form use it.

Bug: T141037
Change-Id: I25a2a13fdd3675b28da43259f543d4edecbb8d4e
---
M .gitignore
M .gitreview
M .jscsrc
M CollaborationKit.alias.php
M CollaborationKit.hooks.php
M CollaborationKit.i18n.magic.php
M Gruntfile.js
M composer.json
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/ApiEditCollaborationHub.php
A includes/CollaborationHubContentEditor.php
M includes/CollaborationListContentEditor.php
M includes/ResourceLoaderListStyleModule.php
M includes/SpecialCreateCollaborationHub.php
M includes/SpecialCreateHubFeature.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationHubContentSchema.php
M includes/content/CollaborationHubDiffEngine.php
M includes/content/CollaborationHubTOC.php
M includes/content/CollaborationKitIcon.php
M includes/content/CollaborationListContent.php
M includes/content/CollaborationListContentHandler.php
M includes/content/CollaborationListContentSchema.php
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.hub.subpage.styles.less
M modules/ext.CollaborationKit.list.edit.js
M modules/ext.CollaborationKit.list.styles.less
M modules/ext.CollaborationKit.mixins.less
M modules/images/blot.svg
M modules/images/icons/LICENSE
M modules/images/icons/addimage.svg
M modules/images/icons/addmapmarker.svg
M modules/images/icons/addquote.svg
M modules/images/icons/bell.svg
M modules/images/icons/book.svg
M modules/images/icons/circleline.svg
M modules/images/icons/circlestar.svg
M modules/images/icons/circletriangle.svg
M modules/images/icons/circlex.svg
M modules/images/icons/clock.svg
M modules/images/icons/community.svg
M modules/images/icons/contents.svg
M modules/images/icons/die.svg
M modules/images/icons/discussion.svg
M modules/images/icons/download.svg
M modules/images/icons/edit.svg
M modules/images/icons/editprotected.svg
M modules/images/icons/eye.svg
M modules/images/icons/flag.svg
M modules/images/icons/funnel.svg
M modules/images/icons/gallery.svg
M modules/images/icons/gear.svg
M modules/images/icons/heart.svg
M modules/images/icons/icons-full.svg
M modules/images/icons/image.svg
M modules/images/icons/journal.svg
M modules/images/icons/key.svg
M modules/images/icons/link.svg
M modules/images/icons/lock.svg
M modules/images/icons/mail.svg
M modules/images/icons/map.svg
M modules/images/icons/mapmarker.svg
M modules/images/icons/menu.svg
M modules/images/icons/message.svg
M modules/images/icons/messagenew.svg
M modules/images/icons/messagescary.svg
M modules/images/icons/move.svg
M modules/images/icons/newspaper.svg
M modules/images/icons/nowiki.svg
M modules/images/icons/ol.svg
M modules/images/icons/page.svg
M modules/images/icons/pagechecked.svg
M modules/images/icons/pageribbon.svg
M modules/images/icons/pagesearch.svg
M modules/images/icons/paperclip.svg
M modules/images/icons/print.svg
M modules/images/icons/puzzlepiece.svg
M modules/images/icons/quotes.svg
M modules/images/icons/ribbon.svg
M modules/images/icons/rocket.svg
M modules/images/icons/search.svg
M modules/images/icons/star.svg
M modules/images/icons/starmenu.svg
M modules/images/icons/sun.svg
M modules/images/icons/translate.svg
M modules/images/icons/trash.svg
M modules/images/icons/ul.svg
M modules/images/icons/user.svg
M package.json
M phpcs.xml
M tests/phpunit/CollaborationHubContentHandlerTest.php
M tests/phpunit/CollaborationHubContentTest.php
95 files changed, 404 insertions(+), 12 deletions(-)


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

diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/.gitreview b/.gitreview
old mode 100644
new mode 100755
diff --git a/.jscsrc b/.jscsrc
old mode 100644
new mode 100755
diff --git a/CollaborationKit.alias.php b/CollaborationKit.alias.php
old mode 100644
new mode 100755
diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
old mode 100644
new mode 100755
index e2d439e..fc28f01
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -13,7 +13,7 @@
$title = $sktemplate->getTitle();
$request = $sktemplate->getRequest();
if ( isset( $links['views']['edit'] ) ) {
-   if ( $title->hasContentModel( 
'CollaborationListContent' ) ) {
+   if ( $title->hasContentModel( 
'CollaborationListContent' ) || $title->hasContentModel( 
'CollaborationHubContent' ) ) {
   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: ores: Increase capacity

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

Change subject: ores: Increase capacity
..


ores: Increase capacity

Change-Id: Ia7f255412174a621d3ac8d8e3650ea6ec2356141
---
M modules/ores/manifests/web.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 8389302..8e184e0 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -1,13 +1,13 @@
 # = Class: ores::web
 # Sets up a uwsgi based web server for ORES running python3
 class ores::web(
-$workers_per_core = 2,
+$workers_per_core = 3,
 $redis_host = '127.0.0.1',
 $redis_password = undef,
 $port = 8081,
 $graphite_server = 'graphite-in.eqiad.wmnet',
 $deployment = 'scap3',
-$celery_workers = 40,
+$celery_workers = 48,
 $extra_config = undef,
 ) {
 require ores::base

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ores: Increase capacity

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

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

Change subject: ores: Increase capacity
..

ores: Increase capacity

Change-Id: Ia7f255412174a621d3ac8d8e3650ea6ec2356141
---
M modules/ores/manifests/web.pp
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 8389302..8e184e0 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -1,13 +1,13 @@
 # = Class: ores::web
 # Sets up a uwsgi based web server for ORES running python3
 class ores::web(
-$workers_per_core = 2,
+$workers_per_core = 3,
 $redis_host = '127.0.0.1',
 $redis_password = undef,
 $port = 8081,
 $graphite_server = 'graphite-in.eqiad.wmnet',
 $deployment = 'scap3',
-$celery_workers = 40,
+$celery_workers = 48,
 $extra_config = undef,
 ) {
 require ores::base

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Typo fix in comment.

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

Change subject: Typo fix in comment.
..


Typo fix in comment.

Change-Id: Ib1d93af2f7318ec887530c63e25d4a00ab118a68
---
M lib/config/MWParserEnvironment.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 3e0b6be..4f0d650 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -481,7 +481,7 @@
  * shouldn't be treated like links at all.
  *
  * This function handles strings that are page-fragments or subpage references
- * and resolves hose w.r.t the current page name so that title-handling code 
elsewhere
+ * and resolves those w.r.t the current page name so that title-handling code 
elsewhere
  * only deal with non-relative title strings.
  */
 MWParserEnvironment.prototype.resolveTitle = function(urlDecodedStr, 
resolveOnly) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1d93af2f7318ec887530c63e25d4a00ab118a68
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 
Gerrit-Reviewer: Arlolra 
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...SecurePoll[master]: Fix SecurePoll_VoterEligibilityPage::saveList visibility

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

Change subject: Fix SecurePoll_VoterEligibilityPage::saveList visibility
..


Fix SecurePoll_VoterEligibilityPage::saveList visibility

SecurePoll_VoterEligibilityPage::saveList can now be private
as we don't support PHP 5.3 anymore.

This reverts commit 27e620df25d881ca9e5413eb6101e0f451e1bf20.

Bug: T135768
Change-Id: Ib9517fe2255fb8546934ab7fbf120cff32ac0bd2
---
M includes/pages/VoterEligibilityPage.php
1 file changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/includes/pages/VoterEligibilityPage.php 
b/includes/pages/VoterEligibilityPage.php
index 1754f70..f9e7bd6 100644
--- a/includes/pages/VoterEligibilityPage.php
+++ b/includes/pages/VoterEligibilityPage.php
@@ -200,11 +200,7 @@
return $names;
}
 
-   /**
-* @todo Make this really private when we don't support PHP 5.3 anymore
-* @private
-*/
-   public function saveList( $property, $names, $comment ) {
+   private function saveList( $property, $names, $comment ) {
global $wgSecurePollUseNamespace;
 
$wikis = $this->election->getProperty( 'wikis' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9517fe2255fb8546934ab7fbf120cff32ac0bd2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Huji 
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...TimedMediaHandler[master]: Remove erroneous break

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

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

Change subject: Remove erroneous break
..

Remove erroneous break

Bug: T148284
Change-Id: Ie081ac9f7d96dd58c399f3f73febe456353cca45
(cherry picked from commit a8736eecfdb12566c6dc1b2aee3d2d4b6dc37a66)
---
M libs/getid3/getid3.lib.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/50/316250/1

diff --git a/libs/getid3/getid3.lib.php b/libs/getid3/getid3.lib.php
index 16d5318..9410509 100644
--- a/libs/getid3/getid3.lib.php
+++ b/libs/getid3/getid3.lib.php
@@ -282,7 +282,6 @@
}
} else {
throw new Exception('ERROR: Cannot have signed 
integers larger than '.(8 * PHP_INT_SIZE).'-bits ('.strlen($byteword).') in 
self::BigEndian2Int()');
-   break;
}
}
return self::CastAsInt($intvalue);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie081ac9f7d96dd58c399f3f73febe456353cca45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2016-10-16T10:00:01+0000

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

Change subject: New Wikidata Build - 2016-10-16T10:00:01+
..


New Wikidata Build - 2016-10-16T10:00:01+

Change-Id: I852ac036cd98ea0687f9f258d1e6b910bae140fa
---
M composer.lock
M extensions/ValueView/RELEASE-NOTES.md
M extensions/ValueView/ValueView.php
M extensions/ValueView/i18n/en.json
M extensions/ValueView/i18n/qqq.json
M extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
M extensions/ValueView/src/experts/GlobeCoordinateInput.js
M extensions/ValueView/src/experts/resources.php
M extensions/ValueView/src/jquery.valueview.valueview.js
A extensions/ValueView/tests/lib/jquery.ui/jquery.ui.commonssuggester.tests.js
M extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js
M extensions/ValueView/tests/lib/resources.php
M extensions/Wikibase/client/i18n/diq.json
M extensions/Wikibase/client/i18n/pl.json
M extensions/Wikibase/client/i18n/sd.json
M extensions/Wikibase/client/i18n/vro.json
M extensions/Wikibase/client/i18n/zh-hant.json
M extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
M extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
M extensions/Wikibase/repo/i18n/cs.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/lb.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/pt.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/sd.json
M extensions/Wikibase/repo/i18n/sv.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php
M 
extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
M extensions/Wikibase/view/resources/jquery/wikibase/resources.php
M vendor/composer/installed.json
38 files changed, 464 insertions(+), 78 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 9cadb17..831f29f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -674,16 +674,16 @@
 },
 {
 "name": "data-values/value-view",
-"version": "0.17.4",
+"version": "0.18.0",
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/data-values-value-view.git;,
-"reference": "094a35216990d62daf104037edd3d593d406d80d"
+"reference": "5938027bbbad63e54cfa0266db211bac5fa902b2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/094a35216990d62daf104037edd3d593d406d80d;,
-"reference": "094a35216990d62daf104037edd3d593d406d80d",
+"url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/5938027bbbad63e54cfa0266db211bac5fa902b2;,
+"reference": "5938027bbbad63e54cfa0266db211bac5fa902b2",
 "shasum": ""
 },
 "require": {
@@ -721,7 +721,7 @@
 ],
 "description": "Provides JS widgets to edit values defined by the 
DataValues library",
 "homepage": "https://www.mediawiki.org/wiki/Extension:ValueView;,
-"time": "2016-10-05 14:27:34"
+"time": "2016-10-14 12:19:21"
 },
 {
 "name": "diff/diff",
@@ -1574,12 +1574,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "7f7a926567984089c1c157da35f19260d18bd7c9"
+"reference": "a306d01a8be6e9648bef0506cc39772ab48311b2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7f7a926567984089c1c157da35f19260d18bd7c9;,
-"reference": "7f7a926567984089c1c157da35f19260d18bd7c9",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a306d01a8be6e9648bef0506cc39772ab48311b2;,
+"reference": "a306d01a8be6e9648bef0506cc39772ab48311b2",
 "shasum": ""
 },
 "require": {
@@ -1593,7 +1593,7 @@
 "data-values/serialization": "~1.1",
 "data-values/time": "~0.8.4",
 "data-values/validators": "~0.1.0",
-"data-values/value-view": "~0.17.3",
+"data-values/value-view": 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: checkComposerLockUpToDate: Always check dependencies

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

Change subject: checkComposerLockUpToDate: Always check dependencies
..


checkComposerLockUpToDate: Always check dependencies

Upstream composer has replaced the 'hash' with a smarter 'content-hash',
but instead of re-implementing (or copy-pasting) all of that in MediaWiki
we can just compare the dependencies themselves, since that's all we
care about.

Bug: T147189
Change-Id: Ic2f22a82699e2b707b6ccb355605999a183a56a0
---
M includes/libs/composer/ComposerJson.php
M includes/libs/composer/ComposerLock.php
M maintenance/checkComposerLockUpToDate.php
M tests/phpunit/includes/libs/composer/ComposerJsonTest.php
M tests/phpunit/includes/libs/composer/ComposerLockTest.php
5 files changed, 1 insertion(+), 40 deletions(-)

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



diff --git a/includes/libs/composer/ComposerJson.php 
b/includes/libs/composer/ComposerJson.php
index 311508f..62231a8 100644
--- a/includes/libs/composer/ComposerJson.php
+++ b/includes/libs/composer/ComposerJson.php
@@ -12,12 +12,7 @@
 * @param string $location
 */
public function __construct( $location ) {
-   $this->hash = md5_file( $location );
$this->contents = json_decode( file_get_contents( $location ), 
true );
-   }
-
-   public function getHash() {
-   return $this->hash;
}
 
/**
diff --git a/includes/libs/composer/ComposerLock.php 
b/includes/libs/composer/ComposerLock.php
index e93127c..818ccdf 100644
--- a/includes/libs/composer/ComposerLock.php
+++ b/includes/libs/composer/ComposerLock.php
@@ -15,10 +15,6 @@
$this->contents = json_decode( file_get_contents( $location ), 
true );
}
 
-   public function getHash() {
-   return $this->contents['hash'];
-   }
-
/**
 * Dependencies currently installed according to composer.lock
 *
diff --git a/maintenance/checkComposerLockUpToDate.php 
b/maintenance/checkComposerLockUpToDate.php
index 9ec61dc..3f0a83d 100644
--- a/maintenance/checkComposerLockUpToDate.php
+++ b/maintenance/checkComposerLockUpToDate.php
@@ -34,11 +34,7 @@
$lock = new ComposerLock( $lockLocation );
$json = new ComposerJson( $jsonLocation );
 
-   if ( $lock->getHash() === $json->getHash() ) {
-   $this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
-   return;
-   }
-   // Out of date, lets figure out which dependencies are old
+   // Check all the dependencies to see if any are old
$found = false;
$installed = $lock->getInstalledDependencies();
foreach ( $json->getRequiredDependencies() as $name => $version 
) {
@@ -61,8 +57,6 @@
1
);
} else {
-   // The hash is the entire composer.json file,
-   // so it can be updated without any of the dependencies 
changing
// We couldn't find any out-of-date dependencies, so 
assume everything is ok!
$this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
}
diff --git a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php 
b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
index 2072752..4c0f99f 100644
--- a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
@@ -11,22 +11,6 @@
$this->json2 = 
"$IP/tests/phpunit/data/composer/new-composer.json";
}
 
-   public static function provideGetHash() {
-   return [
-   [ 'json', 'cc6e7fc565b246cb30b0cac103a2b31e' ],
-   [ 'json2', '19921dd1fc457f1b00561da932432001' ],
-   ];
-   }
-
-   /**
-* @dataProvider provideGetHash
-* @covers ComposerJson::getHash
-*/
-   public function testIsHashUpToDate( $file, $expected ) {
-   $json = new ComposerJson( $this->$file );
-   $this->assertEquals( $expected, $json->getHash() );
-   }
-
/**
 * @covers ComposerJson::getRequiredDependencies
 */
diff --git a/tests/phpunit/includes/libs/composer/ComposerLockTest.php 
b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
index 75eb62c..6097d6d 100644
--- a/tests/phpunit/includes/libs/composer/ComposerLockTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
@@ -11,14 +11,6 @@
}
 
/**
-* @covers ComposerLock::getHash
-*/
-   public function testGetHash() {
-   $lock = new ComposerLock( $this->lock );
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: API: Expose wfIsBadImage() in prop=imageinfo

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

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

Change subject: API: Expose wfIsBadImage() in prop=imageinfo
..

API: Expose wfIsBadImage() in prop=imageinfo

If iiprop=badfile is set, expose the wfIsBadImage() status as a boolean.
This is mainly intended for use by Parsoid, but could be useful for
other API users too.

Bug: T148343
Change-Id: I3432ead92b8d2a17de5243285f2760fc39b501ae
---
M includes/api/ApiQueryImageInfo.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
3 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/316249/1

diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index d1fcfa3..ef7c1ad 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -128,9 +128,14 @@
break;
}
 
+   $info = [ 'imagerepository' => 
$img->getRepoName() ];
+   if ( isset( $prop['badfile'] ) ) {
+   $info['badfile'] = wfIsBadImage( 
$img->getTitle() );
+   }
+
$fit = $result->addValue(
-   [ 'query', 'pages', intval( $pageId ) ],
-   'imagerepository', $img->getRepoName()
+   [ 'query', 'pages' ],
+   intval( $pageId ), $info
);
if ( !$fit ) {
if ( count( $pageIds[NS_FILE] ) == 1 ) {
@@ -734,6 +739,7 @@
'archivename' => 
'apihelp-query+imageinfo-paramvalue-prop-archivename',
'bitdepth' => 
'apihelp-query+imageinfo-paramvalue-prop-bitdepth',
'uploadwarning' => 
'apihelp-query+imageinfo-paramvalue-prop-uploadwarning',
+   'badfile' => 
'apihelp-query+imageinfo-paramvalue-prop-badfile',
],
array_flip( $filter )
);
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index c20ed5d..086c250 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -803,6 +803,7 @@
"apihelp-query+imageinfo-paramvalue-prop-archivename": "Adds the 
filename of the archive version for non-latest versions.",
"apihelp-query+imageinfo-paramvalue-prop-bitdepth": "Adds the bit depth 
of the version.",
"apihelp-query+imageinfo-paramvalue-prop-uploadwarning": "Used by the 
Special:Upload page to get information about an existing file. Not intended for 
use outside MediaWiki core.",
+   "apihelp-query+imageinfo-paramvalue-prop-badfile": "Adds whether the 
file is on the [[MediaWiki:Bad image list]]",
"apihelp-query+imageinfo-param-limit": "How many file revisions to 
return per file.",
"apihelp-query+imageinfo-param-start": "Timestamp to start listing 
from.",
"apihelp-query+imageinfo-param-end": "Timestamp to stop listing at.",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index 8deda75..1f5f187 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -750,6 +750,7 @@
"apihelp-query+imageinfo-paramvalue-prop-archivename": 
"{{doc-apihelp-paramvalue|query+imageinfo|prop|archivename}}",
"apihelp-query+imageinfo-paramvalue-prop-bitdepth": 
"{{doc-apihelp-paramvalue|query+imageinfo|prop|bitdepth}}",
"apihelp-query+imageinfo-paramvalue-prop-uploadwarning": 
"{{doc-apihelp-paramvalue|query+imageinfo|prop|uploadwarning}}",
+   "apihelp-query+imageinfo-paramvalue-prop-badfile": 
"{{doc-apihelp-paramvalue|query+imageinfo|prop|badfile}}",
"apihelp-query+imageinfo-param-limit": 
"{{doc-apihelp-param|query+imageinfo|limit}}",
"apihelp-query+imageinfo-param-start": 
"{{doc-apihelp-param|query+imageinfo|start}}",
"apihelp-query+imageinfo-param-end": 
"{{doc-apihelp-param|query+imageinfo|end}}",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Move videojs-replay dependecy to devDependencies

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

Change subject: Move videojs-replay dependecy to devDependencies
..


Move videojs-replay dependecy to devDependencies

This is only required to run the grunt update-videojs

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

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



diff --git a/package.json b/package.json
index 86aa812..0998d9c 100644
--- a/package.json
+++ b/package.json
@@ -16,10 +16,10 @@
 "jscs-preset-wikimedia": "~1.0.0",
 "video.js": "^5.10.1",
 "videojs-ogvjs": "^1.3.1",
+"videojs-replay": "^1.1.0",
 "videojs-resolution-switcher": "^0.4.2",
 "videojs-responsive-layout": "^1.1.0"
   },
   "dependencies": {
-"videojs-replay": "^1.1.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc522f3fa31bfdbd14939af1362905ca4950ebe0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: TheDJ 
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]: Allow extensions to handle specific contentmodels.

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

Change subject: Allow extensions to handle specific contentmodels.
..


Allow extensions to handle specific contentmodels.

Some extensions (for example, Extension:ProofreadPage) do more than
register specific extension tags: they also hook the parser to declare
responsibility for a specific contentmodel (like "proofread-page" or "json").
These are
https://www.mediawiki.org/wiki/Category:ContentHandler_extensions
(as opposed to https://www.mediawiki.org/wiki/Category:Tag_extensions).
See https://www.mediawiki.org/wiki/Manual:ContentHandler for more
details.

We abstract the top-level parser entry points to allow dispatching
to extensions to parse alternative content models and add a
core extension as a demonstration that handles the "json"
content model, rendering it in DOM as an HTML table (as
the json content model in mediawiki core does).

Bug: T48580
Bug: T133320
Change-Id: I7ca31c99de8e04b1359bc521df121db0eb69e384
---
M bin/parse.js
M bin/parserTests.js
M bin/roundtrip-test.js
M lib/api/apiUtils.js
M lib/api/routes.js
M lib/config/MWParserEnvironment.js
M lib/config/ParsoidConfig.js
M lib/config/WikiConfig.js
M lib/config/extapi.js
A lib/ext/JSON/index.js
M lib/jsapi.js
M lib/utils/DOMUtils.js
M lib/wt2html/DOMPostProcessor.js
M package.json
M tests/mocha/api.js
M tests/mocha/parse.js
M tests/mocha/test.helpers.js
M tests/mockAPI.js
18 files changed, 544 insertions(+), 89 deletions(-)

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



diff --git a/bin/parse.js b/bin/parse.js
index ac81cb9..39c939b 100755
--- a/bin/parse.js
+++ b/bin/parse.js
@@ -73,6 +73,11 @@
'boolean': false,
'default': ParserEnv.prototype.defaultPageName,
},
+   'contentmodel': {
+   description: 'The content model of the input.  Defaults to 
"wikitext" but extensions may support others (for example, "json").',
+   'boolean': false,
+   'default': null,
+   },
'oldid': {
description: 'Oldid of the given page.',
'boolean': false,
@@ -171,7 +176,9 @@
if (pb) {
DU.applyPageBundle(doc, pb);
}
-   return DU.serializeDOM(env, doc.body, argv.selser).then(function(out) {
+   var handler = env.getContentHandler(argv.contentmodel);
+   return handler.fromHTML(env, doc.body, argv.selser)
+   .then(function(out) {
if (argv.html2wt || argv.wt2wt) {
return { trailingNL: true, out: out, env: env };
} else {
@@ -182,8 +189,8 @@
 
 startsAtWikitext = function(argv, env, input) {
env.setPageSrcInfo(input);
-   // Kick off the pipeline by feeding the input into the parser pipeline
-   return env.pipelineFactory.parse(env.page.src)
+   var handler = env.getContentHandler(argv.contentmodel);
+   return handler.toHTML(env)
.then(function(doc) {
if (argv.lint) {
env.log("end/parse");
@@ -298,7 +305,12 @@
var target = env.normalizeAndResolvePageTitle();
return TemplateRequest
.setPageSrcInfo(env, target, argv.oldid)
-   .then(function() { return env.page.src; });
+   .then(function() {
+   // Preserve fetched contentmodel.
+   argv.contentmodel = argv.contentmodel ||
+   
env.page.meta.revision.contentmodel;
+   return env.page.src;
+   });
});
}).then(function(str) {
str = str.replace(/\r/g, '');
diff --git a/bin/parserTests.js b/bin/parserTests.js
index c0aaef4..f05c36f 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -21,6 +21,7 @@
 var yargs = require('yargs');
 var Alea = require('alea');
 var DU = require('../lib/utils/DOMUtils.js').DOMUtils;
+var Promise = require('../lib/utils/promise.js');
 var ParsoidLogger = require('../lib/logger/ParsoidLogger.js').ParsoidLogger;
 var PEG = require('pegjs');
 var Util = require('../lib/utils/Util.js').Util;
@@ -417,30 +418,27 @@
  * @param {string|null} processWikitextCB.res
  */
 ParserTests.prototype.convertHtml2Wt = function(options, mode, item, body, 
processWikitextCB) {
-   var startsAtWikitext = mode === 'wt2wt' || mode === 'wt2html' || mode 
=== 'selser';
var self = this;
-   var cb = function(err, wt) {
-   self.env.setPageSrcInfo(null);
-   self.env.page.dom = null;
-   processWikitextCB(err, wt);
-   };
-   try {
+   return Promise.try(function() {
+   var startsAtWikitext = mode === 'wt2wt' || mode === 'wt2html' 
|| 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: checkComposerLockUpToDate: Always check dependencies

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

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

Change subject: checkComposerLockUpToDate: Always check dependencies
..

checkComposerLockUpToDate: Always check dependencies

Upstream composer has replaced the 'hash' with a smarter 'content-hash',
but instead of re-implementing (or copy-pasting) all of that in MediaWiki
we can just compare the dependencies themselves, since that's all we
care about.

Bug: T147189
Change-Id: Ic2f22a82699e2b707b6ccb355605999a183a56a0
---
M includes/libs/composer/ComposerJson.php
M includes/libs/composer/ComposerLock.php
M maintenance/checkComposerLockUpToDate.php
M tests/phpunit/includes/libs/composer/ComposerJsonTest.php
M tests/phpunit/includes/libs/composer/ComposerLockTest.php
5 files changed, 1 insertion(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/316244/1

diff --git a/includes/libs/composer/ComposerJson.php 
b/includes/libs/composer/ComposerJson.php
index 311508f..62231a8 100644
--- a/includes/libs/composer/ComposerJson.php
+++ b/includes/libs/composer/ComposerJson.php
@@ -12,12 +12,7 @@
 * @param string $location
 */
public function __construct( $location ) {
-   $this->hash = md5_file( $location );
$this->contents = json_decode( file_get_contents( $location ), 
true );
-   }
-
-   public function getHash() {
-   return $this->hash;
}
 
/**
diff --git a/includes/libs/composer/ComposerLock.php 
b/includes/libs/composer/ComposerLock.php
index e93127c..818ccdf 100644
--- a/includes/libs/composer/ComposerLock.php
+++ b/includes/libs/composer/ComposerLock.php
@@ -15,10 +15,6 @@
$this->contents = json_decode( file_get_contents( $location ), 
true );
}
 
-   public function getHash() {
-   return $this->contents['hash'];
-   }
-
/**
 * Dependencies currently installed according to composer.lock
 *
diff --git a/maintenance/checkComposerLockUpToDate.php 
b/maintenance/checkComposerLockUpToDate.php
index 9ec61dc..3f0a83d 100644
--- a/maintenance/checkComposerLockUpToDate.php
+++ b/maintenance/checkComposerLockUpToDate.php
@@ -34,11 +34,7 @@
$lock = new ComposerLock( $lockLocation );
$json = new ComposerJson( $jsonLocation );
 
-   if ( $lock->getHash() === $json->getHash() ) {
-   $this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
-   return;
-   }
-   // Out of date, lets figure out which dependencies are old
+   // Check all the dependencies to see if any are old
$found = false;
$installed = $lock->getInstalledDependencies();
foreach ( $json->getRequiredDependencies() as $name => $version 
) {
@@ -61,8 +57,6 @@
1
);
} else {
-   // The hash is the entire composer.json file,
-   // so it can be updated without any of the dependencies 
changing
// We couldn't find any out-of-date dependencies, so 
assume everything is ok!
$this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
}
diff --git a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php 
b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
index 2072752..4c0f99f 100644
--- a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
@@ -11,22 +11,6 @@
$this->json2 = 
"$IP/tests/phpunit/data/composer/new-composer.json";
}
 
-   public static function provideGetHash() {
-   return [
-   [ 'json', 'cc6e7fc565b246cb30b0cac103a2b31e' ],
-   [ 'json2', '19921dd1fc457f1b00561da932432001' ],
-   ];
-   }
-
-   /**
-* @dataProvider provideGetHash
-* @covers ComposerJson::getHash
-*/
-   public function testIsHashUpToDate( $file, $expected ) {
-   $json = new ComposerJson( $this->$file );
-   $this->assertEquals( $expected, $json->getHash() );
-   }
-
/**
 * @covers ComposerJson::getRequiredDependencies
 */
diff --git a/tests/phpunit/includes/libs/composer/ComposerLockTest.php 
b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
index 75eb62c..6097d6d 100644
--- a/tests/phpunit/includes/libs/composer/ComposerLockTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
@@ -11,14 +11,6 @@
}
 
/**
-* @covers ComposerLock::getHash
-*/
-   public function testGetHash() {
-   $lock = new 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: checkComposerLockUpToDate: Always check dependencies

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

Change subject: checkComposerLockUpToDate: Always check dependencies
..


checkComposerLockUpToDate: Always check dependencies

Upstream composer has replaced the 'hash' with a smarter 'content-hash',
but instead of re-implementing (or copy-pasting) all of that in MediaWiki
we can just compare the dependencies themselves, since that's all we
care about.

Bug: T147189
Change-Id: Ic2f22a82699e2b707b6ccb355605999a183a56a0
---
M includes/libs/composer/ComposerJson.php
M includes/libs/composer/ComposerLock.php
M maintenance/checkComposerLockUpToDate.php
M tests/phpunit/includes/libs/composer/ComposerJsonTest.php
M tests/phpunit/includes/libs/composer/ComposerLockTest.php
5 files changed, 1 insertion(+), 40 deletions(-)

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



diff --git a/includes/libs/composer/ComposerJson.php 
b/includes/libs/composer/ComposerJson.php
index 311508f..62231a8 100644
--- a/includes/libs/composer/ComposerJson.php
+++ b/includes/libs/composer/ComposerJson.php
@@ -12,12 +12,7 @@
 * @param string $location
 */
public function __construct( $location ) {
-   $this->hash = md5_file( $location );
$this->contents = json_decode( file_get_contents( $location ), 
true );
-   }
-
-   public function getHash() {
-   return $this->hash;
}
 
/**
diff --git a/includes/libs/composer/ComposerLock.php 
b/includes/libs/composer/ComposerLock.php
index e93127c..818ccdf 100644
--- a/includes/libs/composer/ComposerLock.php
+++ b/includes/libs/composer/ComposerLock.php
@@ -15,10 +15,6 @@
$this->contents = json_decode( file_get_contents( $location ), 
true );
}
 
-   public function getHash() {
-   return $this->contents['hash'];
-   }
-
/**
 * Dependencies currently installed according to composer.lock
 *
diff --git a/maintenance/checkComposerLockUpToDate.php 
b/maintenance/checkComposerLockUpToDate.php
index 9ec61dc..3f0a83d 100644
--- a/maintenance/checkComposerLockUpToDate.php
+++ b/maintenance/checkComposerLockUpToDate.php
@@ -34,11 +34,7 @@
$lock = new ComposerLock( $lockLocation );
$json = new ComposerJson( $jsonLocation );
 
-   if ( $lock->getHash() === $json->getHash() ) {
-   $this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
-   return;
-   }
-   // Out of date, lets figure out which dependencies are old
+   // Check all the dependencies to see if any are old
$found = false;
$installed = $lock->getInstalledDependencies();
foreach ( $json->getRequiredDependencies() as $name => $version 
) {
@@ -61,8 +57,6 @@
1
);
} else {
-   // The hash is the entire composer.json file,
-   // so it can be updated without any of the dependencies 
changing
// We couldn't find any out-of-date dependencies, so 
assume everything is ok!
$this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
}
diff --git a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php 
b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
index 3cde3e2..ded5f8f 100644
--- a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
@@ -11,22 +11,6 @@
$this->json2 = 
"$IP/tests/phpunit/data/composer/new-composer.json";
}
 
-   public static function provideGetHash() {
-   return [
-   [ 'json', 'cc6e7fc565b246cb30b0cac103a2b31e' ],
-   [ 'json2', '19921dd1fc457f1b00561da932432001' ],
-   ];
-   }
-
-   /**
-* @dataProvider provideGetHash
-* @covers ComposerJson::getHash
-*/
-   public function testIsHashUpToDate( $file, $expected ) {
-   $json = new ComposerJson( $this->$file );
-   $this->assertEquals( $expected, $json->getHash() );
-   }
-
/**
 * @covers ComposerJson::__construct
 * @covers ComposerJson::getRequiredDependencies
diff --git a/tests/phpunit/includes/libs/composer/ComposerLockTest.php 
b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
index 3d5e8d3..eef7e27 100644
--- a/tests/phpunit/includes/libs/composer/ComposerLockTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
@@ -11,14 +11,6 @@
}
 
/**
-* @covers ComposerLock::getHash
-*/
-   public function testGetHash() {
-   $lock = new ComposerLock( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: checkComposerLockUpToDate: Always check dependencies

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

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

Change subject: checkComposerLockUpToDate: Always check dependencies
..

checkComposerLockUpToDate: Always check dependencies

Upstream composer has replaced the 'hash' with a smarter 'content-hash',
but instead of re-implementing (or copy-pasting) all of that in MediaWiki
we can just compare the dependencies themselves, since that's all we
care about.

Bug: T147189
Change-Id: Ic2f22a82699e2b707b6ccb355605999a183a56a0
---
M includes/libs/composer/ComposerJson.php
M includes/libs/composer/ComposerLock.php
M maintenance/checkComposerLockUpToDate.php
M tests/phpunit/includes/libs/composer/ComposerJsonTest.php
M tests/phpunit/includes/libs/composer/ComposerLockTest.php
5 files changed, 1 insertion(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/316243/1

diff --git a/includes/libs/composer/ComposerJson.php 
b/includes/libs/composer/ComposerJson.php
index 311508f..62231a8 100644
--- a/includes/libs/composer/ComposerJson.php
+++ b/includes/libs/composer/ComposerJson.php
@@ -12,12 +12,7 @@
 * @param string $location
 */
public function __construct( $location ) {
-   $this->hash = md5_file( $location );
$this->contents = json_decode( file_get_contents( $location ), 
true );
-   }
-
-   public function getHash() {
-   return $this->hash;
}
 
/**
diff --git a/includes/libs/composer/ComposerLock.php 
b/includes/libs/composer/ComposerLock.php
index e93127c..818ccdf 100644
--- a/includes/libs/composer/ComposerLock.php
+++ b/includes/libs/composer/ComposerLock.php
@@ -15,10 +15,6 @@
$this->contents = json_decode( file_get_contents( $location ), 
true );
}
 
-   public function getHash() {
-   return $this->contents['hash'];
-   }
-
/**
 * Dependencies currently installed according to composer.lock
 *
diff --git a/maintenance/checkComposerLockUpToDate.php 
b/maintenance/checkComposerLockUpToDate.php
index 9ec61dc..3f0a83d 100644
--- a/maintenance/checkComposerLockUpToDate.php
+++ b/maintenance/checkComposerLockUpToDate.php
@@ -34,11 +34,7 @@
$lock = new ComposerLock( $lockLocation );
$json = new ComposerJson( $jsonLocation );
 
-   if ( $lock->getHash() === $json->getHash() ) {
-   $this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
-   return;
-   }
-   // Out of date, lets figure out which dependencies are old
+   // Check all the dependencies to see if any are old
$found = false;
$installed = $lock->getInstalledDependencies();
foreach ( $json->getRequiredDependencies() as $name => $version 
) {
@@ -61,8 +57,6 @@
1
);
} else {
-   // The hash is the entire composer.json file,
-   // so it can be updated without any of the dependencies 
changing
// We couldn't find any out-of-date dependencies, so 
assume everything is ok!
$this->output( "Your composer.lock file is up to date 
with current dependencies!\n" );
}
diff --git a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php 
b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
index 3cde3e2..ded5f8f 100644
--- a/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerJsonTest.php
@@ -11,22 +11,6 @@
$this->json2 = 
"$IP/tests/phpunit/data/composer/new-composer.json";
}
 
-   public static function provideGetHash() {
-   return [
-   [ 'json', 'cc6e7fc565b246cb30b0cac103a2b31e' ],
-   [ 'json2', '19921dd1fc457f1b00561da932432001' ],
-   ];
-   }
-
-   /**
-* @dataProvider provideGetHash
-* @covers ComposerJson::getHash
-*/
-   public function testIsHashUpToDate( $file, $expected ) {
-   $json = new ComposerJson( $this->$file );
-   $this->assertEquals( $expected, $json->getHash() );
-   }
-
/**
 * @covers ComposerJson::__construct
 * @covers ComposerJson::getRequiredDependencies
diff --git a/tests/phpunit/includes/libs/composer/ComposerLockTest.php 
b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
index 3d5e8d3..eef7e27 100644
--- a/tests/phpunit/includes/libs/composer/ComposerLockTest.php
+++ b/tests/phpunit/includes/libs/composer/ComposerLockTest.php
@@ -11,14 +11,6 @@
}
 
/**
-* @covers ComposerLock::getHash
-*/
-   public function testGetHash() {
-

[MediaWiki-commits] [Gerrit] mediawiki...MassEditRegex[master]: Fix undefined $htmlDiff

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

Change subject: Fix undefined $htmlDiff
..


Fix undefined $htmlDiff

Bug: T138813
Change-Id: Id775345955c480f0cb2e4d0eb695c303372e0ccb
---
M MassEditRegex.special.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/MassEditRegex.special.php b/MassEditRegex.special.php
index 157b403..d8b9a6b 100644
--- a/MassEditRegex.special.php
+++ b/MassEditRegex.special.php
@@ -54,9 +54,10 @@
$pageCountLimit = $isPreview ? MER_MAX_PREVIEW_DIFFS : 
MER_MAX_EXECUTE_PAGES;
$errors = array();
 
+   $htmlDiff = '';
+
if ( $isPreview ) {
$this->massEditRegex->getDiffEngine()->showDiffStyle();
-   $htmlDiff = '';
} else {
$wgOut->addHTML( '' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id775345955c480f0cb2e4d0eb695c303372e0ccb
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MassEditRegex
Gerrit-Branch: master
Gerrit-Owner: 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] pywikibot/core[master]: [IMPR] Simplify boolean expression and return statement

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

Change subject: [IMPR] Simplify boolean expression and return statement
..


[IMPR] Simplify boolean expression and return statement

- Don't check for other instances if we already found an item.

Change-Id: I2a59e04bf429daabd2408e0b2b064feb19df373a
---
M pywikibot/page.py
1 file changed, 5 insertions(+), 10 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 79aefc3..fbab94f 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4637,14 +4637,12 @@
 @rtype: bool
 """
 if (isinstance(self.target, pywikibot.ItemPage) and
-isinstance(value, basestring) and
-self.target.id == value):
-return True
+isinstance(value, basestring)):
+return self.target.id == value
 
 if (isinstance(self.target, pywikibot.WbTime) and
-not isinstance(value, pywikibot.WbTime) and
-self.target.year == int(value)):
-return True
+not isinstance(value, pywikibot.WbTime)):
+return self.target.year == int(value)
 
 if (isinstance(self.target, pywikibot.Coordinate) and
 isinstance(value, basestring)):
@@ -4662,10 +4660,7 @@
 return (abs(self.target.lat - coord_args[0]) <= precision and
 abs(self.target.lon - coord_args[1]) <= precision)
 
-if self.target == value:
-return True
-
-return False
+return self.target == value
 
 def has_qualifier(self, qualifier_id, target):
 """

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: [MWVersionInfo] Add jenkins tests

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

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

Change subject: [MWVersionInfo] Add jenkins tests
..

[MWVersionInfo] Add jenkins tests

Adds extension-unittests-generic and composer-test and npm tests

Also add jsonlint test for non-whitelisted users.

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/42/316242/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 70aec54..61a8647 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3969,6 +3969,14 @@
 check:
   - jsonlint
 
+  - name: mediawiki/extensions/MWVersionInfo
+template:
+  - name: composer-test
+  - name: extension-unittests-generic
+  - name: npm
+check:
+  - jsonlint
+
   - name: mediawiki/extensions/NaturalLanguageList
 template:
   - name: extension-unittests-non-voting

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Don't hardcode magic link URLs

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

Change subject: Don't hardcode magic link URLs
..


Don't hardcode magic link URLs

These are actually configurable via MediaWiki messages, so use those
instead of hardcoding the default URLs.

Change-Id: Ie66a1b53f9c011947fe9e8db198a5904373f3192
---
M extension.json
M modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js
2 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index efcc68f..c32e16a 100644
--- a/extension.json
+++ b/extension.json
@@ -1457,7 +1457,9 @@

"visualeditor-magiclinknodeinspector-convert-link",

"visualeditor-magiclinknodeinspector-title-isbn",

"visualeditor-magiclinknodeinspector-title-pmid",
-   "visualeditor-magiclinknodeinspector-title-rfc"
+   "visualeditor-magiclinknodeinspector-title-rfc",
+   "rfcurl",
+   "pubmedurl"
],
"targets": [
"desktop",
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js
index 8b6b3cd..e63fdf7 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js
@@ -386,7 +386,7 @@
 OO.inheritClass( ve.dm.MWMagicLinkPmidType, ve.dm.MWMagicLinkType );
 
 ve.dm.MWMagicLinkPmidType.prototype.getHref = function () {
-   return '//www.ncbi.nlm.nih.gov/pubmed/' + this.code + '?dopt=Abstract';
+   return mw.msg( 'pubmedurl', this.code );
 };
 
 /**
@@ -407,7 +407,7 @@
 OO.inheritClass( ve.dm.MWMagicLinkRfcType, ve.dm.MWMagicLinkType );
 
 ve.dm.MWMagicLinkRfcType.prototype.getHref = function () {
-   return '//tools.ietf.org/html/rfc' + this.code;
+   return mw.msg( 'rfcurl', this.code );
 };
 
 /* Registration */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie66a1b53f9c011947fe9e8db198a5904373f3192
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
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]: linter: Use already-configured MW API URL

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

Change subject: linter: Use already-configured MW API URL
..


linter: Use already-configured MW API URL

Parsoid already knows the MediaWiki API URL for the current wiki, so use
that instead of hardcoding it in the configuration. Instead, have a
"linterSendAPI" variable that controls whether lint errors are sent to
the API or not.

Change-Id: I85fde69ac712ec04f6a3ea73669c06200638df6f
---
M config.example.yaml
M lib/config/MWParserEnvironment.js
M lib/config/ParsoidConfig.js
M lib/logger/linter.js
M lib/utils/Util.js
M tests/mocha/apitest.localsettings.js
M tests/rttest.localsettings.js
7 files changed, 17 insertions(+), 13 deletions(-)

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



diff --git a/config.example.yaml b/config.example.yaml
index daafcc8..fff190d 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -81,8 +81,10 @@
 #serverPort: 8000
 #serverInterface: '127.0.0.1'
 
-# The URL of your LintBridge API endpoint
-#linterAPI: 'http://lintbridge.wmflabs.org/add'
+# Enable linting of some wikitext errors to the log
+#linting: true
+# Send lint errors to MW API instead of to the log
+#linterSendAPI: false
 
 # Require SSL certificates to be valid (default true)
 # Set to false when using self-signed SSL certificates
diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index d25f2e7..6e88edd 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -259,7 +259,7 @@
"fatal", "error", "warning", "info",
];
 
-   if (this.conf.parsoid.linting && !this.conf.parsoid.linterAPI) {
+   if (this.conf.parsoid.linting && !this.conf.parsoid.linterSendAPI) {
defaultLogLevels.push("lint");
}
 
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index 337923c..66e291a 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -226,10 +226,12 @@
 ParsoidConfig.prototype.linting = false;
 
 /**
- * @property {String|null} linterAPI
- * The URL for LintBridge API endpoint
+ * @property {boolean} linterSendAPI
+ * Whether to send lint errors to the MW API
+ * Requires the MW Linter extension to be installed
+ * and configured.
  */
-ParsoidConfig.prototype.linterAPI = null;
+ParsoidConfig.prototype.linterSendAPI = false;
 
 /**
  * @property {number} linterSampling
diff --git a/lib/logger/linter.js b/lib/logger/linter.js
index b446ff1..a594df9 100644
--- a/lib/logger/linter.js
+++ b/lib/logger/linter.js
@@ -33,12 +33,12 @@
}
 
try {
-   if (env.conf.parsoid.linterAPI) {
+   if (env.conf.parsoid.linterSendAPI) {
// Only send the request if it is
// the latest revision
if (env.page.meta.revision.revid === env.page.latest) {
request.post(
-   env.conf.parsoid.linterAPI,
+   env.conf.wiki.apiURI,
{ form: {
data: 
JSON.stringify(enabledBuffer),
page: env.page.name,
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index bcdfb93..e08430a 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -223,7 +223,7 @@
}
if (opts.lint) {
parsoidConfig.linting = true;
-   parsoidConfig.linterAPI = null;
+   parsoidConfig.linterSendAPI = false;
}
if (opts.useBatchAPI !== null) {
parsoidConfig.useBatchAPI = 
Util.booleanOption(opts.useBatchAPI);
diff --git a/tests/mocha/apitest.localsettings.js 
b/tests/mocha/apitest.localsettings.js
index 0a45c19..d99ee0f 100644
--- a/tests/mocha/apitest.localsettings.js
+++ b/tests/mocha/apitest.localsettings.js
@@ -39,8 +39,8 @@
//  parsoidConfig.serverPort = 8000;
//  parsoidConfig.serverInterface = '127.0.0.1';
 
-   // The URL of your LintBridge API endpoint
-   //  parsoidConfig.linterAPI = 'http://lintbridge.wmflabs.org/add';
+   // Send lint errors to MW API
+   //  parsoidConfig.linterSendAPI = false;
 
// Require SSL certificates to be valid (default true)
// Set to false when using self-signed SSL certificates
diff --git a/tests/rttest.localsettings.js b/tests/rttest.localsettings.js
index 4a92840..133f848 100644
--- a/tests/rttest.localsettings.js
+++ b/tests/rttest.localsettings.js
@@ -42,8 +42,8 @@
//  parsoidConfig.serverPort = 8000;
//  parsoidConfig.serverInterface = '127.0.0.1';
 
-   // The URL of your LintBridge API endpoint
-  

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: linter: Log API failures to env.log

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

Change subject: linter: Log API failures to env.log
..


linter: Log API failures to env.log

Change-Id: I24339bd2bf227e80a545cfa1aa0d9e7215e80513
---
M lib/logger/linter.js
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/lib/logger/linter.js b/lib/logger/linter.js
index 210e463..b446ff1 100644
--- a/lib/logger/linter.js
+++ b/lib/logger/linter.js
@@ -48,13 +48,15 @@
formatversion: 2,
}, },
function(error, response, body) {
-   console.log(body);
+   if (response.statusCode !== 
200) {
+   
env.log('error/lint-api', body);
+   }
}
);
}
}
} catch (e) {
-   console.error("Error in logLintOutput: " + e);
+   env.log('error/lint-api', "Error in logLintOutput: " + e);
} finally {
cb();
}
@@ -99,8 +101,7 @@
this.buffer.push(msg);
 
} catch (e) {
-   console.error("Error in linterBackend: " + e);
-   return;
+   this._env.log("error/linter", "Error in linterBackend: " + e);
} finally {
cb();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24339bd2bf227e80a545cfa1aa0d9e7215e80513
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Simplify FR loading prior to extension registration

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

Change subject: Simplify FR loading prior to extension registration
..


Simplify FR loading prior to extension registration

Moving a lot of code back into FlaggedRevs.php

Change-Id: Idcb938498b8d5d5cecede45534464915dbdacb8c
---
M FlaggedRevs.config.php
M FlaggedRevs.php
M FlaggedRevs.setup.php
M backend/FlaggedRevs.hooks.php
M frontend/FlaggedRevsUI.setup.php
D tests/FlaggedRevsSetupTest.php
6 files changed, 518 insertions(+), 609 deletions(-)

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



diff --git a/FlaggedRevs.config.php b/FlaggedRevs.config.php
index 6525e57..07f03b2 100644
--- a/FlaggedRevs.config.php
+++ b/FlaggedRevs.config.php
@@ -4,178 +4,7 @@
 # IMPORTANT: DO NOT EDIT THIS FILE
 # When configuring globals, set them at LocalSettings.php instead
 
-# This will only distinguish "checked", "quality", and unreviewed
-# A small icon will show in the upper right hand corner
-$wgSimpleFlaggedRevsUI = true; // @TODO: remove when ready
-# For visitors, only show tags/icons for unreviewed/outdated pages
-$wgFlaggedRevsLowProfile = true; // @TODO: remove with new icon UI?
 
-# Allowed namespaces of reviewable pages
-$wgFlaggedRevsNamespaces = array( NS_MAIN, NS_FILE, NS_TEMPLATE );
-# Pages exempt from reviewing. No flagging UI will be shown for them.
-$wgFlaggedRevsWhitelist = array();
-# $wgFlaggedRevsWhitelist = array( 'Main_Page' );
-
-# Is a "stable version" used as the default display
-# version for all pages in reviewable namespaces?
-$wgFlaggedRevsOverride = true;
-# Below are groups that see the current revision by default.
-# This makes editing easier since the users always start off
-# viewing the latest version of pages.
-$wgFlaggedRevsExceptions = array( 'user' ); // @TODO: remove when ready (and 
expand pref)
-
-# Auto-review settings for edits/new pages:
-# FR_AUTOREVIEW_NONE
-#   Don't auto-review any edits or new pages
-# FR_AUTOREVIEW_CHANGES
-#   Auto-review the following types of edits (to existing pages):
-#   (a) changes directly to the stable version by users with 'autoreview'/'bot'
-#   (b) reversions to old reviewed versions by users with 'autoreview'/'bot'
-#   (c) self-reversions back to the stable version by any user
-# FR_AUTOREVIEW_CREATION
-#   Auto-review new pages as minimally "checked"
-# FR_AUTOREVIEW_CREATION_AND_CHANGES
-#   Combines FR_AUTOREVIEW_CHANGES and FR_AUTOREVIEW_CREATION
-$wgFlaggedRevsAutoReview = FR_AUTOREVIEW_CREATION_AND_CHANGES;
-
-# Define the tags we can use to rate an article, number of levels,
-# and set the minimum level to have it become a "quality" or "pristine" 
version.
-# NOTE: When setting up new dimensions or levels, you will need to add some
-#   MediaWiki messages for the UI to show properly; any sysop can do this.
-$wgFlaggedRevsTags = array(
-   'accuracy' => array( 'levels' => 3, 'quality' => 2, 'pristine' => 4 ),
-   'depth'=> array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ),
-   'style'=> array( 'levels' => 3, 'quality' => 1, 'pristine' => 4 ),
-);
-# For each tag, define the highest tag level that is unlocked by
-# having certain rights. For example, having 'review' rights may
-# allow for "depth" to be rated up to second level.
-# NOTE: Users cannot lower revision tags from a level they can't set.
-# NOTE: Users with 'validate' (Reviewers) can set all tags to all levels.
-$wgFlaggedRevsTagsRestrictions = array(
-   'accuracy' => array( 'review' => 1, 'autoreview' => 1 ),
-   'depth'=> array( 'review' => 2, 'autoreview' => 2 ),
-   'style'=> array( 'review' => 3, 'autoreview' => 3 ),
-);
-# For each tag, what is the highest level that it can be auto-reviewed to?
-# $wgFlaggedRevsAutoReview must be enabled for this to apply.
-$wgFlaggedRevsTagsAuto = array(
-   'accuracy' => 1, 'depth' => 1, 'style' => 1
-);
-
-# Restriction levels for 'autoreview'/'review' rights.
-# When a level is selected for a page, an edit made by a user
-# will not be auto-reviewed if the user lacks the specified permission.
-# Levels are set at the Stabilization special page.
-$wgFlaggedRevsRestrictionLevels = array( '', 'sysop' );
-# Set this to use FlaggedRevs *only* as a protection-like mechanism.
-# This will disable Stabilization and show the above restriction levels
-# on the protection form of pages. Each level has the stable version shown by 
default.
-# A "none" level will appear in the form as well, to disable the review 
process.
-# Pages will only be reviewable if manually restricted to a level above "none".
-$wgFlaggedRevsProtection = false;
-
-# Define our basic reviewer class of established editors (Editors)
-$wgGroupPermissions['editor']['review']= true;
-$wgGroupPermissions['editor']['autoreview']= true;
-$wgGroupPermissions['editor']['autoconfirmed'] = true;
-$wgGroupPermissions['editor']['editsemiprotected'] 

[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Correct inheritance in graph dialog documentation

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

Change subject: Correct inheritance in graph dialog documentation
..


Correct inheritance in graph dialog documentation

Change-Id: I9c74f69c260035fdc0603dbf54b13e35290d5572
---
M modules/ve-graph/ve.ui.MWGraphDialog.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-graph/ve.ui.MWGraphDialog.js 
b/modules/ve-graph/ve.ui.MWGraphDialog.js
index 7c9865f..dcbad45 100644
--- a/modules/ve-graph/ve.ui.MWGraphDialog.js
+++ b/modules/ve-graph/ve.ui.MWGraphDialog.js
@@ -8,7 +8,7 @@
  * MediaWiki graph dialog.
  *
  * @class
- * @extends ve.ui.NodeDialog
+ * @extends ve.ui.MWExtensionDialog
  *
  * @constructor
  * @param {Object} [element]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c74f69c260035fdc0603dbf54b13e35290d5572
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Ferdbold 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Replace SpecialRecentChangesFilters hook with ChangesListSpe...

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

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

Change subject: Replace SpecialRecentChangesFilters hook with 
ChangesListSpecialPageFilters
..

Replace SpecialRecentChangesFilters hook with ChangesListSpecialPageFilters

Bug: T70999
Change-Id: I9d6c6940831906ec6ce8b30242d72c33228f5b21
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/40/316240/1

diff --git a/extension.json b/extension.json
index 8f09adf..1c6810a 100644
--- a/extension.json
+++ b/extension.json
@@ -372,7 +372,7 @@
"SpecialWatchlistQuery": 
"FlaggedRevsUIHooks::modifyChangesListQuery",
"ChangesListInsertArticleLink": 
"FlaggedRevsUIHooks::addToChangeListLine",
"SpecialNewPagesFilters": 
"FlaggedRevsUIHooks::addHideReviewedFilter",
-   "SpecialRecentChangesFilters": 
"FlaggedRevsUIHooks::addHideReviewedFilter",
+   "ChangesListSpecialPageFilters": 
"FlaggedRevsUIHooks::addHideReviewedFilter",
"SpecialWatchlistFilters": 
"FlaggedRevsUIHooks::addHideReviewedFilter",
"PageHistoryBeforeList": "FlaggedRevsUIHooks::addToHistView",
"DiffViewHeader": "FlaggedRevsUIHooks::onDiffViewHeader",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d6c6940831906ec6ce8b30242d72c33228f5b21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
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] mediawiki...FlaggedRevs[master]: Fix Linker::link() call with $query as string

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

Change subject: Fix Linker::link() call with $query as string
..


Fix Linker::link() call with $query as string

Bug: T138047
Change-Id: Ifbb84bd7eaa49c1020a466022687b48d8d066cf4
---
M frontend/specialpages/reports/UnreviewedPages_body.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/frontend/specialpages/reports/UnreviewedPages_body.php 
b/frontend/specialpages/reports/UnreviewedPages_body.php
index 8366f8d..aa7c0da 100644
--- a/frontend/specialpages/reports/UnreviewedPages_body.php
+++ b/frontend/specialpages/reports/UnreviewedPages_body.php
@@ -108,7 +108,7 @@
$title = Title::newFromRow( $row );
 
$stxt = $underReview = $watching = '';
-   $link = Linker::link( $title, null, array(), 'redirect=no' );
+   $link = Linker::link( $title, null, array(), array( 'redirect' 
=> 'no' ) );
$dirmark = $this->getLanguage()->getDirMark();
$hist = Linker::linkKnown(
$title,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbb84bd7eaa49c1020a466022687b48d8d066cf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Remove pre authmanager MW support

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

Change subject: Remove pre authmanager MW support
..


Remove pre authmanager MW support

Change-Id: I46712392e48c263bd30b849777caea8e22650d40
---
D OATHAuth.hooks.legacy.php
M OATHAuth.hooks.php
M extension.json
3 files changed, 12 insertions(+), 109 deletions(-)

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



diff --git a/OATHAuth.hooks.legacy.php b/OATHAuth.hooks.legacy.php
deleted file mode 100644
index 739f256..000
--- a/OATHAuth.hooks.legacy.php
+++ /dev/null
@@ -1,83 +0,0 @@
-getText( 'wpOATHToken' );
-   $oathrepo = OATHAuthHooks::getOATHUserRepository();
-   $oathuser = $oathrepo->findByUser( $user );
-   # Though it's weird to default to true, we only want to deny
-   # users who have two-factor enabled and have validated their
-   # token.
-   $result = true;
-
-   if ( $oathuser->getKey() !== null ) {
-   // Don't increase pingLimiter, just check for limit 
exceeded.
-   if ( $user->pingLimiter( 'badoath', 0 ) ) {
-   $result = 'oathauth-abortlogin-throttled';
-   } elseif ( !$oathuser->getKey()->verifyToken( $token, 
$oathuser ) ) {
-   $result = 'oathauth-abortlogin';
-   }
-   }
-
-   if ( $result === true ) {
-   return true;
-   } else {
-   $errorMsg = $result;
-   return false;
-   }
-   }
-
-   /**
-* @param $user User
-* @param $password string
-* @param &$abort int
-* @param &$errorMsg string
-* @return bool
-*/
-   static function AbortLogin( $user, $password, &$abort, &$errorMsg ) {
-   $context = RequestContext::getMain();
-   $request = $context->getRequest();
-   $output = $context->getOutput();
-
-   $oathrepo = OATHAuthHooks::getOATHUserRepository();
-   $oathuser = $oathrepo->findByUser( $user );
-   $uid = CentralIdLookup::factory()->centralIdFromLocalUser( 
$user );
-
-   if ( $oathuser->getKey() !== null && !$request->getCheck( 
'token' ) ) {
-   $encData = OATHAuthUtils::encryptSessionData(
-   $request->getValues(),
-   $uid
-   );
-   $request->setSessionData( 'oath_login', $encData );
-   $request->setSessionData( 'oath_uid', $uid );
-   $output->redirect( SpecialPage::getTitleFor( 'OATH' 
)->getFullURL( '', false, PROTO_CURRENT ) );
-   return false;
-   } else {
-   return true;
-   }
-   }
-}
diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php
index 39f269b..e5f5c05 100644
--- a/OATHAuth.hooks.php
+++ b/OATHAuth.hooks.php
@@ -29,29 +29,6 @@
}
 
/**
-* Register hooks which depend on MediaWiki core version
-*/
-   public static function onRegistration() {
-   global $wgDisableAuthManager, $wgAuthManagerAutoConfig;
-
-   if ( !$wgDisableAuthManager && class_exists( AuthManager::class 
) ) {
-   $wgAuthManagerAutoConfig['secondaryauth'] += [
-   TOTPSecondaryAuthenticationProvider::class => [
-   'class' => 
TOTPSecondaryAuthenticationProvider::class,
-   // after non-interactive providers but 
before the ones
-   // that run after a successful 
authentication
-   'sort' => 50,
-   ]
-   ];
-   Hooks::register( 'AuthChangeFormFields', 
'OATHAuthHooks::onAuthChangeFormFields' );
-   } else {
-   Hooks::register( 'AbortChangePassword', 
'OATHAuthLegacyHooks::AbortChangePassword' );
-   Hooks::register( 'AbortLogin', 
'OATHAuthLegacyHooks::AbortLogin' );
-   Hooks::register( 'ChangePasswordForm', 
'OATHAuthLegacyHooks::ChangePasswordForm' );
-   }
-   }
-
-   /**
 * @param AuthenticationRequest[] $requests
 * @param array $fieldInfo Field information array (union of the
 *AuthenticationRequest::getFieldInfo() responses).
diff --git a/extension.json b/extension.json
index 2b0fa3e..3b9a7a1 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "OATHAuth",
-   "version": "0.2.1",
+   "version": "0.2.2",
"author": "Ryan Lane",
"url": 

[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Fix Linker::link() call with $query as string

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

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

Change subject: Fix Linker::link() call with $query as string
..

Fix Linker::link() call with $query as string

Bug: T138047
Change-Id: Ifbb84bd7eaa49c1020a466022687b48d8d066cf4
---
M frontend/specialpages/reports/UnreviewedPages_body.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/39/316239/1

diff --git a/frontend/specialpages/reports/UnreviewedPages_body.php 
b/frontend/specialpages/reports/UnreviewedPages_body.php
index 8366f8d..aa7c0da 100644
--- a/frontend/specialpages/reports/UnreviewedPages_body.php
+++ b/frontend/specialpages/reports/UnreviewedPages_body.php
@@ -108,7 +108,7 @@
$title = Title::newFromRow( $row );
 
$stxt = $underReview = $watching = '';
-   $link = Linker::link( $title, null, array(), 'redirect=no' );
+   $link = Linker::link( $title, null, array(), array( 'redirect' 
=> 'no' ) );
$dirmark = $this->getLanguage()->getDirMark();
$hist = Linker::linkKnown(
$title,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbb84bd7eaa49c1020a466022687b48d8d066cf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
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] mediawiki/core[master]: Move utils/iterators/ into libs/

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

Change subject: Move utils/iterators/ into libs/
..


Move utils/iterators/ into libs/

They have no dependency upon MediaWiki.

Change-Id: I58d59941cc7e1ba4fd5e265c8e30f59db66ed514
---
M autoload.php
R includes/libs/iterators/IteratorDecorator.php
R includes/libs/iterators/NotRecursiveIterator.php
3 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 636cb59..936b261 100644
--- a/autoload.php
+++ b/autoload.php
@@ -631,7 +631,7 @@
'Interwiki' => __DIR__ . '/includes/interwiki/Interwiki.php',
'InvalidPassword' => __DIR__ . '/includes/password/InvalidPassword.php',
'InvalidateUserSesssions' => __DIR__ . 
'/maintenance/invalidateUserSessions.php',
-   'IteratorDecorator' => __DIR__ . 
'/includes/utils/iterators/IteratorDecorator.php',
+   'IteratorDecorator' => __DIR__ . 
'/includes/libs/iterators/IteratorDecorator.php',
'IuConverter' => __DIR__ . '/languages/classes/LanguageIu.php',
'JSCompilerContext' => __DIR__ . '/includes/libs/jsminplus.php',
'JSMinPlus' => __DIR__ . '/includes/libs/jsminplus.php',
@@ -983,7 +983,7 @@
'NewPagesPager' => __DIR__ . 
'/includes/specials/pagers/NewPagesPager.php',
'NewUsersLogFormatter' => __DIR__ . 
'/includes/logging/NewUsersLogFormatter.php',
'NolinesImageGallery' => __DIR__ . 
'/includes/gallery/NolinesImageGallery.php',
-   'NotRecursiveIterator' => __DIR__ . 
'/includes/utils/iterators/NotRecursiveIterator.php',
+   'NotRecursiveIterator' => __DIR__ . 
'/includes/libs/iterators/NotRecursiveIterator.php',
'NukeNS' => __DIR__ . '/maintenance/nukeNS.php',
'NukePage' => __DIR__ . '/maintenance/nukePage.php',
'NullFileJournal' => __DIR__ . 
'/includes/libs/filebackend/filejournal/NullFileJournal.php',
diff --git a/includes/utils/iterators/IteratorDecorator.php 
b/includes/libs/iterators/IteratorDecorator.php
similarity index 100%
rename from includes/utils/iterators/IteratorDecorator.php
rename to includes/libs/iterators/IteratorDecorator.php
diff --git a/includes/utils/iterators/NotRecursiveIterator.php 
b/includes/libs/iterators/NotRecursiveIterator.php
similarity index 100%
rename from includes/utils/iterators/NotRecursiveIterator.php
rename to includes/libs/iterators/NotRecursiveIterator.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58d59941cc7e1ba4fd5e265c8e30f59db66ed514
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove some MediaWiki dependencies on utils/BatchRow*

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

Change subject: Remove some MediaWiki dependencies on utils/BatchRow*
..


Remove some MediaWiki dependencies on utils/BatchRow*

Change-Id: I35279875891630157c651e6575770ca4607bc168
---
M includes/utils/BatchRowIterator.php
M includes/utils/BatchRowUpdate.php
2 files changed, 5 insertions(+), 12 deletions(-)

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



diff --git a/includes/utils/BatchRowIterator.php 
b/includes/utils/BatchRowIterator.php
index 9fc2431..602587c 100644
--- a/includes/utils/BatchRowIterator.php
+++ b/includes/utils/BatchRowIterator.php
@@ -82,11 +82,11 @@
 * @param string|array $table  The name or names of the table to 
read from
 * @param string|array $primaryKey The name or names of the primary key 
columns
 * @param integer  $batchSize  The number of rows to fetch per 
iteration
-* @throws MWException
+* @throws InvalidArgumentException
 */
public function __construct( IDatabase $db, $table, $primaryKey, 
$batchSize ) {
if ( $batchSize < 1 ) {
-   throw new MWException( 'Batch size must be at least 1 
row.' );
+   throw new InvalidArgumentException( 'Batch size must be 
at least 1 row.' );
}
$this->db = $db;
$this->table = $table;
@@ -97,7 +97,7 @@
}
 
/**
-* @param array $condition Query conditions suitable for use with
+* @param array $conditions Query conditions suitable for use with
 *  IDatabase::select
 */
public function addConditions( array $conditions ) {
@@ -105,7 +105,7 @@
}
 
/**
-* @param array $condition Query join conditions suitable for use
+* @param array $conditions Query join conditions suitable for use
 *  with IDatabase::select
 */
public function addJoinConditions( array $conditions ) {
diff --git a/includes/utils/BatchRowUpdate.php 
b/includes/utils/BatchRowUpdate.php
index 1e7eda8..39b65c3 100644
--- a/includes/utils/BatchRowUpdate.php
+++ b/includes/utils/BatchRowUpdate.php
@@ -112,15 +112,8 @@
 *
 * @param callable $output A callback taking a single string
 *  parameter to output
-*
-* @throws MWException
 */
-   public function setOutput( $output ) {
-   if ( !is_callable( $output ) ) {
-   throw new MWException(
-   'Provided $output param is required to be 
callable.'
-   );
-   }
+   public function setOutput( callable $output ) {
$this->output = $output;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35279875891630157c651e6575770ca4607bc168
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UserMerge[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.7.2

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.7.2
..


build: Updating mediawiki/mediawiki-codesniffer to 0.7.2

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

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



diff --git a/composer.json b/composer.json
index f5434bf..98d41d9 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.1"
+   "mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
"fix": "phpcbf",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9d81eae1569f680f735012118466ebe11185ceb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UserMerge
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Cards[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.7.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.7.1

Also added "composer fix" command.

Change-Id: Id4f7bb88d117f85c63dde4ffea0b8926184bd097
---
M composer.json
A composer.lock
M includes/Cards.hooks.php
3 files changed, 192 insertions(+), 10 deletions(-)

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



diff --git a/composer.json b/composer.json
index db22539..33ad1e1 100644
--- a/composer.json
+++ b/composer.json
@@ -1,12 +1,15 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.4.0"
+   "mediawiki/mediawiki-codesniffer": "0.7.1"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
"phpcs -p -s"
+   ],
+   "fix": [
+   "phpcbf"
]
}
 }
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 000..0f749e0
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,179 @@
+{
+"_readme": [
+"This file locks the dependencies of your project to a known state",
+"Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
+"This file is @generated automatically"
+],
+"hash": "3b0013734a655bbfb8437bf53fdfa549",
+"content-hash": "a947cbc88a80f4405c346e8d5ae50405",
+"packages": [],
+"packages-dev": [
+{
+"name": "jakub-onderka/php-parallel-lint",
+"version": "v0.9.2",
+"source": {
+"type": "git",
+"url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git;,
+"reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa;,
+"reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa",
+"shasum": ""
+},
+"require": {
+"php": ">=5.3.3"
+},
+"require-dev": {
+"jakub-onderka/php-console-highlighter": "~0.3",
+"nette/tester": "~1.3"
+},
+"suggest": {
+"jakub-onderka/php-console-highlighter": "Highlight syntax in 
code snippet"
+},
+"bin": [
+"parallel-lint"
+],
+"type": "library",
+"autoload": {
+"classmap": [
+"./"
+]
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"BSD-2-Clause"
+],
+"authors": [
+{
+"name": "Jakub Onderka",
+"email": "jakub.onde...@gmail.com"
+}
+],
+"description": "This tool check syntax of PHP files about 20x 
faster than serial check.",
+"homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint;,
+"time": "2015-12-15 10:42:16"
+},
+{
+"name": "mediawiki/mediawiki-codesniffer",
+"version": "v0.7.1",
+"source": {
+"type": "git",
+"url": 
"https://github.com/wikimedia/mediawiki-tools-codesniffer.git;,
+"reference": "e722267df7a0c0e6e05831d2c8c030d6e18a5321"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-tools-codesniffer/zipball/e722267df7a0c0e6e05831d2c8c030d6e18a5321;,
+"reference": "e722267df7a0c0e6e05831d2c8c030d6e18a5321",
+"shasum": ""
+},
+"require": {
+"php": ">= 5.5.9",
+"squizlabs/php_codesniffer": "2.6.0"
+},
+"require-dev": {
+"jakub-onderka/php-parallel-lint": "0.9.*",
+"phpunit/phpunit": "~4.1"
+},
+"type": "library",
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"GPL-2.0+"
+],
+"description": "MediaWiki CodeSniffer Standards",
+"homepage": 
"https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP;,
+"keywords": [
+"codesniffer",
+"mediawiki"
+],
+"time": "2016-05-06 19:53:37"
+},
+{
+

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUserPage[master]: Use LoadBalancer::getConnectionRef()

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

Change subject: Use LoadBalancer::getConnectionRef()
..


Use LoadBalancer::getConnectionRef()

So we don't have to call reuseConnection() manually afterwards.

And use the newer DB_REPLICA.

Change-Id: Id095ea0ae749ed869a00206b1c8af431fc729dca
---
M GlobalUserPage.body.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php
index 419a74c..32e38bf 100644
--- a/GlobalUserPage.body.php
+++ b/GlobalUserPage.body.php
@@ -167,7 +167,7 @@
 
global $wgGlobalUserPageDBname;
$lb = wfGetLB( $wgGlobalUserPageDBname );
-   $dbr = $lb->getConnection( DB_SLAVE, array(), 
$wgGlobalUserPageDBname );
+   $dbr = $lb->getConnectionRef( DB_REPLICA, array(), 
$wgGlobalUserPageDBname );
$row = $dbr->selectRow(
[ 'page', 'page_props' ],
[ 'page_touched', 'pp_propname' ],
@@ -190,7 +190,6 @@
} else {
$touched = false;
}
-   $lb->reuseConnection( $dbr );
 
self::$touchedCache->set( $user->getName(), $touched );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id095ea0ae749ed869a00206b1c8af431fc729dca
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GlobalUserPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: fix more language converter bugs.

2016-10-16 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review.

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

Change subject: WIP: fix more language converter bugs.
..

WIP: fix more language converter bugs.

Change-Id: Id6688d72175470148fb3295771f10cf2e802caa5
---
M lib/config/WikiConfig.js
M lib/html2wt/LanguageVariantHandler.js
M lib/mw/ApiRequest.js
M lib/wt2html/tt/LanguageVariantHandler.js
M tests/parserTests.txt
5 files changed, 150 insertions(+), 51 deletions(-)


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

diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index 37a4f2a..30cac7e 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -514,6 +514,17 @@
// Function hooks on this wiki, indexed by their normalized form
this.functionHooks = new Set(resultConf.functionhooks || []);
 
+   // Somewhat annoyingly, LanguageConversion is turned on by default
+   // for all wikis (ie, $wgDisableLangConversion = false, as reported
+   // by siteinfo general.langconversion), but the
+   // -{ }- syntax is only parsed when the currently selected language
+   // has variants.  For the most part, the "language" is
+   // siteinfo general.lang and the variants are in siteinfo as lists in
+   // general.fallback and general.variants. *However* various mechanisms
+   // (like the Translate extension) can change the default language
+   // for a given page, and then we need to use other mechanisms to see
+   // if variants are active.
+
// Match a wikitext line containing just whitespace, comments, and
// sol transparent links and behavior switches.
// Redirects should not contain any preceding non-whitespace chars.
diff --git a/lib/html2wt/LanguageVariantHandler.js 
b/lib/html2wt/LanguageVariantHandler.js
index cedbb3d..1f9cc0a 100644
--- a/lib/html2wt/LanguageVariantHandler.js
+++ b/lib/html2wt/LanguageVariantHandler.js
@@ -61,15 +61,19 @@
};
 
// Helper function: protect characters not allowed in -{ }- strings.
+   // XXX escape := in left side of unidir rules, and in language names (!)
var protect = function(t) {
-   // XXX escape - characters that would form -{ }- markup.
-   // XXX escape confusing | : ; characters?
-   // XXX ensure that this wikitext won't break the -{}- context
-   return t;
+   return true ? t : t.replace(/[\{\}|:]/g, function(c) {
+   // Escape {} characters that would form -{ }- markup
+   // Escape | that would form a lang_variant_flag
+   // Escape : that would form a lang_variant_option
+   return '

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: allstar wikitext serialization.

2016-10-16 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review.

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

Change subject: WIP: allstar wikitext serialization.
..

WIP: allstar wikitext serialization.

Change-Id: Ibbf98aa4420650707813ec67addcac1bf827a7b5
---
A bin/allstar.js
M package.json
2 files changed, 488 insertions(+), 0 deletions(-)


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

diff --git a/bin/allstar.js b/bin/allstar.js
new file mode 100755
index 000..1329bbc
--- /dev/null
+++ b/bin/allstar.js
@@ -0,0 +1,487 @@
+#!/usr/bin/env node
+/**
+ * Allstar serialization.
+ * Read from STDIN, write to STDOUT.
+ */
+'use strict';
+require('../core-upgrade.js');
+
+var ParserEnv = 
require('../lib/config/MWParserEnvironment.js').MWParserEnvironment;
+var ParsoidConfig = require('../lib/config/ParsoidConfig.js').ParsoidConfig;
+var Parse = require('./parse.js');
+var TemplateRequest = require('../lib/mw/ApiRequest.js').TemplateRequest;
+var Util = require('../lib/utils/Util.js').Util;
+var DU = require('../lib/utils/DOMUtils.js').DOMUtils;
+var DOMTraverser = require('../lib/utils/DOMTraverser.js').DOMTraverser;
+var Promise = require('../lib/utils/promise.js');
+var fs = require('fs');
+var path = require('path');
+var yargs = require('yargs');
+var yaml = require('js-yaml');
+
+var standardOpts = Util.addStandardOptions({
+   'config': {
+   description: "Path to a config.yaml file.  Use --config w/ no 
argument to default to the server's config.yaml",
+   'default': false,
+   },
+   'prefix': {
+   description: 'Which wiki prefix to use; e.g. "enwiki" for 
English wikipedia, "eswiki" for Spanish, "mediawikiwiki" for mediawiki.org',
+   'boolean': false,
+   'default': null,
+   },
+   'domain': {
+   description: 'Which wiki to use; e.g. "en.wikipedia.org" for 
English wikipedia, "es.wikipedia.org" for Spanish, "mediawiki.org" for 
mediawiki.org',
+   'boolean': false,
+   'default': null,
+   },
+   'page': {
+   description: 'The page name, returned for {{PAGENAME}}. If no 
input is given (ie. empty/stdin closed), it downloads and parses the page. This 
should be the actual title of the article (that is, not including any 
URL-encoding that might be necessary in wikitext).',
+   'boolean': false,
+   'default': ParserEnv.prototype.defaultPageName,
+   },
+   'inputfile': {
+   description: 'File containing input as an alternative to stdin',
+   'boolean': false,
+   'default': false,
+   },
+   'contentVersion': {
+   description: 'The acceptable content version.',
+   'boolean': false,
+   'default': ParserEnv.prototype.contentVersion,
+   },
+   'loadWMF': {
+   description: 'Use WMF mediawiki API config',
+   'boolean': true,
+   'default': true,
+   },
+   'offline': {
+   description: 'Shortcut to turn off various network fetches 
during parse.',
+   'boolean': true,
+   'default': false,
+   },
+});
+
+var serialize = function(env, doc) {
+   var result = [];
+   var dt = new DOMTraverser(env);
+   var atSOL = function() {
+   if (result.length === 0) { return true; }
+   var i = result.length - 1;
+   while (i>0 && result[i].length === 0) { i--; }
+   return /\n$/.test(result[i]);
+   };
+   var atListSOL = function() {
+   if (result.length === 0) { return true; }
+   var i = result.length - 1;
+   while (i>0 && /^[*#:;]*$/.test(result[i])) { i--; }
+   if (i==0) { return /(^|\n)[*#:;]*$/.test(result[i]); }
+   return /\n[*#:;]*$/.test(result[i]);
+   };
+   var forceSOL = function() {
+   if (!atSOL()) { result.push('\n'); }
+   };
+   var typeofContains = function(node, type) {
+   if (node.nodeType !== 1) { return false; }
+   var ty = (node.getAttribute('typeof') || '').split(/\s+/g);
+   if (typeof type === 'string') {
+   type = new RegExp('^' + Util.escapeRegExp(type) + '$');
+   }
+   for (var i=0; i

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Typo fix in comment.

2016-10-16 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review.

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

Change subject: Typo fix in comment.
..

Typo fix in comment.

Change-Id: Ib1d93af2f7318ec887530c63e25d4a00ab118a68
---
M lib/config/MWParserEnvironment.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index e7de92d..828b628 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -484,7 +484,7 @@
  * shouldn't be treated like links at all.
  *
  * This function handles strings that are page-fragments or subpage references
- * and resolves hose w.r.t the current page name so that title-handling code 
elsewhere
+ * and resolves those w.r.t the current page name so that title-handling code 
elsewhere
  * only deal with non-relative title strings.
  */
 MWParserEnvironment.prototype.resolveTitle = function(urlDecodedStr, 
resolveOnly) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1d93af2f7318ec887530c63e25d4a00ab118a68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: fixup! WIP: parse language converter markup.

2016-10-16 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review.

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

Change subject: fixup! WIP: parse language converter markup.
..

fixup! WIP: parse language converter markup.

Change-Id: I0344d3b14c827defe0c14bbe91598a8cfadedee9
---
M lib/html2wt/LanguageVariantHandler.js
M lib/html2wt/escapeWikitext.js
M lib/wt2html/pegTokenizer.pegjs.txt
3 files changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/lib/html2wt/LanguageVariantHandler.js 
b/lib/html2wt/LanguageVariantHandler.js
index 2f3d3f4..cedbb3d 100644
--- a/lib/html2wt/LanguageVariantHandler.js
+++ b/lib/html2wt/LanguageVariantHandler.js
@@ -69,7 +69,7 @@
};
// Helper function: combine the three parts of the -{ }- string
var combine = function(flagStr, bodyStr, useTrailingSemi) {
-   if (flagStr) { flagStr = flagStr + '|'; }
+   if (flagStr || /|/.test(bodyStr)) { flagStr = flagStr + '|'; }
if (useTrailingSemi) { bodyStr = bodyStr + ';'; }
return flagStr + bodyStr;
};
diff --git a/lib/html2wt/escapeWikitext.js b/lib/html2wt/escapeWikitext.js
index 56cd406..0b2980a 100644
--- a/lib/html2wt/escapeWikitext.js
+++ b/lib/html2wt/escapeWikitext.js
@@ -653,6 +653,7 @@
var hasMagicWord = /(^|\W)(RFC|ISBN|PMID)\s/.test(text);
var hasAutolink = state.env.conf.wiki.findValidProtocol(text);
var fullCheckNeeded = !state.inLink && (hasMagicWord || hasAutolink);
+   var hasLanguageConverter = false;
var hasQuoteChar = false;
var indentPreUnsafe = false;
var hasNonQuoteEscapableChars = false;
@@ -662,6 +663,8 @@
hasQuoteChar = /'/.test(text);
indentPreUnsafe = (!indentPreSafeMode && (/\n 
+[^\r\n]*?[^\s]+/).test(text) || sol && (/^ +[^\r\n]*?[^\s]+/).test(text));
hasNonQuoteEscapableChars = 
/[<>\[\]\-\+\|!=#\*:;~{}]|__[^_]*__/.test(text);
+   hasLanguageConverter = /-{|}-/.test(text);
+   if (hasLanguageConverter) { fullCheckNeeded = true; }
}
 
// Quick check for the common case (useful to kill a majority of 
requests)
diff --git a/lib/wt2html/pegTokenizer.pegjs.txt 
b/lib/wt2html/pegTokenizer.pegjs.txt
index f311e85..67286ae 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -852,11 +852,12 @@
 rest:(space_or_newline* ";" space_or_newline* ff:lang_variant_flag
   { return ff; })*
 { return [ f ].concat(rest); }
+  / "" { return []; }
 
 lang_variant_flag
   = f:[-+A-Z]   { return { flag: f }; }
   / v:lang_variant_name { return { variant: v }; }
-  / b:(!space_or_newline [^|;])+ { return { bogus: b.join('') }; /* bad flag 
*/}
+  / b:(!space_or_newline [^{}|;])+ { return { bogus: b.join('') }; /* bad flag 
*/}
 
 lang_variant_name // language variant name, like zh, zh-cn, etc.
   = h:[a-z] t:[-a-z]+ { return h + t.join(''); }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0344d3b14c827defe0c14bbe91598a8cfadedee9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...OAuthAuthentication[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.7.1

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
..


build: Updating mediawiki/mediawiki-codesniffer to 0.7.1

Also added "composer fix" command.

Change-Id: I3259f41b0b5c56924d51ccf8afd86846239fed77
---
M composer.json
M handlers/AuthenticationHandler.php
M handlers/OAuth1Handler.php
M specials/SpecialOAuthLogin.php
M tests/OAuthAuthDBTest.php
M tests/OAuthAuthHooksTest.php
M utils/Hooks.php
M utils/OAuthExternalUser.php
M utils/Policy.php
9 files changed, 44 insertions(+), 48 deletions(-)

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



diff --git a/composer.json b/composer.json
index a799d18..21f773e 100644
--- a/composer.json
+++ b/composer.json
@@ -24,12 +24,15 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.5.1"
+   "mediawiki/mediawiki-codesniffer": "0.7.1"
},
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
"phpcs -p -s"
+   ],
+   "fix": [
+   "phpcbf"
]
}
 }
diff --git a/handlers/AuthenticationHandler.php 
b/handlers/AuthenticationHandler.php
index 0c0cfff..c037a38 100644
--- a/handlers/AuthenticationHandler.php
+++ b/handlers/AuthenticationHandler.php
@@ -27,11 +27,11 @@
 
if ( $exUser->attached() ) {
$status = AuthenticationHandler::doLogin( $exUser, 
$request );
-   $s = \Status::newGood( array( 'successfulLogin', 
$status->getValue() ) );
+   $s = \Status::newGood( [ 'successfulLogin', 
$status->getValue() ] );
$s->merge( $status );
} else {
$status = AuthenticationHandler::doCreateAndLogin( 
$exUser, $request );
-   $s = \Status::newGood( array( 'successfulCreation', 
$status->getValue() ) );
+   $s = \Status::newGood( [ 'successfulCreation', 
$status->getValue() ] );
$s->merge( $status );
}
 
@@ -79,7 +79,7 @@
$u->addWatch( $u->getUserPage(), 
\WatchedItem::IGNORE_USER_RIGHTS );
$u->saveSettings();
 
-   wfRunHooks( 'AddNewAccount', array( $u, false ) );
+   wfRunHooks( 'AddNewAccount', [ $u, false ] );
 
$exUser->setLocalId( $u->getId() );
}
@@ -92,7 +92,6 @@
 
return \Status::newGood( $u );
}
-
 
public static function doLogin( OAuthExternalUser $exUser, \WebRequest 
$request ) {
global $wgSecureLogin, $wgCookieSecure;
diff --git a/handlers/OAuth1Handler.php b/handlers/OAuth1Handler.php
index 5a45762..5229967 100644
--- a/handlers/OAuth1Handler.php
+++ b/handlers/OAuth1Handler.php
@@ -7,7 +7,6 @@
 
 class OAuth1Handler {
 
-
public function init( SessionStore $session, Client $client ) {
// Step 1 - Get a request token
list( $redir, $requestToken ) = $client->initiate();
@@ -18,7 +17,6 @@
public function authorize( \WebResponse $response, $url ) {
$response->header( "Location: $url", true );
}
-
 
public function finish( \WebRequest $request, SessionStore $session, 
Client $client ) {
$verifyCode = $request->getVal( 'oauth_verifier', false );
@@ -44,13 +42,11 @@
return $accessToken;
}
 
-
public function identify( Token $accessToken, Client $client ) {
// Get Identity
$identity = $client->identify( $accessToken );
 
return $identity;
}
-
 
 }
diff --git a/specials/SpecialOAuthLogin.php b/specials/SpecialOAuthLogin.php
index 59b6782..d847f5f 100644
--- a/specials/SpecialOAuthLogin.php
+++ b/specials/SpecialOAuthLogin.php
@@ -11,7 +11,6 @@
parent::__construct( 'OAuthLogin' );
}
 
-
public function execute( $subpage ) {
global $wgUser, $wgOAuthAuthenticationCallbackUrl;
$request = $this->getRequest();
diff --git a/tests/OAuthAuthDBTest.php b/tests/OAuthAuthDBTest.php
index 75b2065..7afb2fd 100644
--- a/tests/OAuthAuthDBTest.php
+++ b/tests/OAuthAuthDBTest.php
@@ -7,7 +7,7 @@
  */
 class OAuthAuthDBTest extends \MediaWikiTestCase {
 
-   public function __construct( $name = null, array $data = array(), 
$dataName = '' ) {
+   public function __construct( $name = null, array $data = [], $dataName 
= '' ) {
parent::__construct( $name, $data, $dataName );
}
 
diff --git a/tests/OAuthAuthHooksTest.php 

[MediaWiki-commits] [Gerrit] mediawiki...Comments[master]: sql: Fix SQLite compatibility

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

Change subject: sql: Fix SQLite compatibility
..


sql: Fix SQLite compatibility

Apparently it needs to be in this order. I just copied it from
.

Change-Id: I948a2fcd546076ad186e7cde933a70795f591a58
---
M sql/comments.sql
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/sql/comments.sql b/sql/comments.sql
index e9fbaef..543d6b3 100644
--- a/sql/comments.sql
+++ b/sql/comments.sql
@@ -1,6 +1,6 @@
 -- MySQL/SQLite schema for the Comments extension
 CREATE TABLE /*_*/Comments (
-  CommentID int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+  CommentID int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
   Comment_Page_ID int(11) NOT NULL default 0,
   Comment_user_id int(11) NOT NULL default 0,
   Comment_Username varchar(200) NOT NULL default '',
@@ -28,11 +28,11 @@
 CREATE INDEX /*i*/Comment_Vote_user_id ON /*_*/Comments_Vote 
(Comment_Vote_user_id);
 
 CREATE TABLE /*_*/Comments_block (
-  cb_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
+  cb_id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
   cb_user_id int(5) NOT NULL default 0,
   cb_user_name varchar(255) NOT NULL default '',
   cb_user_id_blocked int(5) default NULL,
   cb_user_name_blocked varchar(255) NOT NULL default '',
   cb_date datetime default NULL
 ) /*$wgDBTableOptions*/;
-CREATE INDEX /*i*/cb_user_id ON /*_*/Comments_block (cb_user_id);
\ No newline at end of file
+CREATE INDEX /*i*/cb_user_id ON /*_*/Comments_block (cb_user_id);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I948a2fcd546076ad186e7cde933a70795f591a58
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix TitleFormatter::getPrefixedDBkey() call

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

Change subject: Fix TitleFormatter::getPrefixedDBkey() call
..


Fix TitleFormatter::getPrefixedDBkey() call

Bug: T148326
Change-Id: Iccad35d10be84ed334d2872812bc0fdc6c27f3ca
---
M handlers/TextHandler/TextHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/handlers/TextHandler/TextHandler.php 
b/handlers/TextHandler/TextHandler.php
index 1b41f26..8ea8ebb 100644
--- a/handlers/TextHandler/TextHandler.php
+++ b/handlers/TextHandler/TextHandler.php
@@ -313,7 +313,7 @@
 */
function getPrefixedDBkey( $pageTitle ) {
if ( $pageTitle instanceof Title ) {
-   return TitleFormatter::getPrefixedDBkey( $pageTitle );
+   return $pageTitle->getPrefixedDBkey();
} elseif ( $pageTitle instanceof ForeignTitle ) {
return $pageTitle->getFullText();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccad35d10be84ed334d2872812bc0fdc6c27f3ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: TheDJ 
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...ScopedCallback[master]: Some doc-block changes

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

Change subject: Some doc-block changes
..


Some doc-block changes

Change-Id: Ie891e412d2839edeb5ad5e6ef21e0510ec5e788b
---
M src/ScopedCallback.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/src/ScopedCallback.php b/src/ScopedCallback.php
index 0a685c8..16d475e 100644
--- a/src/ScopedCallback.php
+++ b/src/ScopedCallback.php
@@ -25,7 +25,7 @@
 namespace Wikimedia;
 
 /**
- * Class for asserting that a callback happens when an dummy object leaves 
scope
+ * Class for asserting that a callback happens when a dummy object leaves scope
  */
 class ScopedCallback {
/** @var callable */
@@ -35,7 +35,7 @@
 
/**
 * @param callable|null $callback
-* @param array $params Callback arguments (since 1.25)
+* @param array $params Callback arguments (since 1.0.0, MediaWiki 1.25)
 * @throws \InvalidArgumentException
 */
public function __construct( $callback, array $params = [] ) {
@@ -48,7 +48,7 @@
 
/**
 * Trigger a scoped callback and destroy it.
-* This is the same is just setting it to null.
+* This is the same as just setting it to null.
 *
 * @param ScopedCallback $sc
 */
@@ -57,7 +57,7 @@
}
 
/**
-* Destroy a scoped callback without triggering it
+* Destroy a scoped callback without triggering it.
 *
 * @param ScopedCallback $sc
 */
@@ -69,7 +69,7 @@
}
 
/**
-* Trigger the callback when this leaves scope
+* Trigger the callback when it leaves scope.
 */
function __destruct() {
if ( $this->callback !== null ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie891e412d2839edeb5ad5e6ef21e0510ec5e788b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/libs/ScopedCallback
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Provide addition and subtraction methods for WbTime

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

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

Change subject: [IMPR] Provide addition and subtraction methods for WbTime
..

[IMPR] Provide addition and subtraction methods for WbTime

Addition and subtraction is supported for Timedelta objects. It
works like Timestamp and datetime objects.

Some tests added.

Change-Id: I17b2b667fe70011c5be0615e5c5948e9aff3572b
---
M pywikibot/__init__.py
M tests/wikibase_tests.py
2 files changed, 55 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/34/316234/1

diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 11aff5a..f810af8 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -18,6 +18,7 @@
 import sys
 import threading
 
+from copy import copy
 from decimal import Decimal
 
 if sys.version_info[0] > 2:
@@ -537,6 +538,41 @@
 return self._year > other._year or (
 self._year == other._year and self._timestamp >= other._timestamp)
 
+def __add__(self, other):
+"""Perform addition, returning a WbTime."""
+new = copy(self)
+new._year = new.year
+# leap year offset for calculating
+new._timestamp = new._timestamp.replace(year=4800)
+new._timestamp += other
+diff = new._timestamp.year - 4800
+if new._year < 0 and new._year + diff >= 0:
+diff += 1  # skip invalid year 0
+new._year += diff
+if new._year >= datetime.MINYEAR and new._year <= datetime.MAXYEAR:
+new._timestamp = new._timestamp.replace(year=new._year)
+new._year = 0
+else:
+new._timestamp = new._timestamp.replace(year=2000)
+return new
+
+def __sub__(self, other):
+"""Perform substraction, returning a WbTime."""
+new = copy(self)
+new._year = new.year
+new._timestamp = new._timestamp.replace(year=4800)
+new._timestamp -= other
+diff = new._timestamp.year - 4800
+if new._year > 0 and new._year + diff <= 0:
+diff -= 1  # skip invalid year 0
+new._year += diff
+if new._year >= datetime.MINYEAR and new._year <= datetime.MAXYEAR:
+new._timestamp = new._timestamp.replace(year=new._year)
+new._year = 0
+else:
+new._timestamp = new._timestamp.replace(year=2000)
+return new
+
 def __getattr__(self, name):
 """Provide time parts from Timestamp."""
 if self.is_datetime_year() and hasattr(
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index a0d63c1..d753086 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -13,6 +13,7 @@
 import copy
 import json
 
+from datetime import timedelta
 from decimal import Decimal
 
 import pywikibot
@@ -191,6 +192,24 @@
 self.assertIsInstance(t1.toTimestamp(), pywikibot.Timestamp)
 self.assertRaises(ValueError, t2.toTimestamp)
 
+def test_WbTime_arithmetics(self):
+"""Test WbTime arithmetics."""
+repo = self.get_repo()
+t = pywikibot.WbTime(site=repo, year=1)
+t._timestamp = t.max
+delta = timedelta(days=1)
+t += delta
+self.assertEqual(t.toTimestr(), '+001-01-01T23:59:59Z')
+t -= delta
+self.assertEqual(t._timestamp, t.max)
+
+t = pywikibot.WbTime(site=repo, year=1)
+t._timestamp = t.min
+t -= delta
+self.assertEqual(t.toTimestr(), '-001-12-31T00:00:00Z')
+t += delta
+self.assertEqual(t._timestamp, t.min)
+
 def test_WbQuantity_integer(self):
 """Test WbQuantity for integer value."""
 q = pywikibot.WbQuantity(amount=1234, error=1)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add two missing functions to PostgresInstaller.php

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

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

Change subject: Add two missing functions to PostgresInstaller.php
..

Add two missing functions to PostgresInstaller.php

Bug: T148332
Change-Id: I043d1e9b2056d94717dc452d87cc5b3c856e4873
---
M includes/installer/PostgresInstaller.php
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/316233/1

diff --git a/includes/installer/PostgresInstaller.php 
b/includes/installer/PostgresInstaller.php
index 33e1a1f..027fe55 100644
--- a/includes/installer/PostgresInstaller.php
+++ b/includes/installer/PostgresInstaller.php
@@ -622,6 +622,36 @@
return $status;
}
 
+   /**
+* Return a path to the DBMS-specific SQL file if it exists,
+* otherwise default SQL file
+*
+* @param IDatabase $db
+* @param string $filename
+* @return string
+*/
+   private function getSqlFilePath( $db, $filename ) {
+   global $IP;
+
+   $dbmsSpecificFilePath = "$IP/maintenance/" . $db->getType() . 
"/$filename";
+   if ( file_exists( $dbmsSpecificFilePath ) ) {
+   return $dbmsSpecificFilePath;
+   } else {
+   return "$IP/maintenance/$filename";
+   }
+   }
+
+   /**
+* Return a path to the DBMS-specific schema file,
+* otherwise default to tables.sql
+*
+* @param IDatabase $db
+* @return string
+*/
+   public function getSchemaPath( $db ) {
+   return $this->getSqlFilePath( $db, 'tables.sql' );
+   }
+
public function getGlobalDefaults() {
// The default $wgDBmwschema is null, which breaks Postgres and 
other DBMSes that require
// the use of a schema, so we need to set it here

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I043d1e9b2056d94717dc452d87cc5b3c856e4873
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] integration/jenkins[master]: Update mw-install-postgresql to include the install script

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

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

Change subject: Update mw-install-postgresql to include the install script
..

Update mw-install-postgresql to include the install script

Bug: T22343
Bug: T39602
Change-Id: I58f01b1c1a5bffb92bed5036cd98d399fc7f5e00
---
M bin/mw-install-postgresql.sh
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/32/316232/1

diff --git a/bin/mw-install-postgresql.sh b/bin/mw-install-postgresql.sh
index 0fdaf41..14e106f 12
--- a/bin/mw-install-postgresql.sh
+++ b/bin/mw-install-postgresql.sh
@@ -1 +1,14 @@
-not-implemented.sh
\ No newline at end of file
+#!/bin/bash -eu
+
+. /srv/deployment/integration/slave-scripts/bin/mw-setup.sh
+
+# Run MediaWiki installer
+cd "$MW_INSTALL_PATH"
+php maintenance/install.php \
+   --confpath "$MW_INSTALL_PATH" \
+   --dbtype=postgres \
+   --dbname="$MW_DB" \
+   --dbpass=postgres \
+   --pass testpass \
+   TestWiki \
+   WikiAdmin

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58f01b1c1a5bffb92bed5036cd98d399fc7f5e00
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
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] integration/jenkins[master]: Drop script mw-install-postgre since it is a duplicate of mw...

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

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

Change subject: Drop script mw-install-postgre since it is a duplicate of 
mw-install-postgresql
..

Drop script mw-install-postgre since it is a duplicate of mw-install-postgresql

Change-Id: I3c5e64ab96eed14c132d362107afd8ad69884f0f
---
D bin/mw-install-postgre.sh
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/31/316231/1

diff --git a/bin/mw-install-postgre.sh b/bin/mw-install-postgre.sh
deleted file mode 12
index 0fdaf41..000
--- a/bin/mw-install-postgre.sh
+++ /dev/null
@@ -1 +0,0 @@
-not-implemented.sh
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c5e64ab96eed14c132d362107afd8ad69884f0f
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
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] integration/jenkins[master]: Add mw-teardown-postgresql for postgres

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

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

Change subject: Add mw-teardown-postgresql for postgres
..

Add mw-teardown-postgresql for postgres

Bug: T22343
Bug: T39602
Change-Id: Id47e81269a7e8886a0fdb2684e8f490351f98c92
---
A bin/mw-teardown-postgresql.sh
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/30/316230/1

diff --git a/bin/mw-teardown-postgresql.sh b/bin/mw-teardown-postgresql.sh
new file mode 100644
index 000..8a44f96
--- /dev/null
+++ b/bin/mw-teardown-postgresql.sh
@@ -0,0 +1,7 @@
+#!/bin/bash -eu
+
+. /srv/deployment/integration/slave-scripts/bin/mw-teardown.sh
+
+pgsql -U postgres  

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


[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Add French localization

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

Change subject: Add French localization
..


Add French localization

Thanks to Bastenbas

Change-Id: I663e5a3b34c224a33df145a2dca92f22d018bc48
---
M proveit.js
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/proveit.js b/proveit.js
index 9502207..7392b14 100755
--- a/proveit.js
+++ b/proveit.js
@@ -54,6 +54,21 @@
'proveit-no-template': 'Sin plantilla',
'proveit-no-references': 'No se han encontrado 
referencias'
},
+   'fr': {
+   'proveit-list-tab': 'Lister',
+   'proveit-add-tab': 'Ajouter',
+   'proveit-reference-name-label': 'Nom de la référence',
+   'proveit-reference-content-label': 'Contenu de la 
référence',
+   'proveit-reference-template-label': 'Modèle de 
présentation',
+   'proveit-cite-button': 'Réutiliser',
+   'proveit-remove-button': 'Supprimer',
+   'proveit-insert-button': 'Insérer',
+   'proveit-update-button': 'Mettre à jour',
+   'proveit-prompt-name': "La référence a besoin d'un nom 
pour être réutilisée:",
+   'proveit-confirm-remove': "Cela supprimera la référence 
dans tout l'article. Êtes-vous sûr?",
+   'proveit-no-template': 'Aucun modèle',
+   'proveit-no-references': 'Aucune référence trouvée'
+   },
'ru': {
'proveit-list-tab': 'Список',
'proveit-add-tab': 'Добавить',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I663e5a3b34c224a33df145a2dca92f22d018bc48
Gerrit-PatchSet: 1
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]: Add French localization

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

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

Change subject: Add French localization
..

Add French localization

Thanks to Bastenbas

Change-Id: I663e5a3b34c224a33df145a2dca92f22d018bc48
---
M proveit.js
1 file changed, 15 insertions(+), 0 deletions(-)


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

diff --git a/proveit.js b/proveit.js
index 9502207..7392b14 100755
--- a/proveit.js
+++ b/proveit.js
@@ -54,6 +54,21 @@
'proveit-no-template': 'Sin plantilla',
'proveit-no-references': 'No se han encontrado 
referencias'
},
+   'fr': {
+   'proveit-list-tab': 'Lister',
+   'proveit-add-tab': 'Ajouter',
+   'proveit-reference-name-label': 'Nom de la référence',
+   'proveit-reference-content-label': 'Contenu de la 
référence',
+   'proveit-reference-template-label': 'Modèle de 
présentation',
+   'proveit-cite-button': 'Réutiliser',
+   'proveit-remove-button': 'Supprimer',
+   'proveit-insert-button': 'Insérer',
+   'proveit-update-button': 'Mettre à jour',
+   'proveit-prompt-name': "La référence a besoin d'un nom 
pour être réutilisée:",
+   'proveit-confirm-remove': "Cela supprimera la référence 
dans tout l'article. Êtes-vous sûr?",
+   'proveit-no-template': 'Aucun modèle',
+   'proveit-no-references': 'Aucune référence trouvée'
+   },
'ru': {
'proveit-list-tab': 'Список',
'proveit-add-tab': 'Добавить',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I663e5a3b34c224a33df145a2dca92f22d018bc48
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]: Install postgresql on ci in php.pp

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

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

Change subject: Install postgresql on ci in php.pp
..

Install postgresql on ci in php.pp

Bug: T39602
Bug: T22343
Change-Id: I0cf75b7bd831055d2bcd71fc65078a1cbc028ed9
---
M modules/contint/manifests/packages/php.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/316228/1

diff --git a/modules/contint/manifests/packages/php.pp 
b/modules/contint/manifests/packages/php.pp
index 305050a..5a3e86a 100644
--- a/modules/contint/manifests/packages/php.pp
+++ b/modules/contint/manifests/packages/php.pp
@@ -43,6 +43,8 @@
 'php7.0-bcmath',
 'php7.0-mbstring',
 'php7.0-xml',
+'postgresql',
+'postgresql-contrib',
 ]:
 ensure  => latest,
 require => Apt::Repository['sury-php'],

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add an assert-databaseflavour script

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

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

Change subject: Add an assert-databaseflavour script
..

Add an assert-databaseflavour script

Change-Id: I04981b4aaa2dc41f85fb4763f7ef408943cb2b38
---
M jjb/macro.yaml
1 file changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/27/316227/1

diff --git a/jjb/macro.yaml b/jjb/macro.yaml
index 2c23b6b..c50d1a6 100644
--- a/jjb/macro.yaml
+++ b/jjb/macro.yaml
@@ -248,6 +248,43 @@
 exit 1
 fi
 
+# Assert 'database' is databaseflavor
+#
+# Parameter:
+# * databaseflavor: 'mysql' or 'sqlite' or 'postgres'
+#
+- builder:
+name: assert-databaseflavor
+builders:
+- shell: |
+#!/bin/bash -eu
+case "{databaseflavor}" in
+( 'mysql' )
+MATCHER='^MySQL'
+DATABASE_VERSION=`mysql --version`
+;;
+( 'sqlite' )
+MATCHER='^SQlite'
+DATABASE_VERSION=`sqlite --version`
+;;
+( 'postgresql' )
+MATCHER='^pgsql'
+DATABASE_VERSION=`pgsql -v`
+;;
+( * )
+echo "Invalid database '{databaseflavor}' for JJB macro 
'assert-databaseflavor'"
+echo "Must be either 'mysql' or 'sqlite' or 'postgresql'"
+exit 1
+;;
+esac
+
+if ( echo "$DATABASE_VERSION" | egrep "$MATCHER" > /dev/null ); 
then
+echo -e "database is {database}:\n\n$DATABASE_VERSION\n"
+else
+echo -e "Assertion error: php is not 
{phpflavor}:\n\n$PHP_VERSION\n"
+exit 1
+fi
+
 - builder:
 name: 'hhvm-clear-hhbc'
 builders:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[master]: Use Database::buildLike() and Database::anyString() in queries

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

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

Change subject: Use Database::buildLike() and Database::anyString() in queries
..

Use Database::buildLike() and Database::anyString() in queries

Bug: T147643
Change-Id: I86a30709fc73b9f9e53d217e0d485f115bebf5f3
---
M includes/GlobalBlocking.class.php
M includes/api/ApiQueryGlobalBlocks.php
2 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking 
refs/changes/26/316226/1

diff --git a/includes/GlobalBlocking.class.php 
b/includes/GlobalBlocking.class.php
index 3ce8e83..f74d21d 100644
--- a/includes/GlobalBlocking.class.php
+++ b/includes/GlobalBlocking.class.php
@@ -169,13 +169,16 @@
static function getRangeCondition( $ip ) {
$dbr = GlobalBlocking::getGlobalBlockingDatabase( DB_SLAVE );
 
-   $hex_ip = IP::toHex( $ip );
-   $ip_pattern = substr( $hex_ip, 0, 4 ) . '%'; // Don't bother 
checking blocks out of this /16.
-
+   $hexIp = IP::toHex( $ip );
+   // Don't bother checking blocks out of this /16.
+   // @todo Make the range limit configurable
+   $ipPattern = substr( $hexIp, 0, 4 );
+   $ipPattern = $dbr->buildLike( $ipPattern, $dbr->anyString() );
+   $quotedHex = $dbr->addQuotes( $hexIp );
$cond = [
-   'gb_range_start like ' . $dbr->addQuotes( $ip_pattern ),
-   'gb_range_start <= ' . $dbr->addQuotes( $hex_ip ),
-   'gb_range_end >= ' . $dbr->addQuotes( $hex_ip ), // 
This block in the given range.
+   "gb_range_start $ipPattern",
+   "gb_range_start <= $quotedHex",
+   "gb_range_end >= $quotedHex", // This block in the 
given range.
// @todo expiry shouldn't be in this function
'gb_expiry > ' . $dbr->addQuotes( $dbr->timestamp( 
wfTimestampNow() ) )
];
diff --git a/includes/api/ApiQueryGlobalBlocks.php 
b/includes/api/ApiQueryGlobalBlocks.php
index c1d6a99..4ad794e 100644
--- a/includes/api/ApiQueryGlobalBlocks.php
+++ b/includes/api/ApiQueryGlobalBlocks.php
@@ -95,7 +95,7 @@
}
$prefix = substr( $lower, 0, 4 );
$this->addWhere( [
-   "gb_range_start LIKE '$prefix%'",
+   'gb_range_start ' . $dbr->buildLike( 
$prefix, $dbr->anyString() ),
"gb_range_start <= '$lower'",
"gb_range_end >= '$upper'"
]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86a30709fc73b9f9e53d217e0d485f115bebf5f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix TitleFormatter::getPrefixedDBkey() call

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

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

Change subject: Fix TitleFormatter::getPrefixedDBkey() call
..

Fix TitleFormatter::getPrefixedDBkey() call

Bug: T148326
Change-Id: Iccad35d10be84ed334d2872812bc0fdc6c27f3ca
---
M handlers/TextHandler/TextHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/25/316225/1

diff --git a/handlers/TextHandler/TextHandler.php 
b/handlers/TextHandler/TextHandler.php
index 1b41f26..8ea8ebb 100644
--- a/handlers/TextHandler/TextHandler.php
+++ b/handlers/TextHandler/TextHandler.php
@@ -313,7 +313,7 @@
 */
function getPrefixedDBkey( $pageTitle ) {
if ( $pageTitle instanceof Title ) {
-   return TitleFormatter::getPrefixedDBkey( $pageTitle );
+   return $pageTitle->getPrefixedDBkey();
} elseif ( $pageTitle instanceof ForeignTitle ) {
return $pageTitle->getFullText();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccad35d10be84ed334d2872812bc0fdc6c27f3ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
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] mediawiki/core[master]: SpecialBooksources: Fix submitting the form from a subpage link

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

Change subject: SpecialBooksources: Fix submitting the form from a subpage link
..


SpecialBooksources: Fix submitting the form from a subpage link

Visiting Special:Booksources/ and then trying to enter a new
ISBN in the form field didn't work because the $par would take
precedence over the query parameter.

Removing the subpage from the HTMLForm context apparently fixes this.

Change-Id: Ia007648e23beadcc017e117e59ce3df1b329dcdc
---
M includes/specials/SpecialBooksources.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 2fef725..72e0b88 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -133,7 +133,9 @@
],
];
 
-   HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() 
)
+   $context = new DerivativeContext( $this->getContext() );
+   $context->setTitle( $this->getPageTitle() );
+   HTMLForm::factory( 'ooui', $formDescriptor, $context )
->setWrapperLegendMsg( 'booksources-search-legend' )
->setSubmitTextMsg( 'booksources-search' )
->setMethod( 'get' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia007648e23beadcc017e117e59ce3df1b329dcdc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Improve Special:BookSources validation and error messages

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

Change subject: Improve Special:BookSources validation and error messages
..


Improve Special:BookSources validation and error messages

Visiting Special:BookSources/invalid would not show any error message
because "invalid" would get stripped away by cleanIsbn(), and then
appear as the empty string.

Instead, first validate the provided ISBN (if any), and display the
error message if invalid. Then show the form and book details.

Tests included.

Also remove an unused variable.

Change-Id: I40b703eace956ebbcdc0a2c2986b2c10474dd1fd
---
M includes/specials/SpecialBooksources.php
M tests/phpunit/includes/specials/SpecialBooksourcesTest.php
2 files changed, 37 insertions(+), 20 deletions(-)

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



diff --git a/includes/specials/SpecialBooksources.php 
b/includes/specials/SpecialBooksources.php
index 11faa28..2fef725 100644
--- a/includes/specials/SpecialBooksources.php
+++ b/includes/specials/SpecialBooksources.php
@@ -29,11 +29,6 @@
  * @ingroup SpecialPage
  */
 class SpecialBookSources extends SpecialPage {
-   /**
-* ISBN passed to the page, if any
-*/
-   protected $isbn = '';
-
public function __construct() {
parent::__construct( 'Booksources' );
}
@@ -49,19 +44,21 @@
$this->setHeaders();
$this->outputHeader();
 
-   $this->isbn = self::cleanIsbn( $isbn ?: 
$this->getRequest()->getText( 'isbn' ) );
+   // User provided ISBN
+   $isbn = $isbn ?: $this->getRequest()->getText( 'isbn' );
+   $isbn = trim( $isbn );
 
-   $this->buildForm();
+   $this->buildForm( $isbn );
 
-   if ( $this->isbn !== '' ) {
-   if ( !self::isValidISBN( $this->isbn ) ) {
+   if ( $isbn !== '' ) {
+   if ( !self::isValidISBN( $isbn ) ) {
$out->wrapWikiMsg(
"\n$1\n",
'booksources-invalid-isbn'
);
}
 
-   $this->showList();
+   $this->showList( $isbn );
}
}
 
@@ -121,20 +118,22 @@
 
/**
 * Generate a form to allow users to enter an ISBN
+*
+* @param string $isbn
 */
-   private function buildForm() {
+   private function buildForm( $isbn ) {
$formDescriptor = [
'isbn' => [
'type' => 'text',
'name' => 'isbn',
'label-message' => 'booksources-isbn',
-   'default' => $this->isbn,
+   'default' => $isbn,
'autofocus' => true,
'required' => true,
],
];
 
-   $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, 
$this->getContext() )
+   HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() 
)
->setWrapperLegendMsg( 'booksources-search-legend' )
->setSubmitTextMsg( 'booksources-search' )
->setMethod( 'get' )
@@ -146,17 +145,19 @@
 * Determine where to get the list of book sources from,
 * format and output them
 *
+* @param string $isbn
 * @throws MWException
 * @return bool
 */
-   private function showList() {
+   private function showList( $isbn ) {
$out = $this->getOutput();
 
global $wgContLang;
 
+   $isbn = self::cleanIsbn( $isbn );
# Hook to allow extensions to insert additional HTML,
# e.g. for API-interacting plugins and so on
-   Hooks::run( 'BookInformation', [ $this->isbn, $out ] );
+   Hooks::run( 'BookInformation', [ $isbn, $out ] );
 
# Check for a local page such as Project:Book_sources and use 
that if available
$page = $this->msg( 'booksources' 
)->inContentLanguage()->text();
@@ -169,7 +170,7 @@
// XXX: in the future, this could be stored as 
structured data, defining a list of book sources
 
$text = $content->getNativeData();
-   $out->addWikiText( str_replace( 'MAGICNUMBER', 
$this->isbn, $text ) );
+   $out->addWikiText( str_replace( 'MAGICNUMBER', 
$isbn, $text ) );
 
return true;
} else {
@@ -182,7 +183,7 @@
$out->addHTML( '' );

[MediaWiki-commits] [Gerrit] mediawiki...TemplateSandbox[master]: Enable search/title suggestions for Preview page with this t...

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

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

Change subject: Enable search/title suggestions for Preview page with this 
template
..

Enable search/title suggestions for Preview page with this template

This should help finding the correct page title without trying around
or knowing the exact page title.

Bug: T148324
Change-Id: I709ef20f175e17e1c29a67394c14376a534c16ff
---
M TemplateSandbox.hooks.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index e633261..586be39 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -227,6 +227,7 @@
'tabindex' => ++$tabindex,
'size' => 60,
'spellcheck' => 'true',
+   'class' => 'mw-searchInput',
];
 
// EditPage::getContext() is available since 1.28+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I709ef20f175e17e1c29a67394c14376a534c16ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Add jsonp format and whitlist undercore in callback

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

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

Change subject: Add jsonp format and whitlist undercore in callback
..

Add jsonp format and whitlist undercore in callback

Underscore is needed in callback since jquery uses it

Change-Id: I962144e8a670cb869ef1bb0a2445e1d18efecf9a
---
M api/includes/ApiBase.php
1 file changed, 8 insertions(+), 4 deletions(-)


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

diff --git a/api/includes/ApiBase.php b/api/includes/ApiBase.php
index fa63875..8fce128 100644
--- a/api/includes/ApiBase.php
+++ b/api/includes/ApiBase.php
@@ -36,8 +36,8 @@
$params = [
'format' => [ ApiBase::PARAM_DFLT => 'xmlfm',
ApiBase::PARAM_TYPE => $dbMiserMode
-   ? [ 'json', 'xml', 'xmlfm' ]
-   : [ 'csv', 'dynamickml', 'kml', 'gpx', 
'googlemaps', 'poi', 'html', 'htmllist', 'layar', 'json', 'osm', 'xml', 
'xmlfm', 'wikitable' ] ],
+   ? [ 'json', 'jsonp', 'xml', 'xmlfm' ]
+   : [ 'csv', 'dynamickml', 'kml', 'gpx', 
'googlemaps', 'poi', 'html', 'htmllist', 'layar', 'json', 'osm', 'xml', 
'xmlfm', 'wikitable', 'jsonp' ] ],
'callback' => [ ApiBase::PARAM_DFLT => false, 
ApiBase::PARAM_TYPE => 'callback' ],
'limit' => [ ApiBase::PARAM_MIN => 0, 
ApiBase::PARAM_MAX => $dbMiserMode ? 500 : 5000,
ApiBase::PARAM_DFLT => 100, ApiBase::PARAM_TYPE 
=> 'integer' ],
@@ -98,7 +98,7 @@
$cache[$name] = 
$allowed[$name][ApiBase::PARAM_DFLT];
}
} elseif ( $p == 'callback' ) {
-   if ( !preg_match( '/^[A-Za-z0-9]+$/', 
$_GET[$name] ) ) {
+   if ( !preg_match( '/^[A-Za-z0-9_]+$/', 
$_GET[$name] ) ) {
$this->setError( 
'bad-callback-name', $_GET[$name] );
$cache[$name] = 
$allowed[$name][ApiBase::PARAM_DFLT];
} else {
@@ -205,7 +205,11 @@
 * @return FormatBase
 */
function getFormatter() {
-   $formatter = "Format" . ucfirst( $this->getParam( 'format' ) );
+   if ( $this->getParam( 'format' ) == 'jsonp' ) {
+   $formatter = "FormatJson";
+   } else {
+   $formatter = "Format" . ucfirst( $this->getParam( 
'format' ) );
+   }
return new $formatter( $this );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I962144e8a670cb869ef1bb0a2445e1d18efecf9a
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Simplify boolean expression and return statement

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

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

Change subject: [IMPR] Simplify boolean expression and return statement
..

[IMPR] Simplify boolean expression and return statement

- Don't check for other instances if we already found an item.

Change-Id: I2a59e04bf429daabd2408e0b2b064feb19df373a
---
M pywikibot/page.py
1 file changed, 5 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/22/316222/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 79aefc3..fbab94f 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4637,14 +4637,12 @@
 @rtype: bool
 """
 if (isinstance(self.target, pywikibot.ItemPage) and
-isinstance(value, basestring) and
-self.target.id == value):
-return True
+isinstance(value, basestring)):
+return self.target.id == value
 
 if (isinstance(self.target, pywikibot.WbTime) and
-not isinstance(value, pywikibot.WbTime) and
-self.target.year == int(value)):
-return True
+not isinstance(value, pywikibot.WbTime)):
+return self.target.year == int(value)
 
 if (isinstance(self.target, pywikibot.Coordinate) and
 isinstance(value, basestring)):
@@ -4662,10 +4660,7 @@
 return (abs(self.target.lat - coord_args[0]) <= precision and
 abs(self.target.lon - coord_args[1]) <= precision)
 
-if self.target == value:
-return True
-
-return False
+return self.target == value
 
 def has_qualifier(self, qualifier_id, target):
 """

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

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

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


[MediaWiki-commits] [Gerrit] labs...ptable[master]: Remove 'sorted' from fake_globals

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

Change subject: Remove 'sorted' from fake_globals
..


Remove 'sorted' from fake_globals

Added with commit 452cf1473fa2274210064d54f41d465bc8d56f2d,
not needed since commit aab63da5e88d7fddd560ee22f4044fd8460fbefb.

Change-Id: If0e174cdb8b4169f20d905270e7fbb0a98bc28a5
---
M app.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app.py b/app.py
index 9cf9f0b..a82ba52 100644
--- a/app.py
+++ b/app.py
@@ -39,7 +39,7 @@
 element_provider_class = chemistry.SparqlElementProvider
 nuclide_provider_class = nuclides.SparqlNuclideProvider
 
-fake_globals = {'isinstance': isinstance, 'sorted': sorted}
+fake_globals = {'isinstance': isinstance}
 for key in ('EmptyCell', 'UnknownCell', 'ElementCell', 'IndicatorCell'):
 fake_globals[key] = getattr(chemistry, key)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0e174cdb8b4169f20d905270e7fbb0a98bc28a5
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/ptable
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...ptable[master]: Remove 'sorted' from fake_globals

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

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

Change subject: Remove 'sorted' from fake_globals
..

Remove 'sorted' from fake_globals

Added with commit 452cf1473fa2274210064d54f41d465bc8d56f2d,
not needed since commit aab63da5e88d7fddd560ee22f4044fd8460fbefb.

Change-Id: If0e174cdb8b4169f20d905270e7fbb0a98bc28a5
---
M app.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/ptable 
refs/changes/21/316221/1

diff --git a/app.py b/app.py
index 9cf9f0b..a82ba52 100644
--- a/app.py
+++ b/app.py
@@ -39,7 +39,7 @@
 element_provider_class = chemistry.SparqlElementProvider
 nuclide_provider_class = nuclides.SparqlNuclideProvider
 
-fake_globals = {'isinstance': isinstance, 'sorted': sorted}
+fake_globals = {'isinstance': isinstance}
 for key in ('EmptyCell', 'UnknownCell', 'ElementCell', 'IndicatorCell'):
 fake_globals[key] = getattr(chemistry, key)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0e174cdb8b4169f20d905270e7fbb0a98bc28a5
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/ptable
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: pooler-loop: ignore unreachable/down pybals

2016-10-16 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: pooler-loop: ignore unreachable/down pybals
..


pooler-loop: ignore unreachable/down pybals

Change-Id: I0b8cfb1364717c66f389de7eb2633dd202574526
---
M modules/conftool/files/pooler_loop.rb
1 file changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/modules/conftool/files/pooler_loop.rb 
b/modules/conftool/files/pooler_loop.rb
index 5b10c47..f5dedc3 100755
--- a/modules/conftool/files/pooler_loop.rb
+++ b/modules/conftool/files/pooler_loop.rb
@@ -69,8 +69,18 @@
 end
 
 def check_pooled_state(ip, port, pool, host, want_pooled)
-  resp = Net::HTTP.start(ip, port) do |http|
-http.get "/pools/#{pool}/#{host}"
+  # Manage down or unresponsive pybals
+  http = Net::HTTP.new(ip, port)
+  http.open_timeout = 1
+  http.read_timeout = 2
+
+  begin
+resp = http.start do |http|
+  http.get "/pools/#{pool}/#{host}"
+end
+  rescue Timeout::Error
+# If pybal is down, don't care about it
+return true
   end
   # ignore 404s
   # rubocop:disable Style/CaseEquality

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b8cfb1364717c66f389de7eb2633dd202574526
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 
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]: pooler-loop: ignore unreachable/down pybals

2016-10-16 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: pooler-loop: ignore unreachable/down pybals
..

pooler-loop: ignore unreachable/down pybals

Change-Id: I0b8cfb1364717c66f389de7eb2633dd202574526
---
M modules/conftool/files/pooler_loop.rb
1 file changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/316219/1

diff --git a/modules/conftool/files/pooler_loop.rb 
b/modules/conftool/files/pooler_loop.rb
index 5b10c47..f5dedc3 100755
--- a/modules/conftool/files/pooler_loop.rb
+++ b/modules/conftool/files/pooler_loop.rb
@@ -69,8 +69,18 @@
 end
 
 def check_pooled_state(ip, port, pool, host, want_pooled)
-  resp = Net::HTTP.start(ip, port) do |http|
-http.get "/pools/#{pool}/#{host}"
+  # Manage down or unresponsive pybals
+  http = Net::HTTP.new(ip, port)
+  http.open_timeout = 1
+  http.read_timeout = 2
+
+  begin
+resp = http.start do |http|
+  http.get "/pools/#{pool}/#{host}"
+end
+  rescue Timeout::Error
+# If pybal is down, don't care about it
+return true
   end
   # ignore 404s
   # rubocop:disable Style/CaseEquality

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b8cfb1364717c66f389de7eb2633dd202574526
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Implement comparison for WbTime object

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

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

Change subject: [bugfix] Implement comparison for WbTime object
..

[bugfix] Implement comparison for WbTime object

Also some improvements are done:
- Time information is held by a Timestamp object. This enables an easy way
  to implement adding and subtracting WbTime objects further.
- In case of the date is outside the datetime year range (1..)
  the year is held by an instance variable and a dummy year (2000) is used
  for the internal _timestamp.
- Use is_datetime_year() method to check whether the WbTime is inside
  the datetime year range
- Use toTimestamp to get the Timestamp object
- The year property gives the year. All other properties (month, day, hour,
  minute, second) are fetched from the Timestamp object directly
  (via __getattr__()). Other properties and methods are also passed through
  but only if we have a datetime year (to be sure).
- All so-called rich comparison methods ar implemented to compare WbType
  instances
- Reworking of the toTimestr() which is a modification of isoformat
- Rewrite of the precision autodetection which only checks the first valid
  occurance of the time parameter instead of overwriting the assignmet over
  and over again. This may be a breaking change because the precision is
  defined by the lowest valid value except of the highest invalid value.
- Assign the default values to the Timestamp constructor. There is no need
  to hold it locally or as instance variable.
- Change doc string to keep lines beneath 80 chars.
- Remove unneeded FORMATSTR class constant.
- A lot of tests added.

Bug: T148280
Change-Id: If25b71e9d0fd04634a8bfaa783598e48d4226209
---
M pywikibot/__init__.py
M tests/wikibase_tests.py
2 files changed, 133 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/20/316220/1

diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 37f03bb..14ad924 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -416,8 +416,6 @@
  'second': 14
  }
 
-FORMATSTR = '{0:+012d}-{1:02d}-{2:02d}T{3:02d}:{4:02d}:{5:02d}Z'
-
 _items = ('year', 'month', 'day', 'hour', 'minute', 'second',
   'precision', 'before', 'after', 'timezone', 'calendarmodel')
 
@@ -432,11 +430,15 @@
 readable string, e.g., 'hour'. If no precision is given, it is set
 according to the given time units.
 
-Timezone information is given in three different ways depending on the 
time:
-* Times after the implementation of UTC (1972): as an offset from UTC 
in minutes;
-* Times before the implementation of UTC: the offset of the time zone 
from universal time;
-* Before the implementation of time zones: The longitude of the place 
of
-  the event, in the range −180° to 180°, multiplied by 4 to convert to 
minutes.
+Timezone information is given in three different ways depending on the
+time:
+* Times after the implementation of UTC (1972): as an offset from UTC
+  in minutes;
+* Times before the implementation of UTC: the offset of the time zone
+  from universal time;
+* Before the implementation of time zones: The longitude of the place
+  of the event, in the range −180° to 180°, multiplied by 4 to convert
+  to minutes.
 
 @param year: The year as a signed integer of between 1 and 16 digits.
 @type year: long
@@ -452,11 +454,11 @@
 @type second: int
 @param precision: The unit of the precision of the time.
 @type precision: int or str
-@param before: Number of units after the given time it could be, if 
uncertain.
-The unit is given by the precision.
+@param before: Number of units after the given time it could be,
+if uncertain. The unit is given by the precision.
 @type before: int
-@param after: Number of units before the given time it could be, if 
uncertain.
-The unit is given by the precision.
+@param after: Number of units before the given time it could be,
+if uncertain. The unit is given by the precision.
 @type after: int
 @param timezone: Timezone information in minutes.
 @type timezone: int
@@ -467,37 +469,6 @@
 """
 if year is None:
 raise ValueError('no year given')
-self.precision = self.PRECISION['second']
-if second is None:
-self.precision = self.PRECISION['minute']
-second = 0
-if minute is None:
-self.precision = self.PRECISION['hour']
-minute = 0
-if hour is None:
-self.precision = self.PRECISION['day']
-hour = 0
-if day is None:
-self.precision = self.PRECISION['month']
-  

[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2016-10-16T10:00:01+0000

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

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

Change subject: New Wikidata Build - 2016-10-16T10:00:01+
..

New Wikidata Build - 2016-10-16T10:00:01+

Change-Id: I852ac036cd98ea0687f9f258d1e6b910bae140fa
---
M composer.lock
M extensions/ValueView/RELEASE-NOTES.md
M extensions/ValueView/ValueView.php
M extensions/ValueView/i18n/en.json
M extensions/ValueView/i18n/qqq.json
M extensions/ValueView/lib/jquery.ui/jquery.ui.commonssuggester.js
M extensions/ValueView/src/experts/GlobeCoordinateInput.js
M extensions/ValueView/src/experts/resources.php
M extensions/ValueView/src/jquery.valueview.valueview.js
A extensions/ValueView/tests/lib/jquery.ui/jquery.ui.commonssuggester.tests.js
M extensions/ValueView/tests/lib/jquery.ui/jquery.ui.suggester.tests.js
M extensions/ValueView/tests/lib/resources.php
M extensions/Wikibase/client/i18n/diq.json
M extensions/Wikibase/client/i18n/pl.json
M extensions/Wikibase/client/i18n/sd.json
M extensions/Wikibase/client/i18n/vro.json
M extensions/Wikibase/client/i18n/zh-hant.json
M extensions/Wikibase/client/includes/Specials/SpecialEntityUsage.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
M extensions/Wikibase/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
M extensions/Wikibase/repo/i18n/cs.json
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/fr.json
M extensions/Wikibase/repo/i18n/it.json
M extensions/Wikibase/repo/i18n/lb.json
M extensions/Wikibase/repo/i18n/pl.json
M extensions/Wikibase/repo/i18n/pt.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/i18n/sd.json
M extensions/Wikibase/repo/i18n/sv.json
M extensions/Wikibase/repo/i18n/zh-hans.json
M extensions/Wikibase/repo/includes/Actions/SubmitEntityAction.php
M 
extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.RankSelector.js
M extensions/Wikibase/view/resources/jquery/wikibase/resources.php
M vendor/composer/installed.json
38 files changed, 464 insertions(+), 78 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 9cadb17..831f29f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -674,16 +674,16 @@
 },
 {
 "name": "data-values/value-view",
-"version": "0.17.4",
+"version": "0.18.0",
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/data-values-value-view.git;,
-"reference": "094a35216990d62daf104037edd3d593d406d80d"
+"reference": "5938027bbbad63e54cfa0266db211bac5fa902b2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/094a35216990d62daf104037edd3d593d406d80d;,
-"reference": "094a35216990d62daf104037edd3d593d406d80d",
+"url": 
"https://api.github.com/repos/wikimedia/data-values-value-view/zipball/5938027bbbad63e54cfa0266db211bac5fa902b2;,
+"reference": "5938027bbbad63e54cfa0266db211bac5fa902b2",
 "shasum": ""
 },
 "require": {
@@ -721,7 +721,7 @@
 ],
 "description": "Provides JS widgets to edit values defined by the 
DataValues library",
 "homepage": "https://www.mediawiki.org/wiki/Extension:ValueView;,
-"time": "2016-10-05 14:27:34"
+"time": "2016-10-14 12:19:21"
 },
 {
 "name": "diff/diff",
@@ -1574,12 +1574,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "7f7a926567984089c1c157da35f19260d18bd7c9"
+"reference": "a306d01a8be6e9648bef0506cc39772ab48311b2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7f7a926567984089c1c157da35f19260d18bd7c9;,
-"reference": "7f7a926567984089c1c157da35f19260d18bd7c9",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a306d01a8be6e9648bef0506cc39772ab48311b2;,
+"reference": "a306d01a8be6e9648bef0506cc39772ab48311b2",
 "shasum": ""
 },
 "require": {
@@ -1593,7 +1593,7 @@
 "data-values/serialization": "~1.1",
 "data-values/time": "~0.8.4",
 "data-values/validators": "~0.1.0",
-

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Allow the wmde LDAP group to access pivot.w.o

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

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

Change subject: Allow the wmde LDAP group to access pivot.w.o
..

Allow the wmde LDAP group to access pivot.w.o

Change-Id: Ic9672cab4e516c394fa675612bfb2e691b8316f9
---
M modules/statistics/templates/pivot.wikimedia.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/316217/1

diff --git a/modules/statistics/templates/pivot.wikimedia.org.erb 
b/modules/statistics/templates/pivot.wikimedia.org.erb
index c1df67f..5399cda 100644
--- a/modules/statistics/templates/pivot.wikimedia.org.erb
+++ b/modules/statistics/templates/pivot.wikimedia.org.erb
@@ -27,6 +27,7 @@
 AuthLDAPURL "ldaps://ldap-labs.eqiad.wikimedia.org 
ldap-labs.codfw.wikimedia.org/ou=people,dc=wikimedia,dc=org?cn"
 Require ldap-group cn=wmf,ou=groups,dc=wikimedia,dc=org
 Require ldap-group cn=nda,ou=groups,dc=wikimedia,dc=org
+Require ldap-group cn=wmde,ou=groups,dc=wikimedia,dc=org
 
 
 CustomLog /var/log/apache2/pivot.wikimedia.org-access.log wmf

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Let Wikibase publlish its docs

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

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

Change subject: Let Wikibase publlish its docs
..

Let Wikibase publlish its docs

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/16/316216/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 70aec54..425aa7a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -8049,6 +8049,8 @@
   - mwext-Wikibase-repo-tests-sqlite-php55
   - mwext-Wikibase-client-tests-mysql-php55
   - mwext-Wikibase-client-tests-sqlite-php55
+postmerge:
+  - mwext-doxygen-publish
 
   - name: mediawiki/extensions/WikibaseJavaScriptApi
 template:

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

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

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