[MediaWiki-commits] [Gerrit] integration/config[master]: Configure jobs for mediawiki/libs/RemexHtml

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328136 )

Change subject: Configure jobs for mediawiki/libs/RemexHtml
..


Configure jobs for mediawiki/libs/RemexHtml

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d9edbed..7f4387e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -8841,6 +8841,13 @@
   #- doxygen-publish
   - phpunit-coverage-publish
 
+  - name: mediawiki/libs/RemexHtml
+template:
+ - name: composer-test-package55
+postmerge:
+  - doxygen-publish
+  - phpunit-coverage-publish
+
   - name: mediawiki/libs/ScopedCallback
 template:
  - name: composer-test-package55

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: [EducationProgram] Add composer-test and move jshint to check:

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/276065 )

Change subject: [EducationProgram] Add composer-test and move jshint to check:
..


[EducationProgram] Add composer-test and move jshint to check:

Requires I9dd4f0e92bb944958476ac3e70879738abf45fbf

Change-Id: Ida6174a605b0900a3e644b2419147d203112a217
---
M zuul/layout.yaml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index ede2f9d..d9edbed 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3477,11 +3477,12 @@
 
   - name: mediawiki/extensions/EducationProgram
 template:
-  - name: jshint
+  - name: composer-test
   - name: extension-unittests-generic
   - name: npm
 check:
   - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/Elastica
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida6174a605b0900a3e644b2419147d203112a217
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
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] integration/config[master]: Make mwext-PoolCounter-build-jessie more like the Debian pac...

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325144 )

Change subject: Make mwext-PoolCounter-build-jessie more like the Debian package
..


Make mwext-PoolCounter-build-jessie more like the Debian package

Basically syncs up with e2aae3e5cbec and 2c11cfb55.

Bug: T152338
Change-Id: I6c2504264eea9f09351fc7351f16991200178aec
---
M jjb/mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 91024f6..adc1681 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -374,16 +374,7 @@
  - castor-load
  - shell: |
 cd daemon
-make
- - shell: |
- # Install to BUNDLE_PATH, injected by Zuul
- bundle install --clean
- cd daemon
-
- # AUTOTEST is recognized by cucumber ANSI formatter to force color
- # output on non TTY.
- export AUTOTEST=1
- bundle exec make test
+make test
 publishers:
  - archive:
  artifacts: daemon/poolcounterd

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c2504264eea9f09351fc7351f16991200178aec
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
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] integration/config[master]: [CentralAuth] Add composer-test test

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/288819 )

Change subject: [CentralAuth] Add composer-test test
..


[CentralAuth] Add composer-test test

Also add jshint to check: for non-whitelisted users.

Requires I539fbf3ea952f95a2dd0d3ce2c12ea3901bd7960

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 1f1759b..ede2f9d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2987,12 +2987,14 @@
 
   - name: mediawiki/extensions/CentralAuth
 template:
+  - name: composer-test
   - name: extension-qunit-generic
   - name: extension-unittests-generic
   - name: rake
   - name: npm
 check:
   - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/CentralNotice
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d000322a0f93c9c0d5cb9da7fec44b20a90e1ae
Gerrit-PatchSet: 9
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
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] integration/config[master]: Configure jobs for mediawiki/libs/RemexHtml

2016-12-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328136 )

Change subject: Configure jobs for mediawiki/libs/RemexHtml
..

Configure jobs for mediawiki/libs/RemexHtml

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/36/328136/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index d9edbed..7f4387e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -8841,6 +8841,13 @@
   #- doxygen-publish
   - phpunit-coverage-publish
 
+  - name: mediawiki/libs/RemexHtml
+template:
+ - name: composer-test-package55
+postmerge:
+  - doxygen-publish
+  - phpunit-coverage-publish
+
   - name: mediawiki/libs/ScopedCallback
 template:
  - name: composer-test-package55

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Don't hardcode `hhvm` in "composer test" and "phpcs" commands

2016-12-18 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328125 )

Change subject: Don't hardcode `hhvm` in "composer test" and "phpcs" commands
..


Don't hardcode `hhvm` in "composer test" and "phpcs" commands

Also composer automatically adds vendor/bin to the path, so it's not
necessary.

Change-Id: I71cea0a30a1ba928e94d7ce35d884ed063e58cb3
---
M composer.json
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/composer.json b/composer.json
index c7d9486..9f56fe4 100644
--- a/composer.json
+++ b/composer.json
@@ -21,7 +21,7 @@
}
},
"scripts": {
-   "test": "hhvm vendor/bin/phpunit --no-globals-backup 
tests/phpunit",
-   "phpcs": "hhvm vendor/bin/phpcs -s src"
+   "test": "phpunit --no-globals-backup tests/phpunit",
+   "phpcs": "phpcs -s src"
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71cea0a30a1ba928e94d7ce35d884ed063e58cb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Unwrap single pasted content branch nodes

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327774 )

Change subject: Unwrap single pasted content branch nodes
..


Unwrap single pasted content branch nodes

This usually means the user selected just text, but
the browser added the surrounding node (e.g. header) to the
paste context.

Bug: T153249
Change-Id: Icd3bb68bb072883eb408c0fb1e754f0f0e49d860
---
M src/ce/ve.ce.Surface.js
M tests/ce/ve.ce.Surface.test.js
2 files changed, 84 insertions(+), 7 deletions(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index e24a747..ec04f41 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -1889,7 +1889,7 @@
$elements, pasteData, slice, internalListRange,
data, pastedDocumentModel, htmlDoc, $body, $images, i,
context, left, right, contextRange, pastedText, handled,
-   tableAction, htmlBlacklist,
+   tableAction, htmlBlacklist, pastedNodes,
items = [],
metadataIdRegExp = ve.init.platform.getMetadataIdRegExp(),
importantElement = '[id],[typeof],[rel]',
@@ -2162,9 +2162,10 @@
targetFragment.removeContent();
}
 
+   internalListRange = 
pastedDocumentModel.getInternalList().getListNode().getOuterRange();
+
// If the paste was given context, calculate the range of the 
inserted data
if ( beforePasteData.context ) {
-   internalListRange = 
pastedDocumentModel.getInternalList().getListNode().getOuterRange();
context = new ve.dm.ElementLinearData(
pastedDocumentModel.getStore(),
ve.copy( beforePasteData.context )
@@ -2204,6 +2205,23 @@
right--;
}
contextRange = new ve.Range( left, right );
+   } else {
+   contextRange = new ve.Range( 0, internalListRange.start 
);
+   }
+   pastedNodes = pastedDocumentModel.selectNodes( contextRange, 
'siblings' ).filter( function ( node ) {
+   // Ignore nodes where nothing is selected
+   return !( node.range && node.range.isCollapsed() );
+   } );
+
+   // Unwrap single content branch nodes to match internal 
copy/paste behaviour
+   // (which wouldn't put the open and close tags in the clipboard 
to begin with).
+   if (
+   pastedNodes.length === 1 &&
+   pastedNodes[ 0 ].node instanceof ve.dm.ContentBranchNode
+   ) {
+   if ( contextRange.containsRange( pastedNodes[ 0 
].nodeRange ) ) {
+   contextRange = pastedNodes[ 0 ].nodeRange;
+   }
}
 
// If the external HTML turned out to be plain text after
diff --git a/tests/ce/ve.ce.Surface.test.js b/tests/ce/ve.ce.Surface.test.js
index 7b9fbbe..9f27080 100644
--- a/tests/ce/ve.ce.Surface.test.js
+++ b/tests/ce/ve.ce.Surface.test.js
@@ -2003,19 +2003,21 @@
expectedOps: [
[
{
+   type: 'retain',
+   length: 1
+   },
+   {
type: 'replace',
insert: [
-   { type: 
'paragraph', internal: { generated: 'wrapper' } },
{ type: 
'alienInline' },
-   { type: 
'/alienInline' },
-   { type: 
'/paragraph' }
+   { type: 
'/alienInline' }
],
remove: []
},
-   { type: 'retain', length: 
docLen }
+   { type: 'retain', length: 
docLen - 1 }
]
],
-   expectedRangeOrSelection: new ve.Range( 4 ),
+   expectedRangeOrSel

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Ensure document is always sliced in #insertDocument when new...

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327391 )

Change subject: Ensure document is always sliced in #insertDocument when 
newDocRange passed
..


Ensure document is always sliced in #insertDocument when newDocRange passed

Bug: T153247
Change-Id: I688aa75f2d2c6065904e7c81f55f1001d7a26743
---
M src/dm/ve.dm.SourceSurfaceFragment.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/src/dm/ve.dm.SourceSurfaceFragment.js 
b/src/dm/ve.dm.SourceSurfaceFragment.js
index 2ff50bf..0dc2c7f 100644
--- a/src/dm/ve.dm.SourceSurfaceFragment.js
+++ b/src/dm/ve.dm.SourceSurfaceFragment.js
@@ -112,7 +112,10 @@
return this;
}
 
-   newDocRange = newDocRange || new ve.Range( 0, 
doc.getInternalList().getListNode().getOuterRange().start );
+   if ( newDocRange ) {
+   doc = doc.shallowCloneFromRange( newDocRange );
+   newDocRange = doc.originalRange;
+   }
 
if ( doc.data.isPlainText( newDocRange, false, [ 'paragraph' ] ) ) {
return 
ve.dm.SourceSurfaceFragment.super.prototype.insertContent.call( this, 
doc.data.getDataSlice( newDocRange ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I688aa75f2d2c6065904e7c81f55f1001d7a26743
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Use this.document directly in surface fragment

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327775 )

Change subject: Use this.document directly in surface fragment
..


Use this.document directly in surface fragment

Change-Id: Iae4b22cce9509fe585d60f9d21b3c1a81c71f683
---
M src/dm/ve.dm.SurfaceFragment.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/src/dm/ve.dm.SurfaceFragment.js b/src/dm/ve.dm.SurfaceFragment.js
index 1f05815..3497ada 100644
--- a/src/dm/ve.dm.SurfaceFragment.js
+++ b/src/dm/ve.dm.SurfaceFragment.js
@@ -1134,10 +1134,10 @@
}
 
for ( i = 0; i < innerDepth; i++ ) {
-   innerUnwrapper.push( this.surface.getDocument().data.getData( 
range.start + i ) );
+   innerUnwrapper.push( this.document.data.getData( range.start + 
i ) );
}
for ( i = outerDepth; i > 0; i-- ) {
-   outerUnwrapper.push( this.surface.getDocument().data.getData( 
range.start - i ) );
+   outerUnwrapper.push( this.document.data.getData( range.start - 
i ) );
}
 
this.change( ve.dm.TransactionBuilder.static.newFromWrap(
@@ -1186,7 +1186,7 @@
}
 
for ( i = 0; i < depth; i++ ) {
-   unwrapper.push( this.surface.getDocument().data.getData( 
range.start + i ) );
+   unwrapper.push( this.document.data.getData( range.start + i ) );
}
 
this.change(
@@ -1287,7 +1287,7 @@
}
 
for ( i = 0; i < depth; i++ ) {
-   unwrapper.push( this.surface.getDocument().data.getData( 
range.start + i ) );
+   unwrapper.push( this.document.data.getData( range.start + i ) );
}
 
this.change(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae4b22cce9509fe585d60f9d21b3c1a81c71f683
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Divec 
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]: Oppia: use the new includeMetadata option set to false

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328126 )

Change subject: Oppia: use the new includeMetadata option set to false
..


Oppia: use the new includeMetadata option set to false

Change-Id: Ib961b0b7f56db81b29a80fdcfba7c56b71378ff7
---
M groups/Oppia/Oppia.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/groups/Oppia/Oppia.yaml b/groups/Oppia/Oppia.yaml
index 150cada..46765e6 100644
--- a/groups/Oppia/Oppia.yaml
+++ b/groups/Oppia/Oppia.yaml
@@ -11,3 +11,4 @@
   class: JsonFFS
   sourcePattern: "%GROUPROOT%/oppia/assets/i18n/%CODE%.json"
   definitionFile: "%GROUPROOT%/oppia/assets/i18n/en.json"
+  includeMetadata: false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib961b0b7f56db81b29a80fdcfba7c56b71378ff7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Nikerabbit 
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...Translate[master]: TPSection: remove bogus parameter to isInline

2016-12-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328127 )

Change subject: TPSection: remove bogus parameter to isInline
..

TPSection: remove bogus parameter to isInline

Throws warnings.

Change-Id: Ic5e5ec7e9ddf9e03fe47e26aee707a767eb1d240
---
M tag/TPSection.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/27/328127/1

diff --git a/tag/TPSection.php b/tag/TPSection.php
index 747812a..aa58e92 100644
--- a/tag/TPSection.php
+++ b/tag/TPSection.php
@@ -48,7 +48,7 @@
$this->inline = (bool)$value;
}
 
-   public function isInline( $value ) {
+   public function isInline() {
return $this->inline;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5e5ec7e9ddf9e03fe47e26aee707a767eb1d240
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Oppia: use the new includeMetadata option set to false

2016-12-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328126 )

Change subject: Oppia: use the new includeMetadata option set to false
..

Oppia: use the new includeMetadata option set to false

Change-Id: Ib961b0b7f56db81b29a80fdcfba7c56b71378ff7
---
M groups/Oppia/Oppia.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/26/328126/1

diff --git a/groups/Oppia/Oppia.yaml b/groups/Oppia/Oppia.yaml
index 150cada..46765e6 100644
--- a/groups/Oppia/Oppia.yaml
+++ b/groups/Oppia/Oppia.yaml
@@ -11,3 +11,4 @@
   class: JsonFFS
   sourcePattern: "%GROUPROOT%/oppia/assets/i18n/%CODE%.json"
   definitionFile: "%GROUPROOT%/oppia/assets/i18n/en.json"
+  includeMetadata: false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib961b0b7f56db81b29a80fdcfba7c56b71378ff7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Add composer.lock to .gitignore

2016-12-18 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328124 )

Change subject: Add composer.lock to .gitignore
..


Add composer.lock to .gitignore

Change-Id: Ie689f257bbe5f7c0e16079d24166bc0d1bda4813
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index 2cb0fd9..62003db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 .*.swp
 tags
 vendor
+/composer.lock

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie689f257bbe5f7c0e16079d24166bc0d1bda4813
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: phpcs.xml: Consistently use tabs

2016-12-18 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328123 )

Change subject: phpcs.xml: Consistently use tabs
..


phpcs.xml: Consistently use tabs

Change-Id: I35eab9c7ff32ed7783007d787aa939b2c7aedc87
---
M phpcs.xml
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/phpcs.xml b/phpcs.xml
index 42361cf..3a1e7cf 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,9 +6,9 @@



-.
-
-
+   .
+   
+   
vendor
HTMLData.php
test.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35eab9c7ff32ed7783007d787aa939b2c7aedc87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Don't hardcode `hhvm` in "composer test" and "phpcs" commands

2016-12-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328125 )

Change subject: Don't hardcode `hhvm` in "composer test" and "phpcs" commands
..

Don't hardcode `hhvm` in "composer test" and "phpcs" commands

Also composer automatically adds vendor/bin to the path, so it's not
necessary.

Change-Id: I71cea0a30a1ba928e94d7ce35d884ed063e58cb3
---
M composer.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/25/328125/1

diff --git a/composer.json b/composer.json
index c7d9486..9f56fe4 100644
--- a/composer.json
+++ b/composer.json
@@ -21,7 +21,7 @@
}
},
"scripts": {
-   "test": "hhvm vendor/bin/phpunit --no-globals-backup 
tests/phpunit",
-   "phpcs": "hhvm vendor/bin/phpcs -s src"
+   "test": "phpunit --no-globals-backup tests/phpunit",
+   "phpcs": "phpcs -s src"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71cea0a30a1ba928e94d7ce35d884ed063e58cb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: phpcs.xml: Consistently use tabs

2016-12-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328123 )

Change subject: phpcs.xml: Consistently use tabs
..

phpcs.xml: Consistently use tabs

Change-Id: I35eab9c7ff32ed7783007d787aa939b2c7aedc87
---
M phpcs.xml
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/23/328123/1

diff --git a/phpcs.xml b/phpcs.xml
index 42361cf..3a1e7cf 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,9 +6,9 @@



-.
-
-
+   .
+   
+   
vendor
HTMLData.php
test.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35eab9c7ff32ed7783007d787aa939b2c7aedc87
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: Add composer.lock to .gitignore

2016-12-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328124 )

Change subject: Add composer.lock to .gitignore
..

Add composer.lock to .gitignore

Change-Id: Ie689f257bbe5f7c0e16079d24166bc0d1bda4813
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/24/328124/1

diff --git a/.gitignore b/.gitignore
index 2cb0fd9..62003db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 .*.swp
 tags
 vendor
+/composer.lock

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie689f257bbe5f7c0e16079d24166bc0d1bda4813
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: FuzzTest: blacklist menu/menuitem as well as isindex

2016-12-18 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328122 )

Change subject: FuzzTest: blacklist menu/menuitem as well as isindex
..


FuzzTest: blacklist menu/menuitem as well as isindex

Similar to the reasons for blacklisting the menuitem tests in phpunit:
the spec keeps changing.

