[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix token match warning for token ending improperly

2016-11-05 Thread Harish halo (Code Review)
Harish halo has uploaded a new change for review.

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

Change subject: Fix token match warning for token ending improperly
..

Fix token match warning for token ending improperly

To give warning if token ends for example with "\",Fixed by matching the
end of $token string with urldecode(User::EDIT_TOKEN_SUFFIX).

Bug: T122280
Change-Id: Icdafcd7c65e018d96075a138979659a475e40906
---
M includes/api/ApiCheckToken.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/320076/1

diff --git a/includes/api/ApiCheckToken.php b/includes/api/ApiCheckToken.php
index ce1adca..69b43b7 100644
--- a/includes/api/ApiCheckToken.php
+++ b/includes/api/ApiCheckToken.php
@@ -39,7 +39,7 @@
$tokenObj = ApiQueryTokens::getToken(
$this->getUser(), $this->getRequest()->getSession(), 
$salts[$params['type']]
);
-   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) ){
+   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) ) {
$res['result'] = 'Warning';
 }
elseif ( $tokenObj->match( $token, $maxage ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icdafcd7c65e018d96075a138979659a475e40906
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Harish halo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: syntx err

2016-11-05 Thread Harish halo (Code Review)
Harish halo has uploaded a new change for review.

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

Change subject: syntx err
..

syntx err

Change-Id: I768388fe1c7dfe415781c1ef5d97692ac35aa1f2
---
M includes/api/ApiCheckToken.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/api/ApiCheckToken.php b/includes/api/ApiCheckToken.php
index 9c023e9..69b43b7 100644
--- a/includes/api/ApiCheckToken.php
+++ b/includes/api/ApiCheckToken.php
@@ -39,7 +39,7 @@
$tokenObj = ApiQueryTokens::getToken(
$this->getUser(), $this->getRequest()->getSession(), 
$salts[$params['type']]
);
-   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) {
+   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) ) {
$res['result'] = 'Warning';
 }
elseif ( $tokenObj->match( $token, $maxage ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I768388fe1c7dfe415781c1ef5d97692ac35aa1f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Harish halo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ix token match warning for token ending improperly

2016-11-05 Thread Harish halo (Code Review)
Harish halo has uploaded a new change for review.

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

Change subject: ix token match warning for token ending improperly
..

ix token match warning for token ending improperly

To give warning if token ends for example with "\",Fixed by matching the
end of $token string with urldecode(User::EDIT_TOKEN_SUFFIX).

Bug: T122280
Change-Id: Ief05a61ee01e0e3480cb9ccee83e0eb688a10885
---
M includes/api/ApiCheckToken.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/api/ApiCheckToken.php b/includes/api/ApiCheckToken.php
index 69b43b7..ce1adca 100644
--- a/includes/api/ApiCheckToken.php
+++ b/includes/api/ApiCheckToken.php
@@ -39,7 +39,7 @@
$tokenObj = ApiQueryTokens::getToken(
$this->getUser(), $this->getRequest()->getSession(), 
$salts[$params['type']]
);
-   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) ) {
+   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) ){
$res['result'] = 'Warning';
 }