Change-Id: I762824b64a7731910aca77ab350687a0b6ef71e4
---
M src/FuzzTest/FuzzTest.php
M src/FuzzTest/TokenSalad.php
2 files changed, 11 insertions(+), 10 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/src/FuzzTest/FuzzTest.php b/src/FuzzTest/FuzzTest.php
index e0c85bb..99339c2 100644
--- a/src/FuzzTest/FuzzTest.php
+++ b/src/FuzzTest/FuzzTest.php
@@ -26,11 +26,6 @@
for ( $seed = 0; true; $seed++ ) {
mt_srand( $seed );
$text = $tokenSalad->next();
-
-   if ( stripos( $text, "isindex" ) !== false ) {
-   // Skip isindex tests
-   continue;
-   }
if ( @iconv( 'UTF-8', 'UTF-8', $text ) === false ) {
// Skip invalid UTF-8 tests
continue;
diff --git a/src/FuzzTest/TokenSalad.php b/src/FuzzTest/TokenSalad.php
index b39fd63..8292a60 100644
--- a/src/FuzzTest/TokenSalad.php
+++ b/src/FuzzTest/TokenSalad.php
@@ -21,6 +21,8 @@
private $characterSalad;
private $entities;
 
+   private static $elementNameBlacklist = '/^(menu|isindex)/i';
+
public function __construct( $maxLength ) {
$this->maxLength = $maxLength;
$this->bigDictionary = Utils::getBigDictionary();
@@ -106,15 +108,19 @@
}
 
private function getElementName() {
-   if ( Utils::coinToss( 0.5 ) ) {
+   do {
if ( Utils::coinToss( 0.5 ) ) {
-   return Utils::pickRandom( $this->specialTags );
+   if ( Utils::coinToss( 0.5 ) ) {
+   $name = Utils::pickRandom( 
$this->specialTags );
+   } else {
+   $name = Utils::pickRandom( 
FuzzData::$w3schoolsTagNames );
+   }
} else {
-   return Utils::pickRandom( 
FuzzData::$w3schoolsTagNames );
+   $name = Utils::pickRandom( $this->bigDictionary 
);
}
-   } else {
-   return Utils::pickRandom( $this->bigDictionary );
}
+   while ( preg_match( self::$elementNameBlacklist, $name ) );
+   return $name;
}
 
private function getAttributeName() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I762824b64a7731910aca77ab350687a0b6ef71e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] mediawiki...RemexHtml[master]: FuzzTest: blacklist menu/menuitem as well as isindex

2016-12-18 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328122 )

Change subject: FuzzTest: blacklist menu/menuitem as well as isindex
..

FuzzTest: blacklist menu/menuitem as well as isindex

Similar to the reasons for blacklisting the menuitem tests in phpunit:
the spec keeps changing.

Change-Id: I762824b64a7731910aca77ab350687a0b6ef71e4
---
M src/FuzzTest/FuzzTest.php
M src/FuzzTest/TokenSalad.php
2 files changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/22/328122/1

diff --git a/src/FuzzTest/FuzzTest.php b/src/FuzzTest/FuzzTest.php
index e0c85bb..99339c2 100644
--- a/src/FuzzTest/FuzzTest.php
+++ b/src/FuzzTest/FuzzTest.php
@@ -26,11 +26,6 @@
for ( $seed = 0; true; $seed++ ) {
mt_srand( $seed );
$text = $tokenSalad->next();
-
-   if ( stripos( $text, "isindex" ) !== false ) {
-   // Skip isindex tests
-   continue;
-   }
if ( @iconv( 'UTF-8', 'UTF-8', $text ) === false ) {
// Skip invalid UTF-8 tests
continue;
diff --git a/src/FuzzTest/TokenSalad.php b/src/FuzzTest/TokenSalad.php
index b39fd63..8292a60 100644
--- a/src/FuzzTest/TokenSalad.php
+++ b/src/FuzzTest/TokenSalad.php
@@ -21,6 +21,8 @@
private $characterSalad;
private $entities;
 
+   private static $elementNameBlacklist = '/^(menu|isindex)/i';
+
public function __construct( $maxLength ) {
$this->maxLength = $maxLength;
$this->bigDictionary = Utils::getBigDictionary();
@@ -106,15 +108,19 @@
}
 
private function getElementName() {
-   if ( Utils::coinToss( 0.5 ) ) {
+   do {
if ( Utils::coinToss( 0.5 ) ) {
-   return Utils::pickRandom( $this->specialTags );
+   if ( Utils::coinToss( 0.5 ) ) {
+   $name = Utils::pickRandom( 
$this->specialTags );
+   } else {
+   $name = Utils::pickRandom( 
FuzzData::$w3schoolsTagNames );
+   }
} else {
-   return Utils::pickRandom( 
FuzzData::$w3schoolsTagNames );
+   $name = Utils::pickRandom( $this->bigDictionary 
);
}
-   } else {
-   return Utils::pickRandom( $this->bigDictionary );
}
+   while ( preg_match( self::$elementNameBlacklist, $name ) );
+   return $name;
}
 
private function getAttributeName() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I762824b64a7731910aca77ab350687a0b6ef71e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Rename location_update functions to indicate they are insert.

2016-12-18 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328119 )

Change subject: Rename location_update functions to indicate they are insert.
..

Rename location_update functions to indicate they are insert.

These functions create a duplicate address if called when they should be 
updating

Bug: T152475
Change-Id: I74dc55d5aabb19dd41fb5c7faa3f10c7ca530025
---
M sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
2 files changed, 20 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/19/328119/1

diff --git 
a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php 
b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
index fc28436..0d303a1 100644
--- a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
@@ -525,7 +525,7 @@
$contact = wmf_civicrm_message_contact_update( $msg, 
$recur_record->contact_id );
 
// Insert the location record
-   wmf_civicrm_message_location_update( $msg, $contact );
+   wmf_civicrm_message_location_insert( $msg, $contact );
 
// Tag contact for review
wmf_civicrm_tag_contact_for_review( $contact );
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 2760412..824e783 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1361,24 +1361,20 @@
  * @param array $contact
  */
 function wmf_civicrm_message_location_insert( $msg, $contact ) {
-wmf_civicrm_message_location_update( $msg, $contact );
+wmf_civicrm_message_email_insert( $msg, $contact[ 'id' ] );
+wmf_civicrm_message_address_insert( $msg, $contact[ 'id' ] );
 }
 
 /**
- * Update the location record
+ * Updates the email for a contact.
  *
- * Serves as a standard way for message processors to handle location
- * updates.
+ * If updating or unsure use the marginally slower update function.
  *
- * @param array $msg
- * @param array $contact
+ * @param string $msg
+ * @param int $contact_id
+ * @throws \WmfException
  */
-function wmf_civicrm_message_location_update( $msg, $contact ) {
-wmf_civicrm_message_email_update( $msg, $contact[ 'id' ] );
-wmf_civicrm_message_address_update( $msg, $contact[ 'id' ] );
-}
-
-function wmf_civicrm_message_email_update( $msg, $contact_id ) {
+function wmf_civicrm_message_email_insert($msg, $contact_id ) {
 // unset the email address if the default is used
 // this enables us to properly dedupe contacts later on
 if( empty( $msg['email'] ) or $msg[ 'email' ] === 'nob...@wikimedia.org' ){
@@ -1402,7 +1398,17 @@
 }
 }
 
-function wmf_civicrm_message_address_update( $msg, $contact_id ) {
+/**
+ * Insert a new address for a contact.
+ *
+ * If updating or unsure use the marginally slower update function.
+ *
+ * @param array $msg
+ * @param int $contact_id
+ *
+ * @throws \WmfException
+ */
+function wmf_civicrm_message_address_insert($msg, $contact_id ) {
 $loc_type_id = wmf_civicrm_get_default_location_type_id();
 
 // We can do these lookups a bit more efficiently than Civi

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Extend test to ensure double addresses not created.

2016-12-18 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328118 )

Change subject: Extend test to ensure double addresses not created.
..

Extend test to ensure double addresses not created.

Bug: T152475
Change-Id: Ia744f342aa0ca61cf8196867edb3a58df39a
---
M sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
1 file changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/18/328118/1

diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
index 86ccc4e..a0e48ae 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
@@ -230,6 +230,7 @@
 }
 
 public function testRecurring() {
+civicrm_initialize();
 $subscr_id = mt_rand();
 $values = array( 'subscr_id' => $subscr_id );
 $signup_message = new RecurringSignupMessage( $values );
@@ -243,8 +244,14 @@
 exchange_rate_cache_set( 'USD', $payment_time, 1 );
 exchange_rate_cache_set( $message->get('mc_currency'), $payment_time, 
3 );
 
-$this->recurringConsumer->processMessage( $signup_message->getBody() );
-$this->recurringConsumer->processMessage( $message->getBody() );
+$this->recurringConsumer->processMessage($signup_message->getBody());
+
+$msg = $message->getBody();
+db_insert('contribution_tracking')
+  ->fields(array('id' => $msg['custom']))
+->execute();
+
+$this->recurringConsumer->processMessage($msg);
 $this->recurringConsumer->processMessage( $message2->getBody() );
 
 $recur_record = wmf_civicrm_get_recur_record( $subscr_id );
@@ -259,6 +266,12 @@
 $this->assertEquals( $recur_record->id, 
$contributions2[0]['contribution_recur_id']);
 
 $this->assertEquals( $contributions[0]['contact_id'], 
$contributions2[0]['contact_id'] );
+$addresses = $this->callAPISuccess('Address', 'get', 
array('contact_id' => $contributions2[0]['contact_id']));
+$this->assertEquals(1, $addresses['count']);
+$this->assertEquals('5109 Lockwood Rd', 
$addresses['values'][$addresses['id']]['street_address']);
+db_delete('contribution_tracking')
+->condition('id', $msg['custom'])
+->execute();
 }
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Create & use location update function in the scenarios where...

2016-12-18 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328120 )

Change subject: Create & use location update function in the scenarios where we 
are updating.
..

Create & use location update function in the scenarios where we are updating.

The update function will create or update (it uses the replace api) and is 
slightly more expensive
as it does a look up. I have only switched to it in the one place where we have 
identified that we
should be updating rather than creating duplicate addresses due to this small 
penalty.

Bug: T152475
Change-Id: Ia21d771b94228267c54bed4fd0de73ef4fc99dcc
---
M sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
M sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
3 files changed, 116 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/20/328120/1

diff --git 
a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php 
b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
index 0d303a1..288ab7a 100644
--- a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
@@ -318,7 +318,7 @@
$contact = wmf_civicrm_message_contact_update( $msg, 
$recur_record->contact_id );
 
// Insert the location record
-   wmf_civicrm_message_location_insert( $msg, $contact );
+   wmf_civicrm_message_location_update( $msg, $contact );
 
// Tag contact for review
wmf_civicrm_tag_contact_for_review( $contact );
diff --git 
a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php 
b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
index a0e48ae..5c23e3e 100644
--- a/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
+++ b/sites/all/modules/queue2civicrm/tests/phpunit/ProcessMessageTest.php
@@ -268,7 +268,15 @@
 $this->assertEquals( $contributions[0]['contact_id'], 
$contributions2[0]['contact_id'] );
 $addresses = $this->callAPISuccess('Address', 'get', 
array('contact_id' => $contributions2[0]['contact_id']));
 $this->assertEquals(1, $addresses['count']);
-$this->assertEquals('5109 Lockwood Rd', 
$addresses['values'][$addresses['id']]['street_address']);
+// The address comes from the recurring_payment.json not the 
recurring_signup.json as it
+// has been overwritten. This is perhaps not a valid scenario in 
production but it is
+// the scenario the code works to. In production they would probably 
always be the same.
+$this->assertEquals('1211122 132 st', 
$addresses['values'][$addresses['id']]['street_address']);
+
+$emails = $this->callAPISuccess('Email', 'get', array('contact_id' => 
$contributions2[0]['contact_id']));
+$this->assertEquals(1, $addresses['count']);
+$this->assertEquals('test...@wikimedia.org', 
$emails['values'][$emails['id']]['email']);
+
 db_delete('contribution_tracking')
 ->condition('id', $msg['custom'])
 ->execute();
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 824e783..d86dde4 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -1366,6 +1366,63 @@
 }
 
 /**
+ * Update the location record
+ *
+ * Serves as a standard way for message processors to handle location
+ * updates.
+ *
+ * @param array $msg
+ * @param array $contact
+ */
+function wmf_civicrm_message_location_update($msg, $contact) {
+wmf_civicrm_message_email_update($msg, $contact['id']);
+wmf_civicrm_message_address_update($msg, $contact['id']);
+}
+
+/**
+ * Updates the email for a contact.
+ *
+ * If updating or unsure use the marginally slower update function.
+ *
+ * @param string $msg
+ * @param int $contact_id
+ * @throws \WmfException
+ */
+function wmf_civicrm_message_email_update($msg, $contact_id ) {
+  if (!wmf_civicrm_is_email_valid(CRM_Utils_Array::value('email', $msg))) {
+return;
+  }
+
+  try {
+civicrm_api3( "Email", "Replace", array(
+  'location_type_id' => $loc_type_id = 
wmf_civicrm_get_default_location_type_id(),
+  'contact_id' => $contact_id,
+  'values' => array(array(
+'email' => $msg[ 'email' ],
+'is_primary' => 1,
+'is_billing' => 1,
+  ),
+)));
+  }
+  catch (CiviCRM_API3_Exception $e) {
+throw new WmfException( 'IMPORT_CONTACT', "Couldn't store email for the 
contact.", array('result' => $e->getMessage()) );
+  }
+}
+
+/**
+ * We do not store empty emails or placeholder emails.
+ *
+ * @param string $email
+ * @return bool
+ */
+f

[MediaWiki-commits] [Gerrit] labs/striker[master]: Allow deleting SSH keys

2016-12-18 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328117 )

Change subject: Allow deleting SSH keys
..

Allow deleting SSH keys

Add support for deleting existing SSH keys from the user's LDAP account.

Bug: T144711
Change-Id: I1a307bf35fc6f68ef316c23ff037184d696aca42
---
A striker/decorators.py
A striker/profile/forms.py
M striker/profile/urls.py
M striker/profile/utils.py
M striker/profile/views.py
M striker/templates/profile/settings/ssh-keys.html
A striker/templates/profile/settings/ssh-keys/delete-confirm.html
7 files changed, 176 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/17/328117/1

diff --git a/striker/decorators.py b/striker/decorators.py
new file mode 100644
index 000..c5b28b8
--- /dev/null
+++ b/striker/decorators.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2016 Wikimedia Foundation and contributors.
+# All Rights Reserved.
+#
+# This file is part of Striker.
+#
+# Striker is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Striker is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Striker.  If not, see .
+
+import functools
+
+from django import shortcuts
+from django import template
+
+
+def confirm_required(template_name, context_builder=None, key='__confirm__'):
+"""Decorate a view that requires confirmation."""
+def decorator(f):
+@functools.wraps(f)
+def decorated(request, *args, **kwargs):
+if key in request.POST:
+return f(request, *args, **kwargs)
+if context_builder is not None:
+ctx = context_builder(request, *args, **kwargs)
+else:
+ctx = template.RequestContext(request)
+return shortcuts.render_to_response(template_name, ctx)
+return decorated
+return decorator
diff --git a/striker/profile/forms.py b/striker/profile/forms.py
new file mode 100644
index 000..c446139
--- /dev/null
+++ b/striker/profile/forms.py
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2016 Wikimedia Foundation and contributors.
+# All Rights Reserved.
+#
+# This file is part of Striker.
+#
+# Striker is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Striker is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Striker.  If not, see .
+
+from django import forms
+from django.utils.translation import ugettext_lazy as _
+
+from striker.profile import utils
+
+
+class SshKeyDeleteForm(forms.Form):
+key_hash = forms.CharField(
+label=_('SHA512 hash of ssh key'),
+widget=forms.HiddenInput(),
+required=True,
+)
+
+def __init__(self, request=None, *args, **kwargs):
+self.request = request
+self.cleaned_keys = None
+super(SshKeyDeleteForm, self).__init__(*args, **kwargs)
+
+def clean(self):
+key_hash = self.cleaned_data.get('key_hash')
+hashes = utils.ssh_keys_by_hash(self.request.user)
+if key_hash not in hashes:
+raise forms.ValidationError(
+_('SSH key not found.'), code='key_not_found')
+del hashes[key_hash]
+self.cleaned_keys = hashes.values()
+return self.cleaned_data
diff --git a/striker/profile/urls.py b/striker/profile/urls.py
index 7dd680e..d2292ea 100644
--- a/striker/profile/urls.py
+++ b/striker/profile/urls.py
@@ -45,4 +45,9 @@
 'striker.profile.views.ssh_keys',
 name='ssh_keys'
 ),
+urls.url(
+r'^settings/ssh-keys/delete$',
+'striker.profile.views.ssh_key_delete',
+name='ssh_key_delete'
+),
 ]
diff --git a/striker/profile/utils.py b/striker/profile/utils.py
index 9efc0cf..75b7ba5 100644
--- a/striker/profile/utils.py
+++ b/striker/profile/utils.py
@@ -49,3 +49,10 @@
 key.type_name = key.key_type.decode('utf-8')
 
 return key
+
+
+def ssh_keys_by_hash(user):
+return {
+parse_ssh_key(key).hash_sha256():key
+for

[MediaWiki-commits] [Gerrit] operations...hhvm_exporter[master]: Run tests on Python 3.4 too for Jessie

2016-12-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328116 )

Change subject: Run tests on Python 3.4 too for Jessie
..

Run tests on Python 3.4 too for Jessie

Debian Jessie has Python 3.4, so run tests on there to. And set
skip_missing_interpreters = True, so that if a version of Python isn't
installed, it will skip running the tests rather than failing.

Change-Id: I4d82b3bb2e1b5df0b9295bd60ba3a2a0661a73bc
---
M tox.ini
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/hhvm_exporter 
refs/changes/16/328116/1

diff --git a/tox.ini b/tox.ini
index 6727919..95a1b0f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,6 @@
 [tox]
-envlist = py35,py27
+envlist = py35,py34,py27
+skip_missing_interpreters = True
 
 [testenv]
 deps=nose

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d82b3bb2e1b5df0b9295bd60ba3a2a0661a73bc
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/hhvm_exporter
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add prometheus-related repositories

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327692 )

Change subject: Add prometheus-related repositories
..


Add prometheus-related repositories

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 33f7558..1f1759b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2219,7 +2219,9 @@
   - { name: operations/debs/perf-tools,  test: 
['debian-glue-non-voting'] }
   - { name: operations/debs/phantomjs,   test: 
['debian-glue-non-voting'] }
   - { name: operations/debs/php-mailparse,   test: 
['debian-glue-non-voting'] }
+  - { name: operations/debs/prometheus-apache-exporter,  test: 
['debian-glue-non-voting'] }
   - { name: operations/debs/prometheus-memcached-exporter,   test: 
['debian-glue-non-voting'] }
+  - { name: operations/debs/prometheus-redis-exporter,   test: 
['debian-glue-non-voting'] }
   - { name: operations/debs/puppet,  test: 
['debian-glue-non-voting'] }
   - name: operations/debs/pybal
 template:
@@ -2498,6 +2500,10 @@
 template:
   - name: tox-jessie
 
+  - name: operations/software/hhvm_exporter
+template:
+  - name: tox-jessie
+
   - name: research/recommendation-api
 template:
   - name: tox-jessie

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53ba75866c80eef51cde56a2a620079f742f338c
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Move AbuseFilterVariableHolder up to /includes

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328115 )

Change subject: Move AbuseFilterVariableHolder up to /includes
..


Move AbuseFilterVariableHolder up to /includes

This class is not for parsing logic or tree nodes

Change-Id: I07a499cc972c30fc249ec4de3250900a3b703443
---
M extension.json
R includes/AbuseFilterVariableHolder.php
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 7d9a875..0af7683 100644
--- a/extension.json
+++ b/extension.json
@@ -96,7 +96,7 @@
"AbuseFilterViewDiff": "Views/AbuseFilterViewDiff.php",
"TableDiffFormatterFullContext": 
"Views/AbuseFilterViewDiff.php",
"AbuseFilterViewImport": "Views/AbuseFilterViewImport.php",
-   "AbuseFilterVariableHolder": 
"includes/parser/AbuseFilterVariableHolder.php",
+   "AbuseFilterVariableHolder": 
"includes/AbuseFilterVariableHolder.php",
"AFComputedVariable": "includes/AFComputedVariable.php",
"AFPData": "includes/parser/AFPData.php",
"AFPException": "includes/parser/AFPException.php",
diff --git a/includes/parser/AbuseFilterVariableHolder.php 
b/includes/AbuseFilterVariableHolder.php
similarity index 100%
rename from includes/parser/AbuseFilterVariableHolder.php
rename to includes/AbuseFilterVariableHolder.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07a499cc972c30fc249ec4de3250900a3b703443
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Move AbuseFilterVariableHolder up to /includes

2016-12-18 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328115 )

Change subject: Move AbuseFilterVariableHolder up to /includes
..

Move AbuseFilterVariableHolder up to /includes

This class is not for parsing logic or tree nodes

Change-Id: I07a499cc972c30fc249ec4de3250900a3b703443
---
M extension.json
R includes/AbuseFilterVariableHolder.php
2 files changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 7d9a875..0af7683 100644
--- a/extension.json
+++ b/extension.json
@@ -96,7 +96,7 @@
"AbuseFilterViewDiff": "Views/AbuseFilterViewDiff.php",
"TableDiffFormatterFullContext": 
"Views/AbuseFilterViewDiff.php",
"AbuseFilterViewImport": "Views/AbuseFilterViewImport.php",
-   "AbuseFilterVariableHolder": 
"includes/parser/AbuseFilterVariableHolder.php",
+   "AbuseFilterVariableHolder": 
"includes/AbuseFilterVariableHolder.php",
"AFComputedVariable": "includes/AFComputedVariable.php",
"AFPData": "includes/parser/AFPData.php",
"AFPException": "includes/parser/AFPException.php",
diff --git a/includes/parser/AbuseFilterVariableHolder.php 
b/includes/AbuseFilterVariableHolder.php
similarity index 100%
rename from includes/parser/AbuseFilterVariableHolder.php
rename to includes/AbuseFilterVariableHolder.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07a499cc972c30fc249ec4de3250900a3b703443
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update some packages

2016-12-18 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328113 )

Change subject: Update some packages
..

Update some packages

Update grunt-karma to 2.0.0, changelog at
https://github.com/karma-runner/grunt-karma/blob/master/CHANGELOG.md

Update karma to 1.3.0, changelog at
https://github.com/karma-runner/karma/blob/master/CHANGELOG.md

Update karma-chrome-launcher to 2.0.0, changelog at
https://github.com/karma-runner/karma-chrome-launcher/releases

Update karma-qunit to 1.2.1, changelog at
https://github.com/karma-runner/karma-qunit/commits/master

Change-Id: Ic590a8de790552541f3392198d093009616254ac
---
M package.json
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/328113/1

diff --git a/package.json b/package.json
index 99e752c..43b1ecd 100644
--- a/package.json
+++ b/package.json
@@ -15,10 +15,10 @@
 "grunt-jsonlint": "1.1.0",
 "grunt-karma": "2.0.0",
 "grunt-stylelint": "0.6.0",
-"karma": "1.1.0",
-"karma-chrome-launcher": "1.0.1",
+"karma": "1.3.0",
+"karma-chrome-launcher": "2.0.0",
 "karma-firefox-launcher": "1.0.0",
-"karma-qunit": "1.0.0",
+"karma-qunit": "1.2.1",
 "qunitjs": "1.22.0",
 "stylelint-config-wikimedia": "0.3.0"
   }

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Handle asserts for multiple distinct error's messages in dis...

2016-12-18 Thread Magul (Code Review)
Magul has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328112 )

Change subject: Handle asserts for multiple distinct error's messages in 
disambcategory()
..

Handle asserts for multiple distinct error's messages in disambcategory()

Bug: T153594
Change-Id: Ica91f1e9ae317c40eb9e7e5dfd931b3342377bb4
---
M pywikibot/site.py
M tests/site_tests.py
2 files changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/12/328112/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 12a40f4..3e1b574 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1091,9 +1091,9 @@
 item = self.family.disambcatname[repo.code]
 except KeyError:
 raise Error(
-'No {repo} qualifier found for disambiguation category '
-'name in {fam}_family file'.format(repo=repo_name,
-   fam=self.family.name))
+'No qualifier found for disambiguation category name in '
+'{repo} for {fam}_family file'.format(
+repo=repo_name, fam=self.family.name))
 else:
 dp = pywikibot.ItemPage(repo, item)
 try:
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 5de88b5..6e02f4d 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -278,7 +278,12 @@
 try:
 dabcat = mysite.disambcategory()
 except pywikibot.Error as e:
-self.assertIn('No disambiguation category name found', str(e))
+try:
+self.assertIn('No disambisguation category name found', str(e))
+except AssertionError:
+self.assertIn(
+'No qualifier found for disambiguation category name in ',
+str(e))
 else:
 self.assertIsInstance(dabcat, pywikibot.Category)
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Make patrol of reviewed changes optional

2016-12-18 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328111 )

Change subject: Make patrol of reviewed changes optional
..

Make patrol of reviewed changes optional

On some wikis, such as enwiki, reviewers don't have patrol rights and
the criteria for patrolling are higher than those for reviewing. A
config variable is thus added so that on those wikis, reviewing a change
does not make the associated recent change patrolled.

Change-Id: I1cd62e289e616e2e572bd3e1faecf7a8367b7ef3
---
M FlaggedRevs.php
M backend/FlaggedRevs.class.php
M business/RevisionReviewForm.php
3 files changed, 16 insertions(+), 2 deletions(-)


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

diff --git a/FlaggedRevs.php b/FlaggedRevs.php
index d78e9e1..842852f 100644
--- a/FlaggedRevs.php
+++ b/FlaggedRevs.php
@@ -217,6 +217,9 @@
 # In such cases, we select the current (unreviewed) revision. Likewise for 
files.
 $wgFlaggedRevsHandleIncludes = FR_INCLUDES_STABLE;
 
+# Whether reviewing a revision should make the associated recent change 
patrolled
+$wgFlaggedRevsPatrolReviewedChanges = true;
+
 $dir = dirname( __FILE__ );
 
 # Basic directory layout
diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php
index ff630a3..f2c5915 100755
--- a/backend/FlaggedRevs.class.php
+++ b/backend/FlaggedRevs.class.php
@@ -310,6 +310,15 @@
}
 
/**
+* Whether manual review => patrol
+* @return bool
+*/
+   public static function patrolReviewedChanges() {
+   global $wgFlaggedRevsPatrolReviewedChanges;
+   return $wgFlaggedRevsPatrolReviewedChanges;
+   }
+
+   /**
 * Get the array of tag dimensions and level messages
 * @return array
 */
diff --git a/business/RevisionReviewForm.php b/business/RevisionReviewForm.php
index 2036b09..4354a11 100644
--- a/business/RevisionReviewForm.php
+++ b/business/RevisionReviewForm.php
@@ -470,8 +470,10 @@
 
# Get the new stable version as of now
$sv = FlaggedRevision::determineStable( $this->page, FR_MASTER 
/*consistent*/ );
-   # Update recent changes...
-   self::updateRecentChanges( $rev, 'patrol', $sv );
+   if ( FlaggedRevs::patrolReviewedChanges() ) {
+   # Update recent changes...
+   self::updateRecentChanges( $rev, 'patrol', $sv );
+   }
# Update page and tracking tables and clear cache
$changed = FlaggedRevs::stableVersionUpdates( $this->page, $sv, 
$oldSv );
if ( $changed ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cd62e289e616e2e572bd3e1faecf7a8367b7ef3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Cenarium 

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


[MediaWiki-commits] [Gerrit] mediawiki...MassEditRegex[REL1_27]: Replace deprecated skin's commentBlock function with Linker:...

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325801 )

Change subject: Replace deprecated skin's commentBlock function with 
Linker::commentBlock
..


Replace deprecated skin's commentBlock function with Linker::commentBlock

The function is deprecated here 
https://github.com/wikimedia/mediawiki-debian/blob/6a4a101a0091a8684784156635058a6f532cbfe7/includes/skins/Skin.php#L1567

But i doint know why it was calling SkinVector::

This patch should fix this hopefully.

Bug: T152605
Change-Id: Ifb1b9aa2596b2ae5fa3aede1924da72f6604868f
---
M MassEditRegex.special.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/MassEditRegex.special.php b/MassEditRegex.special.php
index d8b9a6b..8417b6b 100644
--- a/MassEditRegex.special.php
+++ b/MassEditRegex.special.php
@@ -360,7 +360,7 @@
Xml::tags( 'div',
array( 'class' => 'mw-summary-preview' ),
$this->msg( 'summary-preview' )->parse() .
-   $this->sk->commentBlock( 
$this->massEditRegex->getSummary() )
+   Linker::commentBlock( 
$this->massEditRegex->getSummary() )
) .
Xml::closeElement( 'div' ) . // class=editOptions
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb1b9aa2596b2ae5fa3aede1924da72f6604868f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassEditRegex
Gerrit-Branch: REL1_27
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Kghbln 
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...MassEditRegex[REL1_28]: Replace deprecated skin's commentBlock function with Linker:...

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/325799 )

Change subject: Replace deprecated skin's commentBlock function with 
Linker::commentBlock
..


Replace deprecated skin's commentBlock function with Linker::commentBlock

The function is deprecated here 
https://github.com/wikimedia/mediawiki-debian/blob/6a4a101a0091a8684784156635058a6f532cbfe7/includes/skins/Skin.php#L1567

But i doint know why it was calling SkinVector::

This patch should fix this hopefully.

Bug: T152605
Change-Id: Ifb1b9aa2596b2ae5fa3aede1924da72f6604868f
---
M MassEditRegex.special.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/MassEditRegex.special.php b/MassEditRegex.special.php
index d8b9a6b..8417b6b 100644
--- a/MassEditRegex.special.php
+++ b/MassEditRegex.special.php
@@ -360,7 +360,7 @@
Xml::tags( 'div',
array( 'class' => 'mw-summary-preview' ),
$this->msg( 'summary-preview' )->parse() .
-   $this->sk->commentBlock( 
$this->massEditRegex->getSummary() )
+   Linker::commentBlock( 
$this->massEditRegex->getSummary() )
) .
Xml::closeElement( 'div' ) . // class=editOptions
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb1b9aa2596b2ae5fa3aede1924da72f6604868f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassEditRegex
Gerrit-Branch: REL1_28
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Kghbln 
Gerrit-Reviewer: Legoktm 
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[master]: build: Update phpunit to 4.8.31

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/291927 )

Change subject: build: Update phpunit to 4.8.31
..


build: Update phpunit to 4.8.31

Please see changelog at
https://github.com/sebastianbergmann/phpunit/blob/4.8/ChangeLog-4.8.md

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

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



diff --git a/composer.json b/composer.json
index f57b9ce..8e98710 100644
--- a/composer.json
+++ b/composer.json
@@ -53,7 +53,7 @@
"monolog/monolog": "~1.18.2",
"nikic/php-parser": "2.1.0",
"nmred/kafka-php": "0.1.5",
-   "phpunit/phpunit": "4.8.24",
+   "phpunit/phpunit": "4.8.31",
"wikimedia/avro": "1.7.7"
},
"suggest": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00e0b94452b371cacecc4eb10330749c0da1890e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
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[master]: Move the Ukrainian grammar rules from PHP and JS to JSON

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/245184 )

Change subject: Move the Ukrainian grammar rules from PHP and JS to JSON
..


Move the Ukrainian grammar rules from PHP and JS to JSON

Bug: T115217
Change-Id: I15a06b07e381cc9074e64e746d22ec51e9e638c4
---
M languages/classes/LanguageUk.php
A languages/data/grammarTransformations/uk.json
M resources/Resources.php
D resources/src/mediawiki.language/languages/uk.js
4 files changed, 18 insertions(+), 77 deletions(-)

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



diff --git a/languages/classes/LanguageUk.php b/languages/classes/LanguageUk.php
index 72bde40..a155d03 100644
--- a/languages/classes/LanguageUk.php
+++ b/languages/classes/LanguageUk.php
@@ -27,50 +27,6 @@
  * @ingroup Language
  */
 class LanguageUk extends Language {
-
-   /**
-* Convert from the nominative form of a noun to some other case
-* Invoked with {{grammar:case|word}}
-*
-* @param string $word
-* @param string $case
-* @return string
-*/
-   function convertGrammar( $word, $case ) {
-   global $wgGrammarForms;
-   if ( isset( $wgGrammarForms['uk'][$case][$word] ) ) {
-   return $wgGrammarForms['uk'][$case][$word];
-   }
-
-   # These rules don't cover the whole language.
-   # They are used only for site names.
-
-   # join and array_slice instead mb_substr
-   $ar = [];
-   preg_match_all( '/./us', $word, $ar );
-   if ( !preg_match( "/[a-zA-Z_]/us", $word ) ) {
-   switch ( $case ) {
-   case 'genitive': # родовий відмінок
-   if ( implode( '', array_slice( $ar[0], 
-2 ) ) === 'ія' ) {
-   $word = implode( '', 
array_slice( $ar[0], 0, -2 ) ) . 'ії';
-   } elseif ( implode( '', array_slice( 
$ar[0], -2 ) ) === 'ти' ) {
-   $word = implode( '', 
array_slice( $ar[0], 0, -2 ) ) . 'т';
-   } elseif ( implode( '', array_slice( 
$ar[0], -2 ) ) === 'ди' ) {
-   $word = implode( '', 
array_slice( $ar[0], 0, -2 ) ) . 'дів';
-   } elseif ( implode( '', array_slice( 
$ar[0], -3 ) ) === 'ник' ) {
-   $word = implode( '', 
array_slice( $ar[0], 0, -3 ) ) . 'ника';
-   }
-   break;
-   case 'accusative': # знахідний відмінок
-   if ( implode( '', array_slice( $ar[0], 
-2 ) ) === 'ія' ) {
-   $word = implode( '', 
array_slice( $ar[0], 0, -2 ) ) . 'ію';
-   }
-   break;
-   }
-   }
-   return $word;
-   }
-
/**
 * Ukrainian numeric format is "12 345,67" but "1234,56"
 *
diff --git a/languages/data/grammarTransformations/uk.json 
b/languages/data/grammarTransformations/uk.json
new file mode 100644
index 000..6512225
--- /dev/null
+++ b/languages/data/grammarTransformations/uk.json
@@ -0,0 +1,18 @@
+{
+   "@metadata": {
+   "authors": [
+   "Gutsul",
+   "Amir E. Aharoni (amir.ahar...@mail.huji.ac.il)"
+   ],
+   "comment": "These rules don't cover the whole grammar of the 
language, and are intended only for names of languages and Wikimedia projects."
+   },
+   "genitive": [
+   [ "(.+)ія$", "$1ії" ],
+   [ "(.+)ти$", "$1т" ],
+   [ "(.+)ди$", "$1дів" ],
+   [ "(.+)ник$", "$1ника" ]
+   ],
+   "accusative": [
+   [ "(.+)ія$", "$1ію" ]
+   ]
+}
diff --git a/resources/Resources.php b/resources/Resources.php
index 3fef2cc..e8be528 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1597,7 +1597,6 @@
'la' => 
'resources/src/mediawiki.language/languages/la.js',
'os' => 
'resources/src/mediawiki.language/languages/os.js',
'sl' => 
'resources/src/mediawiki.language/languages/sl.js',
-   'uk' => 
'resources/src/mediawiki.language/languages/uk.js',
],
'dependencies' => [
'mediawiki.language.data',
diff --git a/resources/src/mediawiki.language/languages/uk.js 
b/resources/src/mediawiki.language/languages/uk.js
deleted file mode 100644
index 138045c..000
--- a/resources/src

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 21b3282

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328109 )

Change subject: Update restbase to 21b3282
..


Update restbase to 21b3282

List of changes:
21b3282 Commons: Blacklist User:Oxyman/Buildings_in_London/2014_October_11-20

Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/restbase b/restbase
index c93ee83..21b3282 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2
+Subproject commit 21b328235d972b4b43d6967d8ccd5564c81642a7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 21b3282

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328109 )

Change subject: Update restbase to 21b3282
..

Update restbase to 21b3282

List of changes:
21b3282 Commons: Blacklist User:Oxyman/Buildings_in_London/2014_October_11-20

Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/09/328109/1

diff --git a/restbase b/restbase
index c93ee83..21b3282 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2
+Subproject commit 21b328235d972b4b43d6967d8ccd5564c81642a7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2aff65bb5d5a58ba5535882619b5e9a67c306ded
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: if one wiki can't be monitored, don't except out, do the rest

2016-12-18 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328108 )

Change subject: if one wiki can't be monitored, don't except out, do the rest
..


if one wiki can't be monitored, don't except out, do the rest

Change-Id: I2fb1c143277a4ba2a4198e277ca68e9eaea24593
---
M xmldumps-backup/monitor.py
1 file changed, 17 insertions(+), 8 deletions(-)

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



diff --git a/xmldumps-backup/monitor.py b/xmldumps-backup/monitor.py
index a3d153d..d38b213 100644
--- a/xmldumps-backup/monitor.py
+++ b/xmldumps-backup/monitor.py
@@ -3,9 +3,13 @@
 import os
 from os.path import exists
 import sys
+import traceback
 from dumps.WikiDump import Wiki, Config, Locker
 from dumps.fileutils import FileUtils
 from dumps.runnerutils import StatusHtml
+
+
+VERBOSE = False
 
 
 def add_to_filename(filename, infix):
@@ -23,14 +27,19 @@
 dbs = config.db_list_by_age()
 
 for db_name in dbs:
-wiki = Wiki(config, db_name)
-locker = Locker(wiki)
-lockfiles = locker.is_stale(all_locks=True)
-if lockfiles:
-locker.cleanup_stale_locks(lockfiles)
-running = running or locker.is_locked(all_locks=True)
-states.append(StatusHtml.status_line(wiki))
-
+try:
+wiki = Wiki(config, db_name)
+locker = Locker(wiki)
+lockfiles = locker.is_stale(all_locks=True)
+if lockfiles:
+locker.cleanup_stale_locks(lockfiles)
+running = running or locker.is_locked(all_locks=True)
+states.append(StatusHtml.status_line(wiki))
+except Exception:
+# if there's a problem with one wiki at least
+# let's show the rest
+if VERBOSE:
+traceback.print_exc(file=sys.stdout)
 if running:
 status = "Dumps are in progress..."
 elif exists("maintenance.txt"):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fb1c143277a4ba2a4198e277ca68e9eaea24593
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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/dumps[master]: if one wiki can't be monitored, don't except out, do the rest

2016-12-18 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328108 )

Change subject: if one wiki can't be monitored, don't except out, do the rest
..

if one wiki can't be monitored, don't except out, do the rest

Change-Id: I2fb1c143277a4ba2a4198e277ca68e9eaea24593
---
M xmldumps-backup/monitor.py
1 file changed, 17 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/08/328108/1

diff --git a/xmldumps-backup/monitor.py b/xmldumps-backup/monitor.py
index a3d153d..d38b213 100644
--- a/xmldumps-backup/monitor.py
+++ b/xmldumps-backup/monitor.py
@@ -3,9 +3,13 @@
 import os
 from os.path import exists
 import sys
+import traceback
 from dumps.WikiDump import Wiki, Config, Locker
 from dumps.fileutils import FileUtils
 from dumps.runnerutils import StatusHtml
+
+
+VERBOSE = False
 
 
 def add_to_filename(filename, infix):
@@ -23,14 +27,19 @@
 dbs = config.db_list_by_age()
 
 for db_name in dbs:
-wiki = Wiki(config, db_name)
-locker = Locker(wiki)
-lockfiles = locker.is_stale(all_locks=True)
-if lockfiles:
-locker.cleanup_stale_locks(lockfiles)
-running = running or locker.is_locked(all_locks=True)
-states.append(StatusHtml.status_line(wiki))
-
+try:
+wiki = Wiki(config, db_name)
+locker = Locker(wiki)
+lockfiles = locker.is_stale(all_locks=True)
+if lockfiles:
+locker.cleanup_stale_locks(lockfiles)
+running = running or locker.is_locked(all_locks=True)
+states.append(StatusHtml.status_line(wiki))
+except Exception:
+# if there's a problem with one wiki at least
+# let's show the rest
+if VERBOSE:
+traceback.print_exc(file=sys.stdout)
 if running:
 status = "Dumps are in progress..."
 elif exists("maintenance.txt"):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fb1c143277a4ba2a4198e277ca68e9eaea24593
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] mediawiki...ApprovedRevs[master]: Remove old ArticleAfterFetchContent hook subscriber

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326550 )

Change subject: Remove old ArticleAfterFetchContent hook subscriber
..


Remove old ArticleAfterFetchContent hook subscriber

Bug: T151973
Change-Id: Ib3dbe701ff486a456ed5a470a295f42c286b65dd
---
M ApprovedRevs.hooks.php
M ApprovedRevs.php
2 files changed, 5 insertions(+), 14 deletions(-)

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



diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php
index f164800..4abb6fb 100644
--- a/ApprovedRevs.hooks.php
+++ b/ApprovedRevs.hooks.php
@@ -227,25 +227,18 @@
 
ApprovedRevs::addCSS();
 
-   $content = '';
-
-   return true;
-   }
-
-   /**
-* Called for MW 1.21+.
-*/
-   public static function showBlankIfUnapproved2( &$article, 
&$contentObject ) {
// There's possibly a bug in MW 1.28, where the second argument
// (called from the hook 'ArticleAfterFetchContentObject') is
// sometimes (or always?) a string, instead of a Content object.
// We'll just get around it here with a check. (In theory, 
$contentObject
// could also be null, so this check is a good idea anyway.)
if ( is_object( $contentObject ) ) {
-   return self::showBlankIfUnapproved( $article, 
$contentObject->mText );
+   $content->mText = '';
} else {
-   return self::showBlankIfUnapproved( $article, 
$contentObject );
+   $content = '';
}
+
+   return true;
}
 
/**
diff --git a/ApprovedRevs.php b/ApprovedRevs.php
index 58fbc36..1890fd8 100644
--- a/ApprovedRevs.php
+++ b/ApprovedRevs.php
@@ -50,9 +50,7 @@
 $wgHooks['SearchResultInitFromTitle'][] = 
'ApprovedRevsHooks::setSearchRevisionID';
 $wgHooks['PersonalUrls'][] = 'ApprovedRevsHooks::removeRobotsTag';
 $wgHooks['ArticleFromTitle'][] = 'ApprovedRevsHooks::showApprovedRevision';
-$wgHooks['ArticleAfterFetchContent'][] = 
'ApprovedRevsHooks::showBlankIfUnapproved';
-// MW 1.21+
-$wgHooks['ArticleAfterFetchContentObject'][] = 
'ApprovedRevsHooks::showBlankIfUnapproved2';
+$wgHooks['ArticleAfterFetchContentObject'][] = 
'ApprovedRevsHooks::showBlankIfUnapproved';
 $wgHooks['DisplayOldSubtitle'][] = 'ApprovedRevsHooks::setSubtitle';
 // it's 'SkinTemplateNavigation' for the Vector skin, 'SkinTemplateTabs' for
 // most other skins

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3dbe701ff486a456ed5a470a295f42c286b65dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Add Czech aliases

2016-12-18 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328084 )

Change subject: Add Czech aliases
..

Add Czech aliases

Change-Id: I2ac5105a2ac16e632eb2bf8eea32d218f66d7a4d
---
M MobileFrontend.alias.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/84/328084/2

diff --git a/MobileFrontend.alias.php b/MobileFrontend.alias.php
index 739a3a5..32219f5 100644
--- a/MobileFrontend.alias.php
+++ b/MobileFrontend.alias.php
@@ -113,6 +113,15 @@
'Nearby' => array( 'Гергахьо' ),
 );
 
+/** Czech (čeština) */
+$specialPageAliases['cs'] => array(
+   'MobileDiff' => array( 'Mobilní_rozdíl' ),
+   'MobileEditor' => array( 'Mobilní_editor' ),
+   'MobileMenu' => array( 'Mobilní_menu' ),
+   'MobileLanguages' => array( 'Mobilní_jazyky' ),
+   'Nearby' => array( 'Poblíž' ),
+);
+
 /** German (Deutsch) */
 $specialPageAliases['de'] = array(
'History' => array( 'Versionsgeschichte' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ac5105a2ac16e632eb2bf8eea32d218f66d7a4d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add Czech aliases

2016-12-18 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328064 )

Change subject: Add Czech aliases
..

Add Czech aliases

Change-Id: I722abfab8d0724cc22902d2a5aa8e0b805f9c1b8
---
M client/WikibaseClient.i18n.alias.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/64/328064/2

diff --git a/client/WikibaseClient.i18n.alias.php 
b/client/WikibaseClient.i18n.alias.php
index f6c1a0a..9630de9 100644
--- a/client/WikibaseClient.i18n.alias.php
+++ b/client/WikibaseClient.i18n.alias.php
@@ -44,6 +44,7 @@
 $specialPageAliases['cs'] = array(
'PagesWithBadges' => array( 'Stránky_s_odznaky' ),
'UnconnectedPages' => array( 'Nepropojené_stránky' ),
+   'EntityUsage' => array( 'Použití_entity' ),
 );
 
 /** German (Deutsch) */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I722abfab8d0724cc22902d2a5aa8e0b805f9c1b8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 

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


[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Add Czech aliases

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328047 )

Change subject: Add Czech aliases
..


Add Czech aliases

Change-Id: I800f082fb4acc9f9cb19f430e15f2063bfaa0958
---
M OATHAuth.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/OATHAuth.alias.php b/OATHAuth.alias.php
index c874a59..a3203cf 100644
--- a/OATHAuth.alias.php
+++ b/OATHAuth.alias.php
@@ -24,6 +24,11 @@
'OATH' => [ 'اواث', 'اواث_اوث' ],
 ];
 
+/** Czech (čeština) */
+$specialPageAliases['cs'] = [
+   'OATH' => [ 'Dvoufaktorové_ověření' ],
+];
+
 /** Northern Luri (لۊری شومالی) */
 $specialPageAliases['lrc'] = [
'OATH' => [ 'قأسأم' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I800f082fb4acc9f9cb19f430e15f2063bfaa0958
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 
Gerrit-Reviewer: Matěj Suchánek 
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...CentralAuth[master]: Add Czech aliases

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328046 )

Change subject: Add Czech aliases
..


Add Czech aliases

Change-Id: I66455e0dbd3386bcebab7174e53383aedd1ed310
---
M CentralAuth.alias.php
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Matěj Suchánek: Looks good to me, but someone else must approve
  Raimond Spekking: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CentralAuth.alias.php b/CentralAuth.alias.php
index 75bb889..47b02b6 100644
--- a/CentralAuth.alias.php
+++ b/CentralAuth.alias.php
@@ -185,8 +185,14 @@
'GlobalUsers' => array( 'Глобальни_декъашхой' ),
 );
 
+/** Czech (čeština) */
 $specialPageAliases['cs'] = array(
-   'CentralAuth' => array ( 'Centrální_ověření' ),
+   'CentralAuth' => array( 'Centrální_ověření' ),
+   'MergeAccount' => array( 'Sloučení_účtů' ),
+   'GlobalGroupMembership' => array( 'Globální_práva_uživatele' ),
+   'GlobalGroupPermissions' => array( 'Práva_globálních_skupin' ),
+   'WikiSets' => array( 'Sady_wiki' ),
+   'GlobalUsers' => array( 'Globální_uživatelé' ),
 );
 
 /** German (Deutsch) */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66455e0dbd3386bcebab7174e53383aedd1ed310
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 
Gerrit-Reviewer: Matěj Suchánek 
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] pywikibot/core[master]: Unit tests should use super setUp and tearDown when appropriate

2016-12-18 Thread Sn1per (Code Review)
Sn1per has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328060 )

Change subject: Unit tests should use super setUp and tearDown when appropriate
..

Unit tests should use super setUp and tearDown when appropriate

Since generic test case classes inherit setUp and tearDown from
TestTimerMixin, this adds runtime duration warnings to the
affected test cases.

Bug: T152435
Change-Id: Ieb05617cb089a857064f0b22b0314bd22b9dd9ae
---
M tests/http_tests.py
M tests/site_tests.py
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/60/328060/1

diff --git a/tests/http_tests.py b/tests/http_tests.py
index 0cb28bd..b2abefe 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -94,6 +94,7 @@
 
 def setUp(self):
 """Set up test by configuring config.authenticate."""
+super(TestCase, self).setUp()
 self._authenticate = config.authenticate
 config.authenticate = {
 'zh.wikipedia.beta.wmflabs.org': ('1', '2'),
@@ -104,6 +105,7 @@
 
 def tearDown(self):
 """Tear down test by resetting config.authenticate."""
+super(TestCase, self).tearDown()
 config.authenticate = self._authenticate
 
 def test_url_based_authentication(self):
@@ -264,12 +266,14 @@
 
 def setUp(self):
 """Set up unit test."""
+super(TestCase, self).setUp()
 self.orig_format = config.user_agent_format
 config.user_agent_format = ('{script_product} ({script_comments}) 
{pwb} '
 '({revision}) {http_backend} {python}')
 
 def tearDown(self):
 """Tear down unit test."""
+super(TestCase, self).tearDown()
 config.user_agent_format = self.orig_format
 
 def test_default_user_agent(self):
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 5de88b5..167c528 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1964,12 +1964,14 @@
 
 def setUp(self):
 """Store version."""
+super(DefaultSiteTestCase, self).setUp()
 self.mysite = self.get_site()
 self._version = MediaWikiVersion(self.mysite.version())
 self.orig_version = self.mysite.version
 
 def tearDown(self):
 """Restore version."""
+super(DefaultSiteTestCase, self).tearDown()
 self.mysite.version = self.orig_version
 
 def _test_tokens(self, version, test_version, additional_token):

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Conftool: Add restbase101[678] and restbase201[012]

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328059 )

Change subject: Conftool: Add restbase101[678] and restbase201[012]
..

Conftool: Add restbase101[678] and restbase201[012]

Bug: T151086
Change-Id: I797bb8a46931687793fb319055be4d17195b56a8
---
M conftool-data/nodes/codfw.yaml
M conftool-data/nodes/eqiad.yaml
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/328059/1

diff --git a/conftool-data/nodes/codfw.yaml b/conftool-data/nodes/codfw.yaml
index 4570409..e1e1d86 100644
--- a/conftool-data/nodes/codfw.yaml
+++ b/conftool-data/nodes/codfw.yaml
@@ -253,6 +253,9 @@
   restbase2007.codfw.wmnet: [restbase]
   restbase2008.codfw.wmnet: [restbase]
   restbase2009.codfw.wmnet: [restbase]
+  restbase2010.codfw.wmnet: [restbase]
+  restbase2011.codfw.wmnet: [restbase]
+  restbase2012.codfw.wmnet: [restbase]
 sca:
   sca2003.codfw.wmnet: [zotero]
   sca2004.codfw.wmnet: [zotero]
diff --git a/conftool-data/nodes/eqiad.yaml b/conftool-data/nodes/eqiad.yaml
index d67c789..ef5a090 100644
--- a/conftool-data/nodes/eqiad.yaml
+++ b/conftool-data/nodes/eqiad.yaml
@@ -254,6 +254,9 @@
   restbase1013.eqiad.wmnet: [restbase]
   restbase1014.eqiad.wmnet: [restbase]
   restbase1015.eqiad.wmnet: [restbase]
+  restbase1016.eqiad.wmnet: [restbase]
+  restbase1017.eqiad.wmnet: [restbase]
+  restbase1018.eqiad.wmnet: [restbase]
 maps:
   maps1001.eqiad.wmnet: [kartotherian]
   maps1002.eqiad.wmnet: [kartotherian]

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

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

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Add FontAwesome css, fonts, and templatetag helper

2016-12-18 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328057 )

Change subject: Add FontAwesome css, fonts, and templatetag helper
..

Add FontAwesome css, fonts, and templatetag helper

Bootstrap comes with Glyphicons Halflings which is a good base icon set,
but it doesn't include a few icons that I'd like to have in Striker.
Usage of the new icons and templatetag are demonstrated on the linked
accounts settings page.

Change-Id: I95be9d20e4efd39d2011c026aa1799f514d5ab3f
---
A static/css/font-awesome.css
A static/css/font-awesome.min.css
A static/fonts/FontAwesome.otf
A static/fonts/fontawesome-webfont.eot
A static/fonts/fontawesome-webfont.svg
A static/fonts/fontawesome-webfont.ttf
A static/fonts/fontawesome-webfont.woff
A static/fonts/fontawesome-webfont.woff2
M striker/settings.py
M striker/templates/base.html
M striker/templates/profile/settings/accounts/ldap.html
M striker/templates/profile/settings/accounts/phabricator.html
M striker/templates/profile/settings/accounts/sul.html
A striker/templatetags/__init__.py
A striker/templatetags/fontawesome.py
15 files changed, 5,070 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/57/328057/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95be9d20e4efd39d2011c026aa1799f514d5ab3f
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
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] labs/striker[master]: Display existing SSH -keys

2016-12-18 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328058 )

Change subject: Display existing SSH -keys
..

Display existing SSH -keys

Display the SSH keys that are stored in LDAP for a user.

Bug: T144711
Change-Id: Ia6d0b559636df0ce9a566a884d793ea8fb7f9b21
---
A contrib/add-ssh.sh
M requirements.txt
M striker/profile/urls.py
A striker/profile/utils.py
M striker/profile/views.py
M striker/templates/profile/settings/accounts.html
M striker/templates/profile/settings/base.html
A striker/templates/profile/settings/ssh-keys.html
8 files changed, 115 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/58/328058/1

diff --git a/contrib/add-ssh.sh b/contrib/add-ssh.sh
new file mode 100755
index 000..9c597bb
--- /dev/null
+++ b/contrib/add-ssh.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Usage: add-ssh.sh SHELL_USER_NAME SSH_PUB_KEY
+
+NEW_UID=${1:?SHELL_USER_NAME required}
+PUB_KEY=${2:?SSH_PUB_KEY required}
+BASE_DN="dc=wmftest,dc=net"
+USER_BASE_DN="ou=People,${BASE_DN}"
+ADMIN_DN="cn=admin,${BASE_DN}"
+ADMIN_PASS="vagrant_admin"
+
+/usr/bin/ldapmodify -x -D "${ADMIN_DN}" -w "${ADMIN_PASS}" <=2.10.0  # Apache 2.0
 requests-oauthlib>=0.6.1  # ISC
 six>=1.10.0  # MIT
+sshpubkeys>=2.2.0  # BSD
diff --git a/striker/profile/urls.py b/striker/profile/urls.py
index f7ed96e..7dd680e 100644
--- a/striker/profile/urls.py
+++ b/striker/profile/urls.py
@@ -40,4 +40,9 @@
 'striker.profile.views.phab_attach',
 name='phabricator_attach'
 ),
+urls.url(
+r'^settings/ssh-keys$',
+'striker.profile.views.ssh_keys',
+name='ssh_keys'
+),
 ]