elseif ( $tokenObj->match( $token, $maxage ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief05a61ee01e0e3480cb9ccee83e0eb688a10885
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Harish halo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix token match warning for token ending improperly

2016-11-05 Thread Harish halo (Code Review)
Harish halo has uploaded a new change for review.

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

Change subject: Fix token match warning for token ending improperly
..

Fix token match warning for token ending improperly

To give warning if token ends for example with "\",Fixed by matching the end
of $token string with urldecode(User::EDIT_TOKEN_SUFFIX).

Bug: T122280
Change-Id: I3fbedfda34d1b72d02120eb81030aa80781be1af
---
M includes/api/ApiCheckToken.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/api/ApiCheckToken.php b/includes/api/ApiCheckToken.php
index 0ddcc5c..9c023e9 100644
--- a/includes/api/ApiCheckToken.php
+++ b/includes/api/ApiCheckToken.php
@@ -41,6 +41,7 @@
);
if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) {
$res['result'] = 'Warning';
+}
elseif ( $tokenObj->match( $token, $maxage ) ) {
$res['result'] = 'valid';
} elseif ( $maxage !== null && $tokenObj->match( $token ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fbedfda34d1b72d02120eb81030aa80781be1af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Harish halo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix token match warning for token ending improperly

2016-11-05 Thread Harish halo (Code Review)
Harish halo has uploaded a new change for review.

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

Change subject: Fix token match warning for  token ending improperly
..

Fix token match warning for  token ending improperly

To give warning if token ends for example with "\",Fixed by matching the end
of $token string with urldecode(User::EDIT_TOKEN_SUFFIX).

Bug: T122280
Change-Id: Ifa494fa5dd480c4aa8a69ecbd5b8f8827809cccf
---
M includes/api/ApiCheckToken.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/includes/api/ApiCheckToken.php b/includes/api/ApiCheckToken.php
index 3d2159c..0ddcc5c 100644
--- a/includes/api/ApiCheckToken.php
+++ b/includes/api/ApiCheckToken.php
@@ -39,7 +39,9 @@
$tokenObj = ApiQueryTokens::getToken(
$this->getUser(), $this->getRequest()->getSession(), 
$salts[$params['type']]
);
-   if ( $tokenObj->match( $token, $maxage ) ) {
+   if ( $tokenObj->match( $token[strlen($token)-1], urldecode( 
User::EDIT_TOKEN_SUFFIX ) ) {
+   $res['result'] = 'Warning';
+   elseif ( $tokenObj->match( $token, $maxage ) ) {
$res['result'] = 'valid';
} elseif ( $maxage !== null && $tokenObj->match( $token ) ) {
$res['result'] = 'expired';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa494fa5dd480c4aa8a69ecbd5b8f8827809cccf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Harish halo 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Update language count in RELEASE NOTES

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

Change subject: Update language count in RELEASE NOTES
..


Update language count in RELEASE NOTES

We have 375 lanaguges not 350.

Change-Id: I5653274d9bec61c8b73a1ef0502ee7a56a058bcb
---
M RELEASE-NOTES-1.28
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 7009e94..7e23083 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -171,7 +171,7 @@
 
 === Languages updated in 1.28 ===
 
-MediaWiki supports over 350 languages. Many localisations are updated
+MediaWiki supports over 375 languages. Many localisations are updated
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Phabricator reports.
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5653274d9bec61c8b73a1ef0502ee7a56a058bcb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Update language count in RELEASE NOTES

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

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

Change subject: Update language count in RELEASE NOTES
..

Update language count in RELEASE NOTES

We have 375 lanaguges not 350.

Change-Id: I5653274d9bec61c8b73a1ef0502ee7a56a058bcb
---
M RELEASE-NOTES-1.28
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/320071/1

diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 7009e94..7e23083 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -171,7 +171,7 @@
 
 === Languages updated in 1.28 ===
 
-MediaWiki supports over 350 languages. Many localisations are updated
+MediaWiki supports over 375 languages. Many localisations are updated
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Phabricator reports.
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: WIP Edit image captions in place

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

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

Change subject: WIP Edit image captions in place
..

WIP Edit image captions in place

TODO: Work out how to disable certain tools when the caption
is being edited, e.g. lists, headings, etc. And also prevent
such content being dropped/pasted in.

Bug: T149753
Depends-On: I6ae92307a7260b4a7e092bdfe8104040df538363
Change-Id: I9baaa8634e9f364e78b3e881113ed8fa917bc76f
---
M extension.json
M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js
M modules/ve-mw/ce/styles/nodes/ve.ce.MWBlockImageNode.css
4 files changed, 18 insertions(+), 3 deletions(-)


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

diff --git a/extension.json b/extension.json
index bcc78ca..bad37b7 100644
--- a/extension.json
+++ b/extension.json
@@ -679,6 +679,7 @@

"lib/ve/src/ce/keydownhandlers/ve.ce.TableEnterKeyDownHandler.js",

"lib/ve/src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js",

"lib/ve/src/ce/nodes/ve.ce.GeneratedContentNode.js",
+   "lib/ve/src/ce/nodes/ve.ce.ActiveNode.js",
"lib/ve/src/ce/nodes/ve.ce.AlienNode.js",
"lib/ve/src/ce/nodes/ve.ce.ArticleNode.js",
"lib/ve/src/ce/nodes/ve.ce.BlockquoteNode.js",
@@ -833,6 +834,7 @@
],
"styles": [

"lib/ve/src/ce/styles/nodes/ve.ce.FocusableNode.css",
+   
"lib/ve/src/ce/styles/nodes/ve.ce.ActiveNode.css",

"lib/ve/src/ce/styles/nodes/ve.ce.AlienNode.css",

"lib/ve/src/ce/styles/nodes/ve.ce.BranchNode.css",

"lib/ve/src/ce/styles/nodes/ve.ce.ContentBranchNode.css",
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
index ea966ee..c8c12d9 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
@@ -68,7 +68,7 @@
this.updateSize();
 
// Mixin constructors
-   ve.ce.MWImageNode.call( this, this.$element, this.$image );
+   ve.ce.MWImageNode.call( this, this.$image, this.$image );
 };
 
 /* Inheritance */
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js
index f44fc51..d6f8da9 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWImageCaptionNode.js
@@ -10,6 +10,8 @@
  *
  * @class
  * @extends ve.ce.BranchNode
+ * @mixins ve.ce.ActiveNode
+ *
  * @constructor
  * @param {ve.dm.MWImageCaptionNode} model Model to observe
  * @param {Object} [config] Configuration options
@@ -17,11 +19,16 @@
 ve.ce.MWImageCaptionNode = function VeCeMWImageCaptionNode() {
// Parent constructor
ve.ce.MWImageCaptionNode.super.apply( this, arguments );
+
+   // Mixin constructor
+   ve.ce.ActiveNode.call( this );
 };
 
 /* Inheritance */
 
 OO.inheritClass( ve.ce.MWImageCaptionNode, ve.ce.BranchNode );
+
+OO.mixinClass( ve.ce.MWImageCaptionNode, ve.ce.ActiveNode );
 
 /* Static Properties */
 
@@ -55,7 +62,8 @@
 /** */
 ve.ce.MWImageCaptionNode.prototype.buildMagnify = function () {
this.$magnify = $( '' )
-   .addClass( 'magnify' );
+   .addClass( 'magnify' )
+   .prop( 'contentEditable', 'false' );
this.$a = $( '' )
.addClass( 'internal' )
.appendTo( this.$magnify );
diff --git a/modules/ve-mw/ce/styles/nodes/ve.ce.MWBlockImageNode.css 
b/modules/ve-mw/ce/styles/nodes/ve.ce.MWBlockImageNode.css
index ab20da6..25f373c 100644
--- a/modules/ve-mw/ce/styles/nodes/ve.ce.MWBlockImageNode.css
+++ b/modules/ve-mw/ce/styles/nodes/ve.ce.MWBlockImageNode.css
@@ -6,6 +6,11 @@
  */
 
 /* Override paragraph margins inside of captions */
-.ve-ce-mwBlockImageNode figcaption p {
+.ve-ce-mwBlockImageNode > figcaption p {
margin: 0 !important; /* stylelint-disable-line 
declaration-no-important */
 }
+
+.ve-ce-mwBlockImageNode > figcaption > .magnify {
+   cursor: default;
+   pointer-events: none; /* stylelint-disable-line 
no-unsupported-browser-features */
+}

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

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

___

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: (WIP) jsondata api

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

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

Change subject: (WIP) jsondata api
..

(WIP) jsondata api

Change-Id: I6b5f189690b52fc3b523a4087ba8d1e48755a879
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/JCDataApi.php
M includes/JCSingleton.php
5 files changed, 120 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index 17e57c0..233daeb 100644
--- a/extension.json
+++ b/extension.json
@@ -48,6 +48,7 @@
"JsonConfig\\JCContent": "includes/JCContent.php",
"JsonConfig\\JCContentHandler": "includes/JCContentHandler.php",
"JsonConfig\\JCContentView": "includes/JCContentView.php",
+   "JsonConfig\\JCDataApi": "includes/JCDataApi.php",
"JsonConfig\\JCDataContent": "includes/JCDataContent.php",
"JsonConfig\\JCDefaultContentView": 
"includes/JCDefaultContentView.php",
"JsonConfig\\JCDefaultObjContentView": 
"includes/JCDefaultObjContentView.php",
@@ -80,6 +81,9 @@
"AbortMove": [
"JsonConfig\\JCSingleton::onAbortMove"
],
+   "ApiMain::moduleManager": [
+   "JsonConfig\\JCSingleton::onApiMainModuleManager"
+   ],
"ArticleDeleteComplete": [
"JsonConfig\\JCSingleton::onArticleDeleteComplete"
],
diff --git a/i18n/en.json b/i18n/en.json
index f793339..f5352f4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -48,5 +48,10 @@
"apihelp-jsonconfig-param-content": "For $1command=reload, use this 
content instead.",
"apihelp-jsonconfig-example-1": "Show configuration",
"apihelp-jsonconfig-example-2": "Reset [[Zero:TEST]]",
-   "apihelp-jsonconfig-example-3": "Reload [[Zero:TEST]]"
+   "apihelp-jsonconfig-example-3": "Reload [[Zero:TEST]]",
+   "apihelp-jsondata-description": "Retrieve localized JSON data from the 
data storing wiki. This API only supports format=json and formatversion=2 or 
later.",
+   "apihelp-jsondata-param-namespace": "Namespace number of the title to 
get. If namespace \"Data\" (486) is defined, this parameter is optional.",
+   "apihelp-jsondata-param-title": "Title to get without namespace prefix. 
By default assumes namespace to be \"Data\"",
+   "apihelp-jsondata-example-1": "Get JSON content of the Sample.tab page, 
localized to user's language",
+   "apihelp-jsondata-example-2": "Get JSON content of the Sample.tab page 
localized to French"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 808707a..d62132a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -56,5 +56,10 @@
"apihelp-jsonconfig-param-content": 
"{{doc-apihelp-param|jsonconfig|content}}",
"apihelp-jsonconfig-example-1": "{{doc-apihelp-example|jsonconfig}}",
"apihelp-jsonconfig-example-2": "{{doc-apihelp-example|jsonconfig}}",
-   "apihelp-jsonconfig-example-3": "{{doc-apihelp-example|jsonconfig}}"
+   "apihelp-jsonconfig-example-3": "{{doc-apihelp-example|jsonconfig}}",
+   "apihelp-jsondata-description": "{{doc-apihelp-description|jsondata}}",
+   "apihelp-jsondata-param-namespace": 
"{{doc-apihelp-param|jsondata|namespace}}",
+   "apihelp-jsondata-param-title": "{{doc-apihelp-param|jsondata|title}}",
+   "apihelp-jsondata-example-1": "{{doc-apihelp-example|jsondata}}",
+   "apihelp-jsondata-example-2": "{{doc-apihelp-example|jsondata}}"
 }
diff --git a/includes/JCDataApi.php b/includes/JCDataApi.php
new file mode 100644
index 000..5b609d6
--- /dev/null
+++ b/includes/JCDataApi.php
@@ -0,0 +1,80 @@
+getMain()->getPrinter()->extractRequestParams();
+   if ( !( $this->getMain()->getPrinter() instanceof ApiFormatJson 
) ||
+!isset( $printerParams['formatversion'] )
+   ) {
+   $this->dieUsage( 'This module only supports format=json 
and format=jsonfm',
+   'invalidparammix' );
+   }
+   if ( $printerParams['formatversion'] == 1 ) {
+   $this->dieUsage( 'This module only supports 
formatversion=2 or later',
+   'invalidparammix' );
+   }
+
+   $params = $this->extractRequestParams();
+   $jct = JCSingleton::parseTitle( $params['title'], intval( 
$params['namespace'] ) );
+   if ( !$jct ) {
+   $this->dieUsageMsg( [ 'invalidtitle', $params['title'] 
] );
+   }
+
+   $data = JCSingleton::getContent( $jct );
+   if ( !$data ) {
+   $this->dieUsageMsg( [ 'invalidtitle', $jct ] );
+   } elseif ( !method_exists( $data, 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Factor out active node functionality from SectionNode

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

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

Change subject: Factor out active node functionality from SectionNode
..

Factor out active node functionality from SectionNode

Create a mixin we can use on other nodes that may have
active sections inside a ce=false.

Change-Id: I6ae92307a7260b4a7e092bdfe8104040df538363
---
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
A src/ce/nodes/ve.ce.ActiveNode.js
M src/ce/nodes/ve.ce.SectionNode.js
M src/ce/styles/nodes/ve.ce.SectionNode.css
M tests/index.html
7 files changed, 104 insertions(+), 61 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/68/320068/1

diff --git a/build/modules.json b/build/modules.json
index fcbf15b..9802ec6 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -379,6 +379,7 @@

"src/ce/keydownhandlers/ve.ce.TableEnterKeyDownHandler.js",

"src/ce/keydownhandlers/ve.ce.LinearTabKeyDownHandler.js",
"src/ce/nodes/ve.ce.GeneratedContentNode.js",
+   "src/ce/nodes/ve.ce.ActiveNode.js",
"src/ce/nodes/ve.ce.AlienNode.js",
"src/ce/nodes/ve.ce.ArticleNode.js",
"src/ce/nodes/ve.ce.BlockquoteNode.js",
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 7b88b5d..be3ff78 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -326,6 +326,7 @@



+   



diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index 4168a23..fa447a7 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -324,6 +324,7 @@



+   



diff --git a/src/ce/nodes/ve.ce.ActiveNode.js b/src/ce/nodes/ve.ce.ActiveNode.js
new file mode 100644
index 000..d028f5b
--- /dev/null
+++ b/src/ce/nodes/ve.ce.ActiveNode.js
@@ -0,0 +1,91 @@
+/*!
+ * VisualEditor ContentEditable ActiveNode class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see 
http://ve.mit-license.org
+ */
+
+/**
+ * Active nodes are editable sections that are nested inside
+ * uneditable sections.
+ *
+ * @class
+ * @abstract
+ *
+ * @constructor
+ */
+ve.ce.ActiveNode = function VeCeActiveNode() {
+   // Properties
+   this.activeNodeSurface = null;
+   this.isActiveNodeSetup = false;
+
+   // Events
+   this.connect( this, {
+   setup: 'onActiveNodeSetup',
+   teardown: 'onActiveNodeTeardown'
+   } );
+
+   // DOM changes
+   this.$element
+   .addClass( 've-ce-activeNode' )
+   .prop( { contentEditable: 'true', spellcheck: true } );
+};
+
+/* Inheritance */
+
+OO.initClass( ve.ce.ActiveNode, ve.ce.BranchNode );
+
+/* Methods */
+
+/**
+ * @inheritdoc
+ */
+ve.ce.ActiveNode.prototype.onActiveNodeSetup = function () {
+   // Exit if already setup or not attached
+   if ( this.isActiveNodeSetup || !this.root ) {
+   return;
+   }
+
+   this.activeNodeSurface = this.getRoot().getSurface();
+
+   // Events
+   this.activeNodeSurface.getModel().connect( this, { select: 
'onActiveNodeSurfaceModelSelect' } );
+
+   this.isActiveNodeSetup = true;
+};
+
+/**
+ * @inheritdoc
+ */
+ve.ce.ActiveNode.prototype.onActiveNodeTeardown = function () {
+   // Events
+   this.activeNodeSurface.getModel().disconnect( this );
+
+   this.isActiveNodeSetup = false;
+};
+
+/**
+ * Handle select events from the surface model.
+ *
+ * @param {ve.dm.Selection} selection Selection
+ */
+ve.ce.ActiveNode.prototype.onActiveNodeSurfaceModelSelect = function ( 
selection ) {
+   var coveringRange = selection.getCoveringRange(),
+   surface = this.activeNodeSurface,
+   activeNode = this;
+
+   if ( coveringRange && this.model.getRange().containsRange( new 
ve.Range( coveringRange.start ) ) ) {
+   // Only set this as the active node if active node is empty, or 
not a
+   // descendent of this node.
+   if ( !surface.getActiveNode() || 
!surface.getActiveNode().traverseUpstream( function ( node ) { return node !== 
activeNode; } ) ) {
+   surface.setActiveNode( this );
+   }
+   this.$element.addClass( 've-ce-activeNode-active' );
+   } else {
+   if ( surface.getActiveNode() === this ) {
+   surface.setActiveNode( null );
+   }
+   if ( !selection.isNull() ) {
+   this.$element.removeClass( 've-ce-activeNode-active' );
+   }
+   }
+};
diff --git a/src/ce/nodes/ve.ce.SectionNode.js 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Don't call static function dynamically

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

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

Change subject: Don't call static function dynamically
..

Don't call static function dynamically

Minor doc fixes

Bug: T150104
Change-Id: Ifd23685074c83e0cbb5482a4d3255f7499bdb174
---
M Question.php
M Quiz.class.php
2 files changed, 10 insertions(+), 9 deletions(-)


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

diff --git a/Question.php b/Question.php
index d7d355c..dc88150 100644
--- a/Question.php
+++ b/Question.php
@@ -90,7 +90,7 @@
/**
 * Determine the question's parameters.
 *
-* @param $matches Array: elements matching $parametersPattern
+* @param $matches array: elements matching $parametersPattern
 *  $matches[0] are the 
potential question parameters.
 */
function parseParameters( $matches ) {
@@ -335,7 +335,7 @@
 */
function parseTextField( $input ) {
global $wqInputId;
-   $wqInputId ++;
+   $wqInputId++;
$title = $state = $size = $maxlength = $class = $style = $value 
= $disabled = $a_inputBeg = $a_inputEnd = $big = '';
# determine size and maxlength of the input.
if( array_key_exists( 3, $input ) ) {
diff --git a/Quiz.class.php b/Quiz.class.php
index 917af70..84a1650 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -89,6 +89,7 @@
 * Displays an error message if the colorId doesn't exists.
 *
 * @param $colorId Integer: color hex code
+* @return string
 * @throws Exception
 */
public static function getColor( $colorId ) {
@@ -138,16 +139,16 @@
}
}
if( $this->mBeingCorrected ) {
-   $settings[0] .= '' .
+   $settings[0] .= '' .
'' . wfMessage( 'quiz_colorRight' )->escaped() . '';
-   $settings[1] .= '' .
+   $settings[1] .= '' .
'' . wfMessage( 'quiz_colorWrong' )->escaped() . '';
-   $settings[2] .= '' .
+   $settings[2] .= '' .
'' . wfMessage( 'quiz_colorNA' )->escaped() . '';
}
if( $this->mState == 'error' ) {
$errorKey = $this->mBeingCorrected ? 3 : 0;
-   $settings[$errorKey] .= 'getColor( 'error' ) . '">' .
+   $settings[$errorKey] .= '' .
'' 
. wfMessage( 'quiz_colorError' )->escaped() . '';
}
# Build the settings table.
@@ -200,7 +201,7 @@
/**
 * Include text between  and  from another page to this 
quiz.
 *
-* @param $matches Array: elements matching $includePattern.
+* @param $matches array: elements matching $includePattern.
 *  $matches[1] is 
the page title.
 * @return mixed|string
 */
@@ -260,7 +261,7 @@
/**
 * Convert a question from quiz syntax to HTML
 *
-* @param $matches Array: elements matching $questionPattern.
+* @param $matches array: elements matching $questionPattern.
 *  $matches[1] is the 
question header.
 *  $matches[3] is the 
question object.
 * @return string
@@ -310,7 +311,7 @@
if( $lState != '' ) {
global $wgContLang;
$border = $wgContLang->isRTL() ? 'border-right' : 
'border-left';
-   $output .= "style=\"$border:3px solid " . 
$this->getColor( $lState ) . '"';
+   $output .= "style=\"$border:3px solid " . 
self::getColor( $lState ) . '"';
if( $this->mIgnoringCoef ) {
$question->mCoef = 1;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd23685074c83e0cbb5482a4d3255f7499bdb174
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
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...Quiz[master]: Move Question to it's own php file

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

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

Change subject: Move Question to it's own php file
..

Move Question to it's own php file

Change-Id: If96b28a48762692f48f8c7854580f271ae454cbb
---
A Question.php
M Quiz.class.php
M extension.json
3 files changed, 440 insertions(+), 439 deletions(-)


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

diff --git a/Question.php b/Question.php
new file mode 100644
index 000..d7d355c
--- /dev/null
+++ b/Question.php
@@ -0,0 +1,439 @@
+mRequest = &$wgRequest;
+   $this->mQuestionId = $questionId;
+   $this->mBeingCorrected = $beingCorrected;
+   $this->mCaseSensitive = $caseSensitive;
+   $this->mParser = $parser;
+   $this->mState = ( $beingCorrected ) ? 'NA' : '';
+   $this->mType = 'multipleChoice';
+   $this->mCoef = 1;
+   $this->mProposalPattern = '`^([+-]) ?(.*)`';
+   $this->mCorrectionPattern   = '`^\|\|(.*)`';
+   $this->mCategoryPattern = '`^\|(\n|[^\|].*\n)`';
+   $this->mTextFieldPattern= '`\{ ([^\}]*?)(_([\d]*) ?| 
)\}`';
+   }
+
+   /**
+* Mutator of the question state
+*
+* @protected
+* @param $pState String:
+*/
+   function setState( $pState ) {
+   if (
+   $pState == 'error' ||
+   ( $pState == 'wrong' && $this->mState != 'error' ) ||
+   ( $pState == 'right' && ( $this->mState == 'NA' || 
$this->mState == 'na_right' ) ) ||
+   ( $pState == 'na_wrong' && ( $this->mState == 'NA' || 
$this->mState == 'na_right' ) ) ||
+   ( $pState == 'na_right' && ( $this->mState == 'NA' ) ) 
||
+   ( $pState == 'new_NA' && ( $this->mState == 'NA' || 
$this->mState == 'right' ) )
+   )
+   {
+   $this->mState = $pState;
+   }
+   # Special cases
+   if( ( $pState == 'na_wrong' && $this->mState == 'right' ) || ( 
$pState == 'right' && $this->mState == 'na_wrong' ) ) {
+   $this->mState = 'wrong';
+   }
+   return;
+   }
+
+   /**
+* Accessor of the question state.
+*
+* @protected
+*/
+   function getState() {
+   if ( $this->mState == 'na_right' ) {
+   return 'right';
+   } elseif ( $this->mState == 'na_wrong' || $this->mState == 
'new_NA' ) {
+   return 'NA';
+   } else {
+   return $this->mState;
+   }
+   }
+
+   /**
+* Convert the question's header into HTML.
+*
+* @param $input String: the quiz header in quiz syntax.
+* @return string
+*/
+   function parseHeader( $input ) {
+   $parametersPattern = '`\n\|([^\|].*)\s*$`';
+   $input = preg_replace_callback( $parametersPattern, array( 
$this, 'parseParameters' ), $input );
+   $splitHeaderPattern = '`\n\|\|`';
+   $unparsedHeader = preg_split( $splitHeaderPattern, $input );
+   $output = $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[0] ) . "\n" );
+   if( array_key_exists( 1, $unparsedHeader ) ) {
+   $output .= '';
+   $output .= '' .
+   $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[1] ) ) .
+   '';
+   $output .= '';
+   }
+   return $output;
+   }
+
+   /**
+* Determine the question's parameters.
+*
+* @param $matches Array: elements matching $parametersPattern
+*  $matches[0] are the 
potential question parameters.
+*/
+   function parseParameters( $matches ) {
+   $typePattern = '`t[yi]p[eo]?="(.*?)"`';
+   if( preg_match( $typePattern, $matches[1], $type ) ) {
+   # List of all object type code and the correspondant 
question type.
+   switch( $type[1] ) {
+   case '{}':
+   $this->mType = 'textField';
+   break;
+   case '()':
+   $this->mType = 'singleChoice';
+   break;
+   case '[]':
+   $this->mType = 'multipleChoice';
+   break;
+   }
+   }
+   $coefPattern = 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Removing Hardcoded Css and $wgContLang from parseQuiz() func...

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

Change subject: Removing Hardcoded Css and $wgContLang from parseQuiz() 
function.
..


Removing Hardcoded Css and $wgContLang from parseQuiz() function.

Bug: T40372
Change-Id: I69d95d153d6d1da1e019ae5ad2c3e7a4667971b5
---
M Quiz.class.php
M modules/ext.quiz.css
2 files changed, 39 insertions(+), 15 deletions(-)

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



diff --git a/Quiz.class.php b/Quiz.class.php
index 06a65e0..f1d8e2a 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -108,22 +108,8 @@
function parseQuiz( $input ) {
# Ouput the style and the script to the header once for all.
if( $this->mQuizId == 0 ) {
-   global $wgContLang;
-   $start = $wgContLang->isRTL() ? 'right' : 'left';
-   $end = $wgContLang->isRTL() ? 'left' : 'right';
-   $head  = "\n";
-   $head .= ".quiz .question { margin-$start: 2em; }\n";
-   $head .= ".quiz .margin { padding-$start: 20px; }\n";
-   $head .= ".quiz .header .questionId { font-size: 1.1em; 
font-weight: bold; float: $start;}\n";
-   $head .= ".quiz a.input em { color:black; 
background-color:#DFDFDF; margin-$end:1px; }\n";
-   $head .= ".quiz a.input input { padding-$start:2px; 
border:0; }\n";
-
-   $head .= '.quiz .correction { background-color: ' . 
Quiz::getColor( 'correction' ) . ";}\n";
-   $head .= ".quiz a.input span.correction { padding:3px; 
margin:0; list-style-type:none; display:none; background-color:" . 
Quiz::getColor( 'correction' ) . "; }\n";
-   $head .= "\n";
global $wgOut;
 
-   $wgOut->addScript( $head );
$wgOut->addModules( 'ext.quiz' );
}
 
diff --git a/modules/ext.quiz.css b/modules/ext.quiz.css
index 311a2c7..c03834c 100644
--- a/modules/ext.quiz.css
+++ b/modules/ext.quiz.css
@@ -19,12 +19,50 @@
 }
 
 .quiz table.settings {
-   background-color: transparent; }
+   background-color: transparent;
+}
 
 .quiz .sign {
text-align: center;
 }
 
+.quiz .question {
+   margin-left: 2em;
+}
+
+.quiz .margin {
+   padding-left: 20px;
+}
+
+.quiz .header .questionId {
+   font-size: 1.1em;
+   font-weight: bold;
+   float: left;
+}
+
+.quiz a.input em {
+   color: black;
+   background-color: #DFDFDF;
+   margin-right: 1px;
+}
+
+.quiz a.input input {
+   padding-left: 2px;
+   border: 0;
+}
+
+.quiz .correction {
+   background-color: #F9F9F9;
+}
+
+.quiz a.input span.correction {
+   padding: 3px;
+   margin: 0;
+   list-style-type: none;
+   display: none;
+   background-color: #F9F9F9;
+}
+
 .quiz a.input, .quiz a.input:hover, .quiz a.input:active, .quiz 
a.input:visited {
text-decoration: none;
color: black;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69d95d153d6d1da1e019ae5ad2c3e7a4667971b5
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Harjotsingh 
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...Citoid[master]: Ensure inserted reference gets selected

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

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

Change subject: Ensure inserted reference gets selected
..

Ensure inserted reference gets selected

Upstream changes means we can't rely on the surface
to expand the selection, so do it explicitly with
the surface fragment.

Change-Id: I44a67639dfa40728b8322e557d020c4a947c5557
---
M modules/ve.ui.CiteFromIdInspector.js
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid 
refs/changes/65/320065/1

diff --git a/modules/ve.ui.CiteFromIdInspector.js 
b/modules/ve.ui.CiteFromIdInspector.js
index aa8f60a..b5e2e52 100644
--- a/modules/ve.ui.CiteFromIdInspector.js
+++ b/modules/ve.ui.CiteFromIdInspector.js
@@ -416,6 +416,7 @@
 ve.ui.CiteFromIdInspector.prototype.getSetupProcess = function ( data ) {
return ve.ui.CiteFromIdInspector.super.prototype.getSetupProcess.call( 
this, data )
.next( function () {
+   var fragment;
 
// Reset
this.lookupPromise = null;
@@ -441,12 +442,14 @@
 
if ( this.inDialog !== 'reference' ) {
this.staging = true;
+   fragment = this.getFragment();
// Stage an empty reference
-   
this.getFragment().getSurface().pushStaging();
+   fragment.getSurface().pushStaging();
 
// Insert an empty reference
-   this.referenceModel.insertInternalItem( 
this.getFragment().getSurface() );
-   
this.referenceModel.insertReferenceNode( this.getFragment(), true );
+   this.referenceModel.insertInternalItem( 
fragment.getSurface() );
+   
this.referenceModel.insertReferenceNode( fragment, true );
+   fragment.select();
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44a67639dfa40728b8322e557d020c4a947c5557
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
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] translatewiki[master]: Remove some deleted extension

2016-11-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: Remove some deleted extension
..


Remove some deleted extension

https://gerrit.wikimedia.org/r/#/c/319959/

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

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index b8cf16e..0c589b2 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -83,10 +83,6 @@
 ignored = antispoof-conflict-item, antispoof-bad-char-non-printable
 optional = antispoof-bad-char
 
-# Discontinued.
-#APC
-#aliasfile = APC/APC.alias.php
-
 Api Explorer
 aliasfile = ApiExplorer/ApiExplorer.alias.php
 
@@ -1480,9 +1476,6 @@
 Maintenance Shell
 aliasfile = MaintenanceShell/MaintenanceShell.alias.php
 
-# Deleted Ib081c4e66e372a7f3a110e4e7299eb6d8634b282
-# Mantle
-
 Map Sources
 aliasfile = MapSources/MapSources.i18n.alias.php
 
@@ -2618,10 +2611,6 @@
 ignored = wikiforum-day-definition-new, wikiforum-max-threads-per-page, 
wikiforum-max-replies-per-page
 optional = group-forumadmin.css, group-forumadmin.js
 
-# Wikidata/Mobile specific, undeployed in August 2015
-# Wiki Grok
-# ignored = wikigrok-submission-summary
-
 # Wiki Labels // 2016-03-06: Stil extension boilerplate
 
 Wiki Lexical Data
@@ -2839,16 +2828,3 @@
 
 Zero Portal
 aliasfile = ZeroPortal/ZeroPortal.alias.php
-
-# Outdated, replaced by JsonConfig, ZeroBanner & ZeroPortal per Yuri
-#Zero Rated Mobile Access
-#file = ZeroRatedMobileAccess/i18n/core/%CODE%.json
-## Do not add the alias file for translation per Adam Baso, 2014-05-28
-##aliasfile = ZeroRatedMobileAccess/ZeroRatedMobileAccess.alias.php
-#ignored = zero-rated-mobile-access-carrier-options-wiki-page, 
zero-rated-mobile-access-language-options-wiki-page-for-carrier
-#ignored = zero-rated-mobile-access-carrier-options-supported-wikis-wiki-page
-#prefix = ZRMA- | right-zero-edit
-
-# Seems to be moved into Zero Banner
-# Zero Rated Mobile Access - Zero Config
-# file = ZeroRatedMobileAccess/i18n/config/%CODE%.json

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32c668a9f03317be7ceb237419706fecee0f7d14
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 
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...Quiz[master]: Removing Hardcoded Css and $wgContLang from parseQuiz() func...

2016-11-05 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review.

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

Change subject: Removing Hardcoded Css and $wgContLang from parseQuiz() 
function.
..

Removing Hardcoded Css and $wgContLang from parseQuiz() function.

Bug: T40372
Change-Id: I69d95d153d6d1da1e019ae5ad2c3e7a4667971b5
---
M Quiz.class.php
1 file changed, 7 insertions(+), 10 deletions(-)


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

diff --git a/Quiz.class.php b/Quiz.class.php
index 06a65e0..df2b41e 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -108,18 +108,15 @@
function parseQuiz( $input ) {
# Ouput the style and the script to the header once for all.
if( $this->mQuizId == 0 ) {
-   global $wgContLang;
-   $start = $wgContLang->isRTL() ? 'right' : 'left';
-   $end = $wgContLang->isRTL() ? 'left' : 'right';
$head  = "\n";
-   $head .= ".quiz .question { margin-$start: 2em; }\n";
-   $head .= ".quiz .margin { padding-$start: 20px; }\n";
-   $head .= ".quiz .header .questionId { font-size: 1.1em; 
font-weight: bold; float: $start;}\n";
-   $head .= ".quiz a.input em { color:black; 
background-color:#DFDFDF; margin-$end:1px; }\n";
-   $head .= ".quiz a.input input { padding-$start:2px; 
border:0; }\n";
+   $head .= ".quiz .question { margin-left: 2em; }\n";
+   $head .= ".quiz .margin { padding-left: 20px; }\n";
+   $head .= ".quiz .header .questionId { font-size: 1.1em; 
font-weight: bold; float: left;}\n";
+   $head .= ".quiz a.input em { color:black; 
background-color:#DFDFDF; margin-right:1px; }\n";
+   $head .= ".quiz a.input input { padding-left:2px; 
border:0; }\n";
 
-   $head .= '.quiz .correction { background-color: ' . 
Quiz::getColor( 'correction' ) . ";}\n";
-   $head .= ".quiz a.input span.correction { padding:3px; 
margin:0; list-style-type:none; display:none; background-color:" . 
Quiz::getColor( 'correction' ) . "; }\n";
+   $head .= ".quiz .correction { background-color:#F9F9F9; 
}\n";
+   $head .= ".quiz a.input span.correction { padding:3px; 
margin:0; list-style-type:none; display:none; background-color:#F9F9F9; }\n";
$head .= "\n";
global $wgOut;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69d95d153d6d1da1e019ae5ad2c3e7a4667971b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Harjotsingh 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Remove some deleted extension

2016-11-05 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: Remove some deleted extension
..

Remove some deleted extension

https://gerrit.wikimedia.org/r/#/c/319959/

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/17/320017/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index b8cf16e..0c589b2 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -83,10 +83,6 @@
 ignored = antispoof-conflict-item, antispoof-bad-char-non-printable
 optional = antispoof-bad-char
 
-# Discontinued.
-#APC
-#aliasfile = APC/APC.alias.php
-
 Api Explorer
 aliasfile = ApiExplorer/ApiExplorer.alias.php
 
@@ -1480,9 +1476,6 @@
 Maintenance Shell
 aliasfile = MaintenanceShell/MaintenanceShell.alias.php
 
-# Deleted Ib081c4e66e372a7f3a110e4e7299eb6d8634b282
-# Mantle
-
 Map Sources
 aliasfile = MapSources/MapSources.i18n.alias.php
 
@@ -2618,10 +2611,6 @@
 ignored = wikiforum-day-definition-new, wikiforum-max-threads-per-page, 
wikiforum-max-replies-per-page
 optional = group-forumadmin.css, group-forumadmin.js
 
-# Wikidata/Mobile specific, undeployed in August 2015
-# Wiki Grok
-# ignored = wikigrok-submission-summary
-
 # Wiki Labels // 2016-03-06: Stil extension boilerplate
 
 Wiki Lexical Data
@@ -2839,16 +2828,3 @@
 
 Zero Portal
 aliasfile = ZeroPortal/ZeroPortal.alias.php
-
-# Outdated, replaced by JsonConfig, ZeroBanner & ZeroPortal per Yuri
-#Zero Rated Mobile Access
-#file = ZeroRatedMobileAccess/i18n/core/%CODE%.json
-## Do not add the alias file for translation per Adam Baso, 2014-05-28
-##aliasfile = ZeroRatedMobileAccess/ZeroRatedMobileAccess.alias.php
-#ignored = zero-rated-mobile-access-carrier-options-wiki-page, 
zero-rated-mobile-access-language-options-wiki-page-for-carrier
-#ignored = zero-rated-mobile-access-carrier-options-supported-wikis-wiki-page
-#prefix = ZRMA- | right-zero-edit
-
-# Seems to be moved into Zero Banner
-# Zero Rated Mobile Access - Zero Config
-# file = ZeroRatedMobileAccess/i18n/config/%CODE%.json

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: logstash: Temporarily disable EventBus channel

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

Change subject: logstash: Temporarily disable EventBus channel
..


logstash: Temporarily disable EventBus channel

Temporarily disable sending log events on the EventBus channel to
logstash until  we can figure out how to fix/prevent the Elasticsearch
mapping conflicts.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d9bb05a..141e742 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4544,7 +4544,7 @@
'diff' => 'debug',
'Echo' => 'debug',
'es-hit' => 'debug',
-   'EventBus' => 'debug',
+   'EventBus' => [ 'logstash' => false ], // T150106, temporarily 
disable to logstash (bd808)
'EventLogging' => 'debug',
'exception' => [ 'logstash' => false ],
'exception-json' => 'debug',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddc34c6f3b64e10d70cc95ca164fc2a7c11a8bed
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: logstash: Temporarily disable EventBus channel

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

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

Change subject: logstash: Temporarily disable EventBus channel
..

logstash: Temporarily disable EventBus channel

Temporarily disable sending log events on the EventBus channel to
logstash until  we can figure out how to fix/prevent the Elasticsearch
mapping conflicts.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d9bb05a..141e742 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4544,7 +4544,7 @@
'diff' => 'debug',
'Echo' => 'debug',
'es-hit' => 'debug',
-   'EventBus' => 'debug',
+   'EventBus' => [ 'logstash' => false ], // T150106, temporarily 
disable to logstash (bd808)
'EventLogging' => 'debug',
'exception' => [ 'logstash' => false ],
'exception-json' => 'debug',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddc34c6f3b64e10d70cc95ca164fc2a7c11a8bed
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] oojs/ui[master]: Remove deprecated TextInputWidget (type=search)

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

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

Change subject: Remove deprecated TextInputWidget (type=search)
..

Remove deprecated TextInputWidget (type=search)

Following-up I3d60fb5bea40e – removing deprecated
TextInputWidget (type=search) and changing demo slightly
to emphasize distinct usage of SearchInputWidget.

Change-Id: I935c89bb44dba8fdf23cd786dc2821c46207a844
---
M demos/pages/widgets.js
M demos/pages/widgets.php
2 files changed, 8 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/15/320015/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index e5efd51..70e15ea 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -909,7 +909,7 @@
}
),
new OO.ui.FieldLayout(
-   new OO.ui.TextInputWidget( { icon: 
'search' } ),
+   new OO.ui.TextInputWidget( { icon: 
'help' } ),
{
label: 'TextInputWidget 
(icon)\u200E',
align: 'top'
@@ -961,16 +961,19 @@
}
),
new OO.ui.FieldLayout(
-   new OO.ui.TextInputWidget( { type: 
'search' } ),
+   new OO.ui.TextInputWidget( {
+   value: 'Disabled',
+   disabled: true
+   } ),
{
-   label: 'TextInputWidget 
(type=search)\u200E',
+   label: 'TextInputWidget 
(disabled)\u200E',
align: 'top'
}
),
new OO.ui.FieldLayout(
new OO.ui.SearchInputWidget(),
{
-   label: 
'SearchInputWidget\u200E',
+   label: 'SearchInputWidget 
(type=search)\u200E',
align: 'top'
}
),
@@ -985,16 +988,6 @@
new OO.ui.SearchInputWidget( { 
disabled: true, value: 'test' } ),
{
label: 'SearchInputWidget 
(disabled, filled)\u200E',
-   align: 'top'
-   }
-   ),
-   new OO.ui.FieldLayout(
-   new OO.ui.TextInputWidget( {
-   value: 'Disabled',
-   disabled: true
-   } ),
-   {
-   label: 'TextInputWidget 
(disabled)\u200E',
align: 'top'
}
),
diff --git a/demos/pages/widgets.php b/demos/pages/widgets.php
index 10584d4..3ceea2b 100644
--- a/demos/pages/widgets.php
+++ b/demos/pages/widgets.php
@@ -481,7 +481,7 @@
]
),
new OOUI\FieldLayout(
-   new OOUI\TextInputWidget( [ 'icon' => 'search' ] ),
+   new OOUI\TextInputWidget( [ 'icon' => 'help' ] ),
[
'label' => "TextInputWidget (icon)\xE2\x80\x8E",
'align' => 'top'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: LocalRepo::checkRedirect(): Fix use of __METHOD__ in closure

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

Change subject: LocalRepo::checkRedirect(): Fix use of __METHOD__ in closure
..


LocalRepo::checkRedirect(): Fix use of __METHOD__ in closure

Change-Id: Ic8b4d2d54f1986fe4b52bc595221c9384389379b
---
M includes/filerepo/LocalRepo.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index c195241..c4730d7 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -195,12 +195,12 @@
$expiry = 86400; // has invalidation, 1 day
}
 
-   $that = $this;
+   $method = __METHOD__;
$redirDbKey = 
ObjectCache::getMainWANInstance()->getWithSetCallback(
$memcKey,
$expiry,
-   function ( $oldValue, &$ttl, array &$setOpts ) use ( 
$that, $title ) {
-   $dbr = $that->getSlaveDB(); // possibly remote 
DB
+   function ( $oldValue, &$ttl, array &$setOpts ) use ( 
$method, $title ) {
+   $dbr = $this->getSlaveDB(); // possibly remote 
DB
 
$setOpts += Database::getCacheSetOptions( $dbr 
);
 
@@ -213,7 +213,7 @@
'page_title' => 
$title->getDBkey(),
'rd_from = page_id'
],
-   __METHOD__
+   $method
);
} else {
$row = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8b4d2d54f1986fe4b52bc595221c9384389379b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove not used variables in ResourcesTest

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

Change subject: Remove not used variables in ResourcesTest
..


Remove not used variables in ResourcesTest

Change-Id: I45f531e66545175c689b8f6a62a5c3ed62ea5a9a
---
M tests/phpunit/structure/ResourcesTest.php
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/structure/ResourcesTest.php 
b/tests/phpunit/structure/ResourcesTest.php
index 86ce53f..2e6bf37 100644
--- a/tests/phpunit/structure/ResourcesTest.php
+++ b/tests/phpunit/structure/ResourcesTest.php
@@ -91,7 +91,6 @@
 */
public function testMissingMessages() {
$data = self::getAllModules();
-   $validDeps = array_keys( $data['modules'] );
$lang = Language::factory( 'en' );
 
/** @var ResourceLoaderModule $module */
@@ -114,7 +113,6 @@
 */
public function testUnsatisfiableDependencies() {
$data = self::getAllModules();
-   $validDeps = array_keys( $data['modules'] );
 
/** @var ResourceLoaderModule $module */
foreach ( $data['modules'] as $moduleName => $module ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45f531e66545175c689b8f6a62a5c3ed62ea5a9a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add a new grrrit-wm: nick and grrrit-wm: force-restart comma...

2016-11-05 Thread Zppix (Code Review)
Zppix has submitted this change and it was merged.

Change subject: Add a new grrrit-wm: nick and grrrit-wm: force-restart command 
to grrrit-wm bot
..


Add a new grrrit-wm: nick and grrrit-wm: force-restart command to grrrit-wm bot

grrrit-wm: nick:

This new command can change the nick back to the original if it manages to do 
nick + 1, for example grrrit-wm1 will be changed back to grrrit-wm if the nick 
is available.

grrrit-wm: force-restart

This new command disconnects it from ssh and irc and then reconnects to
irc and ssh.

Also improve logging.

Change-Id: I96cd194c29d45a0068c30e6908b07dcadf7f9377
---
M src/relay.js
1 file changed, 54 insertions(+), 13 deletions(-)

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



diff --git a/src/relay.js b/src/relay.js
index 69133a3..e14eba1 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -53,7 +53,13 @@
 console.log('Client error: ' + err);
 }).on('close', function() {
 console.log('Client disconnected');
+
+logging.info('re-connecting to irc.');
+
 handle = setInterval(startRelay, 1);
+
+logging.info('re-connected to irc.');
+
 console.log('Client re-connected');
 }).connect({
 host: host,
@@ -185,22 +191,57 @@
 
 ircClient.whois(from, function(info){
 
-if (
-text.indexOf('grrrit-wm: restart') === 0 && 
(whitelist_cloaks.indexOf(info.host) >= 0 ||
-  whitelist_nicks.indexOf(from) >= 0)
-) {
-console.log(from + ' => ' + to  + ' ' + text);
-logging.info('Connecting to gerrit..');
+  if (
+  text.indexOf('grrrit-wm: restart') === 0 && 
(whitelist_cloaks.indexOf(info.host) >= 0 ||
+whitelist_nicks.indexOf(from) >= 0)
+  ) {
+  console.log(from + ' => ' + to  + ' ' + text);
 
-ircClient.say(to, "re-connecting to gerrit");
+  logging.info('re-connecting to gerrit..');
 
-if (sshConn) {
-sshConn.end();
-}
+  ircClient.say(to, "re-connecting to gerrit");
 
-ircClient.say(to, "reconnected to gerrit");
-}
+  if (sshConn) {
+  sshConn.end();
+  }
 
+  ircClient.say(to, "reconnected to gerrit");
+  }
+
+  if (
+  text.indexOf('grrrit-wm: force-restart') === 0 && 
(whitelist_cloaks.indexOf(info.host) >= 0 ||
+whitelist_nicks.indexOf(from) >= 0)
+  ) {
+  console.log(from + ' => ' + to  + ' ' + text);
+
+  ircClient.say(to, "re-connecting to gerrit and irc.");
+
+  logging.info('Disconnecting from irc.');
+
+  ircClient.send('QUIT', "quit");
+
+  logging.info('re-connecting to gerrit..');
+
+  if (sshConn) {
+  sshConn.end();
+  }
+
+  logging.info('re-connected to gerrit.');
+
+  setTimeout(function(){ ircClient.say(to, "re-connected to gerrit 
and irc."); }, 17000);
+  }
+
+  if (
+  text.indexOf('grrrit-wm: nick') === 0 && 
(whitelist_cloaks.indexOf(info.host) >= 0 ||
+whitelist_nicks.indexOf(from) >= 0)
+  ) {
+  console.log(from + ' => ' + to  + ' ' + text);
+
+  logging.info('Changing nick');
+
+  ircClient.send('NICK', config.nick);
+
+  logging.info('changed nick to' + config.nick);
+  }
 });
-
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96cd194c29d45a0068c30e6908b07dcadf7f9377
Gerrit-PatchSet: 13
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: noreference.py: Add template for frwiki

2016-11-05 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review.

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

Change subject: noreference.py: Add template for frwiki
..

noreference.py: Add template for frwiki

Change-Id: I246ee6d05474924d373d4ee331b594bac7f20fc5
---
M scripts/noreferences.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/11/320011/1

diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 7f49df5..112897a 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -130,6 +130,7 @@
 ],
 'fr': [
 u'Liens externes',
+u'Lien externe',
 u'Voir aussi',
 u'Notes'
 ],
@@ -425,6 +426,7 @@
 'dsb': u'{{referency}}',
 'fa': u'{{پانویس}}',
 'fi': u'{{viitteet}}',
+'fr': u'{{références}}',
 'he': u'{{הערות שוליים}}',
 'hsb': u'{{referency}}',
 'hu': u'{{Források}}',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Citoid[master]: Close inspector after re-using a reference

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

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

Change subject: Close inspector after re-using a reference
..

Close inspector after re-using a reference

Change-Id: I663f5e89bab6194da9352f29fc6b681dbbe5495f
---
M modules/ve.ui.CiteFromIdInspector.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid 
refs/changes/09/320009/1

diff --git a/modules/ve.ui.CiteFromIdInspector.js 
b/modules/ve.ui.CiteFromIdInspector.js
index aa8f60a..72dac36 100644
--- a/modules/ve.ui.CiteFromIdInspector.js
+++ b/modules/ve.ui.CiteFromIdInspector.js
@@ -329,6 +329,8 @@
 
ref.insertReferenceNode( this.getFragment() );
this.getFragment().getSurface().applyStaging();
+
+   this.close();
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I663f5e89bab6194da9352f29fc6b681dbbe5495f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
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] wikipedia...ProveIt[master]: Fix small font size for monobook skin

2016-11-05 Thread Iniquity (Code Review)
Iniquity has uploaded a new change for review.

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

Change subject: Fix small font size for monobook skin
..

Fix small font size for monobook skin

Add another font-size for .skin-monobook 

Bug: T150102
Change-Id: I5f1bd7df40082fdc1bfe6e49326d99e10c06b06e
---
M proveit.css
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikipedia/gadgets/ProveIt 
refs/changes/07/320007/2

diff --git a/proveit.css b/proveit.css
index f84e365..a9195cb 100755
--- a/proveit.css
+++ b/proveit.css
@@ -1,9 +1,13 @@
 #proveit {
background: white;
border: 1px solid #ddd;
-   font-size: 0.8em;
+   font-size: .8em;
position: fixed;
z-index: 2147483647; /* Max value */
+}
+
+.skin-monobook #proveit {
+   font-size: 120%;
 }
 
 #proveit-logo {
@@ -127,7 +131,7 @@
box-sizing: border-box;
font: inherit;
outline: none;
-   padding: 0.4em;
+   padding: .4em;
width: 100%;
 }
 
@@ -142,7 +146,7 @@
border-top: 1px solid #ddd;
box-sizing: border-box;
margin: 0;
-   padding: 0.3em;
+   padding: .3em;
pointer-events: none;
position: absolute;
bottom: 0;
@@ -154,8 +158,8 @@
border: 1px solid #ccc;
cursor: pointer;
font: inherit;
-   margin: 0 0.2em;
-   padding: 0.6em;
+   margin: 0 .2em;
+   padding: .6em;
pointer-events: all;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f1bd7df40082fdc1bfe6e49326d99e10c06b06e
Gerrit-PatchSet: 2
Gerrit-Project: wikipedia/gadgets/ProveIt
Gerrit-Branch: master
Gerrit-Owner: Iniquity 

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Updating whitelist to check for cloak/nick

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

Change subject: Updating whitelist to check for cloak/nick
..


Updating whitelist to check for cloak/nick

This is more secure since even if a spammer try's to take a users identity
they have to know the password to the users account to get the cloak.

Also whitelist twentyafterfour and thcipriani nicks since they don't use cloaks.

Change-Id: I204ba64a03d74114508c1820f06d6ab4a34405a7
---
M src/relay.js
1 file changed, 36 insertions(+), 10 deletions(-)

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



diff --git a/src/relay.js b/src/relay.js
index 0cdb053..a7f89e2 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -157,21 +157,47 @@
 }
 }
 ircClient.addListener('join', waitForChannelJoins);
-//To do see Whitelist.js //
-var whitelist = [ "paladox", "mutante", "Zppix", "legoktm", "Krenair", 
"hashar", "ostriches", "greg-g", "twentyafterfour", "apergos", "robh", 
"marktraceur" ];
 ircClient.addListener('message', function (from, to, text) {
+var whitelist_cloaks = [
+"mediawiki/paladox",
+"wikimedia/mutante",
+"wikipedia/Zppix",
+"wikimedia/legoktm",
+"wikimedia/Krenair",
+"mediawiki/hashar",
+"mediawiki/ostriches",
+"wikimedia/greg-g",
+"wiktionary/apergos",
+"wikimedia/robh",
+"fsf/member/marktraceur",
+"wikimedia/GLavagetto-WMF",
+"wikimedia/pdpc.active.reedy",
+"mediawiki/yuvipanda",
+"wikimedia/BDavis-WMF"
+];
+var whitelist_nicks = [
+"twentyafterfour",
+"thcipriani"
+];
 
-if (text.indexOf('grrrit-wm: restart') === 0 && whitelist.indexOf(from) >= 
0) {
-console.log(from + ' => ' + to  + ' ' + text);
-logging.info('Connecting to gerrit..');
+ircClient.whois(from, function(info){
 
-ircClient.say(to, "re-connecting to gerrit");
+if (
+text.indexOf('grrrit-wm: restart') === 0 && 
(whitelist_cloaks.indexOf(info.host) >= 0 ||
+  whitelist_nicks.indexOf(from) >= 0)
+) {
+console.log(from + ' => ' + to  + ' ' + text);
+logging.info('Connecting to gerrit..');
 
-if (sshConn) {
-sshConn.end();
+ircClient.say(to, "re-connecting to gerrit");
+
+if (sshConn) {
+sshConn.end();
+}
+
+ircClient.say(to, "reconnected to gerrit");
 }
 
-ircClient.say(to, "reconnected to gerrit");
-}
+});
 
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I204ba64a03d74114508c1820f06d6ab4a34405a7
Gerrit-PatchSet: 10
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Luke081515 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Improve performance of shallowCloneFromRange( undefined )

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

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

Change subject: Improve performance of shallowCloneFromRange( undefined )
..

Improve performance of shallowCloneFromRange( undefined )

Bypass all selectNodes and node balancing logic, and just
clone the whole document.

Change-Id: I7eb3ede6232e50f92aa9f352f5849bfead739975
---
M src/dm/ve.dm.Document.js
M tests/dm/ve.dm.Document.test.js
2 files changed, 120 insertions(+), 108 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/08/320008/1

diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 5905b6d..5d4aee7 100644
--- a/src/dm/ve.dm.Document.js
+++ b/src/dm/ve.dm.Document.js
@@ -455,139 +455,146 @@
var listRange, i, first, last, firstNode, lastNode,
linearData, slice, originalRange, balancedRange,
balancedNodes, needsContext, contextElement, isContent,
-   startNode = this.getBranchNodeFromOffset( range.start ),
-   endNode = this.getBranchNodeFromOffset( range.end ),
-   selection = this.selectNodes( range, 'siblings' ),
+   startNode, endNode, selection,
balanceOpenings = [],
balanceClosings = [],
contextOpenings = [],
contextClosings = [];
 
listRange = this.getInternalList().getListNode().getOuterRange();
-   // Default to the whole document (but excluding the internal list)
-   range = range || new ve.Range( 0, listRange.start );
 
-   // Fix up selection to remove empty items in unwrapped nodes
-   // TODO: fix this is selectNodes
-   while ( selection[ 0 ] && selection[ 0 ].range && selection[ 0 
].range.isCollapsed() && !selection[ 0 ].node.isWrapped() ) {
-   selection.shift();
-   }
-
-   i = selection.length - 1;
-   while ( selection[ i ] && selection[ i ].range && selection[ i 
].range.isCollapsed() && !selection[ i ].node.isWrapped() ) {
-   selection.pop();
-   i--;
-   }
-
-   if ( selection.length === 0 ) {
-   // Nothing selected
-   linearData = new ve.dm.ElementLinearData( this.getStore(), [
-   { type: 'paragraph', internal: { generated: 'empty' } },
-   { type: 'paragraph' }
-   ] );
-   originalRange = balancedRange = new ve.Range( 1 );
-   } else if ( startNode === endNode ) {
-   // Nothing to balance
-   balancedNodes = selection;
+   if ( !range ) {
+   // Default to the whole document
+   linearData = this.data.sliceObject();
+   originalRange = balancedRange = new ve.Range( 0, 
listRange.start );
} else {
-   // Selection is not balanced
-   first = selection[ 0 ];
-   last = selection[ selection.length - 1 ];
-   firstNode = first.node;
-   lastNode = last.node;
-   while ( !firstNode.isWrapped() ) {
-   firstNode = firstNode.getParent();
-   }
-   while ( !lastNode.isWrapped() ) {
-   lastNode = lastNode.getParent();
+   startNode = this.getBranchNodeFromOffset( range.start );
+   endNode = this.getBranchNodeFromOffset( range.end );
+   selection = this.selectNodes( range, 'siblings' );
+   range = range || new ve.Range( 0, listRange.start );
+
+   // Fix up selection to remove empty items in unwrapped nodes
+   // TODO: fix this is selectNodes
+   while ( selection[ 0 ] && selection[ 0 ].range && selection[ 0 
].range.isCollapsed() && !selection[ 0 ].node.isWrapped() ) {
+   selection.shift();
}
 
-   if ( first.range ) {
-   while ( true ) {
-   while ( !startNode.isWrapped() ) {
+   i = selection.length - 1;
+   while ( selection[ i ] && selection[ i ].range && selection[ i 
].range.isCollapsed() && !selection[ i ].node.isWrapped() ) {
+   selection.pop();
+   i--;
+   }
+
+   if ( selection.length === 0 ) {
+   // Nothing selected
+   linearData = new ve.dm.ElementLinearData( 
this.getStore(), [
+   { type: 'paragraph', internal: { generated: 
'empty' } },
+   { type: 'paragraph' }
+   ] );
+   originalRange = balancedRange = new ve.Range( 1 );
+   } else if ( startNode === endNode ) {
+   // Nothing to balance
+   balancedNodes = selection;
+   } else {
+

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Avoid jQuery in PreviewElement and ve.resolveAttributes

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

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

Change subject: Avoid jQuery in PreviewElement and ve.resolveAttributes
..

Avoid jQuery in PreviewElement and ve.resolveAttributes

This makes widgets which use lots of PreviewElements a lot
faster as they no longer encounter the Sizzle.setDocument
performance bug.

For example ve-mw's reference search widget is 300ms faster
on a page with 200 references.

Bug: T134975
Change-Id: I3b0483a7d5b5bfc6e969ecaa3673e5a3561d9488
---
M src/ce/nodes/ve.ce.GeneratedContentNode.js
M src/ui/elements/ve.ui.PreviewElement.js
M src/ve.utils.js
M tests/ve.test.js
4 files changed, 45 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/06/320006/1

diff --git a/src/ce/nodes/ve.ce.GeneratedContentNode.js 
b/src/ce/nodes/ve.ce.GeneratedContentNode.js
index c8ea4c9..f541352 100644
--- a/src/ce/nodes/ve.ce.GeneratedContentNode.js
+++ b/src/ce/nodes/ve.ce.GeneratedContentNode.js
@@ -125,7 +125,7 @@
 
// Render the computed values of some attributes
ve.resolveAttributes(
-   $rendering,
+   $rendering.toArray(),
domElements[ 0 ].ownerDocument,
ve.dm.Converter.static.computedAttributes
);
diff --git a/src/ui/elements/ve.ui.PreviewElement.js 
b/src/ui/elements/ve.ui.PreviewElement.js
index 8f9df13..1ffec76 100644
--- a/src/ui/elements/ve.ui.PreviewElement.js
+++ b/src/ui/elements/ve.ui.PreviewElement.js
@@ -60,24 +60,31 @@
 /**
  * Replace the content of the body with the model DOM
  *
+ * Doesn't use jQuery to avoid document switching performance bug
+ *
  * @fires render
  */
 ve.ui.PreviewElement.prototype.replaceWithModelDom = function () {
var htmlDocument = ve.dm.converter.getDomFromNode( this.model, true ),
-   $preview = $( htmlDocument.body );
+   element = this.$element[ 0 ];
 
// Resolve attributes
ve.resolveAttributes(
-   $preview,
+   htmlDocument.body,
this.model.getDocument().getHtmlDocument(),
ve.dm.Converter.static.computedAttributes
);
 
// Make all links open in a new window (sync view)
-   $preview.find( 'a' ).attr( 'target', '_blank' );
+   Array.prototype.forEach.call( htmlDocument.body.querySelectorAll( 
'a[href]' ), function ( el ) {
+   el.attr( 'target', '_blank' );
+   } );
 
// Replace content
-   this.$element.empty().append( $preview.contents() );
+   element.innerHTML = '';
+   Array.prototype.forEach.call( htmlDocument.body.childNodes, function ( 
node ) {
+   element.appendChild( node );
+   } );
 
// Cleanup
this.view.destroy();
diff --git a/src/ve.utils.js b/src/ve.utils.js
index 3ee9356..5b24799 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -966,30 +966,40 @@
  *
  * This performs node.setAttribute( 'attr', nodeInDoc[attr] ); for every node.
  *
- * @param {jQuery} $elements Set of DOM elements to modify
+ * Doesn't use jQuery to avoid document switching performance bug
+ *
+ * @param {HTMLElement[]|jQuery} elementsOrJQuery Set of DOM elements to 
modify. Passing a jQuery selector is deprecated.
  * @param {HTMLDocument} doc Document to resolve against (different from 
$elements' .ownerDocument)
  * @param {string[]} attrs Attributes to resolve
  */
-ve.resolveAttributes = function ( $elements, doc, attrs ) {
-   var i, len, attr;
+ve.resolveAttributes = function ( elementsOrJQuery, doc, attrs ) {
+   var i, iLen, j, jLen, element, attr,
+   // Convert jQuery selections to plain arrays
+   elements = elementsOrJQuery.toArray ? 
elementsOrJQuery.toArray() : elementsOrJQuery;
 
/**
-* Callback for jQuery.fn.each that resolves the value of attr to the 
computed
-* property value. Called in the context of an HTMLElement.
+* Resolves the value of attr to the computed property value.
 *
 * @private
+* @param {HTMLElement} el Element
 */
-   function resolveAttribute() {
-   var nodeInDoc = doc.createElement( this.nodeName );
-   nodeInDoc.setAttribute( attr, this.getAttribute( attr ) );
+   function resolveAttribute( el ) {
+   var nodeInDoc = doc.createElement( el.nodeName );
+   nodeInDoc.setAttribute( attr, el.getAttribute( attr ) );
if ( nodeInDoc[ attr ] ) {
-   this.setAttribute( attr, nodeInDoc[ attr ] );
+   el.setAttribute( attr, nodeInDoc[ attr ] );
}
}
 
-   for ( i = 0, len = attrs.length; i < len; i++ ) {
-   attr = attrs[ i ];
-   $elements.find( '[' + attr + ']' ).addBack( '[' + attr + ']' 
).each( resolveAttribute );
+   for ( i 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Converter: Remove internal during the main loop

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

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

Change subject: Converter: Remove internal during the main loop
..

Converter: Remove internal during the main loop

It was placed in a separate loop so as not to affect whitespace
calculations at the end of the document, so fix that calculation
to include the next node being the internal list.

Change-Id: Ice6b16722b234b63548be72a8e1017ef24d3cc8f
---
M src/dm/ve.dm.Converter.js
1 file changed, 8 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/05/320005/1

diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index 23acaa7..4247753 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -1210,35 +1210,6 @@
return dataSlice;
}
 
-   function removeInternalNodes() {
-   var dataCopy, endOffset;
-   // See if there is an internalList in the data, and if there is 
one, remove it
-   // Removing it here prevents unwanted interactions with 
whitespace preservation
-   for ( i = 0; i < dataLen; i++ ) {
-   if (
-   data[ i ].type && data[ i ].type.charAt( 0 ) 
!== '/' &&
-   ve.dm.nodeFactory.lookup( data[ i ].type ) &&
-   ve.dm.nodeFactory.isNodeInternal( data[ i 
].type )
-   ) {
-   // Copy data if we haven't already done so
-   if ( !dataCopy ) {
-   dataCopy = data.slice();
-   }
-   endOffset = findEndOfNode( i );
-   // Remove this node's data from dataCopy
-   dataCopy.splice( i - ( dataLen - 
dataCopy.length ), endOffset - i );
-   // Move i such that it will be at endOffset in 
the next iteration
-   i = endOffset - 1;
-   }
-   }
-   if ( dataCopy ) {
-   data = dataCopy;
-   dataLen = data.length;
-   }
-   }
-
-   removeInternalNodes();
-
for ( i = 0; i < dataLen; i++ ) {
if ( typeof data[ i ] === 'string' ) {
// Text
@@ -1431,8 +1402,10 @@
if ( 
domElement.childNodes.length === 0 && (
// then 
check that we are the last child
// 
before unwrapping (and therefore destroying)
-   i === 
data.length - 1 ||
-   data[ i 
+ 1 ].type.charAt( 0 ) === '/'
+   data[ i 
+ 1 ].type.charAt( 0 ) === '/' ||
+   data[ i 
+ 1 ] === undefined ||
+   // 
Document ends when we encounter the internal list
+   ( data[ 
i + 1 ].type && this.nodeFactory.isNodeInternal( data[ i + 1 ].type ) )
)
) {
doUnwrap = true;
@@ -1491,6 +1464,10 @@
// Create node from data
if ( this.metaItemFactory.lookup( data[ i 
].type ) ) {
isContentNode = canContainContentStack[ 
canContainContentStack.length - 1 ];
+   } else if ( this.nodeFactory.isNodeInternal( 
data[ i ].type ) ) {
+   // Skip over the internal list
+   i = findEndOfNode( i ) - 1;
+   continue;
} else {
canContainContentStack.push(
// if the last item was true 
then this item must inherit it

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

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

___
MediaWiki-commits 

[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from 0606935578aef6a0fde99a32b7431933455540e8:

2016-11-05 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged.

Change subject: Merging from 0606935578aef6a0fde99a32b7431933455540e8:
..


Merging from 0606935578aef6a0fde99a32b7431933455540e8:

Merge "Fix visitor handling"

Change-Id: I4c788ee5a0e0797c601cb0da5f24f816e625a682
---
M embed.html
M i18n/nl.json
A i18n/tl.json
M index.html
D js/embed.wdqs.min.3f92b9f4b64a860b305b.js
A js/embed.wdqs.min.bfd4e3ab22d0dbda2338.js
A js/wdqs.min.e5ae54650add2c3fd34e.js
D js/wdqs.min.fecd17b6a49d208a0dbc.js
8 files changed, 48 insertions(+), 11 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c788ee5a0e0797c601cb0da5f24f816e625a682
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from 0606935578aef6a0fde99a32b7431933455540e8:

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

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

Change subject: Merging from 0606935578aef6a0fde99a32b7431933455540e8:
..

Merging from 0606935578aef6a0fde99a32b7431933455540e8:

Merge "Fix visitor handling"

Change-Id: I4c788ee5a0e0797c601cb0da5f24f816e625a682
---
M embed.html
M i18n/nl.json
A i18n/tl.json
M index.html
D js/embed.wdqs.min.3f92b9f4b64a860b305b.js
A js/embed.wdqs.min.bfd4e3ab22d0dbda2338.js
A js/wdqs.min.e5ae54650add2c3fd34e.js
D js/wdqs.min.fecd17b6a49d208a0dbc.js
8 files changed, 48 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/04/320004/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c788ee5a0e0797c601cb0da5f24f816e625a682
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Replace 404 gitblit download links with github equivalents

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

Change subject: Replace 404 gitblit download links with github equivalents
..


Replace 404 gitblit download links with github equivalents

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

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



diff --git a/README.md b/README.md
index 62689a1..5c02e91 100644
--- a/README.md
+++ b/README.md
@@ -49,8 +49,8 @@
 
 Next, you'll need a copy of the mediawiki-vagrant project files.
 
- * zip: 
https://git.wikimedia.org/zip/?r=mediawiki/vagrant.git=HEAD=zip
- * tar.gz: 
https://git.wikimedia.org/zip/?r=mediawiki/vagrant.git=HEAD=gz
+ * zip: https://github.com/wikimedia/mediawiki-vagrant/archive/master.zip
+ * tar.gz: https://github.com/wikimedia/mediawiki-vagrant/archive/master.tar.gz
  * Git: `git clone https://gerrit.wikimedia.org/r/mediawiki/vagrant`
 
 If you've downloaded the zip file or tarball, you will need to extract it to a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6247127619da07de20e499e56a7be55f82571394
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Aklapper 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikipedia...ProveIt[master]: Correct Polish translations

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

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

Change subject: Correct Polish translations
..

Correct Polish translations

Change-Id: I71fc7f9c100cce39a25b1341ab5aee071b34da55
---
M i18n/pl.json
1 file changed, 19 insertions(+), 18 deletions(-)


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

diff --git a/i18n/pl.json b/i18n/pl.json
index 44e8765..711972f 100644
--- a/i18n/pl.json
+++ b/i18n/pl.json
@@ -1,20 +1,21 @@
 {
-   "@metadata": {
-   "authors": [
-   "Agnieszka Dul"
-   ]
-   },
-   "proveit-list-tab": "Lista ($1)",
-   "proveit-add-tab": "Dodaj",
-   "proveit-reference-name-label": "Tekstu źródłowego",
-   "proveit-reference-content-label": "Tekst źródłowy",
-   "proveit-reference-template-label": "Główny szablon",
-   "proveit-cite-button": "Cytat",
-   "proveit-remove-button": "Usuń",
-   "proveit-insert-button": "Wstawić",
-   "proveit-update-button": "Aktualizuj",
-   "proveit-prompt-name": "Aby cytować, należy podać autora tekstu 
źródłowego:",
-   "proveit-confirm-remove": "Zostanie usunięte źródło i wszystkie cytaty. 
czy jesteś pewien?",
-   "proveit-no-template": "Brak szablonu",
-   "proveit-no-references": "Nie znaleziono źródła"
+"@metadata": {
+"authors": [
+"Agnieszka Dul",
+"Michał Sobkowski"
+]
+},
+"proveit-list-tab": "Lista ($1)",
+"proveit-add-tab": "Dodaj",
+"proveit-reference-name-label": "Nazwa przypisu",
+"proveit-reference-content-label": "Kod źródłowy przypisu",
+"proveit-reference-template-label": "Główny szablon",
+"proveit-cite-button": "Wstaw przypis",
+"proveit-remove-button": "Usuń",
+"proveit-insert-button": "Wstaw",
+"proveit-update-button": "Aktualizuj",
+"proveit-prompt-name": "Ten przypis nie ma jeszcze nazwy. Zdefiniuj ją 
tutaj:",
+"proveit-confirm-remove": "Zostanie usunięte źródło i wszystkie cytaty. 
czy jesteś pewien?",
+"proveit-no-template": "Brak szablonu",
+"proveit-no-references": "Nie znaleziono źródła"
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71fc7f9c100cce39a25b1341ab5aee071b34da55
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] wikipedia...ProveIt[master]: Correct Polish translations

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

Change subject: Correct Polish translations
..


Correct Polish translations

Change-Id: I71fc7f9c100cce39a25b1341ab5aee071b34da55
---
M i18n/pl.json
1 file changed, 19 insertions(+), 18 deletions(-)

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



diff --git a/i18n/pl.json b/i18n/pl.json
index 44e8765..711972f 100644
--- a/i18n/pl.json
+++ b/i18n/pl.json
@@ -1,20 +1,21 @@
 {
-   "@metadata": {
-   "authors": [
-   "Agnieszka Dul"
-   ]
-   },
-   "proveit-list-tab": "Lista ($1)",
-   "proveit-add-tab": "Dodaj",
-   "proveit-reference-name-label": "Tekstu źródłowego",
-   "proveit-reference-content-label": "Tekst źródłowy",
-   "proveit-reference-template-label": "Główny szablon",
-   "proveit-cite-button": "Cytat",
-   "proveit-remove-button": "Usuń",
-   "proveit-insert-button": "Wstawić",
-   "proveit-update-button": "Aktualizuj",
-   "proveit-prompt-name": "Aby cytować, należy podać autora tekstu 
źródłowego:",
-   "proveit-confirm-remove": "Zostanie usunięte źródło i wszystkie cytaty. 
czy jesteś pewien?",
-   "proveit-no-template": "Brak szablonu",
-   "proveit-no-references": "Nie znaleziono źródła"
+"@metadata": {
+"authors": [
+"Agnieszka Dul",
+"Michał Sobkowski"
+]
+},
+"proveit-list-tab": "Lista ($1)",
+"proveit-add-tab": "Dodaj",
+"proveit-reference-name-label": "Nazwa przypisu",
+"proveit-reference-content-label": "Kod źródłowy przypisu",
+"proveit-reference-template-label": "Główny szablon",
+"proveit-cite-button": "Wstaw przypis",
+"proveit-remove-button": "Usuń",
+"proveit-insert-button": "Wstaw",
+"proveit-update-button": "Aktualizuj",
+"proveit-prompt-name": "Ten przypis nie ma jeszcze nazwy. Zdefiniuj ją 
tutaj:",
+"proveit-confirm-remove": "Zostanie usunięte źródło i wszystkie cytaty. 
czy jesteś pewien?",
+"proveit-no-template": "Brak szablonu",
+"proveit-no-references": "Nie znaleziono źródła"
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71fc7f9c100cce39a25b1341ab5aee071b34da55
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] mediawiki...Cite[master]: Re-use internalList when building index

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

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

Change subject: Re-use internalList when building index
..

Re-use internalList when building index

Calling #getItemNode on the un-initalised internalList caused
a tree rebuild of the sub-document.

On a page with 200 references this cuts the time it takes to
render the re-use list from ~2000ms to ~1000ms.

Bug: T134975
Change-Id: I696a965e88338e1bec2a14f61dab158c56728f2e
---
M modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js 
b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
index 186dbe3..c967379 100644
--- a/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
+++ b/modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
@@ -152,7 +152,7 @@
n++;
refModel = 
ve.dm.MWReferenceModel.static.newFromReferenceNode( refNode );
view = new ve.ui.MWPreviewElement(
-   
refModel.getDocument().getInternalList().getItemNode( refModel.getListIndex() )
+   this.internalList.getItemNode( 
refModel.getListIndex() )
);
 
refGroup = refModel.getGroup();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I696a965e88338e1bec2a14f61dab158c56728f2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
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/vagrant[master]: Remove 404 gitblit links

2016-11-05 Thread Aklapper (Code Review)
Aklapper has uploaded a new change for review.

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

Change subject: Remove 404 gitblit links
..

Remove 404 gitblit links

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/01/320001/1

diff --git a/README.md b/README.md
index 62689a1..f6b2e74 100644
--- a/README.md
+++ b/README.md
@@ -49,8 +49,6 @@
 
 Next, you'll need a copy of the mediawiki-vagrant project files.
 
- * zip: 
https://git.wikimedia.org/zip/?r=mediawiki/vagrant.git=HEAD=zip
- * tar.gz: 
https://git.wikimedia.org/zip/?r=mediawiki/vagrant.git=HEAD=gz
  * Git: `git clone https://gerrit.wikimedia.org/r/mediawiki/vagrant`
 
 If you've downloaded the zip file or tarball, you will need to extract it to a

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Use shallow copy for internal list data inside shallowCloneF...

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

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

Change subject: Use shallow copy for internal list data inside 
shallowCloneFromRange
..

Use shallow copy for internal list data inside shallowCloneFromRange

Shallow copies should only be used for read-only so this shouldn't
cause any problems.

On an article with 200 references, this was adding >500ms to generating
the re-use reference list.

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


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/00/32/1

diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 5b5c383..5905b6d 100644
--- a/src/dm/ve.dm.Document.js
+++ b/src/dm/ve.dm.Document.js
@@ -583,10 +583,10 @@
);
}
 
-   // Copy over the internal list
+   // Shallow copy over the internal list
ve.batchSplice(
linearData.data, linearData.getLength(), 0,
-   this.getData( listRange, true )
+   this.getData( listRange )
);
 
// The internalList is rebuilt by the document constructor

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "VCL: only create new hit-for-pass on miss"

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

Change subject: Revert "VCL: only create new hit-for-pass on miss"
..


Revert "VCL: only create new hit-for-pass on miss"

This reverts commit 32e838680e59f07c09aa41ee4cbf7c798d8cafd5.

Change-Id: I0c270a49c59601863a46377b63418d58cb35da6e
---
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index 7e657d8..c210fd9 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -356,7 +356,6 @@
if (
beresp.ttl <= 0s
&& beresp.status < 500
-   && bereq.http.X-CDIS == "miss"
&& (!beresp.http.X-Cache-Int || beresp.http.X-Cache-Int !~ " 
hit")
) {
set beresp.ttl = 601s;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c270a49c59601863a46377b63418d58cb35da6e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Revert "VCL: only create new hit-for-pass on miss"

2016-11-05 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: Revert "VCL: only create new hit-for-pass on miss"
..

Revert "VCL: only create new hit-for-pass on miss"

This reverts commit 32e838680e59f07c09aa41ee4cbf7c798d8cafd5.

Change-Id: I0c270a49c59601863a46377b63418d58cb35da6e
---
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/31/1

diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index 7e657d8..c210fd9 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -356,7 +356,6 @@
if (
beresp.ttl <= 0s
&& beresp.status < 500
-   && bereq.http.X-CDIS == "miss"
&& (!beresp.http.X-Cache-Int || beresp.http.X-Cache-Int !~ " 
hit")
) {
set beresp.ttl = 601s;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Remove unused $user passed to NewsletterEditPage

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

Change subject: Remove unused $user passed to NewsletterEditPage
..


Remove unused $user passed to NewsletterEditPage

Bug: T138462
Change-Id: I684095e229a0b16e471d7b729e929725ee2a199b
---
M Newsletter.hooks.php
M includes/NewsletterEditPage.php
2 files changed, 2 insertions(+), 13 deletions(-)

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



diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 193808e..d765bf1 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -158,7 +158,6 @@
 * @throws ReadOnlyError
 */
public static function onCustomEditor( Article $article, User $user ) {
-   $out = $article->getContext()->getOutput();
if ( !$article->getTitle()->inNamespace( NS_NEWSLETTER ) ) {
return true;
}
@@ -166,9 +165,8 @@
$newsletter = Newsletter::newFromName( 
$article->getTitle()->getText() );
if ( $newsletter ) {
// A newsletter exists in that title, lets redirect to 
manage page
-   $editPage = new NewsletterEditPage( 
$article->getContext(), $newsletter, $user );
+   $editPage = new NewsletterEditPage( 
$article->getContext(), $newsletter );
$editPage->edit();
-
return false;
}
 
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index aab3708..6c51d7f 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -8,13 +8,12 @@
 
protected $newsletter;
 
-   public function __construct( IContextSource $context, Newsletter 
$newsletter = null, User $user = null) {
+   public function __construct( IContextSource $context, Newsletter 
$newsletter = null) {
$this->context = $context;
$this->user = $context->getUser();
$this->title = $context->getTitle();
$this->out = $context->getOutput();
$this->newsletter = $newsletter;
-   $this->user = $user;
}
 
public function edit() {
@@ -48,14 +47,6 @@
$this->out->setPageTitle( $this->context->msg( 
'newslettercreate', $this->title->getPrefixedText() )->text() );
$this->getForm()->show();
}
-
-   // TODO more things here
-   // block
-   // ratelimit
-   // check existing
-   // add subtitle link
-   // intro
-   // form
}
 
protected function getPermissionErrors() {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: VCL: only create new hit-for-pass on miss

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

Change subject: VCL: only create new hit-for-pass on miss
..


VCL: only create new hit-for-pass on miss

I think in Varnish3 this didn't matter, as the new hit-for-pass
was local to this request only, whereas now in Varnish4 it may
actually be constantly replacing the existing hit-for-pass object,
leading to racy waitinglist states for related requests.  Worst
case this is merely a functional no-op, but I think it improves
the situation based on limited testing.

Change-Id: I7ab7288235f3e0a5f6313af3f5d0123213301a42
---
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index c210fd9..7e657d8 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -356,6 +356,7 @@
if (
beresp.ttl <= 0s
&& beresp.status < 500
+   && bereq.http.X-CDIS == "miss"
&& (!beresp.http.X-Cache-Int || beresp.http.X-Cache-Int !~ " 
hit")
) {
set beresp.ttl = 601s;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Remove unused $user passed to NewsletterEditPage

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

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

Change subject: Remove unused $user passed to NewsletterEditPage
..

Remove unused $user passed to NewsletterEditPage

Bug: T138462
Change-Id: I684095e229a0b16e471d7b729e929725ee2a199b
---
M Newsletter.hooks.php
M includes/NewsletterEditPage.php
2 files changed, 3 insertions(+), 13 deletions(-)


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

diff --git a/Newsletter.hooks.php b/Newsletter.hooks.php
index 193808e..d765bf1 100755
--- a/Newsletter.hooks.php
+++ b/Newsletter.hooks.php
@@ -158,7 +158,6 @@
 * @throws ReadOnlyError
 */
public static function onCustomEditor( Article $article, User $user ) {
-   $out = $article->getContext()->getOutput();
if ( !$article->getTitle()->inNamespace( NS_NEWSLETTER ) ) {
return true;
}
@@ -166,9 +165,8 @@
$newsletter = Newsletter::newFromName( 
$article->getTitle()->getText() );
if ( $newsletter ) {
// A newsletter exists in that title, lets redirect to 
manage page
-   $editPage = new NewsletterEditPage( 
$article->getContext(), $newsletter, $user );
+   $editPage = new NewsletterEditPage( 
$article->getContext(), $newsletter );
$editPage->edit();
-
return false;
}
 
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index aab3708..95f1b7f 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -8,13 +8,12 @@
 
protected $newsletter;
 
-   public function __construct( IContextSource $context, Newsletter 
$newsletter = null, User $user = null) {
+   public function __construct( IContextSource $context, Newsletter 
$newsletter = null) {
$this->context = $context;
$this->user = $context->getUser();
$this->title = $context->getTitle();
$this->out = $context->getOutput();
$this->newsletter = $newsletter;
-   $this->user = $user;
}
 
public function edit() {
@@ -22,6 +21,7 @@
throw new ReadOnlyError;
}
$this->createNew = !$this->title->exists();
+
if ( !$this->createNew ) {
// A newsletter exists, lets open the edit page
if ( $this->user->isBlocked() ) {
@@ -48,14 +48,6 @@
$this->out->setPageTitle( $this->context->msg( 
'newslettercreate', $this->title->getPrefixedText() )->text() );
$this->getForm()->show();
}
-
-   // TODO more things here
-   // block
-   // ratelimit
-   // check existing
-   // add subtitle link
-   // intro
-   // form
}
 
protected function getPermissionErrors() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I684095e229a0b16e471d7b729e929725ee2a199b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: VCL: only create new hit-for-pass on miss

2016-11-05 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: VCL: only create new hit-for-pass on miss
..

VCL: only create new hit-for-pass on miss

I think in Varnish3 this didn't matter, as the new hit-for-pass
was local to this request only, whereas now in Varnish4 it may
actually be constantly replacing the existing hit-for-pass object,
leading to racy waitinglist states for related requests.  Worst
case this is merely a functional no-op, but I think it improves
the situation based on limited testing.

Change-Id: I7ab7288235f3e0a5f6313af3f5d0123213301a42
---
M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/319997/1

diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
index c210fd9..7e657d8 100644
--- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb
@@ -356,6 +356,7 @@
if (
beresp.ttl <= 0s
&& beresp.status < 500
+   && bereq.http.X-CDIS == "miss"
&& (!beresp.http.X-Cache-Int || beresp.http.X-Cache-Int !~ " 
hit")
) {
set beresp.ttl = 601s;

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix visitor handling

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

Change subject: Fix visitor handling
..


Fix visitor handling

Visitor array wasn't cleaned up and elements were removed at
wrong indexes.

Bug: T149990
Change-Id: I28e670c9007dee7cbb16f2854fd0ed903274e5b6
---
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
M wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
3 files changed, 14 insertions(+), 13 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Jonas Kress (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 6c867f8..47a6b74 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -709,6 +709,8 @@
b.object = instance;
} );
 
+   defaultBrowser.resetVisitors();
+
// wire up
$.each( this._resultBrowsers, function( key, b ) {
defaultBrowser.addVisitor( b.object );
diff --git a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
index 325f006..9a82709 100644
--- a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
@@ -107,6 +107,13 @@
};
 
/**
+* Reset visitors array.
+*/
+   SELF.prototype.resetVisitors = function() {
+   this._visitors = [];
+   };
+
+   /**
 * Call all visitors for the piece of data
 *
 * @protected
@@ -114,7 +121,7 @@
 * @param {String} columnKey
 */
SELF.prototype.processVisitors = function( data, columnKey ) {
-   var self = this, removeVisitors = [];
+   var self = this, removeVisitors = {};
 
if ( this._visitors.length === 0 ) {
return;
@@ -123,13 +130,14 @@
$.each( this._visitors, function( key, v ) {
if ( v.visit && typeof v.visit === 'function' ) {
if ( v.visit( data, columnKey ) === false ) {
-   removeVisitors.push( key );
+   removeVisitors[key] = true;
}
}
} );
 
-   $.each( removeVisitors, function( key, visitorIndex ) {
-   self._visitors.splice( visitorIndex, 1 );
+   // need to use filter since removal changes keys
+   self._visitors = self._visitors.filter( function( value, 
visitorIndex ) {
+   return !removeVisitors[visitorIndex];
} );
};
 
diff --git a/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
index 4e8e4ac..b25ea34 100644
--- a/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/PolestarResultBrowser.js
@@ -44,15 +44,6 @@
};
 
/**
-* Checks whether the browser can draw the given result
-*
-* @return {boolean}
-**/
-   SELF.prototype.isDrawable = function() {
-   return this._drawable;
-   };
-
-   /**
 * Receiving data from the visit
 *
 * @param {Object} data

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28e670c9007dee7cbb16f2854fd0ed903274e5b6
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Simplify space replacement

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

Change subject: [IMPR] Simplify space replacement
..


[IMPR] Simplify space replacement

- use re.sub to replace multiple spaces by a single space instead of
  using a loop

Change-Id: I68a03dbc944cdc1721d42c5489cee3b868836264
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 93c36f5..be6170b 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4984,8 +4984,7 @@
 # Replace underscores by spaces
 t = t.replace(u"_", u" ")
 # replace multiple spaces with a single space
-while u"  " in t:
-t = t.replace(u"  ", u" ")
+t = re.sub(' {2,}', ' ', t)
 # Strip spaces at both ends
 t = t.strip()
 # Remove left-to-right and right-to-left markers.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68a03dbc944cdc1721d42c5489cee3b868836264
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] pywikibot/core[master]: [IMPR] use format length

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

Change subject: [IMPR] use format length
..


[IMPR] use format length

- Use format length instead expanding message strings by spaces

Change-Id: I56b0d48d80e4c5eceeea8beb688c0948b45dc85e
---
M scripts/welcome.py
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/scripts/welcome.py b/scripts/welcome.py
index ed0dd34..0ad4ac1 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -861,14 +861,14 @@
 5: 'lightblue'
 }
 staMsg = {
-0: 'MSG  ',
+0: 'MSG',
 1: 'NoAct',
 2: 'Match',
-3: 'Skip ',
+3: 'Skip',
 4: 'Warning',
-5: 'Done ',
+5: 'Done',
 }
-pywikibot.output(color_format('{color}[{0}]{default} ',
+pywikibot.output(color_format('{color}[{0:5}]{default} ',
   staMsg[n], color=staColor[n]), newline=False)
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56b0d48d80e4c5eceeea8beb688c0948b45dc85e
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] operations/puppet[production]: varnish: backend restarts on v4 only

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

Change subject: varnish: backend restarts on v4 only
..


varnish: backend restarts on v4 only

We seem to have some kind of fallocate() vs free-space-accounting
race on the persistent v3 instances that remain, so lets stop
doing the restarts there.

Change-Id: I2793454f8bf982d373abf1afe9da23b1887f9123
---
M modules/role/manifests/cache/base.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/cache/base.pp 
b/modules/role/manifests/cache/base.pp
index 8b259f7..f7c9e14 100644
--- a/modules/role/manifests/cache/base.pp
+++ b/modules/role/manifests/cache/base.pp
@@ -56,7 +56,7 @@
 }
 
 # XXX: temporary, we need this to mitigate T145661
-if $::realm == 'production' {
+if $::realm == 'production' and $varnish_version4 {
 $hnodes = hiera("cache::${cache_cluster}::nodes")
 $all_nodes = array_concat($hnodes['eqiad'], $hnodes['esams'], 
$hnodes['ulsfo'], $hnodes['codfw'])
 $times = cron_splay($all_nodes, 'weekly', 
"${cache_cluster}-backend-restarts")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2793454f8bf982d373abf1afe9da23b1887f9123
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] realign -help string to fit the option in the help co...

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

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

Change subject: [IMPR] realign -help string to fit the option in the help 
context
..

[IMPR] realign -help string to fit the option in the help context

Change-Id: I0f5de7cd2678b6a1afb6b56b98e1798dab42c836
---
M scripts/listpages.py
M scripts/makecat.py
2 files changed, 55 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/96/319996/1

diff --git a/scripts/listpages.py b/scripts/listpages.py
index 59622b1..60a39a4 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -8,60 +8,62 @@
 
 These parameters are supported to specify which pages titles to print:
 
--format  Defines the output format.
+-format Defines the output format.
 
- Can be a custom string according to python string.format() notation or
- can be selected by a number from following list (1 is default format):
- 1 - u'{num:4d} {page.title}'
- --> 10 PageTitle
+Can be a custom string according to python string.format() notation
+or can be selected by a number from following list
+(1 is default format):
+1 - u'{num:4d} {page.title}'
+--> 10 PageTitle
 
- 2 - u'{num:4d} {[[page.title]]}'
- --> 10 [[PageTitle]]
+2 - u'{num:4d} {[[page.title]]}'
+--> 10 [[PageTitle]]
 
- 3 - u'{page.title}'
- --> PageTitle
+3 - u'{page.title}'
+--> PageTitle
 
- 4 - u'{[[page.title]]}'
- --> [[PageTitle]]
+4 - u'{[[page.title]]}'
+--> [[PageTitle]]
 
- 5 - u'{num:4d} \03{{lightred}}{page.loc_title:<40}\03{{default}}'
- --> 10 PageTitle (colorised in lightred)
+5 - u'{num:4d} \03{{lightred}}{page.loc_title:<40}\03{{default}}'
+--> 10 PageTitle (colorised in lightred)
 
- 6 - u'{num:4d} {page.loc_title:<40} {page.can_title:<40}'
- --> 10 localised_Namespace:PageTitle canonical_Namespace:PageTitle
+6 - u'{num:4d} {page.loc_title:<40} {page.can_title:<40}'
+--> 10 localised_Namespace:PageTitle
+   canonical_Namespace:PageTitle
 
- 7 - u'{num:4d} {page.loc_title:<40} {page.trs_title:<40}'
- --> 10 localised_Namespace:PageTitle 
outputlang_Namespace:PageTitle
- (*) requires "outputlang:lang" set.
+7 - u'{num:4d} {page.loc_title:<40} {page.trs_title:<40}'
+--> 10 localised_Namespace:PageTitle
+   outputlang_Namespace:PageTitle
+(*) requires "outputlang:lang" set.
 
- num is the sequential number of the listed page.
+num is the sequential number of the listed page.
 
- An empty format is equal to -notitle and just shows the total amount
- of pages.
+An empty format is equal to -notitle and just shows the total
+amount of pages.
 
--outputlang   Language for translation of namespaces.
+-outputlang Language for translation of namespaces.
 
--notitle Page title is not printed.
+-notitlePage title is not printed.
 
--get Page content is printed.
+-getPage content is printed.
 
--saveSave Page content to a file named as page.title(as_filename=True).
- Directory can be set with -save:dir_name
- If no dir is specified, current direcory will be used.
+-save   Save Page content to a file named as page.title(as_filename=True).
+Directory can be set with -save:dir_name
+If no dir is specified, current direcory will be used.
 
--encode  File encoding can be specified with '-encode:name' (name must be a
- valid python encoding: utf-8, etc.).
- If not specified, it defaults to config.textfile_encoding.
+-encode File encoding can be specified with '-encode:name' (name must be
+a valid python encoding: utf-8, etc.).
+If not specified, it defaults to config.textfile_encoding.
 
--put:Save the list to the defined page of the wiki. By default it does not
- overwrite an exisiting page.
+-put:   Save the list to the defined page of the wiki. By default it does
+not overwrite an exisiting page.
 
--overwriteOverwrite the page if it exists. Can only by applied with -put.
+-overwrite  Overwrite the page if it exists. Can only by applied with -put.
 
--summary: The summary text when the page is written. If it's one word just
-  containing letters, dashes and underscores it uses that as a
-  translation key.
-
+-summary:   The summary text when the page is written. If it's one word just
+containing letters, dashes and underscores it uses that as a
+translation key.
 
 Custom format can 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish: backend restarts on v4 only

2016-11-05 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: varnish: backend restarts on v4 only
..

varnish: backend restarts on v4 only

We seem to have some kind of fallocate() vs free-space-accounting
race on the persistent v3 instances that remain, so lets stop
doing the restarts there.

Change-Id: I2793454f8bf982d373abf1afe9da23b1887f9123
---
M modules/role/manifests/cache/base.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/319995/1

diff --git a/modules/role/manifests/cache/base.pp 
b/modules/role/manifests/cache/base.pp
index 8b259f7..f7c9e14 100644
--- a/modules/role/manifests/cache/base.pp
+++ b/modules/role/manifests/cache/base.pp
@@ -56,7 +56,7 @@
 }
 
 # XXX: temporary, we need this to mitigate T145661
-if $::realm == 'production' {
+if $::realm == 'production' and $varnish_version4 {
 $hnodes = hiera("cache::${cache_cluster}::nodes")
 $all_nodes = array_concat($hnodes['eqiad'], $hnodes['esams'], 
$hnodes['ulsfo'], $hnodes['codfw'])
 $times = cron_splay($all_nodes, 'weekly', 
"${cache_cluster}-backend-restarts")

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] use format length

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

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

Change subject: [IMPR] use format length
..

[IMPR] use format length

- Use format length instead expanding message strings by spaces

Change-Id: I56b0d48d80e4c5eceeea8beb688c0948b45dc85e
---
M scripts/welcome.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/94/319994/1

diff --git a/scripts/welcome.py b/scripts/welcome.py
index ed0dd34..0ad4ac1 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -861,14 +861,14 @@
 5: 'lightblue'
 }
 staMsg = {
-0: 'MSG  ',
+0: 'MSG',
 1: 'NoAct',
 2: 'Match',
-3: 'Skip ',
+3: 'Skip',
 4: 'Warning',
-5: 'Done ',
+5: 'Done',
 }
-pywikibot.output(color_format('{color}[{0}]{default} ',
+pywikibot.output(color_format('{color}[{0:5}]{default} ',
   staMsg[n], color=staColor[n]), newline=False)
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56b0d48d80e4c5eceeea8beb688c0948b45dc85e
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] pywikibot/core[master]: [IMPR] Simplify space replacement

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

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

Change subject: [IMPR] Simplify space replacement
..

[IMPR] Simplify space replacement

- use re.sub to replace multiple spaces by a single space instead of
  using a loop

Change-Id: I68a03dbc944cdc1721d42c5489cee3b868836264
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/92/319992/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 93c36f5..be6170b 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4984,8 +4984,7 @@
 # Replace underscores by spaces
 t = t.replace(u"_", u" ")
 # replace multiple spaces with a single space
-while u"  " in t:
-t = t.replace(u"  ", u" ")
+t = re.sub(' {2,}', ' ', t)
 # Strip spaces at both ends
 t = t.strip()
 # Remove left-to-right and right-to-left markers.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68a03dbc944cdc1721d42c5489cee3b868836264
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] pywikibot/core[master]: [cleanup] import need_version, use deprecated_args

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

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

Change subject: [cleanup] import need_version, use deprecated_args
..

[cleanup] import need_version, use deprecated_args

- use need_version from pywikibot.site and use this as decorator
- replace multiple deprecate_arg decorators by a single deprecated_args

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/91/319991/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 93c36f5..2f1bdda 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -64,7 +64,7 @@
 UserRightsError,
 )
 from pywikibot.family import Family
-from pywikibot.site import Namespace
+from pywikibot.site import Namespace, need_version
 from pywikibot.tools import (
 PYTHON_VERSION,
 MediaWikiVersion, UnicodeMixin, ComparableMixin, DotReadableDict,
@@ -1893,8 +1893,7 @@
 raise ValueError(u'Timestamp %d is not a deleted revision' % 
timestamp)
 self._deletedRevs[timestamp]['marked'] = undelete
 
-@deprecate_arg('throttle', None)
-@deprecate_arg('comment', 'reason')
+@deprecated_args(comment='reason', throttle=None)
 def undelete(self, reason=None):
 """
 Undelete revisions based on the markers set by previous calls.
@@ -2167,8 +2166,7 @@
 
 """Page: A MediaWiki page."""
 
-@deprecate_arg("insite", None)
-@deprecate_arg("defaultNamespace", "ns")
+@deprecated_args(defaultNamespace='ns', insite=None)
 def __init__(self, source, title=u"", ns=0):
 """Instantiate a Page object."""
 if isinstance(source, pywikibot.site.BaseSite):
@@ -2663,7 +2661,7 @@
 if total == 0:
 return
 
-@pywikibot.site.need_version("1.13")
+@need_version('1.13')
 def isEmptyCategory(self):
 """
 Return True if category has no members (including subcategories).
@@ -2673,7 +2671,7 @@
 ci = self.categoryinfo
 return sum(ci[k] for k in ['files', 'pages', 'subcats']) == 0
 
-@pywikibot.site.need_version("1.11")
+@need_version('1.11')
 def isHiddenCategory(self):
 """
 Return True if the category is hidden.
@@ -3215,8 +3213,7 @@
 for item in self.contributions(total=total):
 yield item[0]
 
-@deprecate_arg("limit", "total")  # To be consistent with rest of framework
-@deprecate_arg("namespace", "namespaces")
+@deprecated_args(limit='total', namespace='namespaces')
 def contributions(self, total=500, namespaces=[]):
 """
 Yield tuples describing this user edits.
@@ -3939,7 +3936,7 @@
 data['sitelinks'] = self.sitelinks
 return data
 
-@pywikibot.site.need_version("1.28-wmf.23")
+@need_version('1.28-wmf.23')
 def concept_url(self):
 """Return the full concept URL."""
 return '{0}{1}'.format(self.site.concept_base_uri, self.id)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82d5a3d3b5a32e35874583b49997eb3729a10cda
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...heritage[master]: Add some unit tests for database_statistics module

2016-11-05 Thread Code Review
Jean-Frédéric has uploaded a new change for review.

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

Change subject: Add some unit tests for database_statistics module
..

Add some unit tests for database_statistics module

Change-Id: Iba1b5dbe1899859ee5f68dd44beaf04b2f726f8b
---
A tests/test_database_statistics.py
1 file changed, 32 insertions(+), 0 deletions(-)


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

diff --git a/tests/test_database_statistics.py 
b/tests/test_database_statistics.py
new file mode 100644
index 000..0988fcf
--- /dev/null
+++ b/tests/test_database_statistics.py
@@ -0,0 +1,32 @@
+"""Unit tests for database_statistics."""
+
+# from pywikibot.site import APISite
+# from pywikibot.exceptions import NoPage
+import unittest
+import mock
+from erfgoedbot import database_statistics
+
+
+class TestGetMethods(unittest.TestCase):
+
+def setUp(self):
+self.mock_cursor = mock.Mock()
+
+def test_getCount(self):
+self.mock_cursor.fetchone.return_value = (42,)
+result = database_statistics.getCount("SELECT X", self.mock_cursor)
+self.assertEqual(result, 42)
+self.mock_cursor.execute.assert_called_once_with("SELECT X")
+self.mock_cursor.fetchone.assert_called_once_with()
+
+def test_getCountries(self):
+database_statistics.getCountries(None, self.mock_cursor)
+self.mock_cursor.execute.assert_called_once_with(
+u'SELECT DISTINCT(country) FROM monuments_all'
+)
+
+def test_getLanguages(self):
+database_statistics.getLanguages("at", None, self.mock_cursor)
+self.mock_cursor.execute.assert_called_once_with(
+u"SELECT DISTINCT(lang) FROM monuments_all WHERE country='at'"
+)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba1b5dbe1899859ee5f68dd44beaf04b2f726f8b
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Jean-Frédéric 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [cleanup] Deprecate Subject.originPage and Subject.foundIn p...

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

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

Change subject: [cleanup] Deprecate Subject.originPage and Subject.foundIn 
properties
..

[cleanup] Deprecate Subject.originPage and Subject.foundIn properties

- originPage and foundIn where renamed
  in 9011580e19c2 but not deprecated.
- deprecate them now
- rename 'originPage' parameter of interwiki.Subject to 'origin'
  like its superclass
- change all occurences to the renamed property

Change-Id: Ia0fadc0b1df57cda18306167fbf85021ad806d75
---
M pywikibot/interwiki_graph.py
M scripts/interwiki.py
2 files changed, 105 insertions(+), 108 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/89/319989/1

diff --git a/pywikibot/interwiki_graph.py b/pywikibot/interwiki_graph.py
index 85d903b..b305105 100644
--- a/pywikibot/interwiki_graph.py
+++ b/pywikibot/interwiki_graph.py
@@ -21,7 +21,7 @@
 import pywikibot
 
 from pywikibot import config2 as config
-from pywikibot.tools import Counter
+from pywikibot.tools import Counter, deprecated
 
 # deprecated value
 pydotfound = not isinstance(pydot, ImportError)
@@ -75,19 +75,14 @@
 # Remember the "origin page"
 self._origin = origin
 
-# Temporary variable to support git blame; do not use
-originPage = origin
-
-self.found_in = None
-
 # foundIn is a dictionary where pages are keys and lists of
 # pages are values. It stores where we found each page.
 # As we haven't yet found a page that links to the origin page, we
 # start with an empty list for it.
-if originPage:
-self.foundIn = {self.originPage: []}
+if origin:
+self.found_in = {self.origin: []}
 else:
-self.foundIn = {}
+self.found_in = {}
 
 @property
 def origin(self):
@@ -100,15 +95,16 @@
 self._origin = value
 
 @property
+@deprecated('origin')
 def originPage(self):
 """Deprecated property for the origin page.
 
 DEPRECATED.  Use origin.
 """
-# TODO: deprecate this property
 return self.origin
 
 @originPage.setter
+@deprecated('origin')
 def originPage(self, value):
 """Deprecated property for the origin page.
 
@@ -117,15 +113,16 @@
 self.origin = value
 
 @property
+@deprecated('found_in')
 def foundIn(self):
 """Mapping of pages to others pages interwiki linked to it.
 
 DEPRECATED.  Use found_in.
 """
-# TODO: deprecate this property
 return self.found_in
 
 @foundIn.setter
+@deprecated('found_in')
 def foundIn(self, value):
 """Temporary property setter to support code migration."""
 self.found_in = value
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index f5c5db3..564f150 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -361,7 +361,7 @@
 from pywikibot import titletranslate
 
 from pywikibot.bot import ListOption, StandardOption
-from pywikibot.tools import first_upper
+from pywikibot.tools import first_upper, deprecated_args
 from pywikibot.tools.formatter import color_format
 
 if sys.version_info[0] > 2:
@@ -721,8 +721,8 @@
 While using dict values would be faster for the remove() operation,
 keeping list values is important, because the order in which the pages
 were found matters: the earlier a page is found, the closer it is to 
the
-Subject.originPage. Chances are that pages found within 2 interwiki
-distance from the originPage are more related to the original topic
+Subject.origin. Chances are that pages found within 2 interwiki
+distance from the origin are more related to the original topic
 than pages found later on, after 3, 4, 5 or more interwiki hops.
 
 Keeping this order is hence important to display an ordered
@@ -799,7 +799,7 @@
 With P a set of pages, NL ('NextLevel') a function on sets defined as:
 NL(P) = { target | ∃ source ∈ P, target ∈ source.langlinks() }
 pseudocode:
-todo <- [originPage]
+todo <- [origin]
 done <- []
 while todo != []:
 pending <- todo
@@ -823,7 +823,7 @@
 Site:
 
 Code becomes:
-todo <- {originPage.site:[originPage]}
+todo <- {origin.site:[origin]}
 done <- []
 while todo != {}:
 site <- electSite()
@@ -843,7 +843,8 @@
 this Object.
 """
 
-def __init__(self, originPage=None, hints=None, conf=None):
+@deprecated_args(originPage='origin')
+def __init__(self, origin=None, hints=None, conf=None):
 """
 Constructor.
 
@@ -852,17 +853,17 @@
 """
 self.conf = conf
 if self.conf.contentsondisk:
-if originPage:
-originPage = StoredPage(originPage)
+

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Add test framework for diffElement

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

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

Change subject: Add test framework for diffElement
..

Add test framework for diffElement

Just one simple text diff test for now.

Change-Id: I298db26624da3bcba499a6da19d88e4c12b1c4fe
---
M build/modules.json
M tests/index.html
A tests/ui/ve.ui.DiffElement.test.js
3 files changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/88/319988/1

diff --git a/build/modules.json b/build/modules.json
index fcbf15b..d50d6ba 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -658,6 +658,7 @@
"tests/init/ve.init.sa.Platform.test.js",
"tests/ui/ve.ui.DataTransferHandlerFactory.test.js",
"tests/ui/ve.ui.Trigger.test.js",
+   "tests/ui/ve.ui.DiffElement.test.js",
"tests/ui/actions/ve.ui.AnnotationAction.test.js",
"tests/ui/actions/ve.ui.ContentAction.test.js",
"tests/ui/actions/ve.ui.FormatAction.test.js",
diff --git a/tests/index.html b/tests/index.html
index 1af691b..bbc90f8 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -477,6 +477,7 @@



+   



diff --git a/tests/ui/ve.ui.DiffElement.test.js 
b/tests/ui/ve.ui.DiffElement.test.js
new file mode 100644
index 000..c5c
--- /dev/null
+++ b/tests/ui/ve.ui.DiffElement.test.js
@@ -0,0 +1,37 @@
+/*!
+ * VisualEditor DiffElement Trigger tests.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see 
http://ve.mit-license.org
+ */
+
+QUnit.module( 've.ui.DiffElement' );
+
+/* Tests */
+
+QUnit.test( 'Diffing', function ( assert ) {
+   var i, len, visualDiff, diffElement,
+   cases = [
+   {
+   msg: 'Simple text change',
+   oldDoc: 'foo bar baz',
+   newDoc: 'foo car baz',
+   expected:
+   '' +
+   '' +
+   'foo ' +
+   'bar  car' +
+   ' baz' +
+   '' +
+   ''
+   }
+   ];
+
+   for ( i = 0, len = cases.length; i < len; i++ ) {
+   visualDiff = new ve.dm.VisualDiff(
+   ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].oldDoc ) ),
+   ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( cases[ i ].newDoc ) )
+   );
+   diffElement = new ve.ui.DiffElement( visualDiff );
+   assert.strictEqual( diffElement.$element.html(), cases[ i 
].expected, cases[ i ].msg );
+   }
+} );

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Replace reference to current doc with this.newDoc

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

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

Change subject: Replace reference to current doc with this.newDoc
..

Replace reference to current doc with this.newDoc

Change-Id: Ibf72ae271c91e3d930f845ec51e45cf16693e9e0
---
M src/ui/elements/ve.ui.DiffElement.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/87/319987/1

diff --git a/src/ui/elements/ve.ui.DiffElement.js 
b/src/ui/elements/ve.ui.DiffElement.js
index b22a64e..648cf2b 100644
--- a/src/ui/elements/ve.ui.DiffElement.js
+++ b/src/ui/elements/ve.ui.DiffElement.js
@@ -463,7 +463,7 @@
for ( i = 1, ilen = linearDiff.length; i < ilen; i++ ) {
diffDocData = diffDocData.concat( linearDiff[ i ][ 1 ] );
}
-   diffDoc = ve.init.target.surface.model.documentModel.cloneWithData( 
diffDocData );
+   diffDoc = this.newDoc.cloneWithData( diffDocData );
 
// Add spans with the appropriate class for removes and inserts
// TODO: do insert and remove outside of loop

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

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

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add setInterval to ssh close for startRelay()

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

Change subject: Add setInterval to ssh close for startRelay()
..


Add setInterval to ssh close for startRelay()

Change-Id: I5cc2067d90e270fe667227895caeea499bce5323
---
M src/relay.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/src/relay.js b/src/relay.js
index 0cdb053..c779788 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -10,6 +10,7 @@
 yaml = require('js-yaml'),
 logging = require('winston'),
 ssh2 = require('ssh2'),
+handle,
 sshConn = null,
 // Sane? defaults
 config_defaults = {
@@ -52,13 +53,15 @@
 console.log('Client error: ' + err);
 }).on('close', function() {
 console.log('Client disconnected');
-startRelay();
+handle = setInterval(startRelay, 1);
+console.log('Client re-connected');
 }).connect({
 host: host,
 port: port,
 username: username,
 privateKey: require('fs').readFileSync(keypath),
 });
+clearInterval(handle);
 }
 
 var allChannels = _.keys(config.channels);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5cc2067d90e270fe667227895caeea499bce5323
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Add Wikidata to the database statistics

2016-11-05 Thread Code Review
Jean-Frédéric has uploaded a new change for review.

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

Change subject: Add Wikidata to the database statistics
..

Add Wikidata to the database statistics

Change-Id: I2a4d2b0d7ed9146293c4d52cb16904c8909d9358
---
M erfgoedbot/database_statistics.py
1 file changed, 15 insertions(+), 1 deletion(-)


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

diff --git a/erfgoedbot/database_statistics.py 
b/erfgoedbot/database_statistics.py
index 8068849..5b65931 100755
--- a/erfgoedbot/database_statistics.py
+++ b/erfgoedbot/database_statistics.py
@@ -27,7 +27,7 @@
 
 output = u'{| class="wikitable sortable"\n'
 output += \
-u'! country !! [[:en:List of ISO 639-1 codes|lang]] !! 
data-sort-type="number"|total !! data-sort-type="number"|name !! 
data-sort-type="number"|address !! data-sort-type="number"|municipality 
!!data-sort-type="number"| coordinates !! data-sort-type="number"|image !! 
data-sort-type="number"|commonscat !! data-sort-type="number"|article !! 
data-sort-type="number"|[[:en:ISO 3166-1 alpha-2#Officially assigned code 
elements|adm0]] !! data-sort-type="number"|[[:en:ISO 3166-2#Current 
codes|adm1]] !! data-sort-type="number"|adm2 !! data-sort-type="number"|adm3 
!!data-sort-type="number"| adm4 !! data-sort-type="number"|source pages\n'
+u'! country !! [[:en:List of ISO 639-1 codes|lang]] !! 
data-sort-type="number"|total !! data-sort-type="number"|name !! 
data-sort-type="number"|address !! data-sort-type="number"|municipality 
!!data-sort-type="number"| coordinates !! data-sort-type="number"|image !! 
data-sort-type="number"|commonscat !! data-sort-type="number"|article !! 
data-sort-type="number"|wikidata !! data-sort-type="number"|[[:en:ISO 3166-1 
alpha-2#Officially assigned code elements|adm0]] !! 
data-sort-type="number"|[[:en:ISO 3166-2#Current codes|adm1]] !! 
data-sort-type="number"|adm2 !! data-sort-type="number"|adm3 
!!data-sort-type="number"| adm4 !! data-sort-type="number"|source pages\n'
 
 totals = {}
 
@@ -39,6 +39,7 @@
 totals['image'] = 0
 totals['commonscat'] = 0
 totals['article'] = 0
+totals['wikidata'] = 0
 
 totals['adm0'] = 0
 totals['adm1'] = 0
@@ -81,6 +82,9 @@
 output += \
 u'|| %(article)s (%(articlePercentage)s%%)' % 
statistics[
 country][language]
+output += \
+u'|| %(wikidata)s (%(wikidataPercentage)s%%)' % 
statistics[
+country][language]
 
 output += \
 u'|| %(adm0)s (%(adm0Percentage)s%%)' % 
statistics[
@@ -117,6 +121,8 @@
 statistics[country][language]['commonscat']
 totals['article'] += \
 statistics[country][language]['article']
+totals['wikidata'] += \
+statistics[country][language]['wikidata']
 
 totals['adm0'] += \
 statistics[country][language]['adm0']
@@ -146,6 +152,8 @@
 1.0 * totals['commonscat'] / totals['all'] * 100, 2)
 totals['articlePercentage'] = round(
 1.0 * totals['article'] / totals['all'] * 100, 2)
+totals['wikidataPercentage'] = round(
+1.0 * totals['wikidata'] / totals['all'] * 100, 2)
 
 totals['adm0Percentage'] = round(
 1.0 * totals['adm0'] / totals['all'] * 100, 2)
@@ -175,6 +183,8 @@
 u'|| %(commonscat)s (%(commonscatPercentage)s%%)' % 
totals
 output += \
 u'|| %(article)s (%(articlePercentage)s%%)' % totals
+output += \
+u'|| %(wikidata)s (%(wikidataPercentage)s%%)' % totals
 
 output += \
 u'|| %(adm0)s (%(adm0Percentage)s%%)' % totals
@@ -220,6 +230,8 @@
 'commonscat'] = u"""SELECT COUNT(*) FROM monuments_all WHERE 
country='%s' AND lang='%s' AND NOT (commonscat='' OR commonscat IS NULL)"""
 queries[
 'article'] = u"""SELECT COUNT(*) FROM monuments_all WHERE country='%s' 
AND lang='%s' AND NOT (monument_article='' OR monument_article IS NULL)"""
+queries[
+'wikidata'] = u"""SELECT COUNT(*) FROM monuments_all WHERE 
country='%s' AND lang='%s' AND NOT (wd_item='' OR wd_item IS NULL)"""
 
 queries[
 'adm0iso'] = u"""SELECT adm0 FROM monuments_all WHERE country='%s' AND 
lang='%s' AND NOT (adm0='' OR adm0 IS NULL) LIMIT 1"""
@@ -258,6 +270,8 @@
 1.0 * result['commonscat'] / result['all'] * 100, 2)
 result['articlePercentage'] = round(
 1.0 * result['article'] / result['all'] * 100, 2)
+result['wikidataPercentage'] = round(
+1.0 * result['wikidata'] / result['all'] * 100, 2)
 
 result['adm0Percentage'] = round(
 1.0 * result['adm0'] / result['all'] * 100, 2)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Add setInterval to ssh close for startRelay()

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

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

Change subject: Add setInterval to ssh close for startRelay()
..

Add setInterval to ssh close for startRelay()

Change-Id: I5cc2067d90e270fe667227895caeea499bce5323
---
M src/relay.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/src/relay.js b/src/relay.js
index 0cdb053..3d135ef 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -52,7 +52,8 @@
 console.log('Client error: ' + err);
 }).on('close', function() {
 console.log('Client disconnected');
-startRelay();
+setInterval(startRelay, 1);
+console.log('Client re-connected');
 }).connect({
 host: host,
 port: port,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cc2067d90e270fe667227895caeea499bce5323
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Updating whitelist to only allow users with hostnames mediaw...

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

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

Change subject: Updating whitelist to only allow users with hostnames 
mediawiki, wikimedia and wikipedia
..

Updating whitelist to only allow users with hostnames mediawiki, wikimedia and 
wikipedia

This is more secure since even if a spammer try's to take a users identity they 
have to know the password to the user to get the cloak.

Also whitelist certain ip's.

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I204ba64a03d74114508c1820f06d6ab4a34405a7
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
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] operations/puppet[production]: ores (labs): Define log directory in worker nodes

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

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

Change subject: ores (labs): Define log directory in worker nodes
..

ores (labs): Define log directory in worker nodes

Bug: T149925
Change-Id: I3f0c199dc9433ae71f0d983db2742bedb2f6d2fd
---
M modules/role/manifests/labs/ores/worker.pp
1 file changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/319984/1

diff --git a/modules/role/manifests/labs/ores/worker.pp 
b/modules/role/manifests/labs/ores/worker.pp
index a36dc93..53769c9 100644
--- a/modules/role/manifests/labs/ores/worker.pp
+++ b/modules/role/manifests/labs/ores/worker.pp
@@ -32,4 +32,23 @@
 },
 priority => '99',
 }
+
+if !defined(File['/srv/log']) {
+file { '/srv/log':
+ensure => 'directory',
+mode   => '0755',
+owner  => 'root',
+group  => 'root',
+}
+}
+
+if !defined(File['/srv/log/ores']) {
+file { '/srv/log/ores':
+ensure => 'directory',
+mode   => '0755',
+owner  => 'www-data',
+group  => 'www-data',
+}
+}
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f0c199dc9433ae71f0d983db2742bedb2f6d2fd
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...WikibaseLexeme[master]: Make Lexeme implement LabelsProvider and DescriptionProvider

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

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

Change subject: Make Lexeme implement LabelsProvider and DescriptionProvider
..

Make Lexeme implement LabelsProvider and DescriptionProvider

Workaround for T150084

Change-Id: Id72e3c5a158e767932fbff85bf2c5f357c996c98
---
M src/DataModel/Lexeme.php
1 file changed, 21 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/82/319982/1

diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 80e478b..37429f0 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -11,12 +11,13 @@
 use Wikibase\DataModel\Term\Fingerprint;
 use Wikibase\DataModel\Term\FingerprintProvider;
 use Wikibase\DataModel\Term\LabelsProvider;
-use Wikimedia\Assert\Assert;
+use Wikibase\DataModel\Term\TermList;
 
 /**
  * @license GPL-2.0+
  */
-class Lexeme implements EntityDocument, StatementListProvider, 
FingerprintProvider {
+class Lexeme implements EntityDocument, StatementListProvider, 
FingerprintProvider,
+   LabelsProvider, DescriptionsProvider {
 
const ENTITY_TYPE = 'lexeme';
 
@@ -102,6 +103,24 @@
}
 
/**
+* Workaround for T150084
+*
+* @return TermList
+*/
+   public function getDescriptions() {
+   return new TermList();
+   }
+
+   /**
+* Workaround for T150084
+*
+* @return TermList
+*/
+   public function getLabels() {
+   return new TermList();
+   }
+
+   /**
 * @return bool
 */
public function isEmpty() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id72e3c5a158e767932fbff85bf2c5f357c996c98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Expose ORES damaging thresholds in javascript

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

Change subject: Expose ORES damaging thresholds in javascript
..


Expose ORES damaging thresholds in javascript

Bug: T144922
Change-Id: Ib650fe11c8780d77f200cecd141bdb021b4bbd62
---
M includes/Hooks.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Hooks.php b/includes/Hooks.php
index 9c887ea..b23ffdb 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -496,6 +496,7 @@
 * @return bool
 */
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
+   global $wgOresDamagingThresholds;
if ( !self::oresEnabled( $out->getUser() ) ) {
return true;
}
@@ -504,6 +505,10 @@
 
if ( $oresData !== null ) {
$out->addJsConfigVars( 'oresData', $oresData );
+   $out->addJsConfigVars(
+   'oresThresholds',
+   [ 'damaging' => $wgOresDamagingThresholds ]
+   );
}
 
$out->addModuleStyles( 'ext.ores.styles' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib650fe11c8780d77f200cecd141bdb021b4bbd62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Move remaining active projects to direct support requests re...

2016-11-05 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Move remaining active projects to direct support requests 
reporting
..

Move remaining active projects to direct support requests reporting

Use translatewiki.net talk pages, avoid going through the central
[[Support]] page which is hard to monitor for well-meaning maintainers.
The links could go directly to the projects' issue trackers in the
future, maybe when both conditions are satisfied:
* a way for us to list and monitor the reports,
* OAuth login with translatewiki.net account.

The projects which had some (open) support requests opened in the
last 12 months are:
* Blockly
* BlueSpice
* CodevTT
* Encyclopedia of Life
* EntryScape
* FreeCol
* Hive.js
* Huggle
* IHRIS
* INaturalist
* Intuition
* Kiwix
* Lib.reviews
* MantisBT
* MediaWiki
* Mifos
* NFC Ring Control
* NOCC
* OpenStreetMap
* Pywikibot
* Wikimedia
* WikimediaMobile

Change-Id: I892904f66327d9a229361f4bf5a60df8fbbf3361
---
M TranslateSettings.php
1 file changed, 56 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/80/319980/1

diff --git a/TranslateSettings.php b/TranslateSettings.php
index b7d363c..202afb0 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -226,6 +226,10 @@
 
 wfAddNamespace( 1202, 'FreeCol' );
 $wgTranslateGroupFiles[] = "$GROUPS/FreeCol/FreeCol.yaml";
+$wgTranslateSupportUrlNamespace[1202] = [
+   'page' => 'Translating_talk:FreeCol',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1204, 'Nocc' );
 $wgTranslateGroupFiles[] = "$GROUPS/Nocc/Nocc.yaml";
@@ -259,6 +263,10 @@
 wfAddNamespace( 1210, 'Mantis' );
 $wgTranslateGroupFiles[] = "$GROUPS/MantisBT/MantisBT.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/MantisBT/CodevTT.yaml";
+$wgTranslateSupportUrlNamespace[1210] = [
+   'page' => 'Translating_talk:MantisBT',
+   'params' => $lqtParams,
+];
 
 # No longer in use.
 wfAddNamespace( 1212, 'Mwlib' );
@@ -279,6 +287,10 @@
 $wgTranslateGroupFiles[] = "$GROUPS/OpenStreetMap/OpenStreetMap.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/OpenStreetMap/Potlatch2.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/OpenStreetMap/WaymarkedTrails.yaml";
+$wgTranslateSupportUrlNamespace[1222] = [
+   'page' => 'Translating_talk:OpenStreetMap',
+   'params' => $lqtParams,
+];
 
 # No longer in use.
 wfAddNamespace( 1224, 'WikiReader' );
@@ -293,9 +305,17 @@
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISQualify.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISTrain.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRIS.yaml";
+$wgTranslateSupportUrlNamespace[1228] = [
+   'page' => 'Translating_talk:iHRIS',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1230, 'Mifos' );
 $wgTranslateGroupFiles[] = "$GROUPS/Mifos/Mifos.yaml";
+$wgTranslateSupportUrlNamespace[1230] = [
+   'page' => 'Translating_talk:Mifos',
+   'params' => $lqtParams,
+];
 
 # No longer in use.
 wfAddNamespace( 1232, 'Wikia' );
@@ -305,6 +325,10 @@
 
 wfAddNamespace( 1236, 'Europeana' );
 $wgTranslateGroupFiles[] = "$GROUPS/Europeana/Europeana.yaml";
+$wgTranslateSupportUrlNamespace[1236] = [
+   'page' => 'Translating_talk:Europeana',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1238, 'Pywikibot' );
 $wgTranslateGroupFiles[] = "$GROUPS/Pywikibot/Pywikibot.yaml";
@@ -331,21 +355,37 @@
 
 wfAddNamespace( 1242, 'EOL' );
 $wgTranslateGroupFiles[] = "$GROUPS/EOL/EOL.yaml";
+$wgTranslateSupportUrlNamespace[1242] = [
+   'page' => 'Translating_talk:Encyclopedia_of_Life',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1244, 'Kiwix' );
 $wgTranslateGroupFiles[] = "$GROUPS/Kiwix/Kiwix.yaml";
+$wgTranslateSupportUrlNamespace[1244] = [
+   'page' => 'Translating_talk:Kiwix',
+   'params' => $lqtParams,
+];
 
 # No longer in use.
 wfAddNamespace( 1246, 'Mozilla' );
 
 wfAddNamespace( 1248, 'Huggle' );
 $wgTranslateGroupFiles[] = "$GROUPS/Huggle/Huggle.yaml";
+$wgTranslateSupportUrlNamespace[1248] = [
+   'page' => 'Translating_talk:Huggle',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1250, 'EtherpadLite' );
 $wgTranslateGroupFiles[] = "$GROUPS/EtherpadLite/EtherpadLite.yaml";
 
 wfAddNamespace( 1252, 'Vicuna' );
 $wgTranslateGroupFiles[] = "$GROUPS/Vicuna/Vicuna.yaml";
+$wgTranslateSupportUrlNamespace[1252] = [
+   'page' => 'Translating_talk:Vicuña_Uploader',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1254, 'FUEL' );
 $wgTranslateGroupFiles[] = "$GROUPS/FUEL/FUEL.yaml";
@@ -365,18 +405,34 @@
 
 wfAddNamespace( 1262, 'iNaturalist' );
 $wgTranslateGroupFiles[] = "$GROUPS/iNaturalist/iNaturalist.yaml";
+$wgTranslateSupportUrlNamespace[1262] = [
+   'page' => 'Translating_talk:iNaturalist',
+   'params' => $lqtParams,
+];
 
 wfAddNamespace( 1264, 'EntryScape' );
 $wgCapitalLinkOverrides[NS_ENTRYSCAPE] = false;
 

[MediaWiki-commits] [Gerrit] translatewiki[master]: Simplify $wgTranslateSupportUrlNamespace definitions

2016-11-05 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Simplify $wgTranslateSupportUrlNamespace definitions
..

Simplify $wgTranslateSupportUrlNamespace definitions

Change-Id: I1d42d753855804dd860da3b8e4e7d4385da6d715
---
M TranslateSettings.php
1 file changed, 31 insertions(+), 80 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/81/319981/1

diff --git a/TranslateSettings.php b/TranslateSettings.php
index 202afb0..f00c676 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -136,6 +136,21 @@
return true;
 }
 
+function twnAddNamespace( $id, $name, $constant = null, $support = true ) {
+   wfAddNamespace( $id, $name, $constant );
+   if ( $support === true ) {
+   $page = $name;
+   } elseif ( is_string( $support ) ) {
+   $page = $support;
+   }
+   if ( isset($page) ) {
+   $wgTranslateSupportUrlNamespace[$id] = [
+   'page' => 'Translating_talk:' . $page,
+   'params' => $lqtParams,
+   ];
+   }
+}
+
 $wgTranslateAuthorBlacklist[] = [ 'black', '/^.*;.*;(Andre Engels|Gangleri|Jon 
Harald 
Søby|IAlex|M.M.S.|BotMultichill|Nike|Piivaat|Raymond|RobertL|SieBot|Siebrand|SPQRobin|Suradnik13|Verdy
 p)$/Ui' ];
 $wgTranslateAuthorBlacklist[] = [ 'black', '/^.*;da;(Wegge|Morten)$/Ui' ]; # 
are both credited under other names
 $wgTranslateAuthorBlacklist[] = [ 'black', '/^out-mantis.*;nl;Siebrand$/Ui' ]; 
# credited under other name
@@ -224,12 +239,8 @@
 # No longer in use.
 wfAddNamespace( 1200, 'Voctrain' );
 
-wfAddNamespace( 1202, 'FreeCol' );
+twnAddNamespace( 1202, 'FreeCol' );
 $wgTranslateGroupFiles[] = "$GROUPS/FreeCol/FreeCol.yaml";
-$wgTranslateSupportUrlNamespace[1202] = [
-   'page' => 'Translating_talk:FreeCol',
-   'params' => $lqtParams,
-];
 
 wfAddNamespace( 1204, 'Nocc' );
 $wgTranslateGroupFiles[] = "$GROUPS/Nocc/Nocc.yaml";
@@ -260,13 +271,9 @@
 # No longer in use.
 wfAddNamespace( 1208, 'StatusNet' );
 
-wfAddNamespace( 1210, 'Mantis' );
+twnAddNamespace( 1210, 'Mantis', $support = 'MantisBT' );
 $wgTranslateGroupFiles[] = "$GROUPS/MantisBT/MantisBT.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/MantisBT/CodevTT.yaml";
-$wgTranslateSupportUrlNamespace[1210] = [
-   'page' => 'Translating_talk:MantisBT',
-   'params' => $lqtParams,
-];
 
 # No longer in use.
 wfAddNamespace( 1212, 'Mwlib' );
@@ -283,14 +290,10 @@
 # No longer in use.
 wfAddNamespace( 1220, 'Okawix' );
 
-wfAddNamespace( 1222, 'Osm' );
+twnAddNamespace( 1222, 'Osm', $support = 'OpenStreetMap' );
 $wgTranslateGroupFiles[] = "$GROUPS/OpenStreetMap/OpenStreetMap.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/OpenStreetMap/Potlatch2.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/OpenStreetMap/WaymarkedTrails.yaml";
-$wgTranslateSupportUrlNamespace[1222] = [
-   'page' => 'Translating_talk:OpenStreetMap',
-   'params' => $lqtParams,
-];
 
 # No longer in use.
 wfAddNamespace( 1224, 'WikiReader' );
@@ -298,24 +301,16 @@
 # No longer in use.
 wfAddNamespace( 1226, 'Shapado' );
 
-wfAddNamespace( 1228, 'iHRIS' );
+twnAddNamespace( 1228, 'iHRIS' );
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISCommon.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISI2ce.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISManage.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISQualify.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRISTrain.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/IHRIS/IHRIS.yaml";
-$wgTranslateSupportUrlNamespace[1228] = [
-   'page' => 'Translating_talk:iHRIS',
-   'params' => $lqtParams,
-];
 
-wfAddNamespace( 1230, 'Mifos' );
+twnAddNamespace( 1230, 'Mifos' );
 $wgTranslateGroupFiles[] = "$GROUPS/Mifos/Mifos.yaml";
-$wgTranslateSupportUrlNamespace[1230] = [
-   'page' => 'Translating_talk:Mifos',
-   'params' => $lqtParams,
-];
 
 # No longer in use.
 wfAddNamespace( 1232, 'Wikia' );
@@ -323,21 +318,13 @@
 # No longer in use.
 wfAddNamespace( 1234, 'OpenImages' );
 
-wfAddNamespace( 1236, 'Europeana' );
+twnAddNamespace( 1236, 'Europeana' );
 $wgTranslateGroupFiles[] = "$GROUPS/Europeana/Europeana.yaml";
-$wgTranslateSupportUrlNamespace[1236] = [
-   'page' => 'Translating_talk:Europeana',
-   'params' => $lqtParams,
-];
 
-wfAddNamespace( 1238, 'Pywikibot' );
+twnAddNamespace( 1238, 'Pywikibot' );
 $wgTranslateGroupFiles[] = "$GROUPS/Pywikibot/Pywikibot.yaml";
 $wgNamespaceAliases['Pywikipedia'] = 1238;
 $wgNamespaceAliases['Pywikipedia_talk'] = 1238;
-$wgTranslateSupportUrlNamespace[NS_PYWIKIBOT] = [
-   'page' => 'Translating_talk:Pywikibot',
-   'params' => $lqtParams,
-];
 
 wfAddNamespace( 1240, 'Intuition' );
 $wgTranslateGroupFiles[] = "$GROUPS/Intuition/IntuitionAgg.yaml";
@@ -353,39 +340,23 @@
'params' => $phabParams,
 ];
 
-wfAddNamespace( 1242, 'EOL' );

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove empty lines at end of functions

2016-11-05 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Remove empty lines at end of functions
..

Remove empty lines at end of functions

It looks like there is something missing after the last statement
Also remove some other empty lines at begin of functions, ifs or loops
while at these files

Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
---
M includes/AjaxDispatcher.php
M includes/EditPage.php
M includes/Feed.php
M includes/MediaWikiServices.php
M includes/OutputPage.php
M includes/Preferences.php
M includes/Title.php
M includes/Xml.php
M includes/actions/HistoryAction.php
M includes/api/ApiQuerySiteinfo.php
M includes/cache/UserCache.php
M includes/cache/localisation/LocalisationCache.php
M includes/deferred/SearchUpdate.php
M includes/diff/WordLevelDiff.php
M includes/filerepo/file/OldLocalFile.php
M includes/htmlform/fields/HTMLSelectAndOtherField.php
M includes/htmlform/fields/HTMLSelectNamespace.php
M includes/htmlform/fields/HTMLSelectOrOtherField.php
M includes/http/MWHttpRequest.php
M includes/installer/DatabaseInstaller.php
M includes/libs/CSSMin.php
M includes/libs/filebackend/SwiftFileBackend.php
M includes/libs/mime/XmlTypeCheck.php
M includes/libs/virtualrest/ParsoidVirtualRESTService.php
M includes/libs/virtualrest/RestbaseVirtualRESTService.php
M includes/media/FormatMetadata.php
M includes/page/ImagePage.php
M includes/parser/LinkHolderArray.php
M includes/parser/ParserOptions.php
M includes/resourceloader/ResourceLoader.php
M includes/search/SearchPostgres.php
M includes/skins/BaseTemplate.php
M includes/skins/SkinTemplate.php
M includes/specialpage/LoginSignupSpecialPage.php
M includes/specials/SpecialSearch.php
M includes/user/User.php
M languages/classes/LanguageSr.php
M languages/classes/LanguageZh.php
M maintenance/Maintenance.php
M maintenance/checkComposerLockUpToDate.php
M maintenance/createCommonPasswordCdb.php
M tests/parser/TestFileReader.php
M tests/phpunit/includes/GitInfoTest.php
M tests/phpunit/includes/HtmlTest.php
M tests/phpunit/includes/LinkFilterTest.php
M tests/phpunit/includes/PagePropsTest.php
M tests/phpunit/includes/TemplateCategoriesTest.php
M tests/phpunit/includes/api/ApiContinuationManagerTest.php
M tests/phpunit/includes/api/ApiResultTest.php
M tests/phpunit/includes/api/ApiRevisionDeleteTest.php
M tests/phpunit/includes/auth/AuthManagerTest.php
M 
tests/phpunit/includes/auth/EmailNotificationSecondaryAuthenticationProviderTest.php
M tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php
M 
tests/phpunit/includes/auth/TemporaryPasswordPrimaryAuthenticationProviderTest.php
M tests/phpunit/includes/auth/UserDataAuthenticationRequestTest.php
M tests/phpunit/includes/exception/MWExceptionTest.php
M tests/phpunit/includes/linker/LinkRendererTest.php
M tests/phpunit/includes/media/ExifBitmapTest.php
M tests/phpunit/includes/session/SessionProviderTest.php
M tests/phpunit/includes/session/SessionTest.php
M tests/phpunit/includes/user/UserTest.php
61 files changed, 0 insertions(+), 128 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/319979/1

diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php
index 9142238..d444a27 100644
--- a/includes/AjaxDispatcher.php
+++ b/includes/AjaxDispatcher.php
@@ -90,7 +90,6 @@
# Or we could throw an exception:
# throw new MWException( __METHOD__ . ' called 
without any data (mode empty).' );
}
-
}
 
/**
@@ -156,6 +155,5 @@
}
}
}
-
}
 }
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 7dd68e4..9c5c91a 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1044,7 +1044,6 @@
 
// Allow extensions to modify form data
Hooks::run( 'EditPage::importFormData', [ $this, $request ] );
-
}
 
/**
@@ -2237,7 +2236,6 @@
 * @return bool
 */
private function mergeChangesIntoContent( &$editContent ) {
-
$db = wfGetDB( DB_MASTER );
 
// This is the revision the editor started from
@@ -2813,7 +2811,6 @@
if ( !$wgUser->getOption( 'previewontop' ) ) {
$this->displayPreviewArea( $previewOutput, false );
}
-
}
 
/**
@@ -2839,7 +2836,6 @@
return Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
$templateListFormatter->format( $templates, $type )
);
-
}
 
/**
diff --git a/includes/Feed.php b/includes/Feed.php
index 8bfe1c7..189fd9f 100644
--- a/includes/Feed.php
+++ b/includes/Feed.php
@@ -236,7 +236,6 @@
$wgOut->addVaryHeader( 'X-Forwarded-Proto' );
}

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

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

Change subject: New Wikidata Build - 2016-11-05T10:00:01+
..


New Wikidata Build - 2016-11-05T10:00:01+

Change-Id: Ic6bd696b8d68de3f221b6cb3ef327a06a2458361
---
M composer.lock
M extensions/Wikibase/client/i18n/nn.json
M extensions/Wikibase/client/i18n/pt.json
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/i18n/cs.json
M extensions/Wikibase/lib/includes/Formatters/QuantityDetailsFormatter.php
M extensions/Wikibase/lib/includes/Units/UnitConverter.php
M 
extensions/Wikibase/lib/tests/phpunit/Formatters/QuantityDetailsFormatterTest.php
M extensions/Wikibase/repo/i18n/cs.json
M extensions/Wikibase/repo/i18n/gl.json
M extensions/Wikibase/repo/i18n/nl.json
M extensions/Wikibase/repo/i18n/pt.json
M 
extensions/Wikibase/repo/includes/ParserOutput/ReferencedEntitiesDataUpdater.php
M extensions/Wikibase/repo/includes/Rdf/RdfVocabulary.php
M extensions/Wikibase/repo/includes/Rdf/Values/QuantityRdfBuilder.php
M extensions/Wikibase/repo/includes/ValidatorBuilders.php
M extensions/Wikibase/repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q1_info.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q1_simple.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q2_labels.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q3_links.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q4_claims.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q5_badges.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q6_qualifiers.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q7_references.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q8_baddates.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/dumpheader.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/empty.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/entities.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/redirect.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/refs.nt
M 
extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Rdf/Values/QuantityRdfBuilderTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/ValidatorBuildersTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/WikibaseRepoTest.php
M vendor/composer/installed.json
37 files changed, 142 insertions(+), 71 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 69f2b04..749ef23 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1581,12 +1581,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "1b04ba6e5cb6a4ccb634b1c822ae3a7e4b9ecef6"
+"reference": "771c426014b4eb0c290e6fea0655779a70fdb80e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/1b04ba6e5cb6a4ccb634b1c822ae3a7e4b9ecef6;,
-"reference": "1b04ba6e5cb6a4ccb634b1c822ae3a7e4b9ecef6",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/771c426014b4eb0c290e6fea0655779a70fdb80e;,
+"reference": "771c426014b4eb0c290e6fea0655779a70fdb80e",
 "shasum": ""
 },
 "require": {
@@ -1596,7 +1596,7 @@
 "data-values/geo": "~1.0",
 "data-values/interfaces": "~0.2.0|~0.1.5",
 "data-values/javascript": "~0.8.0",
-"data-values/number": "~0.8.0",
+"data-values/number": "~0.8.1",
 "data-values/serialization": "~1.1",
 "data-values/time": "~0.8.4",
 "data-values/validators": "~0.1.0",
@@ -1660,7 +1660,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-11-03 22:34:41"
+"time": "2016-11-04 21:53:29"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/client/i18n/nn.json 
b/extensions/Wikibase/client/i18n/nn.json
index 21907f5..96fe1b0 100644
--- a/extensions/Wikibase/client/i18n/nn.json
+++ b/extensions/Wikibase/client/i18n/nn.json
@@ -55,8 +55,20 @@
"wikibase-unconnectedpages-format-row": "($1 {{PLURAL:$1|mellomspråkleg 
lenkje|mellomspråklege lenkjer}} på sida)",
"wikibase-unconnectedpages-submit": "Vis sider",

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove ParserTestParser hook from hooks.txt

2016-11-05 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Remove ParserTestParser hook from hooks.txt
..

Remove ParserTestParser hook from hooks.txt

The hook was removed in Ia8e17008cb9d9b62ce5645e15a41a3b402f4026a

The mentioned file in the documenation was renamed:
parserTest.inc -> ParserTest.php -> ParserTestRunner.php

Change-Id: I8fcf8302b84254d1dc5a3b629f425616bd1f5d13
---
M docs/hooks.txt
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/docs/hooks.txt b/docs/hooks.txt
index ea662cc..30fca07 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2521,10 +2521,6 @@
 &$globals: Array with all the globals which should be set for parser tests.
   The arrays keys serve as the globals names, its values are the globals 
values.
 
-'ParserTestParser': Called when creating a new instance of Parser in
-tests/parser/parserTest.inc.
-&$parser: Parser object created
-
 'ParserTestTables': Alter the list of tables to duplicate when parser tests are
 run. Use when page save hooks require the presence of custom tables to ensure
 that tests continue to run properly.

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Expose the concept url of an ItemPage

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

Change subject: Expose the concept url of an ItemPage
..


Expose the concept url of an ItemPage

The siteinfo parameter was introduced in 
8ef8d6bf9159e5a4cbf9ebfa2286e7599485662b
and deployed as part of 1.28/wmf.23.

This is part 1 of 3 of the commits to allow unit ItemPages
to be passed to WbQuantity.

Bug: T143594
Change-Id: Ie1e67484351e482b33d6a0faf44c388d20d462a5
---
M pywikibot/page.py
M pywikibot/site.py
2 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index fbab94f..93c36f5 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3939,6 +3939,11 @@
 data['sitelinks'] = self.sitelinks
 return data
 
+@pywikibot.site.need_version("1.28-wmf.23")
+def concept_url(self):
+"""Return the full concept URL."""
+return '{0}{1}'.format(self.site.concept_base_uri, self.id)
+
 def getRedirectTarget(self):
 """Return the redirect target for this page."""
 target = super(ItemPage, self).getRedirectTarget()
diff --git a/pywikibot/site.py b/pywikibot/site.py
index f997020..780b48b 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -7032,6 +7032,17 @@
 '%r does not support entity type "property"'
 % self)
 
+@property
+@need_version("1.28-wmf.23")
+def concept_base_uri(self):
+"""
+Return the base uri for concepts/entities.
+
+@return: concept base uri
+@rtype: str
+"""
+return self.siteinfo['general']['wikibase-conceptbaseuri']
+
 def _get_baserevid(self, claim, baserevid):
 """Check that claim.on_item is set and matches baserevid if used."""
 if not claim.on_item:

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

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

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


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

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

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

Change subject: New Wikidata Build - 2016-11-05T10:00:01+
..

New Wikidata Build - 2016-11-05T10:00:01+

Change-Id: Ic6bd696b8d68de3f221b6cb3ef327a06a2458361
---
M composer.lock
M extensions/Wikibase/client/i18n/nn.json
M extensions/Wikibase/client/i18n/pt.json
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/i18n/cs.json
M extensions/Wikibase/lib/includes/Formatters/QuantityDetailsFormatter.php
M extensions/Wikibase/lib/includes/Units/UnitConverter.php
M 
extensions/Wikibase/lib/tests/phpunit/Formatters/QuantityDetailsFormatterTest.php
M extensions/Wikibase/repo/i18n/cs.json
M extensions/Wikibase/repo/i18n/gl.json
M extensions/Wikibase/repo/i18n/nl.json
M extensions/Wikibase/repo/i18n/pt.json
M 
extensions/Wikibase/repo/includes/ParserOutput/ReferencedEntitiesDataUpdater.php
M extensions/Wikibase/repo/includes/Rdf/RdfVocabulary.php
M extensions/Wikibase/repo/includes/Rdf/Values/QuantityRdfBuilder.php
M extensions/Wikibase/repo/includes/ValidatorBuilders.php
M extensions/Wikibase/repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q1_info.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q1_simple.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q2_labels.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q3_links.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q4_claims.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q5_badges.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q6_qualifiers.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q7_references.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/Q8_baddates.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfBuilder/dumpheader.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/empty.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/entities.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/redirect.nt
M extensions/Wikibase/repo/tests/phpunit/data/rdf/RdfDumpGenerator/refs.nt
M 
extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataTestProvider.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Rdf/Values/QuantityRdfBuilderTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/ValidatorBuildersTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/WikibaseRepoTest.php
M vendor/composer/installed.json
37 files changed, 142 insertions(+), 71 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 69f2b04..749ef23 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1581,12 +1581,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "1b04ba6e5cb6a4ccb634b1c822ae3a7e4b9ecef6"
+"reference": "771c426014b4eb0c290e6fea0655779a70fdb80e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/1b04ba6e5cb6a4ccb634b1c822ae3a7e4b9ecef6;,
-"reference": "1b04ba6e5cb6a4ccb634b1c822ae3a7e4b9ecef6",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/771c426014b4eb0c290e6fea0655779a70fdb80e;,
+"reference": "771c426014b4eb0c290e6fea0655779a70fdb80e",
 "shasum": ""
 },
 "require": {
@@ -1596,7 +1596,7 @@
 "data-values/geo": "~1.0",
 "data-values/interfaces": "~0.2.0|~0.1.5",
 "data-values/javascript": "~0.8.0",
-"data-values/number": "~0.8.0",
+"data-values/number": "~0.8.1",
 "data-values/serialization": "~1.1",
 "data-values/time": "~0.8.4",
 "data-values/validators": "~0.1.0",
@@ -1660,7 +1660,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-11-03 22:34:41"
+"time": "2016-11-04 21:53:29"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/client/i18n/nn.json 
b/extensions/Wikibase/client/i18n/nn.json
index 21907f5..96fe1b0 100644
--- a/extensions/Wikibase/client/i18n/nn.json
+++ b/extensions/Wikibase/client/i18n/nn.json
@@ -55,8 +55,20 @@
"wikibase-unconnectedpages-format-row": "($1 {{PLURAL:$1|mellomspråkleg 
lenkje|mellomspråklege lenkjer}} på sida)",

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add missing @since tags to EditPage protected methods

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

Change subject: Add missing @since tags to EditPage protected methods
..


Add missing @since tags to EditPage protected methods

Follows I31f585e5c4fcf724d9aaf670a21f4f0af42e98ce

Change-Id: I6118b8a9a03a20be72a69d429ef75e417dc4cf7d
---
M includes/EditPage.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 0f27e78..7dd68e4 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4401,6 +4401,9 @@
return strtr( $result, [ "" => "

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Let findHooks.php find UserCreateForm/UserLoginForm

2016-11-05 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Let findHooks.php find UserCreateForm/UserLoginForm
..

Let findHooks.php find UserCreateForm/UserLoginForm

To make findHooks.php happy the hooks must be explicit called with
Hooks::run, passing the name with a variable makes it impossible to
detect and therefore the script unhappy.
In case of B/C this is should be a possible solution.

Change-Id: Iaf4d325a3821e09a742d23a3a5bca8493965bfb8
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/319976/1

diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 984e32b..c4e1f17 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -763,10 +763,18 @@
$wgAuth->modifyUITemplate( $template, $action );
 
$oldTemplate = $template;
-   $hookName = $this->isSignup() ? 'UserCreateForm' : 
'UserLoginForm';
-   Hooks::run( $hookName, [ &$template ] );
-   if ( $oldTemplate !== $template ) {
-   wfDeprecated( "reference in $hookName hook", '1.27' );
+
+   // Both Hooks::run are explicit here to make findHooks.php happy
+   if ( $this->isSignup() ) {
+   Hooks::run( 'UserCreateForm', [ &$template ] );
+   if ( $oldTemplate !== $template ) {
+   wfDeprecated( "reference in UserCreateForm 
hook", '1.27' );
+   }
+   } else {
+   Hooks::run( 'UserLoginForm', [ &$template ] );
+   if ( $oldTemplate !== $template ) {
+   wfDeprecated( "reference in UserLoginForm 
hook", '1.27' );
+   }
}
 
return $template;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix @since tags of changes that missed the branch

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

Change subject: Fix @since tags of changes that missed the branch
..


Fix @since tags of changes that missed the branch

Follows:
FormOptions: I29ae63472536f99f7f9546f30d86e7bd324d3094
MediaWikiServices: Ie5fd2c523ceec8cc2656e749928f38909dc4bdf1
InterwikiLookupAdapter: I387dc2ff3f5564fcedde835dec66781d8e9424fd

Change-Id: I8d99d0b559d04083fb83b0fcf45cde95dab32d64
---
M includes/FormOptions.php
M includes/MediaWikiServices.php
M includes/interwiki/InterwikiLookupAdapter.php
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/FormOptions.php b/includes/FormOptions.php
index 826f3bb..e558944 100644
--- a/includes/FormOptions.php
+++ b/includes/FormOptions.php
@@ -53,7 +53,7 @@
 */
const INTNULL = 3;
/** Array type, maps guessType() to WebRequest::getArray()
-* @since 1.28 */
+* @since 1.29 */
const ARR = 5;
/* @} */
 
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index f882d74..bb2ed5b 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -567,7 +567,7 @@
}
 
/**
-* @since 1.28
+* @since 1.29
 * @return Parser
 */
public function getParser() {
diff --git a/includes/interwiki/InterwikiLookupAdapter.php 
b/includes/interwiki/InterwikiLookupAdapter.php
index a17bdd9..ba53188 100644
--- a/includes/interwiki/InterwikiLookupAdapter.php
+++ b/includes/interwiki/InterwikiLookupAdapter.php
@@ -21,7 +21,7 @@
  *
  * @file
  *
- * @since 1.28
+ * @since 1.29
  * @ingroup InterwikiLookup
  *
  * @license GNU GPL v2+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d99d0b559d04083fb83b0fcf45cde95dab32d64
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix case of MediaWikiSite in IWLookupAdapter

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

Change subject: Fix case of MediaWikiSite in IWLookupAdapter
..


Fix case of MediaWikiSite in IWLookupAdapter

Change-Id: Ice98cb0a3127333c045cfb4328081ad5c490c435
---
M includes/interwiki/InterwikiLookupAdapter.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/interwiki/InterwikiLookupAdapter.php 
b/includes/interwiki/InterwikiLookupAdapter.php
index ba53188..60d6f43 100644
--- a/includes/interwiki/InterwikiLookupAdapter.php
+++ b/includes/interwiki/InterwikiLookupAdapter.php
@@ -30,7 +30,7 @@
 use Interwiki;
 use Site;
 use SiteLookup;
-use MediawikiSite;
+use MediaWikiSite;
 
 class InterwikiLookupAdapter implements InterwikiLookup {
 
@@ -155,7 +155,7 @@
$interwikis = [];
foreach ( $site->getInterwikiIds() as $interwiki ) {
$url = $site->getPageUrl();
-   if ( $site instanceof MediawikiSite ) {
+   if ( $site instanceof MediaWikiSite ) {
$path = $site->getFileUrl( 'api.php' );
} else {
$path = '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice98cb0a3127333c045cfb4328081ad5c490c435
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Restore hooks.txt for ParserLimitReportFormat

2016-11-05 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Restore hooks.txt for ParserLimitReportFormat
..

Restore hooks.txt for ParserLimitReportFormat

The hook was readded with Iad2646acde79b8a59710bb9fd5fbbfea5a39c341

The text is from I2783c46c6d80f828f9ecf5e71fc8f35910454582

Change-Id: I5e26e0c9bef06e0a6213fd219bda58a61da80665
---
M docs/hooks.txt
1 file changed, 13 insertions(+), 1 deletion(-)


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

diff --git a/docs/hooks.txt b/docs/hooks.txt
index ea662cc..568b0d6 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2487,12 +2487,24 @@
 &$parser: Parser object
 &$varCache: variable cache (array)
 
-'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare instead.
+'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare and
+ParserLimitReportFormat instead.
 Called at the end of Parser:parse() when the parser will
 include comments about size of the text parsed.
 $parser: Parser object
 &$limitReport: text that will be included (without comment tags)
 
+'ParserLimitReportFormat': Called for each row in the parser limit report that
+needs formatting. If nothing handles this hook, the default is to use "$key" to
+get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to
+format the value.
+$key: Key for the limit report item (string)
+&$value: Value of the limit report item
+&$report: String onto which to append the data
+$isHTML: If true, $report is an HTML table with two columns; if false, it's
+  text intended for display in a monospaced font.
+$localize: If false, $report should be output in English.
+
 'ParserLimitReportPrepare': Called at the end of Parser:parse() when the parser
 will include comments about size of the text parsed. Hooks should use
 $output->setLimitReportData() to populate data. Functions for this hook should

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Move save dialog checkbox code up from DAT into ArticleTarget

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

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

Change subject: Move save dialog checkbox code up from DAT into ArticleTarget
..

Move save dialog checkbox code up from DAT into ArticleTarget

So it applies to MobileArticleTarget.

This shows the checkboxes on mobile.

Bug: T148914
Change-Id: Ib6559d5601004e58b72903805059e04f42acc85f
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
2 files changed, 94 insertions(+), 106 deletions(-)


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

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 8ce1ee6..958c635 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -41,9 +41,6 @@
this.recreating = false;
this.activatingDeferred = null;
this.toolbarSetupDeferred = null;
-   this.checkboxFields = null;
-   this.checkboxesByName = null;
-   this.$otherFields = null;
this.suppressNormalStartupDialogs = false;
this.editingTabDialog = null;
 
@@ -314,7 +311,7 @@
  * @inheritdoc
  */
 ve.init.mw.DesktopArticleTarget.prototype.loadSuccess = function ( response ) {
-   var $checkboxes, defaults, data, windowManager,
+   var windowManager,
target = this;
 
// Parent method
@@ -353,66 +350,6 @@
new mw.Api().saveOption( 
'visualeditor-hidebetawelcome', '1' );
}
this.suppressNormalStartupDialogs = true;
-   }
-
-   data = response ? ( response.visualeditor || response.visualeditoredit 
) : {};
-
-   this.checkboxFields = [];
-   this.checkboxesByName = {};
-   this.$otherFields = $( [] );
-   if ( [ 'edit', 'submit' ].indexOf( mw.util.getParamValue( 'action' ) ) 
!== -1 ) {
-   $( '#content #firstHeading' ).text(
-   mw.Title.newFromText( mw.config.get( 'wgPageName' ) 
).getPrefixedText()
-   );
-   }
-
-   if ( data.checkboxes ) {
-   defaults = {};
-   $( '.editCheckboxes input' ).each( function () {
-   defaults[ this.name ] = this.checked;
-   } );
-
-   $checkboxes = $( '' ).html( ve.getObjectValues( 
data.checkboxes ).join( '' ) );
-   $checkboxes.find( 'input[type=checkbox]' ).each( function () {
-   var $label, title, checkbox,
-   $this = $( this ),
-   name = $this.attr( 'name' ),
-   id = $this.attr( 'id' );
-
-   if ( !name ) {
-   // This really shouldn't happen..
-   return;
-   }
-
-   // Label with for=id
-   if ( id ) {
-   $label = $checkboxes.find( 'label[for=' + id + 
']' );
-   }
-   // Label wrapped input
-   if ( !$label ) {
-   $label = $this.closest( 'label' );
-   }
-   if ( $label ) {
-   title = $label.attr( 'title' );
-   $label.find( 'a' ).attr( 'target', '_blank' );
-   }
-   checkbox = new OO.ui.CheckboxInputWidget( {
-   value: $this.attr( 'value' ),
-   selected: defaults[ name ] !== undefined ? 
defaults[ name ] : $this.prop( 'checked' ),
-   classes: [ 've-ui-mwSaveDialog-checkbox-' + 
name ]
-   } );
-   // HACK: CheckboxInputWidget doesn't support access keys
-   checkbox.$input.attr( 'accesskey', $( this ).attr( 
'accesskey' ) );
-   target.checkboxFields.push(
-   new OO.ui.FieldLayout( checkbox, {
-   align: 'inline',
-   label: $label ? $label.contents() : 
undefined,
-   title: title
-   } )
-   );
-   target.checkboxesByName[ name ] = checkbox;
-   } );
-   this.$otherFields = $checkboxes.find( 'input[type!=checkbox]' );
}
 };
 
@@ -1012,31 +949,6 @@
 };
 
 /**
- * @inheritdoc
- */
-ve.init.mw.DesktopArticleTarget.prototype.getSaveFields = function () {
-   var name, fieldValues = {};
-
-   for ( name in this.checkboxesByName ) {
-   if (