diff --git a/striker/profile/utils.py b/striker/profile/utils.py
new file mode 100644
index 000..9efc0cf
--- /dev/null
+++ b/striker/profile/utils.py
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2016 Wikimedia Foundation and contributors.
+# All Rights Reserved.
+#
+# This file is part of Striker.
+#
+# Striker is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Striker is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Striker.  If not, see .
+
+import logging
+import sshpubkeys
+
+
+logger = logging.getLogger(__name__)
+
+
+def parse_ssh_key(pubkey):
+key = sshpubkeys.SSHKey(
+pubkey, strict_mode=True, skip_option_parsing=True)
+try:
+key.parse()
+except sshpubkeys.InvalidKeyException as err:
+logger.exception('Failed to parse "%s"', err)
+key = None
+except NotImplementedError as err:
+logger.exception('Failed to parse "%s"', err)
+key = None
+
+if key.key_type == b'ssh-dss':
+key.type_name = 'DSA'
+elif key.key_type == b'ssh-rsa':
+key.type_name = 'RSA'
+elif key.key_type.startswith(b'ecdsa-sha'):
+key.type_name = 'ECDSA'
+elif key.key_type == b'ssh-ed25519':
+key.type_name = 'ED25519'
+else:
+key.type_name = key.key_type.decode('utf-8')
+
+return key
diff --git a/striker/profile/views.py b/striker/profile/views.py
index 162232c..14d8736 100644
--- a/striker/profile/views.py
+++ b/striker/profile/views.py
@@ -29,6 +29,7 @@
 from django.utils.translation import ugettext_lazy as _
 
 from striker import phabricator
+from striker.profile import utils
 
 
 logger = logging.getLogger(__name__)
@@ -71,3 +72,11 @@
 next_page = req.GET.get(
 'next', urlresolvers.reverse('profile:accounts'))
 return shortcuts.redirect(next_page)
+
+@login_required
+def ssh_keys(req):
+ldapuser = req.user.ldapuser
+ctx = {
+'ssh_keys': [utils.parse_ssh_key(key) for key in ldapuser.ssh_keys],
+}
+return shortcuts.render(req, 'profile/settings/ssh-keys.html', ctx)
diff --git a/striker/templates/profile/settings/accounts.html 
b/striker/templates/profile/settings/accounts.html
index 9350aa0..dfbb18c 100644
--- a/striker/templates/profile/settings/accounts.html
+++ b/striker/templates/profile/settings/accounts.html
@@ -4,7 +4,9 @@
 
 {% block title %}{% trans "Account settings" %}{% endblock %}
 {% block content %}
-{% include "profile/settings/accounts/ldap.html" %}
-{% include "profile/settings/accounts/sul.html" %}
-{% include "profile/settings/accounts/phabricator.html" %}
+
+  {% include "profile/settings/accounts/ldap.html" %}
+  {% include "profile/settings/accounts/sul.html" %}
+  {% include "profile/settings/accounts/phabricator.html" %}
+
 {% end

[MediaWiki-commits] [Gerrit] labs/striker[master]: Combine account settings screens

2016-12-18 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328056 )

Change subject: Combine account settings screens
..

Combine account settings screens

Combine the linked account status screens into a single view.

Change-Id: I027a0cc88536962189ed8fec4204a766db2cceaf
---
M striker/profile/urls.py
M striker/profile/views.py
M striker/templates/base.html
M striker/templates/index/authed.html
A striker/templates/profile/settings/accounts.html
R striker/templates/profile/settings/accounts/ldap.html
R striker/templates/profile/settings/accounts/phabricator.html
R striker/templates/profile/settings/accounts/sul.html
M striker/templates/profile/settings/base.html
9 files changed, 32 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/striker 
refs/changes/56/328056/1

diff --git a/striker/profile/urls.py b/striker/profile/urls.py
index dd5584c..f7ed96e 100644
--- a/striker/profile/urls.py
+++ b/striker/profile/urls.py
@@ -31,23 +31,9 @@
 name='nojs'
 ),
 urls.url(
-r'^settings/ldap$',
-login_required(
-TemplateView.as_view(
-template_name='profile/settings/ldap.html')),
-name='ldap'
-),
-urls.url(
-r'^settings/sul$',
-login_required(
-TemplateView.as_view(
-template_name='profile/settings/sul.html')),
-name='sul'
-),
-urls.url(
-r'^settings/phabricator$',
-'striker.profile.views.phab',
-name='phabricator'
+r'^settings/accounts$',
+'striker.profile.views.accounts',
+name='accounts'
 ),
 urls.url(
 r'^settings/phabricator/attach$',
diff --git a/striker/profile/views.py b/striker/profile/views.py
index 2d05ae6..162232c 100644
--- a/striker/profile/views.py
+++ b/striker/profile/views.py
@@ -35,11 +35,11 @@
 
 
 @login_required
-def phab(req):
+def accounts(req):
 ctx = {
 'phab_url': settings.PHABRICATOR_URL,
 }
-return shortcuts.render(req, 'profile/settings/phabricator.html', ctx)
+return shortcuts.render(req, 'profile/settings/accounts.html', ctx)
 
 
 @login_required
@@ -69,5 +69,5 @@
 id=req.id))
 
 next_page = req.GET.get(
-'next', urlresolvers.reverse('profile:phabricator'))
+'next', urlresolvers.reverse('profile:accounts'))
 return shortcuts.redirect(next_page)
diff --git a/striker/templates/base.html b/striker/templates/base.html
index c32a758..a41c847 100644
--- a/striker/templates/base.html
+++ b/striker/templates/base.html
@@ -45,7 +45,7 @@
 
   {{ user }} 
   
-  {% bootstrap_icon 
"cog" %} {% trans "Settings" %}
+  {% bootstrap_icon 
"cog" %} {% trans "Settings" %}
   {% bootstrap_icon 
"log-out" %} {% trans "Logout" %}
   
 
diff --git a/striker/templates/index/authed.html 
b/striker/templates/index/authed.html
index f1766fb..29a9058 100644
--- a/striker/templates/index/authed.html
+++ b/striker/templates/index/authed.html
@@ -46,7 +46,7 @@
   
 
   {% 
bootstrap_icon "wrench" %} {% trans "Tools" %}
-  {% 
bootstrap_icon "cog" %} {% trans "Settings" %}
+  {% 
bootstrap_icon "cog" %} {% trans "Settings" %}
 
   
 
diff --git a/striker/templates/profile/settings/accounts.html 
b/striker/templates/profile/settings/accounts.html
new file mode 100644
index 000..9350aa0
--- /dev/null
+++ b/striker/templates/profile/settings/accounts.html
@@ -0,0 +1,10 @@
+{% extends "profile/settings/base.html" %}
+{% load bootstrap3 %}
+{% load i18n %}
+
+{% block title %}{% trans "Account settings" %}{% endblock %}
+{% block content %}
+{% include "profile/settings/accounts/ldap.html" %}
+{% include "profile/settings/accounts/sul.html" %}
+{% include "profile/settings/accounts/phabricator.html" %}
+{% endblock %}
diff --git a/striker/templates/profile/settings/ldap.html 
b/striker/templates/profile/settings/accounts/ldap.html
similarity index 71%
rename from striker/templates/profile/settings/ldap.html
rename to striker/templates/profile/settings/accounts/ldap.html
index a814395..6cd9c38 100644
--- a/striker/templates/profile/settings/ldap.html
+++ b/striker/templates/profile/settings/accounts/ldap.html
@@ -1,10 +1,10 @@
-{% extends "profile/settings/base.html" %}
 {% load bootstrap3 %}
 {% load i18n %}
 
-{% block title %}{% trans "Wikitech LDAP settings" %}{% endblock %}
-{% block content %}
 
+  
+{% trans "Wikitech/Labs/Gerrit LDAP account" 
%}
+  
   
 
   {% trans "Username" %}{{ user.ldapname }}
@@ -13,4 +13,3 @@
 
   
 
-{% endblock %}
diff --git a/striker/templates/profile/settings/phabricator.html 
b/striker/templates/profile/settings/accounts/phabricator.html
similarity index 88%
rename from striker/templates/profile/settings/phabricator.html
rename to striker/templates/profile/s

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Add "templates used" page to meta dialog

2016-12-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328055 )

Change subject: Add "templates used" page to meta dialog
..

Add "templates used" page to meta dialog

Bug: T149009
Change-Id: I63e663d05aefb47274f1f28bdcafc5317c2fc4f6
---
M ApiVisualEditor.php
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
A modules/ve-mw/ui/pages/ve.ui.MWTemplatesUsedPage.js
M modules/ve-mw/ui/tools/ve.ui.MWMetaDialogTool.js
9 files changed, 135 insertions(+), 10 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 53ad089..f119ae5 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -408,10 +408,10 @@
 
// HACK: Build a fake EditPage so we can get 
checkboxes from it
$article = new Article( $title ); // 
Deliberately omitting ,0 so oldid comes from request
-   $ep = new EditPage( $article );
+   $editPage = new EditPage( $article );
$req = $this->getRequest();
-   $req->setVal( 'format', $ep->contentFormat );
-   $ep->importFormData( $req ); // By reference 
for some reason (bug 52466)
+   $req->setVal( 'format', 
$editPage->contentFormat );
+   $editPage->importFormData( $req ); // By 
reference for some reason (bug 52466)
$tabindex = 0;
$states = [
'minor' => $user->getOption( 
'minordefault' ) && $title->exists(),
@@ -419,7 +419,8 @@
( $user->getOption( 
'watchcreations' ) && !$title->exists() ) ||
$user->isWatched( $title ),
];
-   $checkboxes = $ep->getCheckboxes( $tabindex, 
$states );
+   $checkboxes = $editPage->getCheckboxes( 
$tabindex, $states );
+   $templates = 
$editPage->makeTemplatesOnThisPageList( $editPage->getTemplates() );
 
// HACK: Find out which red links are on the 
page
// We do the lookup for the current version. 
This might not be entirely complete
@@ -461,6 +462,7 @@
'result' => 'success',
'notices' => $notices,
'checkboxes' => $checkboxes,
+   'templates' => $templates,
'links' => $links,
'protectedClasses' => implode( ' ', 
$protectedClasses ),
'basetimestamp' => $baseTimestamp,
diff --git a/extension.json b/extension.json
index ff37869..3579aca 100644
--- a/extension.json
+++ b/extension.json
@@ -1524,6 +1524,7 @@

"modules/ve-mw/ui/pages/ve.ui.MWAdvancedSettingsPage.js",

"modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js",

"modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js",
+   
"modules/ve-mw/ui/pages/ve.ui.MWTemplatesUsedPage.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js",

"modules/ve-mw/ui/tools/ve.ui.MWMetaDialogTool.js"
],
@@ -1602,12 +1603,14 @@
"visualeditor-dialog-meta-settings-toc-force",
"visualeditor-dialog-meta-settings-toc-help",
"visualeditor-dialog-meta-settings-toc-label",
+   
"visualeditor-dialog-meta-templatesused-noresults",
"visualeditor-dialog-meta-title",
"visualeditor-dialogbutton-meta-tooltip",
"visualeditor-languages-tool",
"visualeditor-meta-tool",
"visualeditor-redirect-description",
-   "visualeditor-settings-tool"
+   "visualeditor-settings-tool",
+   "visualeditor-templatesused-tool"
],
"targets": [
"desktop",
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index ba91

[MediaWiki-commits] [Gerrit] integration/config[master]: Begin the migration for all nodepool jobs to be run by all u...

2016-12-18 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328054 )

Change subject: Begin the migration for all nodepool jobs to be run by all users
..

Begin the migration for all nodepool jobs to be run by all users

Creates a new test-nodepool pipeline as there is no easy way to stop the
email whitelist from being stopped on certain tests.

nodepool is safer then plain instances.

We can now remove the jshint and jsonlint test once we add the npm job
to this pipeline.

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/54/328054/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 33f7558..c4a39f0 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -506,6 +506,36 @@
   approval:
 - code-review: +1
 
+  # Start the migration for all tests to be run by everyone
+  # At one point we should rename this pipeline back to test
+  # and the one above should be renamed to test-restrict
+  - name: test-nodepool
+description: >
+  Jobs run by all users. Will vote +2.
+manager: IndependentPipelineManager
+source: gerrit
+trigger:
+  gerrit:
+- event: patchset-created
+  branch: (?!^refs/meta/config)
+
+# Let whitelisted users the ability to reenqueue a change in the test
+# pipeline by simply commenting 'recheck' on a change.
+- event: comment-added
+  branch: (?!^refs/meta/config)
+  comment: (?im)^Patch Set \d+:( 
-?Code\-Review(\+|-)?(1|2)?)?\n\n\s*recheck\.?\s*$
+
+# Let whitelisted users CR+1 to trigger tests for an untested patch
+# (Verified 0 or 1)
+- event: comment-added
+  branch: (?!^refs/meta/config$)
+  require-approval:
+# hasn't been tested yet
+- verified: [0, 1]
+  username: jenkins-bot
+  approval:
+- code-review: +1
+
 success-message: 'Main test build succeeded.'
 success:
   gerrit:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to c93ee83

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328053 )

Change subject: Update restbase to c93ee83
..


Update restbase to c93ee83

List of changes:
c93ee83 Commons: Blacklist two large pages

Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/restbase b/restbase
index 765ad34..c93ee83 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 765ad341c82c9a5dae15eab568fab8d12cab86ec
+Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to c93ee83

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328053 )

Change subject: Update restbase to c93ee83
..

Update restbase to c93ee83

List of changes:
c93ee83 Commons: Blacklist two large pages

Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
---
M restbase
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/53/328053/1

diff --git a/restbase b/restbase
index 765ad34..c93ee83 16
--- a/restbase
+++ b/restbase
@@ -1 +1 @@
-Subproject commit 765ad341c82c9a5dae15eab568fab8d12cab86ec
+Subproject commit c93ee83fedfde2efa56dd79c7e67a58f990f1ad2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8039386d0fdbc6bc41bd4d4f86c833d46f67a7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 765ad34

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328052 )

Change subject: Update restbase to 765ad34
..


Update restbase to 765ad34

List of changes:
8cdfb5c Blacklist User:Cyberpower678/RfX_Report on enwiki
xxx Update node module dependencies

Change-Id: Iae57bd2ca09f2719462ca5d74c20382bcbcebf29
---
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M restbase
7 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index 10689db..841353f 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme";,
   "_id": "content-type@1.0.1",
-  "_shasum": "41eb82f0aea6308e6d64ce4c5c8f4f4461fd33c2",
+  "_shasum": "1a969a8999e61f29c8e2a626d6baa68e7a02",
   "_from": "git+https://github.com/wikimedia/content-type.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b";
 }
diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues";
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f";
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 179c725..dc1cc53 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues";
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c393a813309dc50357b551434034515227e94f5c",
+  "_shasum": "0fb82fd2cfb57c7843efef67c42df6d7b4d552b3",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541";
 }
diff --git a/node_modules/json-stable-stringify/package.json 
b/node_modules/json-stable-stringify/package.json
index 477002f..cf17100 100644
--- a/node_modules/json-stable-stringify/package.json
+++ b/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues";
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "2726b961529201b312dfd4bf0a7aa1d3ba07f24a",
+  "_shasum": "1b905d9b33262570f99e96dc177f2eda2f4d7dd4",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f";
 }
diff --git 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
+++ 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues";
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f";
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index b959dbd..400f430 100644
--- 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/packag

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update restbase to 765ad34

2016-12-18 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328052 )

Change subject: Update restbase to 765ad34
..

Update restbase to 765ad34

List of changes:
8cdfb5c Blacklist User:Cyberpower678/RfX_Report on enwiki
xxx Update node module dependencies

Change-Id: Iae57bd2ca09f2719462ca5d74c20382bcbcebf29
---
M node_modules/content-type/package.json
M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/swagger-ui/package.json
M node_modules/json-stable-stringify/package.json
M 
node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M restbase
7 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/52/328052/1

diff --git a/node_modules/content-type/package.json 
b/node_modules/content-type/package.json
index 10689db..841353f 100644
--- a/node_modules/content-type/package.json
+++ b/node_modules/content-type/package.json
@@ -44,7 +44,7 @@
   },
   "homepage": "https://github.com/jshttp/content-type#readme";,
   "_id": "content-type@1.0.1",
-  "_shasum": "41eb82f0aea6308e6d64ce4c5c8f4f4461fd33c2",
+  "_shasum": "1a969a8999e61f29c8e2a626d6baa68e7a02",
   "_from": "git+https://github.com/wikimedia/content-type.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/content-type.git#47b2632d0a2ee79a7d67268e2f6621becd95d05b";
 }
diff --git 
a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json 
b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
+++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues";
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f";
 }
diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json 
b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
index 179c725..dc1cc53 100644
--- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json
+++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json
@@ -73,7 +73,7 @@
 "url": "https://github.com/swagger-api/swagger-ui/issues";
   },
   "_id": "swagger-ui@2.2.8",
-  "_shasum": "c393a813309dc50357b551434034515227e94f5c",
+  "_shasum": "0fb82fd2cfb57c7843efef67c42df6d7b4d552b3",
   "_from": "git+https://github.com/wikimedia/swagger-ui.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541";
 }
diff --git a/node_modules/json-stable-stringify/package.json 
b/node_modules/json-stable-stringify/package.json
index 477002f..cf17100 100644
--- a/node_modules/json-stable-stringify/package.json
+++ b/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues";
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "2726b961529201b312dfd4bf0a7aa1d3ba07f24a",
+  "_shasum": "1b905d9b33262570f99e96dc177f2eda2f4d7dd4",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f";
 }
diff --git 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
index 198d453..0a7dfa1 100644
--- 
a/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
+++ 
b/node_modules/restbase-mod-table-cassandra/node_modules/json-stable-stringify/package.json
@@ -50,7 +50,7 @@
 "url": "https://github.com/substack/json-stable-stringify/issues";
   },
   "_id": "json-stable-stringify@1.0.0",
-  "_shasum": "c2cdc3e673a21c28d8f138408accffd639283e55",
+  "_shasum": "de91de08c65bc22ff0f5f0b8045e7eec626885b0",
   "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master";,
   "_resolved": 
"git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f";
 }
diff --git 
a/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
 
b/node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
index b959dbd..400f430 100644
--- 
a/node_modules/service-runner/node_module

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Contint: Make sure /mnt/home/jenkins-deploy/tmpfs is mounted...

2016-12-18 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328051 )

Change subject: Contint: Make sure /mnt/home/jenkins-deploy/tmpfs is mounted 
before starting MySQL
..

Contint: Make sure /mnt/home/jenkins-deploy/tmpfs is mounted before starting 
MySQL

Bug: T141450
Change-Id: I46ecf8f458f581ac6f9ff010ff337301503a393c
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/328051/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GoogleMaps[master]: Removed usages of a deprecated method Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327920 )

Change subject: Removed usages of a deprecated method Revision::getText
..


Removed usages of a deprecated method Revision::getText

Bug: T151973
Change-Id: I871c3b16f4ecbc8ec5858f4c9afcd11fb874c889
---
M GoogleMaps.body.php
M SpecialGoogleMapsKML.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/GoogleMaps.body.php b/GoogleMaps.body.php
index ea677d1..0d3fe39 100644
--- a/GoogleMaps.body.php
+++ b/GoogleMaps.body.php
@@ -567,7 +567,7 @@
$revision = is_null($title) ? null :
Revision::newFromTitle($title);
$parsedArticleText = is_null($revision) ? null :
-   self::parseWikiText($pParser, $pLocalParser, 
$revision->getText(), $revision->getTitle(), $pParser->mOptions);
+   self::parseWikiText($pParser, $pLocalParser, 
ContentHandler::getContentText($revision->getContent()), $revision->getTitle(), 
$pParser->mOptions);
$titleMaybeNonexistent = is_null($title) ? 
Title::makeTitleSafe(NS_MAIN, $pTitle) : $title;
$titleLink = is_null($titleMaybeNonexistent) ? '' : 
Linker::link($titleMaybeNonexistent);
if (count($pTabs)) {
diff --git a/SpecialGoogleMapsKML.php b/SpecialGoogleMapsKML.php
index 4e3de79..ad40317 100644
--- a/SpecialGoogleMapsKML.php
+++ b/SpecialGoogleMapsKML.php
@@ -39,7 +39,7 @@
$localParser = new Parser();
$localParser->startExternalParse( 
$this->getPageTitle(), $popts, Parser::OT_WIKI, true );
 
-   if (preg_match_all("/(.*?)<\/googlemap>/s", $revision->getText(), $matches)) {
+   if (preg_match_all("/(.*?)<\/googlemap>/s", 
ContentHandler::getContentText($revision->getContent()), $matches)) {
$exporter->addFileHeader();
for($i=0;$ihttps://gerrit.wikimedia.org/r/327920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I871c3b16f4ecbc8ec5858f4c9afcd11fb874c889
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GoogleMaps
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
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...ExtTab[master]: Removed usages of a deprecated method Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327918 )

Change subject: Removed usages of a deprecated method Revision::getText
..


Removed usages of a deprecated method Revision::getText

Bug: T151973
Change-Id: I85d7b9df7a16843432121057390fdc30bfef66a0
---
M includes/ET_AjaxAccess.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/ET_AjaxAccess.php b/includes/ET_AjaxAccess.php
index 7278481..0ca7bb9 100644
--- a/includes/ET_AjaxAccess.php
+++ b/includes/ET_AjaxAccess.php
@@ -23,7 +23,7 @@
$popts = $wgOut->parserOptions();
$popts->setTidy( true );
$popts->enableLimitReport();
-   $html = $wgParser->parse( $revision->getText(), 
$wgTitle, $popts )->getText();
+   $html = $wgParser->parse( 
ContentHandler::getContentText( $revision->getContent() ), $wgTitle, $popts 
)->getText();
}
return $html;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85d7b9df7a16843432121057390fdc30bfef66a0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ExtTab
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
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...DebugTemplates[master]: Removed usages of the deprecated method Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327917 )

Change subject: Removed usages of the deprecated method Revision::getText
..


Removed usages of the deprecated method Revision::getText

Bug: T151973
Change-Id: I35151660a68f1e9b049c1f1aff16c56ea608aca4
---
M SpecialDebugTemplates.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/SpecialDebugTemplates.php b/SpecialDebugTemplates.php
index b0f2836..88be5c5 100644
--- a/SpecialDebugTemplates.php
+++ b/SpecialDebugTemplates.php
@@ -199,7 +199,7 @@
if ( is_object( $title ) ) {
$r = Revision::newFromTitle( $title );
if ( is_object( $r ) )
-   return $r->getText();
+   return ContentHandler::getContentText( 
$r->getContent() );
}
return "";
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35151660a68f1e9b049c1f1aff16c56ea608aca4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DebugTemplates
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
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...FirstSteps[master]: Removed usages of a deprecated method Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327919 )

Change subject: Removed usages of a deprecated method Revision::getText
..


Removed usages of a deprecated method Revision::getText

Bug: T151973
Change-Id: Ief05d1e48ea3fba9d185430306855027a9987a75
---
M SpecialFirstSteps.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/SpecialFirstSteps.php b/SpecialFirstSteps.php
index 49f7c0c..9f25590 100644
--- a/SpecialFirstSteps.php
+++ b/SpecialFirstSteps.php
@@ -255,7 +255,7 @@
 
if ( $userpage->exists() ) {
$revision = Revision::newFromTitle( $userpage );
-   $text = $revision->getText();
+   $text = ContentHandler::getContentText( 
$revision->getContent() );
$preload = $text;
 
if ( preg_match( '/{{#babel:/i', $text ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief05d1e48ea3fba9d185430306855027a9987a75
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/FirstSteps
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
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...WikimediaMessages[master]: Add npm entry point and banana i18n linter

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/320596 )

Change subject: Add npm entry point and banana i18n linter
..


Add npm entry point and banana i18n linter

Bug: T150332
Change-Id: I288e902ec922cff36f2dbd3332644bbf527e6301
---
M .gitignore
A Gruntfile.js
A package.json
3 files changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 98b092a..a30a7d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/node_modules/
 .svn
 *~
 *.kate-swp
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..ce7a487
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,15 @@
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: [
+   'i18n/*/',
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'lint', ['banana'] );
+   grunt.registerTask( 'test', ['lint'] );
+   grunt.registerTask( 'default', ['test'] );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..d916fde
--- /dev/null
+++ b/package.json
@@ -0,0 +1,9 @@
+{
+  "devDependencies": {
+"grunt": "1.0.1",
+"grunt-banana-checker": "0.5.0"
+  },
+  "scripts": {
+   "test": "grunt test"
+  }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I288e902ec922cff36f2dbd3332644bbf527e6301
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
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]: Test: Do not merge

2016-12-18 Thread Paladox (Code Review)
Hello Bartosz Dziewoński, Esanders, Jack Phoenix, Gergő Tisza, Legoktm, 
jenkins-bot, Anomie,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Test: Do not merge
..

Test: Do not merge

Change-Id: I3e71ad227a74e6b69f1af1455f7e005642fad979
---
M includes/htmlform/fields/HTMLFormFieldCloner.php
M resources/src/mediawiki/htmlform/hide-if.js
2 files changed, 9 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/328050/1

diff --git a/includes/htmlform/fields/HTMLFormFieldCloner.php 
b/includes/htmlform/fields/HTMLFormFieldCloner.php
index d8de890..09fe1bc 100644
--- a/includes/htmlform/fields/HTMLFormFieldCloner.php
+++ b/includes/htmlform/fields/HTMLFormFieldCloner.php
@@ -96,17 +96,6 @@
} else {
$info['id'] = Sanitizer::escapeId( 
"{$this->mID}--$key--$fieldname" );
}
-   // Copy the hide-if rules to "child" fields, so that 
the JavaScript code handling them
-   // (resources/src/mediawiki/htmlform/hide-if.js) 
doesn't have to handle nested fields.
-   if ( $this->mHideIf ) {
-   if ( isset( $info['hide-if'] ) ) {
-   // Hide child field if either its rules 
say it's hidden, or parent's rules say it's hidden
-   $info['hide-if'] = [ 'OR', 
$info['hide-if'], $this->mHideIf ];
-   } else {
-   // Hide child field if parent's rules 
say it's hidden
-   $info['hide-if'] = $this->mHideIf;
-   }
-   }
$field = HTMLForm::loadInputFromParameters( $name, 
$info, $this->mParent );
$fields[$fieldname] = $field;
}
diff --git a/resources/src/mediawiki/htmlform/hide-if.js 
b/resources/src/mediawiki/htmlform/hide-if.js
index f9cb5de..5f60097 100644
--- a/resources/src/mediawiki/htmlform/hide-if.js
+++ b/resources/src/mediawiki/htmlform/hide-if.js
@@ -201,31 +201,22 @@
}
 
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
-   var
-   $fields = $root.find( '.mw-htmlform-hide-if' ),
-   $oouiFields = $fields.filter( '[data-ooui]' ),
+   $root.find( '.mw-htmlform-hide-if' ).each( function () {
+   var v, i, fields, test, func, spec, self, modules, 
data, extraModules,
+   $el = $( this );
+
modules = [];
-
-   if ( $oouiFields.length ) {
-   modules.push( 'mediawiki.htmlform.ooui' );
-   $oouiFields.each( function () {
-   var data, extraModules,
-   $el = $( this );
-
+   if ( $el.is( '[data-ooui]' ) ) {
+   modules.push( 'mediawiki.htmlform.ooui' );
data = $el.data( 'mw-modules' );
if ( data ) {
// We can trust this value, 'data-mw-*' 
attributes are banned from user content in Sanitizer
extraModules = data.split( ',' );
modules.push.apply( modules, 
extraModules );
}
-   } );
-   }
+   }
 
-   mw.loader.using( modules ).done( function () {
-   $fields.each( function () {
-   var v, i, fields, test, func, spec, self,
-   $el = $( this );
-
+   mw.loader.using( modules ).done( function () {
if ( $el.is( '[data-ooui]' ) ) {
// self should be a FieldLayout that 
mixes in mw.htmlform.Element
self = OO.ui.FieldLayout.static.infuse( 
$el );
@@ -246,42 +237,7 @@
test = v[ 1 ];
// The .toggle() method works mostly the same 
for jQuery objects and OO.ui.Widget
func = function () {
-   var shouldHide = test();
-   self.toggle( !shouldHide );
-
-   // It is impossible to submit a form 
with hidden fields failing validation, e.g. one that
-   // is required. However, validity is 
not checked for disabled fields, as these are not
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Pin eslint version

2016-12-18 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328049 )

Change subject: Pin eslint version
..

Pin eslint version

We doint want tests failing every time upstream publishing a new
version.

Instead we should bump this manually everytime they update to make sure
no failures happen.

Change-Id: I1c76dacd0950100825b85a3791f74c1f6d5477d9
---
M package.json
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/package.json b/package.json
index 99e752c..faf66ff 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
 "grunt-contrib-copy": "1.0.0",
 "grunt-contrib-watch": "1.0.0",
 "grunt-eslint": "19.0.0",
+"eslint": "3.12.2",
 "grunt-jsonlint": "1.1.0",
 "grunt-karma": "2.0.0",
 "grunt-stylelint": "0.6.0",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Metrolook[master]: build: Replace jshint and jscs with eslint

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328045 )

Change subject: build: Replace jshint and jscs with eslint
..


build: Replace jshint and jscs with eslint

Change-Id: I8fb7efe8733718d871c6d3a85c7afacc84f84d97
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M js/vector.js
M package.json
7 files changed, 19 insertions(+), 45 deletions(-)

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



diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..cbad6a2
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,13 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true
+   },
+   "globals": {
+   "mediaWiki": false
+   },
+   "rules": {
+   "valid-jsdoc": "off"
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 099f69c..000
--- a/.jshintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-vendor
-
-js/overthrow.js
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 66e3d48..000
--- a/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 006f96e..963ac50 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,25 +1,18 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'skin.json' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
'*.js',
'**/*.js',
'!node_modules/**',
'!js/overthrow.js'
]
-   },
-   jscs: {
-   src: '<%= jshint.all %>'
},
banana: conf.MessagesDirs,
jsonlint: {
@@ -34,6 +27,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/js/vector.js b/js/vector.js
index 7266a13..d1b1e53 100644
--- a/js/vector.js
+++ b/js/vector.js
@@ -110,4 +110,3 @@
}
} );
 } );
-
diff --git a/package.json b/package.json
index 22a0263..2836b23 100644
--- a/package.json
+++ b/package.json
@@ -6,9 +6,9 @@
   },
   "devDependencies": {
 "grunt": "1.0.1",
-"grunt-contrib-jshint": "1.0.0",
+"grunt-eslint": "19.0.0",
+"eslint-config-wikimedia": "0.3.0",
 "grunt-banana-checker": "0.5.0",
-"grunt-jscs": "2.8.0",
 "grunt-jsonlint": "1.1.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fb7efe8733718d871c6d3a85c7afacc84f84d97
Gerrit-PatchSet: 19
Gerrit-Project: mediawiki/skins/Metrolook
Gerrit-Branch: master
Gerrit-Owner: Paladox 
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] mediawiki...Newsletter[master]: Subscribe button now shows to Anonymous user

2016-12-18 Thread Filip (Code Review)
Filip has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328048 )

Change subject: Subscribe button now shows to Anonymous user
..

Subscribe button now shows to Anonymous user

Show subscribe button to anonymous user, and redirect to login page. Thats 
alternative for 328041

Bug: T150637
Change-Id: Ifeaa0c045b5f5dee947c2c02a7c640be2e0ae4c4
---
M includes/content/NewsletterContent.php
1 file changed, 4 insertions(+), 13 deletions(-)


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

diff --git a/includes/content/NewsletterContent.php 
b/includes/content/NewsletterContent.php
index 61ce83b..bcb18c0 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -129,12 +129,7 @@
$this->newsletter = Newsletter::newFromName( 
$title->getText() );
$user = $options->getUser();
 
-   $newsletterActionButtons = '';
-
-   if ( $user->isLoggedIn() ) {
-   // buttons are only shown for logged-in users
-   $newsletterActionButtons = 
$this->getNewsletterActionButtons( $options );
-   }
+   $newsletterActionButtons = 
$this->getNewsletterActionButtons( $options );
 
$mainTitle = Title::newFromText( $this->mainPage );
 
@@ -211,12 +206,8 @@
$form->suppressDefaultSubmit();
$form->prepareForm();
 
-   if ( $options->getUser()->isLoggedIn() ) {
-   $output->setText( $this->getNavigationLinks( 
$options ) . $newsletterActionButtons .
-   "" . $form->getBody() );
-   } else {
-   $output->setText( $this->getNavigationLinks( 
$options ) . $form->getBody() );
-   }
+   $output->setText( $this->getNavigationLinks( $options ) 
. $newsletterActionButtons .
+   "" . $form->getBody() );
return $output;
}
}
@@ -450,4 +441,4 @@
 
return $truncatedtext;
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeaa0c045b5f5dee947c2c02a7c640be2e0ae4c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Filip 

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


[MediaWiki-commits] [Gerrit] mediawiki...OATHAuth[master]: Add Czech aliases

2016-12-18 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328047 )

Change subject: Add Czech aliases
..

Add Czech aliases

Change-Id: I800f082fb4acc9f9cb19f430e15f2063bfaa0958
---
M OATHAuth.alias.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth 
refs/changes/47/328047/1

diff --git a/OATHAuth.alias.php b/OATHAuth.alias.php
index c874a59..194e543 100644
--- a/OATHAuth.alias.php
+++ b/OATHAuth.alias.php
@@ -19,6 +19,11 @@
'OATH' => [ 'أواث', 'أواث_أوث' ],
 ];
 
+/** Czech (čeština) */
+$specialPageAliases['cs'] => [
+   'OATH' => [ 'Dvoufaktorové_ověření', 'OATH', 'OATHAuth' ],
+];
+
 /** Egyptian Arabic (مصرى) */
 $specialPageAliases['arz'] = [
'OATH' => [ 'اواث', 'اواث_اوث' ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I800f082fb4acc9f9cb19f430e15f2063bfaa0958
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Add Czech aliases

2016-12-18 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328046 )

Change subject: Add Czech aliases
..

Add Czech aliases

Change-Id: I66455e0dbd3386bcebab7174e53383aedd1ed310
---
M CentralAuth.alias.php
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/46/328046/1

diff --git a/CentralAuth.alias.php b/CentralAuth.alias.php
index 75bb889..55ba6da 100644
--- a/CentralAuth.alias.php
+++ b/CentralAuth.alias.php
@@ -185,8 +185,15 @@
'GlobalUsers' => array( 'Глобальни_декъашхой' ),
 );
 
+/** Czech (čeština) */
+
 $specialPageAliases['cs'] = array(
-   'CentralAuth' => array ( 'Centrální_ověření' ),
+   'CentralAuth' => array( 'Centrální_ověření' ),
+   'MergeAccount' => array( 'Sloučení_účtů' ),
+   'GlobalGroupMembership' => array( 'Globální_práva_uživatele' ), 
+   'GlobalGroupPermissions' => array( 'Práva_globálních_skupin' ),
+   'WikiSets' => array( 'Wiki_množiny' ),
+   'GlobalUsers' => array( 'Globální_uživatelé' ),
 );
 
 /** German (Deutsch) */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66455e0dbd3386bcebab7174e53383aedd1ed310
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Urbanecm 

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


[MediaWiki-commits] [Gerrit] mediawiki...Metrolook[master]: build: Replace jshint and jscs with eslint

2016-12-18 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328045 )

Change subject: build: Replace jshint and jscs with eslint
..

build: Replace jshint and jscs with eslint

Change-Id: I8fb7efe8733718d871c6d3a85c7afacc84f84d97
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M package.json
6 files changed, 4 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook 
refs/changes/45/328045/1

diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/.eslintrc.json
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 099f69c..000
--- a/.jshintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules
-vendor
-
-js/overthrow.js
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 66e3d48..000
--- a/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index 006f96e..a6783da 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,10 +7,7 @@
grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
'*.js',
'**/*.js',
@@ -34,6 +31,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 22a0263..2836b23 100644
--- a/package.json
+++ b/package.json
@@ -6,9 +6,9 @@
   },
   "devDependencies": {
 "grunt": "1.0.1",
-"grunt-contrib-jshint": "1.0.0",
+"grunt-eslint": "19.0.0",
+"eslint-config-wikimedia": "0.3.0",
 "grunt-banana-checker": "0.5.0",
-"grunt-jscs": "2.8.0",
 "grunt-jsonlint": "1.1.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fb7efe8733718d871c6d3a85c7afacc84f84d97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Metrolook
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[master]: Add Czech aliases for special pages

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328033 )

Change subject: Add Czech aliases for special pages
..


Add Czech aliases for special pages

Change-Id: I6093695cb73d1261f3ba5121777c94ab74a24d66
---
M GlobalBlocking.alias.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/GlobalBlocking.alias.php b/GlobalBlocking.alias.php
index 8e1c25e..3b84d87 100644
--- a/GlobalBlocking.alias.php
+++ b/GlobalBlocking.alias.php
@@ -104,6 +104,14 @@
'RemoveGlobalBlock' => array( 'Глобальни_блокдӀаяккхар' ),
 );
 
+/** Czech (čeština) */
+$specialPageAliases['cs'] = array(
+   'GlobalBlock' => array( 'Globální_blokování' ),
+   'GlobalBlockList' => array( 'Seznam_globálních_blokování' ),
+   'RemoveGlobalBlock' => array( 'Globální_odblokování' ),
+   'GlobalBlockStatus' => array( 'Výjimky_z_globálních_blokování' ),
+);
+
 /** German (Deutsch) */
 $specialPageAliases['de'] = array(
'GlobalBlock' => array( 'Globale_Sperre' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6093695cb73d1261f3ba5121777c94ab74a24d66
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Urbanecm 
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...Translate[master]: SpecialPageTranslationDeletePage: Use 'wpReason' for consist...

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328042 )

Change subject: SpecialPageTranslationDeletePage: Use 'wpReason' for consistency
..


SpecialPageTranslationDeletePage: Use 'wpReason' for consistency

For consistency with ?action=delete, set the name of the reason field to
'wpReason'. Templates that prefill the deletion reason will now properly
fill it on translatable pages too.

Reported at .

Change-Id: Ifd83ccb351d8beb7e2a933999d469364833b37d4
---
M tag/SpecialPageTranslationDeletePage.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/tag/SpecialPageTranslationDeletePage.php 
b/tag/SpecialPageTranslationDeletePage.php
index edcfcbb..607d934 100644
--- a/tag/SpecialPageTranslationDeletePage.php
+++ b/tag/SpecialPageTranslationDeletePage.php
@@ -63,7 +63,7 @@
// Yes, the use of getVal() and getText() is wanted, see bug 
T22365
$this->text = $request->getVal( 'wpTitle', $par );
$this->title = Title::newFromText( $this->text );
-   $this->reason = $request->getText( 'reason' );
+   $this->reason = $request->getText( 'wpReason' );
// Checkboxes that default being checked are tricky
$this->doSubpages = $request->getBool( 'subpages', 
!$request->wasPosted() );
 
@@ -196,7 +196,7 @@
$this->addInputLabel(
$form,
$this->msg( 'pt-deletepage-reason' )->text(),
-   'reason',
+   'wpReason', // For consistency with ?action=delete
60,
$this->reason
);
@@ -302,7 +302,7 @@
$this->addInputLabel(
$form,
$this->msg( 'pt-deletepage-reason' )->text(),
-   'reason',
+   'wpReason',
60,
$this->reason );
$form[] = Xml::checkLabel(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd83ccb351d8beb7e2a933999d469364833b37d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Nikerabbit 
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]: Change pageids validation to more error resilient

2016-12-18 Thread Magul (Code Review)
Magul has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328044 )

Change subject: Change pageids validation to more error resilient
..

Change pageids validation to more error resilient

Method will not fail for any pageid that don't meet positive integer standard,
instead it will be just omitted.

Bug: T153592
Change-Id: If87bbdbbe0631cb9d829dda6e070a01052df7e28
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/44/328044/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 12a40f4..b4aa53c 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3136,7 +3136,7 @@
 pageids = [p.strip() for p in pageids]
 
 # Validate pageids.
-gen = (str(int(p)) for p in pageids if int(p) > 0)
+gen = (str(int(p)) for p in pageids if str(p).isdigit())
 
 # Find out how many pages can be specified at a time.
 parameter = self._paraminfo.parameter('query+info', 'prop')

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix UnboundLocalError for count uninitialized before loop

2016-12-18 Thread Magul (Code Review)
Magul has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328043 )

Change subject: Fix UnboundLocalError for count uninitialized before loop
..

Fix UnboundLocalError for count uninitialized before loop

Bug: T153593
Change-Id: Ie3f7a1d23fb9c3a1012da50e6f33231652f09c55
---
M tests/site_tests.py
1 file changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/43/328043/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 5de88b5..48a0e3b 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -2503,26 +2503,26 @@
 def test_load_from_pageids_iterable_of_str(self):
 """Test basic loading with pageids."""
 pageids = [str(page._pageid) for page in self.links]
-gen = self.site.load_pages_from_pageids(pageids)
-for count, page in enumerate(gen, start=1):
+gen = list(self.site.load_pages_from_pageids(pageids))
+for page in gen:
 self.assertIsInstance(page, pywikibot.Page)
 self.assertIsInstance(page.exists(), bool)
 self.assertTrue(page.exists())
 self.assertTrue(hasattr(page, '_pageid'))
 self.assertIn(page, self.links)
-self.assertEqual(count, len(self.links))
+self.assertEqual(len(gen), len(self.links))
 
 def test_load_from_pageids_iterable_of_int(self):
 """Test basic loading with pageids."""
 pageids = [page._pageid for page in self.links]
-gen = self.site.load_pages_from_pageids(pageids)
-for count, page in enumerate(gen, start=1):
+gen = list(self.site.load_pages_from_pageids(pageids))
+for page in gen:
 self.assertIsInstance(page, pywikibot.Page)
 self.assertIsInstance(page.exists(), bool)
 self.assertTrue(page.exists())
 self.assertTrue(hasattr(page, '_pageid'))
 self.assertIn(page, self.links)
-self.assertEqual(count, len(self.links))
+self.assertEqual(len(gen), len(self.links))
 
 def test_load_from_pageids_iterable_in_order(self):
 """Test loading with pageids is ordered."""
@@ -2540,38 +2540,38 @@
 """Test loading with duplicate pageids."""
 pageids = [page._pageid for page in self.links]
 pageids = pageids + pageids
-gen = self.site.load_pages_from_pageids(pageids)
-for count, page in enumerate(gen, start=1):
+gen = list(self.site.load_pages_from_pageids(pageids))
+for page in gen:
 self.assertIsInstance(page, pywikibot.Page)
 self.assertIsInstance(page.exists(), bool)
 self.assertTrue(page.exists())
 self.assertTrue(hasattr(page, '_pageid'))
 self.assertIn(page, self.links)
-self.assertEqual(count, len(self.links))
+self.assertEqual(len(gen), len(self.links))
 
 def test_load_from_pageids_comma_separated(self):
 """Test loading from comma-separated pageids."""
 pageids = ', '.join(str(page._pageid) for page in self.links)
-gen = self.site.load_pages_from_pageids(pageids)
-for count, page in enumerate(gen, start=1):
+gen = list(self.site.load_pages_from_pageids(pageids))
+for page in gen:
 self.assertIsInstance(page, pywikibot.Page)
 self.assertIsInstance(page.exists(), bool)
 self.assertTrue(page.exists())
 self.assertTrue(hasattr(page, '_pageid'))
 self.assertIn(page, self.links)
-self.assertEqual(count, len(self.links))
+self.assertEqual(len(gen), len(self.links))
 
 def test_load_from_pageids_pipe_separated(self):
 """Test loading from comma-separated pageids."""
 pageids = '|'.join(str(page._pageid) for page in self.links)
-gen = self.site.load_pages_from_pageids(pageids)
-for count, page in enumerate(gen, start=1):
+gen = list(self.site.load_pages_from_pageids(pageids))
+for page in gen:
 self.assertIsInstance(page, pywikibot.Page)
 self.assertIsInstance(page.exists(), bool)
 self.assertTrue(page.exists())
 self.assertTrue(hasattr(page, '_pageid'))
 self.assertIn(page, self.links)
-self.assertEqual(count, len(self.links))
+self.assertEqual(len(gen), len(self.links))
 
 
 class TestPagePreloading(DefaultSiteTestCase):

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

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

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

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Removed usage of old SpecialPage code for viewing the page

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328023 )

Change subject: Removed usage of old SpecialPage code for viewing the page
..


Removed usage of old SpecialPage code for viewing the page

Bug: T152678
Change-Id: Ic725e3767c213fe304063681b411dfe5da86143a
---
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialNewsletter.php
3 files changed, 3 insertions(+), 132 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index b94d4f5..21a59d1 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -33,7 +33,6 @@
"newsletter-subscribe-loginrequired": "Please log in to subscribe to 
[[Special:Newsletters|newsletters]].",
"newsletter-notfound": "Newsletter not found",
"newsletter-not-found-id": "A newsletter with this ID does not exist. A 
[[Special:Newsletters|list of existing newsletters]] is available.",
-   "newsletter-view": "View newsletter details",
"newsletter-view-mainpage": "Main page:",
"newsletter-view-description": "Description:",
"newsletter-view-publishers": "{{PLURAL:$1|Publisher:|Publishers:}}",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c419efb..6e2da62 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -40,7 +40,6 @@
"newsletter-subscribe-loginrequired": "Error message shown on the login 
form for non-logged in users if they try to visit 
Special:Newsletter//subscribe.",
"newsletter-notfound": "Header of Special:Newsletter/ if no 
newsletter by that id exists.\n\nSee also:\n* 
{{msg-mw|newsletter-not-found-id}}",
"newsletter-not-found-id": "Error message shown on 
Special:Newsletter/ if no newsletter by that id exists.\n\nSee also:\n* 
{{msg-mw|newsletter-notfound}}",
-   "newsletter-view": "Header message shown on Special:Newsletter/ if 
a newsletter by the specified id exists.\n\nSee also:\n* 
{{msg-mw|newsletter-delete}}",
"newsletter-view-mainpage": "Label for the newsletter's main page 
field. Shown on Special:Newsletter/\n{{Identical|Main page}}",
"newsletter-view-description": "Label for newsletter description field. 
Shown on Special:Newsletter/\n{{Identical|Description}}",
"newsletter-view-publishers": "Label for newsletter's publisher(s) 
field. Shown on Special:Newsletter/.\n\nParameters:\n* $1 - Number of 
publishers for the newsletter, for use with PLURAL.",
diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index dc5a760..11b7039 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -61,9 +61,9 @@
$this->doAnnounceExecute();
break;
default:
-   $this->doViewExecute();
-   $action = null;
-   break;
+   $this->getOutput()->redirect(
+   Title::makeTitleSafe( 
NS_NEWSLETTER, $this->newsletter->getName() )->getFullURL() );
+   return;
}
 
$out->addSubtitle( $this->getNavigationLinks( $action ) 
);
@@ -181,94 +181,6 @@
}
 
/**
-* Build the main form for Special:Newsletter/$id. This is shown
-* by default when visiting Special:Newsletter/$id
-*/
-   protected function doViewExecute() {
-   $user = $this->getUser();
-   $this->getOutput()->setPageTitle( $this->msg( 'newsletter-view' 
) );
-
-   if ( $user->isLoggedIn() ) {
-   // buttons are only shown for logged-in users
-$html = $this->getNewsletterActionButtons();
-$this->getOutput()->addHTML( $html );
-   }
-
-   $publishers = UserArray::newFromIDs( 
$this->newsletter->getPublishers() );
-   $mainTitle = Title::newFromID( $this->newsletter->getPageId() );
-   $fields = array(
-   'mainpage' => array(
-   'type' => 'info',
-   'label-message' => 'newsletter-view-mainpage',
-   'default' => 
$this->getLinkRenderer()->makeLink( $mainTitle, $mainTitle->getPrefixedText() ),
-   'raw' => true,
-   ),
-   'description' => array(
-   'type' => 'info',
-   'label-message' => 
'newsletter-view-description',
-   'default' => 
$this->newsletter->getDescription(),
-   'rows' => 6,
-

[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: SpecialPageTranslationDeletePage: Use 'wpReason' for consist...

2016-12-18 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328042 )

Change subject: SpecialPageTranslationDeletePage: Use 'wpReason' for consistency
..

SpecialPageTranslationDeletePage: Use 'wpReason' for consistency

For consistency with ?action=delete, set the name of the reason field to
'wpReason'. Templates that prefill the deletion reason will now properly
fill it on translatable pages too.

Reported at .

Change-Id: Ifd83ccb351d8beb7e2a933999d469364833b37d4
---
M tag/SpecialPageTranslationDeletePage.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/42/328042/1

diff --git a/tag/SpecialPageTranslationDeletePage.php 
b/tag/SpecialPageTranslationDeletePage.php
index edcfcbb..607d934 100644
--- a/tag/SpecialPageTranslationDeletePage.php
+++ b/tag/SpecialPageTranslationDeletePage.php
@@ -63,7 +63,7 @@
// Yes, the use of getVal() and getText() is wanted, see bug 
T22365
$this->text = $request->getVal( 'wpTitle', $par );
$this->title = Title::newFromText( $this->text );
-   $this->reason = $request->getText( 'reason' );
+   $this->reason = $request->getText( 'wpReason' );
// Checkboxes that default being checked are tricky
$this->doSubpages = $request->getBool( 'subpages', 
!$request->wasPosted() );
 
@@ -196,7 +196,7 @@
$this->addInputLabel(
$form,
$this->msg( 'pt-deletepage-reason' )->text(),
-   'reason',
+   'wpReason', // For consistency with ?action=delete
60,
$this->reason
);
@@ -302,7 +302,7 @@
$this->addInputLabel(
$form,
$this->msg( 'pt-deletepage-reason' )->text(),
-   'reason',
+   'wpReason',
60,
$this->reason );
$form[] = Xml::checkLabel(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd83ccb351d8beb7e2a933999d469364833b37d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HTMLForm: Use 'mw-htmlform' CSS class

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324959 )

Change subject: HTMLForm: Use 'mw-htmlform' CSS class
..


HTMLForm: Use 'mw-htmlform' CSS class

Makes it easy to identify all HTMLForms on a page.

Change-Id: I5b9494fc925ac953c14b358331acddfe80c2661d
---
M includes/htmlform/HTMLForm.php
M includes/htmlform/OOUIHTMLForm.php
M includes/htmlform/VFormHTMLForm.php
M resources/src/mediawiki/htmlform/styles.css
M tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
5 files changed, 9 insertions(+), 4 deletions(-)

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



diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index 71ccaa3..5c5a9a7 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -1047,6 +1047,7 @@
: 'application/x-www-form-urlencoded';
# Attributes
$attribs = [
+   'class' => 'mw-htmlform',
'action' => $this->getAction(),
'method' => $this->getMethod(),
'enctype' => $encType,
@@ -1079,7 +1080,7 @@
 
return Html::rawElement(
'form',
-   $this->getFormAttributes() + [ 'class' => 'visualClear' 
],
+   $this->getFormAttributes(),
$html
);
}
diff --git a/includes/htmlform/OOUIHTMLForm.php 
b/includes/htmlform/OOUIHTMLForm.php
index 46b570d..54bdf04 100644
--- a/includes/htmlform/OOUIHTMLForm.php
+++ b/includes/htmlform/OOUIHTMLForm.php
@@ -275,7 +275,7 @@
 
public function wrapForm( $html ) {
$form = new OOUI\FormLayout( $this->getFormAttributes() + [
-   'classes' => [ 'mw-htmlform-ooui' ],
+   'classes' => [ 'mw-htmlform', 'mw-htmlform-ooui' ],
'content' => new OOUI\HtmlSnippet( $html ),
] );
 
diff --git a/includes/htmlform/VFormHTMLForm.php 
b/includes/htmlform/VFormHTMLForm.php
index 5d9f7a0..325526b 100644
--- a/includes/htmlform/VFormHTMLForm.php
+++ b/includes/htmlform/VFormHTMLForm.php
@@ -67,7 +67,7 @@
 
protected function getFormAttributes() {
$attribs = parent::getFormAttributes();
-   $attribs['class'] = [ 'mw-ui-vform', 'mw-ui-container', 
'visualClear' ];
+   $attribs['class'] = [ 'mw-htmlform', 'mw-ui-vform', 
'mw-ui-container' ];
return $attribs;
}
 
diff --git a/resources/src/mediawiki/htmlform/styles.css 
b/resources/src/mediawiki/htmlform/styles.css
index 1603130..1b9d2fb 100644
--- a/resources/src/mediawiki/htmlform/styles.css
+++ b/resources/src/mediawiki/htmlform/styles.css
@@ -1,5 +1,9 @@
 /* HTMLForm styles */
 
+.mw-htmlform {
+   clear: both;
+}
+
 table.mw-htmlform-nolabel td.mw-label {
display: none;
 }
diff --git a/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php 
b/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
index cd84d79..ab3ac55 100644
--- a/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
+++ b/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php
@@ -33,7 +33,7 @@
$user = new TestUser( __METHOD__ );
list( $html, ) = $this->executeSpecialPage( 'clear', null, 
'qqx', $user->getUser() );
$this->assertRegExp(
-   '//',
+   '//',
$html
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b9494fc925ac953c14b358331acddfe80c2661d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HTMLFormFieldCloner: Set 'formnovalidate' on add/remove fiel...

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/324950 )

Change subject: HTMLFormFieldCloner: Set 'formnovalidate' on add/remove field 
buttons
..


HTMLFormFieldCloner: Set 'formnovalidate' on add/remove field buttons

Otherwise, after we allow HTML5 form validation attributes, these
buttons wouldn't work for non-JS users (unless the whole form was
otherwise valid).

Change-Id: Ia9c16849774c186b991280ea60fc5608ddd4cf42
---
M includes/htmlform/fields/HTMLButtonField.php
M includes/htmlform/fields/HTMLFormFieldCloner.php
2 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/includes/htmlform/fields/HTMLButtonField.php 
b/includes/htmlform/fields/HTMLButtonField.php
index 500b502..a19bd5a 100644
--- a/includes/htmlform/fields/HTMLButtonField.php
+++ b/includes/htmlform/fields/HTMLButtonField.php
@@ -13,6 +13,9 @@
  *   of the value from 'default'. Overrides 'buttonlabel-raw'.
  * - buttonlabel-raw: HTMLto display for the button display text, instead
  *   of the value from 'default'.
+ * - formnovalidate: Set to true if clicking this button should suppress
+ *   client-side form validation. Used in HTMLFormFieldCloner for add/remove
+ *   buttons.
  *
  * Note that the buttonlabel parameters are not supported on IE6 and IE7 due to
  * bugs in those browsers. If detected, they will be served buttons using the
@@ -27,10 +30,16 @@
/** @var array $mFlags Flags to add to OOUI Button widget */
protected $mFlags = [];
 
+   protected $mFormnovalidate = false;
+
public function __construct( $info ) {
$info['nodata'] = true;
if ( isset( $info['flags'] ) ) {
$this->mFlags = $info['flags'];
+   }
+
+   if ( isset( $info['formnovalidate'] ) ) {
+   $this->mFormnovalidate = $info['formnovalidate'];
}
 
# Generate the label from a message, if possible
@@ -71,6 +80,7 @@
'type' => $this->buttonType,
'name' => $this->mName,
'value' => $this->getDefault(),
+   'formnovalidate' => $this->mFormnovalidate,
] + $this->getAttributes( [ 'disabled', 'tabindex' ] );
 
if ( $this->isBadIE() ) {
diff --git a/includes/htmlform/fields/HTMLFormFieldCloner.php 
b/includes/htmlform/fields/HTMLFormFieldCloner.php
index abb50d0..8fb840a 100644
--- a/includes/htmlform/fields/HTMLFormFieldCloner.php
+++ b/includes/htmlform/fields/HTMLFormFieldCloner.php
@@ -57,6 +57,7 @@
if ( isset( $this->mParams['fields']['delete'] ) ) {
$class = 'mw-htmlform-cloner-delete-button';
$info = $this->mParams['fields']['delete'] + [
+   'formnovalidate' => true,
'cssclass' => $class
];
unset( $info['name'], $info['class'] );
@@ -310,6 +311,7 @@
: 'htmlform-cloner-delete';
$field = HTMLForm::loadInputFromParameters( $name, [
'type' => 'submit',
+   'formnovalidate' => true,
'name' => $name,
'id' => Sanitizer::escapeId( 
"{$this->mID}--$key--delete" ),
'cssclass' => 
'mw-htmlform-cloner-delete-button',
@@ -382,6 +384,7 @@
: 'htmlform-cloner-create';
$field = HTMLForm::loadInputFromParameters( $name, [
'type' => 'submit',
+   'formnovalidate' => true,
'name' => $name,
'id' => Sanitizer::escapeId( "{$this->mID}--create" ),
'cssclass' => 'mw-htmlform-cloner-create-button',

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update version string

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328040 )

Change subject: Update version string
..


Update version string

Change-Id: Ia17fefef42631f7f26a1588c814acc7a02b3385b
---
M pywikibot/family.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pywikibot/family.py b/pywikibot/family.py
index e1157cb..437969e 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1242,7 +1242,7 @@
 Use L{pywikibot.tools.MediaWikiVersion} to compare version strings.
 """
 # Here we return the latest mw release for downloading
-return '1.27.1'
+return '1.28.0'
 
 def force_version(self, code):
 """

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia17fefef42631f7f26a1588c814acc7a02b3385b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
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...MadLib[master]: Removed usages of a deprecated method: Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327924 )

Change subject: Removed usages of a deprecated method: Revision::getText
..


Removed usages of a deprecated method: Revision::getText

Bug: T151973
Change-Id: I0739a747491d901af2bfe0386e64d5e643fc9b9e
---
M MadLib.php
1 file changed, 1 insertion(+), 1 deletion(-)

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

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



diff --git a/MadLib.php b/MadLib.php
index 3fd430f..5887305 100644
--- a/MadLib.php
+++ b/MadLib.php
@@ -201,7 +201,7 @@
 if(is_object($title)) {
 $r = Revision::newFromTitle($title);
 if(is_object($r))
-return $r->getText();
+return ContentHandler::getContentText($r->getContent());
 }
 return "";
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0739a747491d901af2bfe0386e64d5e643fc9b9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MadLib
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: LukBukkit 
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...IndexFunction[master]: Removed usages of a deprecated method: Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327923 )

Change subject: Removed usages of a deprecated method: Revision::getText
..


Removed usages of a deprecated method: Revision::getText

Bug: T151973
Change-Id: Ie4b990f1f7266e37ad803ad9b9741bfa85edcf62
---
M IndexAbstracts.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/IndexAbstracts.php b/IndexAbstracts.php
index 4082606..4b05515 100644
--- a/IndexAbstracts.php
+++ b/IndexAbstracts.php
@@ -99,7 +99,7 @@
$rev = Revision::newFromTitle( $title );
 
if ( $rev ) {
-   $text = substr( $rev->getText(), 0, 16384 );
+   $text = substr( ContentHandler::getContentText( 
$rev->getContent() ), 0, 16384 );
 
// Ok, first note this is a TERRIBLE HACK. :D
//

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4b990f1f7266e37ad803ad9b9741bfa85edcf62
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/IndexFunction
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rewrite importImages.php to use Maintenance infrastructure

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327860 )

Change subject: Rewrite importImages.php to use Maintenance infrastructure
..


Rewrite importImages.php to use Maintenance infrastructure

I even tested it!

Change-Id: I999f5842625c752f01c1eb4b012431c4a24ce7ce
---
M autoload.php
D maintenance/importImages.inc
M maintenance/importImages.php
3 files changed, 452 insertions(+), 470 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 6dbcc1d..00c2991 100644
--- a/autoload.php
+++ b/autoload.php
@@ -616,6 +616,7 @@
'ImageListPager' => __DIR__ . 
'/includes/specials/pagers/ImageListPager.php',
'ImagePage' => __DIR__ . '/includes/page/ImagePage.php',
'ImageQueryPage' => __DIR__ . 
'/includes/specialpage/ImageQueryPage.php',
+   'ImportImages' => __DIR__ . '/maintenance/importImages.php',
'ImportLogFormatter' => __DIR__ . 
'/includes/logging/ImportLogFormatter.php',
'ImportReporter' => __DIR__ . '/includes/specials/SpecialImport.php',
'ImportSiteScripts' => __DIR__ . '/maintenance/importSiteScripts.php',
diff --git a/maintenance/importImages.inc b/maintenance/importImages.inc
deleted file mode 100644
index fc9428d..000
--- a/maintenance/importImages.inc
+++ /dev/null
@@ -1,137 +0,0 @@
-http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- * @author Rob Church 
- * @author Mij 
- */
-
-/**
- * Search a directory for files with one of a set of extensions
- *
- * @param string $dir Path to directory to search
- * @param array $exts Array of extensions to search for
- * @param bool $recurse Search subdirectories recursively
- * @return array|bool Array of filenames on success, or false on failure
- */
-function findFiles( $dir, $exts, $recurse = false ) {
-   if ( is_dir( $dir ) ) {
-   $dhl = opendir( $dir );
-   if ( $dhl ) {
-   $files = [];
-   while ( ( $file = readdir( $dhl ) ) !== false ) {
-   if ( is_file( $dir . '/' . $file ) ) {
-   list( /* $name */, $ext ) = 
splitFilename( $dir . '/' . $file );
-   if ( array_search( strtolower( $ext ), 
$exts ) !== false ) {
-   $files[] = $dir . '/' . $file;
-   }
-   } elseif ( $recurse && is_dir( $dir . '/' . 
$file ) && $file !== '..' && $file !== '.' ) {
-   $files = array_merge( $files, 
findFiles( $dir . '/' . $file, $exts, true ) );
-   }
-   }
-
-   return $files;
-   } else {
-   return [];
-   }
-   } else {
-   return [];
-   }
-}
-
-/**
- * Split a filename into filename and extension
- *
- * @param string $filename Filename
- * @return array
- */
-function splitFilename( $filename ) {
-   $parts = explode( '.', $filename );
-   $ext = $parts[count( $parts ) - 1];
-   unset( $parts[count( $parts ) - 1] );
-   $fname = implode( '.', $parts );
-
-   return [ $fname, $ext ];
-}
-
-/**
- * Find an auxilliary file with the given extension, matching
- * the give base file path. $maxStrip determines how many extensions
- * may be stripped from the original file name before appending the
- * new extension. For example, with $maxStrip = 1 (the default),
- * file files acme.foo.bar.txt and acme.foo.txt would be auxilliary
- * files for acme.foo.bar and the extension ".txt". With $maxStrip = 2,
- * acme.txt would also be acceptable.
- *
- * @param string $file Base path
- * @param string $auxExtension The extension to be appended to the base path
- * @param int $maxStrip The maximum number of extensions to strip from the 
base path (default: 1)
- * @return string|bool
- */
-function findAuxFile( $file, $auxExtension, $maxStrip = 1 ) {
-   if ( strpos( $auxExtension, '.' ) !== 0 ) {
-   $auxExtension = '.' . $auxExtension;
-   }
-
-   $d = dirname( $file );
-   $n = basename( $file );
-
-   while ( $maxStrip >= 0 ) {
-   $f = $d . '/' . $n . $auxExtension;
-
-   if ( file_exists( $f ) ) {
-   return $f;
-   }
-
-   $idx = strrpos( $n, '.' );
-   if ( !$idx ) {
-   break;
-   }
-
-   $n = substr( $n, 0, $idx );
-   $maxStrip -= 1;
-   }
-
-   return false;
-}
-
-# @todo FIXME: Access the api in a saner way and performing just one query
-# (preferably batching files too).
-function getFileCommentFromSourceWiki( $wiki_host, $file ) {
-   $url = $wiki_host . '/a

[MediaWiki-commits] [Gerrit] mediawiki...ImageTagging[master]: Removed usages of a deprecated method Revision::getText

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327922 )

Change subject: Removed usages of a deprecated method Revision::getText
..


Removed usages of a deprecated method Revision::getText

Bug: T151973
Change-Id: I1291b6d952351b3458290f33f70e18ce62221b8f
---
M ImageTaggingHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ImageTaggingHooks.php b/ImageTaggingHooks.php
index 08aba21..f49e3bf 100644
--- a/ImageTaggingHooks.php
+++ b/ImageTaggingHooks.php
@@ -274,7 +274,7 @@
array( 'known' )
);
$revision = Revision::newFromTitle( $t );
-   $text = $revision->getText();
+   $text = ContentHandler::getContentText( $revision->getContent() 
);
 
$lines = explode( "\n", $text );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1291b6d952351b3458290f33f70e18ce62221b8f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ImageTagging
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 
Gerrit-Reviewer: Filip 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.htmlform: Fields hidden with 'hide-if' should be disabled

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/311463 )

Change subject: mw.htmlform: Fields hidden with 'hide-if' should be disabled
..


mw.htmlform: Fields hidden with 'hide-if' should be disabled

Otherwise, in browsers that support HTML5 form validation, it
would be impossible to submit the form if a field failing
validation was hidden (e.g. because it's marked as required).

Note that disabled fields are not submitted with the form. This
should be okay, as server-side validation ignores them entirely.
(I37e50799ba1f0e0e64a197818b58444f5b056bf0 fixes a corner case.)

For cloner fields, 'hide-if' rules of the parent are now copied
to the children, to make handling such nested fields simpler.

Bug: T145440
Change-Id: I81d04dca6cbb499a15828fd33b01746b68c694da
---
M includes/htmlform/fields/HTMLFormFieldCloner.php
M resources/src/mediawiki/htmlform/hide-if.js
2 files changed, 64 insertions(+), 9 deletions(-)

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



diff --git a/includes/htmlform/fields/HTMLFormFieldCloner.php 
b/includes/htmlform/fields/HTMLFormFieldCloner.php
index 09fe1bc..d8de890 100644
--- a/includes/htmlform/fields/HTMLFormFieldCloner.php
+++ b/includes/htmlform/fields/HTMLFormFieldCloner.php
@@ -96,6 +96,17 @@
} else {
$info['id'] = Sanitizer::escapeId( 
"{$this->mID}--$key--$fieldname" );
}
+   // Copy the hide-if rules to "child" fields, so that 
the JavaScript code handling them
+   // (resources/src/mediawiki/htmlform/hide-if.js) 
doesn't have to handle nested fields.
+   if ( $this->mHideIf ) {
+   if ( isset( $info['hide-if'] ) ) {
+   // Hide child field if either its rules 
say it's hidden, or parent's rules say it's hidden
+   $info['hide-if'] = [ 'OR', 
$info['hide-if'], $this->mHideIf ];
+   } else {
+   // Hide child field if parent's rules 
say it's hidden
+   $info['hide-if'] = $this->mHideIf;
+   }
+   }
$field = HTMLForm::loadInputFromParameters( $name, 
$info, $this->mParent );
$fields[$fieldname] = $field;
}
diff --git a/resources/src/mediawiki/htmlform/hide-if.js 
b/resources/src/mediawiki/htmlform/hide-if.js
index 5f60097..f9cb5de 100644
--- a/resources/src/mediawiki/htmlform/hide-if.js
+++ b/resources/src/mediawiki/htmlform/hide-if.js
@@ -201,22 +201,31 @@
}
 
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
-   $root.find( '.mw-htmlform-hide-if' ).each( function () {
-   var v, i, fields, test, func, spec, self, modules, 
data, extraModules,
-   $el = $( this );
-
+   var
+   $fields = $root.find( '.mw-htmlform-hide-if' ),
+   $oouiFields = $fields.filter( '[data-ooui]' ),
modules = [];
-   if ( $el.is( '[data-ooui]' ) ) {
-   modules.push( 'mediawiki.htmlform.ooui' );
+
+   if ( $oouiFields.length ) {
+   modules.push( 'mediawiki.htmlform.ooui' );
+   $oouiFields.each( function () {
+   var data, extraModules,
+   $el = $( this );
+
data = $el.data( 'mw-modules' );
if ( data ) {
// We can trust this value, 'data-mw-*' 
attributes are banned from user content in Sanitizer
extraModules = data.split( ',' );
modules.push.apply( modules, 
extraModules );
}
-   }
+   } );
+   }
 
-   mw.loader.using( modules ).done( function () {
+   mw.loader.using( modules ).done( function () {
+   $fields.each( function () {
+   var v, i, fields, test, func, spec, self,
+   $el = $( this );
+
if ( $el.is( '[data-ooui]' ) ) {
// self should be a FieldLayout that 
mixes in mw.htmlform.Element
self = OO.ui.FieldLayout.static.infuse( 
$el );
@@ -237,7 +246,42 @@
test = v[ 1 ];
// The .toggle() method works mostly the same 
for jQuery objects and 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Turn $wgRunJobsAsync off by default

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/306667 )

Change subject: Turn $wgRunJobsAsync off by default
..


Turn $wgRunJobsAsync off by default

The current situation doesn't work in all installations and has being worse
since MediaWiki 1.27. Default settings should be safe in all installations,
and $wgRunJobsAsync wasn't one of them.

Bug: T142751
Change-Id: I8daa38534a0e925a75ba2fb47e3e299f1baee4b1
---
M RELEASE-NOTES-1.29
M includes/DefaultSettings.php
2 files changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index ef9d734..3af1654 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -25,6 +25,8 @@
 * $wgUserEmailUseReplyTo is now true by default to work around restrictive 
DMARC policies.
 * Subpages are now enabled by default in the Template namespace. Set
   $wgNamespacesWithSubpages[NS_TEMPLATE] to false to keep the old behavior.
+* $wgRunJobsAsync is now false by default (T142751). This change only affects
+  wikis with $wgJobRunRate > 0.
 
 === New features in 1.29 ===
 * (T5233) A cookie can now be set when a user is autoblocked, to track that 
user if
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 09ea958..f419b77 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -8105,10 +8105,7 @@
  *
  * @since 1.23
  */
-$wgRunJobsAsync = (
-   !function_exists( 'register_postsend_function' ) &&
-   !function_exists( 'fastcgi_finish_request' )
-);
+$wgRunJobsAsync = false;
 
 /**
  * Number of rows to update per job

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8daa38534a0e925a75ba2fb47e3e299f1baee4b1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Martineznovo 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Martineznovo 
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...AbuseFilter[master]: Improve interface for users who cannot modify filters

2016-12-18 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327491 )

Change subject: Improve interface for users who cannot modify filters
..

Improve interface for users who cannot modify filters

Make selectors for groups and warnings read-only and also don't show
edit button for users without editinterface permission.

Change-Id: I7c27f27ed080396b3a64ccaf9a7ccf2c3231b839
---
M Views/AbuseFilterViewEdit.php
1 file changed, 43 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/91/327491/2

diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php
index 9d02855..38e0541 100644
--- a/Views/AbuseFilterViewEdit.php
+++ b/Views/AbuseFilterViewEdit.php
@@ -368,6 +368,10 @@
$groupSelector->addOption( 
AbuseFilter::nameGroup( $group ), $group );
}
 
+   if ( !empty( $readOnlyAttrib ) ) {
+   $groupSelector->setAttribute( 'disabled', 
'disabled' );
+   }
+
$fields['abusefilter-edit-group'] = 
$groupSelector->getHTML();
}
 
@@ -680,7 +684,7 @@
}
 
$warnFields['abusefilter-edit-warn-message'] =
-   $this->getExistingSelector( $warnMsg );
+   $this->getExistingSelector( $warnMsg, 
!empty( $readOnlyAttrib ) );

$warnFields['abusefilter-edit-warn-other-label'] =
Xml::input(
'wpFilterWarnMessageOther',
@@ -697,20 +701,23 @@
'value' => $this->msg( 
'abusefilter-edit-warn-preview' )->text()
)
);
-   $editButton = Xml::element(
-   'input',
-   array(
-   'type' => 'button',
-   'id' => 
'mw-abusefilter-warn-edit-button',
-   'value' => $this->msg( 
'abusefilter-edit-warn-edit' )->text()
-   )
-   );
+   $editButton = '';
+   if ( $this->getUser()->isAllowed( 
'editinterface' ) ) {
+   $editButton .= ' ' . Xml::element(
+   'input',
+   array(
+   'type' => 'button',
+   'id' => 
'mw-abusefilter-warn-edit-button',
+   'value' => $this->msg( 
'abusefilter-edit-warn-edit' )->text()
+   )
+   );
+   }
$previewHolder = Xml::element(
'div',
array( 'id' => 
'mw-abusefilter-warn-preview' ), ''
);
$warnFields['abusefilter-edit-warn-actions'] =
-   Xml::tags( 'p', null, "$previewButton 
$editButton" ) . "\n$previewHolder";
+   Xml::tags( 'p', null, $previewButton . 
$editButton ) . "\n$previewHolder";
$output .=
Xml::tags(
'div',
@@ -767,38 +774,43 @@
}
 
/**
-* @param $warnMsg
+* @param $warnMsg string
+* @param $readOnly bool
 * @return string
 */
-   function getExistingSelector( $warnMsg ) {
+   function getExistingSelector( $warnMsg, $readOnly = false ) {
$existingSelector = new XmlSelect(
'wpFilterWarnMessage',
'mw-abusefilter-warn-message-existing',
$warnMsg == 'abusefilter-warning' ? 
'abusefilter-warning' : 'other'
);
 
-   // Find other messages.
-   $dbr = wfGetDB( DB_SLAVE );
-   $res = $dbr->select(
-   'page',
-   array( 'page_title' ),
-   array(
-   'page_namespace' => 8,
-   'page_title LIKE ' . $dbr->addQuotes( 
'Abusefilter-warning%' )
-   ),
-   __METHOD__
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move TempFileRepo to a separate file

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327909 )

Change subject: Move TempFileRepo to a separate file
..


Move TempFileRepo to a separate file

Change-Id: I6fc0870cc82a7b19859abc00bd4b2ecee6c0fc9e
---
M autoload.php
M includes/filerepo/FileRepo.php
A includes/filerepo/TempFileRepo.php
3 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 6dbcc1d..fa04957 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1425,7 +1425,7 @@
'TablePager' => __DIR__ . '/includes/pager/TablePager.php',
'TagLogFormatter' => __DIR__ . '/includes/logging/TagLogFormatter.php',
'TempFSFile' => __DIR__ . 
'/includes/libs/filebackend/fsfile/TempFSFile.php',
-   'TempFileRepo' => __DIR__ . '/includes/filerepo/FileRepo.php',
+   'TempFileRepo' => __DIR__ . '/includes/filerepo/TempFileRepo.php',
'TemplateParser' => __DIR__ . '/includes/TemplateParser.php',
'TemplatesOnThisPageFormatter' => __DIR__ . 
'/includes/TemplatesOnThisPageFormatter.php',
'TestFileOpPerformance' => __DIR__ . '/maintenance/fileOpPerfTest.php',
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index 41f5281..be37011 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -1924,12 +1924,3 @@
return $this->supportsSha1URLs;
}
 }
-
-/**
- * FileRepo for temporary files created via FileRepo::getTempRepo()
- */
-class TempFileRepo extends FileRepo {
-   public function getTempRepo() {
-   throw new MWException( "Cannot get a temp repo from a temp 
repo." );
-   }
-}
diff --git a/includes/filerepo/TempFileRepo.php 
b/includes/filerepo/TempFileRepo.php
new file mode 100644
index 000..c9a6b59
--- /dev/null
+++ b/includes/filerepo/TempFileRepo.php
@@ -0,0 +1,9 @@
+https://gerrit.wikimedia.org/r/327909
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fc0870cc82a7b19859abc00bd4b2ecee6c0fc9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Added anonymous user warning message

2016-12-18 Thread Filip (Code Review)
Filip has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328041 )

Change subject: Added anonymous user warning message
..

Added anonymous user warning message

Added warning for anonymous user for Special:Newsletters and Newsletter

Bug: T150637
Change-Id: Idc98d1fb68a0b5bf1f0f3aedebebaddaf30934a2
---
M i18n/en.json
M i18n/qqq.json
M includes/content/NewsletterContent.php
M includes/specials/SpecialNewsletters.php
4 files changed, 30 insertions(+), 2 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index b94d4f5..a52008f 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -66,6 +66,7 @@
"newsletter-manage-newsletter-success": "The newsletter have been 
modified.",
"newsletter-manage-newsletter-nochanges": "No changes were made to the 
existing newsletter.",
"newsletter-manage-summary": "Summary of the change:",
+   "newsletter-user-anon": "You need to be logged in in 
order to subscribe to newsletters",
"newsletter-delete": "Delete newsletter",
"newsletter-delete-failure": "\"$1\" newsletter could not be deleted. 
Please try again.",
"newsletter-subscribe": "Newsletter subscription management",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c419efb..bfce75b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -73,6 +73,7 @@
"newsletter-manage-newsletter-success": "Success message shown on 
Special:Newsletter's manage form when the publishers have been modfied.",
"newsletter-manage-newsletter-nochanges": "Message shown on 
Special:Newsletter if no changes were made to the existing publishers' list.",
"newsletter-manage-summary": "Edit summary for updating fields in 
Special:Newsletter's manage form",
+   "newsletter-user-anon": "Warning message shown when user is not 
logged-in",
"newsletter-delete": "Header message shown on 
Special:Newsletter//delete.\n\nSee also:\n* 
{{msg-mw|newsletter-view}}\n*{{msg-mw|newsletter-subscribe}}",
"newsletter-delete-failure": "Error message shown on 
Special:Newsletter//delete when the newsletter deletion 
fails.\n\nParameters:\n* $1 - Newsletter name",
"newsletter-subscribe": "Header message shown on 
Special:Newsletter//subscribe.\n\nSee also:\n* 
{{msg-mw|newsletter-delete}}\n*{{msg-mw|newsletter-view}}",
diff --git a/includes/content/NewsletterContent.php 
b/includes/content/NewsletterContent.php
index 61ce83b..ee45b0c 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -130,11 +130,24 @@
$user = $options->getUser();
 
$newsletterActionButtons = '';
+   $anonWarningText = '';
 
if ( $user->isLoggedIn() ) {
// buttons are only shown for logged-in users
$newsletterActionButtons = 
$this->getNewsletterActionButtons( $options );
+   } else {
+   $LoginTitle = SpecialPage::getTitleFor( 'Userlogin' );
+   $query = ['returnto' => $title->getPrefixedDBkey()];
+   $url = $LoginTitle->getFullURL( $query, false, 
PROTO_HTTPS );
+   $anonWarningText =
+   Html::rawElement(
+   'p',
+   array( 'class' => 'warning' ),
+   wfMessage( 'newsletter-user-anon', $url 
)->text()
+   );
}
+
+
 
$mainTitle = Title::newFromText( $this->mainPage );
 
@@ -215,7 +228,7 @@
$output->setText( $this->getNavigationLinks( 
$options ) . $newsletterActionButtons .
"" . $form->getBody() );
} else {
-   $output->setText( $this->getNavigationLinks( 
$options ) . $form->getBody() );
+   $output->setText( $this->getNavigationLinks( 
$options ) . $anonWarningText . $form->getBody() );
}
return $output;
}
@@ -450,4 +463,4 @@
 
return $truncatedtext;
}
-}
\ No newline at end of file
+}
diff --git a/includes/specials/SpecialNewsletters.php 
b/includes/specials/SpecialNewsletters.php
index 27b3b91..21589c5 100644
--- a/includes/specials/SpecialNewsletters.php
+++ b/includes/specials/SpecialNewsletters.php
@@ -24,6 +24,19 @@
$out->addModuleStyles( 'ext.newsletter.newsletters.styles' );
$user = $this->getUser();
 
+   if ( $user->isAnon() ) {
+   $title = SpecialPage::getTitleFor( 'Userlogin' );
+

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Bug monoversion installation, maintenance

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327915 )

Change subject: Bug monoversion installation, maintenance
..


Bug monoversion installation, maintenance

Bugs:
* Monoversion installation was broken because
  architecture was modified (and it was out-of-tests)

Code:
* Document it works with MW >= 1.3 instead of >= 1.6
* Added two classes in extension.json, even if loaded independently
* Rewrote a bit the credits loading for MediaWikiFarm

Change-Id: I906e3b3626077b5af582bb122b52ed9edc60a77f
---
M MediaWikiFarm.php
M extension.json
M src/MediaWikiFarm.php
M tests/phpunit/LoadingTest.php
4 files changed, 26 insertions(+), 18 deletions(-)

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



diff --git a/MediaWikiFarm.php b/MediaWikiFarm.php
index f1c27a4..99e9575 100644
--- a/MediaWikiFarm.php
+++ b/MediaWikiFarm.php
@@ -27,6 +27,6 @@
MediaWikiFarm::load();
 
# Load MediaWiki configuration
-   require_once MediaWikiFarm::getInstance()->getConfigFile();
+   require_once $wgMediaWikiFarm->getConfigFile();
 }
 // @codeCoverageIgnoreEnd
diff --git a/extension.json b/extension.json
index 1ad7552..8a2d26f 100644
--- a/extension.json
+++ b/extension.json
@@ -9,7 +9,7 @@
"url": "https://www.mediawiki.org/wiki/Extension:MediaWikiFarm";,
"type": "other",
"requires": {
-   "MediaWiki": ">= 1.6.0"
+   "MediaWiki": ">= 1.3.0"
},
"config": {
"MediaWikiFarmConfigDir": "/etc/mediawiki",
@@ -28,6 +28,8 @@
},
"AutoloadClasses": {
"MediaWikiFarm": "src/MediaWikiFarm.php",
+   "AbstractMediaWikiFarmScript": 
"src/AbstractMediaWikiFarmScript.php",
+   "MediaWikiFarmScript": "src/MediaWikiFarmScript.php",
"MWFConfigurationException": "src/MediaWikiFarm.php"
},
"manifest_version": 1
diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 18e871a..5f5c309 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -369,11 +369,21 @@
}
}
 
-   # Register this extension MediaWikiFarm to appear in 
Special:Version
-   if( $this->parameters['ExtensionRegistry'] ) {
-   wfLoadExtension( 'MediaWikiFarm', $this->codeDir ? 
$this->farmDir . '/extension.json' : null );
+   # Load extensions with the wfLoadExtension mechanism
+   foreach( $this->configuration['extensions'] as $extension => 
$value ) {
+
+   if( $value == 'wfLoadExtension' && ( $extension != 
'MediaWikiFarm' || !$this->codeDir ) ) {
+
+   wfLoadExtension( $extension );
+   }
}
-   else {
+
+   # Register this extension MediaWikiFarm to appear in 
Special:Version
+   if( $this->configuration['extensions']['MediaWikiFarm'] == 
'wfLoadExtension' && $this->codeDir ) {
+
+   wfLoadExtension( 'MediaWikiFarm', $this->farmDir . 
'/extension.json' );
+   }
+   elseif( $this->configuration['extensions']['MediaWikiFarm'] == 
'require_once' ) {
$GLOBALS['wgExtensionCredits']['other'][] = array(
'path' => $this->farmDir . '/MediaWikiFarm.php',
'name' => 'MediaWikiFarm',
@@ -385,18 +395,11 @@
);
 
$GLOBALS['wgAutoloadClasses']['MediaWikiFarm'] = 
'src/MediaWikiFarm.php';
+   
$GLOBALS['wgAutoloadClasses']['AbstractMediaWikiFarmScript'] = 
'src/AbstractMediaWikiFarmScript.php';
+   $GLOBALS['wgAutoloadClasses']['MediaWikiFarmScript'] = 
'src/MediaWikiFarmScript.php';

$GLOBALS['wgAutoloadClasses']['MWFConfigurationException'] = 
'src/MediaWikiFarm.php';
$GLOBALS['wgMessagesDirs']['MediaWikiFarm'] = array( 
'i18n' );
$GLOBALS['wgHooks']['UnitTestsList'][] = array( 
'MediaWikiFarm::onUnitTestsList' );
-   }
-
-   # Load extensions with the wfLoadExtension mechanism
-   foreach( $this->configuration['extensions'] as $extension => 
$value ) {
-
-   if( $value == 'wfLoadExtension' && $extension != 
'MediaWikiFarm' ) {
-
-   wfLoadExtension( $extension );
-   }
}
}
 
@@ -1193,6 +1196,7 @@
}
 
$settings['wgUseExtensionMediaWikiFarm'] = true;
+   $this->configuration['extensions']['MediaWikiFarm'] = 
'require_once';
if( $this->parameters['ExtensionRegistry'] ) {
$this->configuration['extensions']['MediaWikiFarm'] = 
'wfLoadExtension';
   

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update version string

2016-12-18 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328040 )

Change subject: Update version string
..

Update version string

Change-Id: Ia17fefef42631f7f26a1588c814acc7a02b3385b
---
M pywikibot/family.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/40/328040/1

diff --git a/pywikibot/family.py b/pywikibot/family.py
index e1157cb..437969e 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1242,7 +1242,7 @@
 Use L{pywikibot.tools.MediaWikiVersion} to compare version strings.
 """
 # Here we return the latest mw release for downloading
-return '1.27.1'
+return '1.28.0'
 
 def force_version(self, code):
 """

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia17fefef42631f7f26a1588c814acc7a02b3385b
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]: Alias "mul" for "-" added

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326992 )

Change subject: Alias "mul" for "-" added
..


Alias "mul" for "-" added

Bug: T114574
Change-Id: I125300cb3b8800d2795b6d0511e8941ba9ad541c
---
M pywikibot/families/wikisource_family.py
M pywikibot/family.py
2 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/pywikibot/families/wikisource_family.py 
b/pywikibot/families/wikisource_family.py
index 661ca2b..8d0ec61 100644
--- a/pywikibot/families/wikisource_family.py
+++ b/pywikibot/families/wikisource_family.py
@@ -39,10 +39,10 @@
 
 super(Family, self).__init__()
 
-# FIXME: '-' is invalid at the beginning of a hostname, and
-# '-' is not a valid subdomain.
-self.langs['-'] = self.domain
-self.languages_by_size.append('-')
+# All requests to 'mul.wikisource.org/*' are redirected to
+# the main page, so using 'wikisource.org'
+self.langs['mul'] = self.domain
+self.languages_by_size.append('mul')
 
 # Global bot allowed languages on
 # 
https://meta.wikimedia.org/wiki/Bot_policy/Implementation#Current_implementation
diff --git a/pywikibot/family.py b/pywikibot/family.py
index e1157cb..145d984 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1557,6 +1557,8 @@
 
 # Renamed; see T11823
 'be-x-old': 'be-tarask',
+
+'-': 'mul',  # T114574
 }
 
 # Not open for edits; stewards can still edit.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I125300cb3b8800d2795b6d0511e8941ba9ad541c
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Borisfba 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Don't allow $section to be unset

2016-12-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328039 )

Change subject: Don't allow $section to be unset
..

Don't allow $section to be unset

Change-Id: I46a36a08fc2e98aeb35774af8b26ebee313965f3
---
M ApiVisualEditor.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index dd8eef2..53ad089 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -239,9 +239,7 @@
'rvprop' => 
'content|ids'
];
 
-   if ( isset( $params['section'] 
) ) {
-   $section = 
$params['section'];
-   }
+   $section = isset( 
$params['section'] ) ? $params['section'] : null;
 
if ( $section === 'new' ) {
$content = '';

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update languages_by_size

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328038 )

Change subject: Update languages_by_size
..


Update languages_by_size

Change-Id: I059aaf45668cb1bd1a99fa6b0309fd8b5dbf21de
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
M pywikibot/families/wiktionary_family.py
5 files changed, 38 insertions(+), 38 deletions(-)

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



diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index de4108e..2727218 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -113,11 +113,11 @@
 def __init__(self):
 """Constructor."""
 self.languages_by_size = [
-'en', 'de', 'hu', 'fr', 'ja', 'it', 'es', 'pt', 'nl', 'vi', 'pl',
+'en', 'hu', 'de', 'fr', 'ja', 'it', 'es', 'pt', 'nl', 'vi', 'pl',
 'he', 'ca', 'id', 'fi', 'sq', 'fa', 'ru', 'th', 'cs', 'zh', 'az',
 'sv', 'hr', 'tr', 'sr', 'ar', 'ko', 'no', 'da', 'gl', 'ta', 'ro',
 'tl', 'mk', 'is', 'uk', 'ka', 'lt', 'tt', 'sa', 'eo', 'sk', 'bg',
-'el', 'hy', 'hi', 'bn', 'si', 'ms', 'sl', 'ur', 'li', 'la', 'ml',
+'el', 'bn', 'hi', 'hy', 'si', 'ms', 'sl', 'ur', 'li', 'la', 'ml',
 'km', 'ang', 'ia', 'cv', 'et', 'mr', 'eu', 'oc', 'kk', 'ne', 'pa',
 'fy', 'ie', 'te', 'af', 'tg', 'ku', 'ky', 'bs', 'be', 'mg', 'cy',
 'zh-min-nan', 'uz',
diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 5d08026..eebf0fd 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -58,33 +58,33 @@
 self.languages_by_size = [
 'en', 'sv', 'ceb', 'de', 'nl', 'fr', 'ru', 'it', 'es', 'war', 'pl',
 'vi', 'ja', 'pt', 'zh', 'uk', 'ca', 'fa', 'no', 'ar', 'sh', 'fi',
-'hu', 'id', 'ro', 'cs', 'ko', 'sr', 'ms', 'tr', 'eu', 'eo', 'bg',
+'hu', 'id', 'ro', 'cs', 'ko', 'sr', 'tr', 'ms', 'eu', 'eo', 'bg',
 'min', 'da', 'kk', 'sk', 'hy', 'zh-min-nan', 'he', 'lt', 'hr', 
'ce',
 'sl', 'et', 'gl', 'nn', 'uz', 'la', 'el', 'be', 'simple', 'vo',
-'hi', 'th', 'az', 'ur', 'ka', 'ta', 'mk', 'oc', 'mg', 'cy', 'lv',
-'new', 'bs', 'tt', 'tg', 'te', 'tl', 'pms', 'sq', 'br', 
'be-tarask',
-'ky', 'ht', 'jv', 'zh-yue', 'ast', 'lb', 'ml', 'bn', 'mr', 'af',
-'pnb', 'sco', 'is', 'ga', 'ba', 'fy', 'cv', 'sw', 'lmo', 'my', 
'an',
-'yo', 'ne', 'io', 'gu', 'nds', 'scn', 'bpy', 'pa', 'ku', 'als',
-'bar', 'kn', 'ia', 'qu', 'su', 'ckb', 'mn', 'bat-smg', 'arz', 
'nap',
-'wa', 'gd', 'bug', 'yi', 'am', 'map-bms', 'si', 'mzn', 'fo', 'li',
-'or', 'nah', 'sah', 'azb', 'vec', 'hsb', 'os', 'sa', 'mrj', 'hif',
-'mhr', 'ilo', 'roa-tara', 'pam', 'xmf', 'eml', 'sd', 'ps', 'nso',
-'bh', 'se', 'hak', 'mi', 'bcl', 'diq', 'nds-nl', 'gan', 'glk',
-'vls', 'rue', 'bo', 'wuu', 'mai', 'fiu-vro', 'co', 'tk', 'szl',
-'sc', 'csb', 'vep', 'lrc', 'km', 'crh', 'gv', 'kv', 'frr',
-'zh-classical', 'as', 'so', 'zea', 'cdo', 'lad', 'ay', 'stq', 
'udm',
-'kw', 'nrm', 'ie', 'koi', 'ace', 'rm', 'pcd', 'myv', 'lij', 'mt',
-'fur', 'gn', 'dsb', 'dv', 'cbk-zam', 'ext', 'lez', 'ug', 'kab',
-'ang', 'ksh', 'mwl', 'ln', 'gag', 'sn', 'frp', 'gom', 'pag', 'pi',
-'nv', 'av', 'pfl', 'xal', 'krc', 'haw', 'kaa', 'bxr', 'rw', 'pdc',
-'to', 'nov', 'kl', 'pap', 'lo', 'arc', 'bjn', 'olo', 'kbd', 'jam',
-'ha', 'tet', 'tyv', 'ki', 'tpi', 'ig', 'na', 'lbe', 'roa-rup',
-'jbo', 'ty', 'kg', 'za', 'mdf', 'lg', 'wo', 'srn', 'ab', 'ltg',
-'chr', 'zu', 'sm', 'om', 'bi', 'tcy', 'tn', 'chy', 'cu', 'rmy',
-'tw', 'xh', 'tum', 'pih', 'rn', 'got', 'pnt', 'ss', 'ch', 'bm',
-'ady', 'ts', 'ny', 'iu', 'st', 'fj', 'ee', 'ak', 'ks', 'ik', 'sg',
-'ve', 'dz', 'ff', 'ti', 'cr',
+'hi', 'th', 'az', 'ka', 'ur', 'ta', 'cy', 'mk', 'oc', 'mg', 'lv',
+'new', 'bs', 'tt', 'tg', 'te', 'tl', 'pms', 'sq', 'br', 'ky',
+'be-tarask', 'ht', 'jv', 'zh-yue', 'ast', 'lb', 'ml', 'bn', 'mr',
+'af', 'pnb', 'sco', 'is', 'ga', 'ba', 'cv', 'fy', 'sw', 'lmo', 
'my',
+'an', 'yo', 'ne', 'io', 'gu', 'nds', 'scn', 'bpy', 'pa', 'ku',
+'als', 'bar', 'kn', 'qu', 'ia', 'su', 'ckb', 'mn', 'arz', 
'bat-smg',
+'nap', 'wa', 'gd', 'bug', 'yi', 'am', 'map-bms', 'si', 'fo', 'mzn',
+'azb', 'or', 'li', 'sah', 'hsb', 'vec', 'nah', 'os', 'sa', 'mrj',
+'ilo', 'hif', 'mhr', 'roa-tara', 'mai', 'xmf', '

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update languages_by_size

2016-12-18 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328038 )

Change subject: Update languages_by_size
..

Update languages_by_size

Change-Id: I059aaf45668cb1bd1a99fa6b0309fd8b5dbf21de
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
M pywikibot/families/wiktionary_family.py
5 files changed, 38 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/38/328038/1

diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index de4108e..2727218 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -113,11 +113,11 @@
 def __init__(self):
 """Constructor."""
 self.languages_by_size = [
-'en', 'de', 'hu', 'fr', 'ja', 'it', 'es', 'pt', 'nl', 'vi', 'pl',
+'en', 'hu', 'de', 'fr', 'ja', 'it', 'es', 'pt', 'nl', 'vi', 'pl',
 'he', 'ca', 'id', 'fi', 'sq', 'fa', 'ru', 'th', 'cs', 'zh', 'az',
 'sv', 'hr', 'tr', 'sr', 'ar', 'ko', 'no', 'da', 'gl', 'ta', 'ro',
 'tl', 'mk', 'is', 'uk', 'ka', 'lt', 'tt', 'sa', 'eo', 'sk', 'bg',
-'el', 'hy', 'hi', 'bn', 'si', 'ms', 'sl', 'ur', 'li', 'la', 'ml',
+'el', 'bn', 'hi', 'hy', 'si', 'ms', 'sl', 'ur', 'li', 'la', 'ml',
 'km', 'ang', 'ia', 'cv', 'et', 'mr', 'eu', 'oc', 'kk', 'ne', 'pa',
 'fy', 'ie', 'te', 'af', 'tg', 'ku', 'ky', 'bs', 'be', 'mg', 'cy',
 'zh-min-nan', 'uz',
diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 5d08026..eebf0fd 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -58,33 +58,33 @@
 self.languages_by_size = [
 'en', 'sv', 'ceb', 'de', 'nl', 'fr', 'ru', 'it', 'es', 'war', 'pl',
 'vi', 'ja', 'pt', 'zh', 'uk', 'ca', 'fa', 'no', 'ar', 'sh', 'fi',
-'hu', 'id', 'ro', 'cs', 'ko', 'sr', 'ms', 'tr', 'eu', 'eo', 'bg',
+'hu', 'id', 'ro', 'cs', 'ko', 'sr', 'tr', 'ms', 'eu', 'eo', 'bg',
 'min', 'da', 'kk', 'sk', 'hy', 'zh-min-nan', 'he', 'lt', 'hr', 
'ce',
 'sl', 'et', 'gl', 'nn', 'uz', 'la', 'el', 'be', 'simple', 'vo',
-'hi', 'th', 'az', 'ur', 'ka', 'ta', 'mk', 'oc', 'mg', 'cy', 'lv',
-'new', 'bs', 'tt', 'tg', 'te', 'tl', 'pms', 'sq', 'br', 
'be-tarask',
-'ky', 'ht', 'jv', 'zh-yue', 'ast', 'lb', 'ml', 'bn', 'mr', 'af',
-'pnb', 'sco', 'is', 'ga', 'ba', 'fy', 'cv', 'sw', 'lmo', 'my', 
'an',
-'yo', 'ne', 'io', 'gu', 'nds', 'scn', 'bpy', 'pa', 'ku', 'als',
-'bar', 'kn', 'ia', 'qu', 'su', 'ckb', 'mn', 'bat-smg', 'arz', 
'nap',
-'wa', 'gd', 'bug', 'yi', 'am', 'map-bms', 'si', 'mzn', 'fo', 'li',
-'or', 'nah', 'sah', 'azb', 'vec', 'hsb', 'os', 'sa', 'mrj', 'hif',
-'mhr', 'ilo', 'roa-tara', 'pam', 'xmf', 'eml', 'sd', 'ps', 'nso',
-'bh', 'se', 'hak', 'mi', 'bcl', 'diq', 'nds-nl', 'gan', 'glk',
-'vls', 'rue', 'bo', 'wuu', 'mai', 'fiu-vro', 'co', 'tk', 'szl',
-'sc', 'csb', 'vep', 'lrc', 'km', 'crh', 'gv', 'kv', 'frr',
-'zh-classical', 'as', 'so', 'zea', 'cdo', 'lad', 'ay', 'stq', 
'udm',
-'kw', 'nrm', 'ie', 'koi', 'ace', 'rm', 'pcd', 'myv', 'lij', 'mt',
-'fur', 'gn', 'dsb', 'dv', 'cbk-zam', 'ext', 'lez', 'ug', 'kab',
-'ang', 'ksh', 'mwl', 'ln', 'gag', 'sn', 'frp', 'gom', 'pag', 'pi',
-'nv', 'av', 'pfl', 'xal', 'krc', 'haw', 'kaa', 'bxr', 'rw', 'pdc',
-'to', 'nov', 'kl', 'pap', 'lo', 'arc', 'bjn', 'olo', 'kbd', 'jam',
-'ha', 'tet', 'tyv', 'ki', 'tpi', 'ig', 'na', 'lbe', 'roa-rup',
-'jbo', 'ty', 'kg', 'za', 'mdf', 'lg', 'wo', 'srn', 'ab', 'ltg',
-'chr', 'zu', 'sm', 'om', 'bi', 'tcy', 'tn', 'chy', 'cu', 'rmy',
-'tw', 'xh', 'tum', 'pih', 'rn', 'got', 'pnt', 'ss', 'ch', 'bm',
-'ady', 'ts', 'ny', 'iu', 'st', 'fj', 'ee', 'ak', 'ks', 'ik', 'sg',
-'ve', 'dz', 'ff', 'ti', 'cr',
+'hi', 'th', 'az', 'ka', 'ur', 'ta', 'cy', 'mk', 'oc', 'mg', 'lv',
+'new', 'bs', 'tt', 'tg', 'te', 'tl', 'pms', 'sq', 'br', 'ky',
+'be-tarask', 'ht', 'jv', 'zh-yue', 'ast', 'lb', 'ml', 'bn', 'mr',
+'af', 'pnb', 'sco', 'is', 'ga', 'ba', 'cv', 'fy', 'sw', 'lmo', 
'my',
+'an', 'yo', 'ne', 'io', 'gu', 'nds', 'scn', 'bpy', 'pa', 'ku',
+'als', 'bar', 'kn', 'qu', 'ia', 'su', 'ckb', 'mn', 'arz', 
'bat-smg',
+'nap', 'wa', 'gd', 'bug', 'yi', 'am', 'map-bms', 'si', 'fo', 'mzn',
+'azb', 'or', 'li', 'sah', 'hsb', 'vec', 'nah', 'os', 'sa', 'mrj',
+'ilo', 'hif', 'mhr', 'roa-tara', 'mai', 'xmf', 'p

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make the code for grammar data processing common

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/241645 )

Change subject: Make the code for grammar data processing common
..


Make the code for grammar data processing common

This makes the code for processing JSON files with
grammar transformations reusable by different languages
and applies the same logic to Russian and Hebrew.
It will be done to other languages in further patches.

This patch is not supposed to change any functionality,
and the tests are intact (except a comment in the test
for Hebrew - the class doesn't exist any longer).

PHP:
* Move the JSON grammar transformation data processing logic
  from LanguageRu.php to convertGrammar() in Language.php.
  By default all these data files are supposed to be
  processed identically, so the code should be common.
  If there is no JSON data file, nothing new happens.
* LanguageRu's own convertGrammar() method is removed.
* The LanguageHe class is removed, now that all its functionality
  is handled by generic JSON data processing in the Language class.
  LanguageHe.php file is removed from the repo and from autoloading.

JavaScript:
* Move the JSON grammar transformation data processing logic
  from ru.js to mediawiki.language.js.
* JavaScript grammar code files he.js and ru.js are removed
  from the repo and from Resources.php, because all the data
  is in JSON, and the default logic in mediawiki.language.js
  works for both languages.

Bug: T115217
Change-Id: I5e75467121c3d791bb84f9e6fdfcf07c1840f81a
---
M autoload.php
M languages/Language.php
D languages/classes/LanguageHe.php
M languages/classes/LanguageRu.php
A languages/data/grammarTransformations/he.json
M resources/Resources.php
D resources/src/mediawiki.language/languages/he.js
D resources/src/mediawiki.language/languages/ru.js
M resources/src/mediawiki.language/mediawiki.language.js
M tests/phpunit/languages/classes/LanguageHeTest.php
10 files changed, 105 insertions(+), 184 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 6dbcc1d..e1b808a 100644
--- a/autoload.php
+++ b/autoload.php
@@ -695,7 +695,6 @@
'LanguageFi' => __DIR__ . '/languages/classes/LanguageFi.php',
'LanguageGa' => __DIR__ . '/languages/classes/LanguageGa.php',
'LanguageGan' => __DIR__ . '/languages/classes/LanguageGan.php',
-   'LanguageHe' => __DIR__ . '/languages/classes/LanguageHe.php',
'LanguageHsb' => __DIR__ . '/languages/classes/LanguageHsb.php',
'LanguageHu' => __DIR__ . '/languages/classes/LanguageHu.php',
'LanguageHy' => __DIR__ . '/languages/classes/LanguageHy.php',
diff --git a/languages/Language.php b/languages/Language.php
index bc5ab7e..ac8d4cb 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -3737,6 +3737,43 @@
return $wgGrammarForms[$this->getCode()][$case][$word];
}
 
+   $grammarTransformations = $this->getGrammarTransformations();
+
+   if ( isset( $grammarTransformations[$case] ) ) {
+   $forms = $grammarTransformations[$case];
+
+   // Some names of grammar rules are aliases for other 
rules.
+   // In such cases the value is a string rather than 
object,
+   // so load the actual rules.
+   if ( is_string( $forms ) ) {
+   $forms = $grammarTransformations[$forms];
+   }
+
+   foreach ( array_values( $forms ) as $rule ) {
+   $form = $rule[0];
+
+   if ( $form === '@metadata' ) {
+   continue;
+   }
+
+   $replacement = $rule[1];
+
+   $regex = '/' . addcslashes( $form, '/' ) . '/u';
+   $patternMatches = preg_match( $regex, $word );
+
+   if ( $patternMatches === false ) {
+   wfLogWarning(
+   'An error occurred while 
processing grammar. ' .
+   "Word: '$word'. Regex: /$form/."
+   );
+   } elseif ( $patternMatches === 1 ) {
+   $word = preg_replace( $regex, 
$replacement, $word );
+
+   break;
+   }
+   }
+   }
+
return $word;
}
 
diff --git a/languages/classes/LanguageHe.php b/languages/classes/LanguageHe.php
deleted file mode 100644
index a6aaf6d..000
--- a/languages/classes/LanguageHe.php
+++ /dev/null
@@ -1,70 +0,0 @@
-http:/

[MediaWiki-commits] [Gerrit] operations/puppet[production]: videoscaler: Reduce runners_transcode from 5 to 2

2016-12-18 Thread Zhuyifei1999 (Code Review)
Zhuyifei1999 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328037 )

Change subject: videoscaler: Reduce runners_transcode from 5 to 2
..

videoscaler: Reduce runners_transcode from 5 to 2

Too much runners make hosts overloaded, and in turn reduce the speed
of each transcode, and jobs are timing out more often. This reduction
will hopefully make more running jobs actually complete.

Bug: T153488
Change-Id: I96107533b0d8d328dbac1ef0508a21fd81d8a012
---
M hieradata/role/common/mediawiki/videoscaler.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/328037/1

diff --git a/hieradata/role/common/mediawiki/videoscaler.yaml 
b/hieradata/role/common/mediawiki/videoscaler.yaml
index 585b2ce..6bd7fd0 100644
--- a/hieradata/role/common/mediawiki/videoscaler.yaml
+++ b/hieradata/role/common/mediawiki/videoscaler.yaml
@@ -2,7 +2,7 @@
 admin::groups:
   - deployment
   - perf-roots
-mediawiki::jobrunner::runners_transcode: 5
+mediawiki::jobrunner::runners_transcode: 2
 nutcracker::verbosity: "4"
 hhvm::extra::fcgi:
   hhvm:

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add ftpmirror.your.org to whitelist of commons

2016-12-18 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328036 )

Change subject: Add ftpmirror.your.org to whitelist of commons
..

Add ftpmirror.your.org to whitelist of commons

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6585c9e..c3a5f02 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12524,6 +12524,7 @@
'www.photolib.noaa.gov',// National Oceanic and 
Atmospheric Administration - T138383
'contentdm.lib.byu.edu',// Harold B. Lee Library - 
T139095
'*.ic.uva.nl',  // University of Amsterdam 
- T150167
+   'ftpmirror.your.org'// Public mirror of 
Wikimedia images - T153569
],
 ],
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: ApiQueryMessageGroups: pass context to get descriptions in u...

2016-12-18 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328034 )

Change subject: ApiQueryMessageGroups: pass context to get descriptions in user 
language
..

ApiQueryMessageGroups: pass context to get descriptions in user language

This only affected groups which use i18n key, not those using
Special:MyLanguage hack.

Bug: T153512
Change-Id: Ieaf3096a6e0c098fa2b790fefbe8c00493391d8c
---
M api/ApiQueryMessageGroups.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/34/328034/1

diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php
index d6a5a3e..d5967b2 100644
--- a/api/ApiQueryMessageGroups.php
+++ b/api/ApiQueryMessageGroups.php
@@ -109,6 +109,7 @@
 */
protected function formatGroup( $mixed, $props, $depth = 0 ) {
$params = $this->extractRequestParams();
+   $context = $this->getContext();
 
// Default
$g = $mixed;
@@ -129,11 +130,11 @@
}
 
if ( isset( $props['label'] ) ) {
-   $a['label'] = $g->getLabel();
+   $a['label'] = $g->getLabel( $context );
}
 
if ( isset( $props['description'] ) ) {
-   $a['description'] = $g->getDescription();
+   $a['description'] = $g->getDescription( $context );
}
 
if ( isset( $props['class'] ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieaf3096a6e0c098fa2b790fefbe8c00493391d8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[master]: Add Czech aliases for special pages

2016-12-18 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328033 )

Change subject: Add Czech aliases for special pages
..

Add Czech aliases for special pages

Change-Id: I6093695cb73d1261f3ba5121777c94ab74a24d66
---
M GlobalBlocking.alias.php
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking 
refs/changes/33/328033/2

diff --git a/GlobalBlocking.alias.php b/GlobalBlocking.alias.php
index 8e1c25e..3b84d87 100644
--- a/GlobalBlocking.alias.php
+++ b/GlobalBlocking.alias.php
@@ -104,6 +104,14 @@
'RemoveGlobalBlock' => array( 'Глобальни_блокдӀаяккхар' ),
 );
 
+/** Czech (čeština) */
+$specialPageAliases['cs'] = array(
+   'GlobalBlock' => array( 'Globální_blokování' ),
+   'GlobalBlockList' => array( 'Seznam_globálních_blokování' ),
+   'RemoveGlobalBlock' => array( 'Globální_odblokování' ),
+   'GlobalBlockStatus' => array( 'Výjimky_z_globálních_blokování' ),
+);
+
 /** German (Deutsch) */
 $specialPageAliases['de'] = array(
'GlobalBlock' => array( 'Globale_Sperre' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6093695cb73d1261f3ba5121777c94ab74a24d66
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Optionally collect context in TestLogger

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/319794 )

Change subject: Optionally collect context in TestLogger
..


Optionally collect context in TestLogger

Change-Id: I3835b054ceac0fa0bcd58b41efa6bf78a0fafae7
---
M tests/phpunit/includes/TestLogger.php
1 file changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/tests/phpunit/includes/TestLogger.php 
b/tests/phpunit/includes/TestLogger.php
index 3cb20e1..7086a92 100644
--- a/tests/phpunit/includes/TestLogger.php
+++ b/tests/phpunit/includes/TestLogger.php
@@ -33,16 +33,18 @@
  */
 class TestLogger extends \Psr\Log\AbstractLogger {
private $collect = false;
+   private $collectContext = false;
private $buffer = [];
private $filter = null;
 
/**
 * @param bool $collect Whether to collect logs
 * @param callable $filter Filter logs before collecting/printing. 
Signature is
-*  string|null function ( string $message, string $level );
+*  string|null function ( string $message, string $level, array 
$context );
 */
-   public function __construct( $collect = false, $filter = null ) {
+   public function __construct( $collect = false, $filter = null, 
$collectContext = false ) {
$this->collect = $collect;
+   $this->collectContext = $collectContext;
$this->filter = $filter;
}
 
@@ -56,7 +58,8 @@
 
/**
 * Return the collected logs
-* @return array Array of array( string $level, string $message )
+* @return array Array of array( string $level, string $message ), or
+*   array( string $level, string $message, array $context ) if 
$collectContext was true.
 */
public function getBuffer() {
return $this->buffer;
@@ -73,14 +76,18 @@
$message = trim( $message );
 
if ( $this->filter ) {
-   $message = call_user_func( $this->filter, $message, 
$level );
+   $message = call_user_func( $this->filter, $message, 
$level, $context );
if ( $message === null ) {
return;
}
}
 
if ( $this->collect ) {
-   $this->buffer[] = [ $level, $message ];
+   if ( $this->collectContext ) {
+   $this->buffer[] = [ $level, $message, $context 
];
+   } else {
+   $this->buffer[] = [ $level, $message ];
+   }
} else {
switch ( $level ) {
case LogLevel::DEBUG:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3835b054ceac0fa0bcd58b41efa6bf78a0fafae7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


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

2016-12-18 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328032 )

Change subject: New Wikidata Build - 2016-12-18T10:00:01+
..

New Wikidata Build - 2016-12-18T10:00:01+

Change-Id: Ic89bf5797570c4b5e3a783613131f5209532f4f5
---
M composer.lock
M extensions/Wikibase/client/i18n/bqi.json
M extensions/Wikibase/client/i18n/frr.json
M vendor/composer/installed.json
4 files changed, 12 insertions(+), 10 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index fc0cb3c..7667c25 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1585,12 +1585,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-"reference": "32a8fe6eee79a6c505694e0c2c98ac6384873d0b"
+"reference": "7f7e5e40dd0ff419c735cdbddf9b2c690b35ba46"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/32a8fe6eee79a6c505694e0c2c98ac6384873d0b";,
-"reference": "32a8fe6eee79a6c505694e0c2c98ac6384873d0b",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7f7e5e40dd0ff419c735cdbddf9b2c690b35ba46";,
+"reference": "7f7e5e40dd0ff419c735cdbddf9b2c690b35ba46",
 "shasum": ""
 },
 "require": {
@@ -1663,7 +1663,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-12-16 21:18:18"
+"time": "2016-12-17 21:26:07"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/client/i18n/bqi.json 
b/extensions/Wikibase/client/i18n/bqi.json
index fc7ffa3..566fb6c 100644
--- a/extensions/Wikibase/client/i18n/bqi.json
+++ b/extensions/Wikibase/client/i18n/bqi.json
@@ -4,6 +4,7 @@
"Mogoeilor"
]
},
+   "tooltip-t-wikibase": "هوم پیڤأند سي إمایأجا رسينإ آ",
"wikibase-comment-update": "{{WBREPONAME}} قلم آلشد ڤابي",
"wikibase-dataitem": "{{WBREPONAME}} قلم",
"wikibase-editlinks": "ویرایشت هوم پیوندا",
@@ -12,5 +13,6 @@
"wikibase-rc-hide-wikidata-hide": "قام کردن",
"wikibase-rc-hide-wikidata-show": "نشون دائن",
"wikibase-rc-wikibase-edit-letter": "د",
-   "wikibase-rc-wikibase-edit-title": "{{WBREPONAME}} ویرایشت"
+   "wikibase-rc-wikibase-edit-title": "{{WBREPONAME}} ویرایشت",
+   "wikibase-otherprojects": "مإن پورجإیأل ديأ"
 }
diff --git a/extensions/Wikibase/client/i18n/frr.json 
b/extensions/Wikibase/client/i18n/frr.json
index fb17edd..f34ba7e 100644
--- a/extensions/Wikibase/client/i18n/frr.json
+++ b/extensions/Wikibase/client/i18n/frr.json
@@ -57,7 +57,7 @@
"wikibase-pageinfo-entity-id": "{{WBREPONAME}}-käännumer (ID)",
"wikibase-pageinfo-entity-id-none": "Nian",
"wikibase-property-render-error": "Eegenskap „$1“ küd ei ferwerket 
wurd: $2",
-   "wikibase-otherprojects": "Ööder projekten",
+   "wikibase-otherprojects": "Uun ööder projekten",
"wikibase-otherprojects-beta-message": "Sidjenliist faan ööder 
projekten",
"wikibase-otherprojects-beta-description": "Diar komt en kirew 
„{{int:wikibase-otherprojects}}“ tu det sidjenliist mä ferwisangen tu 
Wikimedia-projekten mä {{WBREPONAME}}-dooten."
 }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 7a6dfc0..bb94698 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1406,12 +1406,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-"reference": "32a8fe6eee79a6c505694e0c2c98ac6384873d0b"
+"reference": "7f7e5e40dd0ff419c735cdbddf9b2c690b35ba46"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/32a8fe6eee79a6c505694e0c2c98ac6384873d0b";,
-"reference": "32a8fe6eee79a6c505694e0c2c98ac6384873d0b",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/7f7e5e40dd0ff419c735cdbddf9b2c690b35ba46";,
+"reference": "7f7e5e40dd0ff419c735cdbddf9b2c690b35ba46",
 "shasum": ""
 },
 "require": {
@@ -1444,7 +1444,7 @@
 "jakub-onderka/php-parallel-lint": "0.9.2",
 "mediawiki/mediawiki-codesniffer": "0.4.0|0.5.0"
 },
-"time": "2016-12-16 21:18:18",
+"time": "2016-12-17 21:26:07",
 "type": "mediawiki-extension",
 "installation-source": "dist",
 "autoload

[MediaWiki-commits] [Gerrit] mediawiki...SemanticWebBrowser[master]: Remove eclipse folders

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327830 )

Change subject: Remove eclipse folders
..


Remove eclipse folders

Also expand .gitignore

Change-Id: I4e5ed70e9d021a188960755ab0875a362c557872
---
D .buildpath
M .gitignore
D .project
D .settings/.jsdtscope
D .settings/org.eclipse.php.core.prefs
D .settings/org.eclipse.wst.jsdt.ui.superType.container
D .settings/org.eclipse.wst.jsdt.ui.superType.name
7 files changed, 17 insertions(+), 61 deletions(-)

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



diff --git a/.buildpath b/.buildpath
deleted file mode 100644
index 8bcb4b5..000
--- a/.buildpath
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-   
-   
-
diff --git a/.gitignore b/.gitignore
index 98b092a..3a22afb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,19 @@
-.svn
-*~
+# Editors
 *.kate-swp
+*~
+\#*#
+.#*
 .*.swp
+.project
+.buildpath
+.classpath
+.settings
+cscope.files
+cscope.out
+*.orig
+## NetBeans
+nbproject*
+project.index
+## Sublime
+sublime-*
+sftp-config.json
diff --git a/.project b/.project
deleted file mode 100644
index 8f8d4c1..000
--- a/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-   SemanticWebBrowser-Git
-   
-   
-   
-   
-   
-   
org.eclipse.wst.common.project.facet.core.builder
-   
-   
-   
-   
-   
org.eclipse.wst.jsdt.core.javascriptValidator
-   
-   
-   
-   
-   
org.eclipse.wst.validation.validationbuilder
-   
-   
-   
-   
-   org.eclipse.dltk.core.scriptbuilder
-   
-   
-   
-   
-   
-   org.eclipse.php.core.PHPNature
-   org.eclipse.wst.jsdt.core.jsNature
-   
org.eclipse.wst.common.project.facet.core.nature
-   
-
diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope
deleted file mode 100644
index 2f6f983..000
--- a/.settings/.jsdtscope
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-
diff --git a/.settings/org.eclipse.php.core.prefs 
b/.settings/org.eclipse.php.core.prefs
deleted file mode 100644
index 6c9413c..000
--- a/.settings/org.eclipse.php.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-include_path=0;/1SemanticWebBrowser
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container 
b/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a..000
--- a/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name 
b/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b..000
--- a/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e5ed70e9d021a188960755ab0875a362c557872
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticWebBrowser
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...LoginNotify[master]: Avoid duplicate @doc in extension.json

2016-12-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327875 )

Change subject: Avoid duplicate @doc in extension.json
..


Avoid duplicate @doc in extension.json

External JSON reader can have problems with duplicate keys in json.

Change-Id: I80c18a77ceafef681708f7656db465fb3717e0c0
---
M extension.json
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/extension.json b/extension.json
index f14109a..c43fb72 100644
--- a/extension.json
+++ b/extension.json
@@ -52,16 +52,16 @@
"LoginNotifyExpiryNewIP": 1209600,
"LoginNotifyCheckKnownIPs": true,
"LoginNotifyEnableOnSuccess": true,
-   "@doc": "Enable notification for users with certain rights. To 
disable set to false",
+   "@docLoginNotifyEnableForPriv": "Enable notification for users 
with certain rights. To disable set to false",
"LoginNotifyEnableForPriv": [ "editinterface", "userrights" ],
-   "@doc": "Override this to use a different secret than 
$wgSecretKey",
+   "@docLoginNotifySecretKey": "Override this to use a different 
secret than $wgSecretKey",
"LoginNotifySecretKey": null,
-   "@doc": "Expiry in seconds. Default is 180 days",
+   "@docLoginNotifyCookieExpire": "Expiry in seconds. Default is 
180 days",
"LoginNotifyCookieExpire": 15552000,
-   "@doc": "Override to allow sharing login cookies between sites 
on different subdomains",
+   "@docLoginNotifyCookieDomain": "Override to allow sharing login 
cookies between sites on different subdomains",
"LoginNotifyCookieDomain": null,
"LoginNotifyMaxCookieRecords": 6,
-   "@doc": "Set to false to disable caching IPs in memcache. Set 
to 0 to cache forever. Default 60 days.",
+   "@docLoginNotifyCacheLoginIPExpiry": "Set to false to disable 
caching IPs in memcache. Set to 0 to cache forever. Default 60 days.",
"LoginNotifyCacheLoginIPExpiry": 5184000
},
"manifest_version": 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80c18a77ceafef681708f7656db465fb3717e0c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LoginNotify
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   >