[MediaWiki-commits] [Gerrit] translatewiki[master]: [puppet] Update elastic-elasticsearch

2017-12-27 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400472 )

Change subject: [puppet] Update elastic-elasticsearch
..

[puppet] Update elastic-elasticsearch

Change-Id: I27bf55c5b27f59801f406dce4aea4c35baa6a598
---
M puppet/Puppetfile
M puppet/Puppetfile.lock
2 files changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/72/400472/1

diff --git a/puppet/Puppetfile b/puppet/Puppetfile
index 413f02d..0064830 100644
--- a/puppet/Puppetfile
+++ b/puppet/Puppetfile
@@ -1,7 +1,7 @@
 forge "https://forgeapi.puppetlabs.com;
 
 mod 'puppetlabs-mysql', '5.1.0'
-mod 'elastic-elasticsearch', '6.0.0'
+mod 'elastic-elasticsearch', '6.1.0'
 mod 'thias-sysctl', '1.0.6'
 mod 'puppetlabs-java', '2.3.0'
 mod 'puppet-letsencrypt', '2.1.0'
diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock
index b10f3f5..f2e1d4d 100644
--- a/puppet/Puppetfile.lock
+++ b/puppet/Puppetfile.lock
@@ -1,10 +1,9 @@
 FORGE
   remote: https://forgeapi.puppetlabs.com
   specs:
-elastic-elasticsearch (6.0.0)
-  puppet-tea (< 1.0.0, >= 0.2.0)
+elastic-elasticsearch (6.1.0)
   puppetlabs-apt (< 5.0.0, >= 2.0.0)
-  puppetlabs-stdlib (< 5.0.0, >= 4.6.0)
+  puppetlabs-stdlib (< 5.0.0, >= 4.13.0)
   richardc-datacat (< 1.0.0, >= 0.6.2)
 puppet-archive (2.2.0)
   puppetlabs-stdlib (< 5.0.0, >= 4.13.1)
@@ -14,7 +13,6 @@
   puppetlabs-vcsrepo (< 2.0.0, >= 1.3.1)
   stahnma-epel (< 2.0.0, >= 1.0.0)
 puppet-staging (2.2.0)
-puppet-tea (0.2.0)
 puppetlabs-apt (4.4.1)
   puppetlabs-stdlib (< 5.0.0, >= 4.16.0)
 puppetlabs-inifile (1.6.0)
@@ -34,7 +32,7 @@
 thias-sysctl (1.0.6)
 
 DEPENDENCIES
-  elastic-elasticsearch (= 6.0.0)
+  elastic-elasticsearch (= 6.1.0)
   puppet-letsencrypt (= 2.1.0)
   puppetlabs-java (= 2.3.0)
   puppetlabs-mysql (= 5.1.0)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27bf55c5b27f59801f406dce4aea4c35baa6a598
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] operations/software[master]: test-s4.hosts: New file with the test-s4 hosts

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

Change subject: test-s4.hosts: New file with the test-s4 hosts
..


test-s4.hosts: New file with the test-s4 hosts

db and db1112 are the hosts dedicated for the MCR schema tests, so I
would like to have a file tracking them just to have them somewhere.

Once the tests are done, we can delete it.

Bug: T180788
Change-Id: I8351ee445a550eb91cbeaa3a2555ba2dff77128a
---
A dbtools/test-s4.hosts
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/dbtools/test-s4.hosts b/dbtools/test-s4.hosts
new file mode 100644
index 000..7b167d3
--- /dev/null
+++ b/dbtools/test-s4.hosts
@@ -0,0 +1,2 @@
+db1112.eqiad.wmnet 3306
+db.eqiad.wmnet 3306

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8351ee445a550eb91cbeaa3a2555ba2dff77128a
Gerrit-PatchSet: 2
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Volans 
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/software[master]: test-s4.hosts: New file with the test-s4 hosts

2017-12-27 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400471 )

Change subject: test-s4.hosts: New file with the test-s4 hosts
..

test-s4.hosts: New file with the test-s4 hosts

db and db1112 are the hosts dedicated for the MCR schema tests, so I
would like to have a file tracking them just to have them somewhere.

Once the tests are done, we can delete it.

Bug: T180788
Change-Id: I8351ee445a550eb91cbeaa3a2555ba2dff77128a
---
A dbtools/test-s4.hosts
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/71/400471/1

diff --git a/dbtools/test-s4.hosts b/dbtools/test-s4.hosts
new file mode 100644
index 000..0b27fad
--- /dev/null
+++ b/dbtools/test-s4.hosts
@@ -0,0 +1,2 @@
+db.eqiad.wmnet 3306
+db1112.eqiad.wmnet 3306

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8351ee445a550eb91cbeaa3a2555ba2dff77128a
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Marostegui 

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: @parma and @params -> @param in javascript

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

Change subject: @parma and @params -> @param in javascript
..


@parma and @params -> @param in javascript

Change-Id: Id53ad48de9c0d3990e7647c39ce88bb80df5b671
---
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
index 189485b..1e1c42a 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -754,7 +754,7 @@
 * Update a loaded player interface by setting local methods to 
the
 * updated player prototype methods
 *
-* @parma {function}
+* @param {function}
 *  callback function called once player has been 
loaded
 */
updateLoadedPlayerInterface: function( callback ){
diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js
index aa4c38b..d14204a 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js
@@ -447,7 +447,7 @@
/**
* Set the current time with a callback
*
-   * @param {Float} position
+   * @param {Float} seekTime
*   Seconds to set the time to
* @param {Function} callback
*   Function called once time has been set.
@@ -891,7 +891,7 @@
/**
* Load the video stream with a callback fired once the video is "loaded"
*
-   * @parma {Function} callbcak Function called once video is loaded
+   * @param {Function} callback Function called once video is loaded
*/
load: function( callback ) {
this.getPlayerElement();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id53ad48de9c0d3990e7647c39ce88bb80df5b671
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...BlueSpiceWhoIsOnline[master]: Fix register of extension in extension.json

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400419 )

Change subject: Fix register of extension in extension.json
..


Fix register of extension in extension.json

Name in "bsgExtensions" must the same as in "name"

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

Approvals:
  Pwirth: Looks good to me, approved
  Umherirrender: Verified



diff --git a/extension.json b/extension.json
index c3588b0..0f05b3f 100644
--- a/extension.json
+++ b/extension.json
@@ -7,7 +7,7 @@
"descriptionmsg": "bs-whoisonline-desc",
"type": "bluespice",
"bsgExtensions": {
-   "WhoIsOnline": {
+   "BlueSpiceWhoIsOnline": {
"className": "WhoIsOnline",
"extPath": "/BlueSpiceWhoIsOnline"
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70702de6ca6e01f31eb2f95c49f4dbf0639933c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceWhoIsOnline
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceBlog[master]: Fix use of boolean in extension.json

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400418 )

Change subject: Fix use of boolean in extension.json
..


Fix use of boolean in extension.json

Must be a real boolean, not "true" as string

BlueSpiceBlog/extension.json did not pass validation.
[config.BlogMoreInNewWindow.public] String value found, but a boolean is
required
[config.BlogShowAll.public] String value found, but a boolean is
required

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

Approvals:
  Pwirth: Looks good to me, approved
  Umherirrender: Verified



diff --git a/extension.json b/extension.json
index 10f2e57..3cd56fe 100644
--- a/extension.json
+++ b/extension.json
@@ -63,12 +63,12 @@
"BlogMoreInNewWindow": {
"value": false,
"descriptionmsg": "bs-blog-pref-moreinnewwindow",
-   "public": "true"
+   "public": true
},
"BlogShowAll": {
"value": true,
"descriptionmsg": "bs-blog-pref-showall",
-   "public": "true"
+   "public": true
},
"BlogMoreAtEndOfEntry": {
"value": true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If93093a416d9645cc2296774e460ce26fe070ead
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceBlog
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Use findItemFromData instead getItemFromData

2017-12-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400470 )

Change subject: Use findItemFromData instead getItemFromData
..

Use findItemFromData instead getItemFromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: Ie996b7328c5d023d2f89abd4d07d704c2bf1831d
---
M src/ui/elements/ve.ui.DiffElement.js
M src/ui/widgets/ve.ui.MediaSizeWidget.js
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/70/400470/1

diff --git a/src/ui/elements/ve.ui.DiffElement.js 
b/src/ui/elements/ve.ui.DiffElement.js
index 329fcb2..9a5938e 100644
--- a/src/ui/elements/ve.ui.DiffElement.js
+++ b/src/ui/elements/ve.ui.DiffElement.js
@@ -158,7 +158,7 @@
var elementId = $( e.target ).closest( '[data-diff-id]' ).attr( 
'data-diff-id' );
if ( elementId !== undefined ) {
this.descriptions.highlightItem(
-   this.descriptions.getItemFromData( +elementId )
+   this.descriptions.findItemFromData( +elementId )
);
} else {
this.descriptions.highlightItem();
diff --git a/src/ui/widgets/ve.ui.MediaSizeWidget.js 
b/src/ui/widgets/ve.ui.MediaSizeWidget.js
index eea24ca..ae2450d 100644
--- a/src/ui/widgets/ve.ui.MediaSizeWidget.js
+++ b/src/ui/widgets/ve.ui.MediaSizeWidget.js
@@ -159,7 +159,7 @@
 ve.ui.MediaSizeWidget.prototype.onScalableOriginalSizeChange = function ( 
dimensions ) {
var disabled = !dimensions || $.isEmptyObject( dimensions );
this.fullSizeButton.setDisabled( disabled );
-   this.sizeTypeSelectWidget.getItemFromData( 'default' ).setDisabled( 
disabled );
+   this.sizeTypeSelectWidget.findItemFromData( 'default' ).setDisabled( 
disabled );
// Revalidate current dimensions
this.validateDimensions();
 };
@@ -310,7 +310,7 @@
Number( this.dimensionsWidget.getHeight() ) === 0
) {
this.sizeTypeSelectWidget.chooseItem(
-   this.sizeTypeSelectWidget.getItemFromData( sizeType )
+   this.sizeTypeSelectWidget.findItemFromData( sizeType )
);
}
 };
@@ -350,10 +350,10 @@
// If we don't have original dimensions, disable the full size button
if ( !this.scalable.getOriginalDimensions() ) {
this.fullSizeButton.setDisabled( true );
-   this.sizeTypeSelectWidget.getItemFromData( 'default' 
).setDisabled( true );
+   this.sizeTypeSelectWidget.findItemFromData( 'default' 
).setDisabled( true );
} else {
this.fullSizeButton.setDisabled( false );
-   this.sizeTypeSelectWidget.getItemFromData( 'default' 
).setDisabled( false );
+   this.sizeTypeSelectWidget.findItemFromData( 'default' 
).setDisabled( false );
 
// Call for the set size type according to default or custom 
settings of the scalable
this.setSizeType( this.scalable.isDefault() ? 'default' : 
'custom' );
@@ -377,7 +377,7 @@
  */
 ve.ui.MediaSizeWidget.prototype.onFullSizeButtonClick = function () {
this.sizeTypeSelectWidget.chooseItem(
-   this.sizeTypeSelectWidget.getItemFromData( 'custom' )
+   this.sizeTypeSelectWidget.findItemFromData( 'custom' )
);
this.setCurrentDimensions( this.scalable.getOriginalDimensions() );
this.dimensionsWidget.setDisabled( false );
@@ -541,7 +541,7 @@
} else {
this.dimensionsWidget.removeDefaults();
}
-   this.sizeTypeSelectWidget.getItemFromData( 'default' ).setDisabled(
+   this.sizeTypeSelectWidget.findItemFromData( 'default' ).setDisabled(
$.isEmptyObject( defaultDimensions )
);
this.validateDimensions();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie996b7328c5d023d2f89abd4d07d704c2bf1831d
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Use findItemFromData instead getItemFromData

2017-12-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400469 )

Change subject: Use findItemFromData instead getItemFromData
..

Use findItemFromData instead getItemFromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: I379da96a42c440c7d2d5dc2f3de2773c03546c04
---
M modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
index a0520d2..bad496b 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMetaDialog.js
@@ -113,7 +113,7 @@
isSource = 
ve.init.target.getSurface().getMode() === 'source';
 
visualOnlyPages.forEach( function ( page ) {
-   selectWidget.getItemFromData( page 
).setDisabled( isSource );
+   selectWidget.findItemFromData( page 
).setDisabled( isSource );
} );
 
if ( isSource && visualOnlyPages.indexOf( data.page || 
'categories' ) !== -1 ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TemplateData[master]: Use findItemFromData instead getItemFromData

2017-12-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400468 )

Change subject: Use findItemFromData instead getItemFromData
..

Use findItemFromData instead getItemFromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: If93d7d85e05c57c65728a7b9dbc7f1c93c9953d8
---
M modules/ext.templateDataGenerator.ui.tdDialog.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ext.templateDataGenerator.ui.tdDialog.js 
b/modules/ext.templateDataGenerator.ui.tdDialog.js
index efa6fe3..48848c9 100644
--- a/modules/ext.templateDataGenerator.ui.tdDialog.js
+++ b/modules/ext.templateDataGenerator.ui.tdDialog.js
@@ -650,7 +650,7 @@
if ( value !== undefined ) {
// Change the actual input
if ( prop.type === 'select' ) {
-   propInput.selectItem( propInput.getItemFromData( value 
) );
+   propInput.selectItem( propInput.findItemFromData( value 
) );
} else if ( prop.type === 'boolean' ) {
propInput.setSelected( !!value );
} else {
@@ -666,7 +666,7 @@
} else {
// Empty the input
if ( prop.type === 'select' ) {
-   propInput.selectItem( propInput.getItemFromData( 
prop.default ) );
+   propInput.selectItem( propInput.findItemFromData( 
prop.default ) );
} else if ( prop.type === 'boolean' ) {
propInput.setSelected( false );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If93d7d85e05c57c65728a7b9dbc7f1c93c9953d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Use findItemFromData instead getItemFromData

2017-12-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400467 )

Change subject: Use findItemFromData instead getItemFromData
..

Use findItemFromData instead getItemFromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: I70ea6c0c01f47b72d05b4d3bfc5f98aedb5601ee
---
M resources/infrastructure/ext.centralNotice.adminUi.bannerSequence.js
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git 
a/resources/infrastructure/ext.centralNotice.adminUi.bannerSequence.js 
b/resources/infrastructure/ext.centralNotice.adminUi.bannerSequence.js
index 87930df..dfc9fbf 100644
--- a/resources/infrastructure/ext.centralNotice.adminUi.bannerSequence.js
+++ b/resources/infrastructure/ext.centralNotice.adminUi.bannerSequence.js
@@ -858,7 +858,7 @@
BannerSequenceWidget.prototype.updateFromModelForBucket = function ( 
bucket ) {
 
var sequence = this.model.getBktSequences()[ bucket ],
-   seqContainer = this.getItemFromData( bucket );
+   seqContainer = this.findItemFromData( bucket );
 
// If we don't have a sequence container for this bucket it, 
create it
if ( !seqContainer ) {
@@ -887,7 +887,7 @@
 * Tell the sequence container for a bucket to remove a step
 */
BannerSequenceWidget.prototype.removeStepForBucket = function ( bucket, 
stepNum ) {
-   var seqContainerWidget = this.getItemFromData( bucket );
+   var seqContainerWidget = this.findItemFromData( bucket );
 
seqContainerWidget.removeStep( stepNum );
};
@@ -902,7 +902,7 @@
bucket,
stepsWithMissingBanners
) {
-   this.getItemFromData( bucket ).setMissingBannerErrors( 
stepsWithMissingBanners );
+   this.findItemFromData( bucket ).setMissingBannerErrors( 
stepsWithMissingBanners );
};
 
/**
@@ -912,7 +912,7 @@
bucket,
banners
) {
-   this.getItemFromData( bucket ).updateBannersForDropDowns( 
banners );
+   this.findItemFromData( bucket ).updateBannersForDropDowns( 
banners );
};
 
/**
@@ -920,7 +920,7 @@
 * sequence.
 */
BannerSequenceWidget.prototype.updateTotalPageViewsForBucket = function 
( bucket ) {
-   this.getItemFromData( bucket ).updateTotalPageViews();
+   this.findItemFromData( bucket ).updateTotalPageViews();
};
 
/* BucketSeqContainerWidget */
@@ -1007,7 +1007,7 @@
// Go through steps in model, adding or updating widgets as 
needed
for ( i = 0; i < this.model.length; i++ ) {
stepModel = this.model[ i ];
-   stepWidget = this.bucketSeqWidget.getItemFromData( i );
+   stepWidget = this.bucketSeqWidget.findItemFromData( i );
 
if ( !stepWidget ) {
this.addStepWidget( stepModel, i );
@@ -1080,7 +1080,7 @@
 
BucketSeqContainerWidget.prototype.removeStep = function ( stepNum ) {
 
-   var stepWidget = this.bucketSeqWidget.getItemFromData( stepNum 
);
+   var stepWidget = this.bucketSeqWidget.findItemFromData( stepNum 
);
 
stepWidget.clearFromGeneralErrorState();
this.bucketSeqWidget.removeItems( [ stepWidget ] );
@@ -1101,7 +1101,7 @@
for ( i = 0; i < stepsWithMissingBanners.length; i++ ) {
 
this.bucketSeqWidget
-   .getItemFromData( stepsWithMissingBanners[ i ] )
+   .findItemFromData( stepsWithMissingBanners[ i ] 
)
.setMissingBannerError( true );
}
};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70ea6c0c01f47b72d05b4d3bfc5f98aedb5601ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Use findItemFromData instead getItemFromData

2017-12-27 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400466 )

Change subject: Use findItemFromData instead getItemFromData
..

Use findItemFromData instead getItemFromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: I076b28c0cd11c4fd47ebe1a68cefa8c8ad9000c9
---
M 
modules/editor/editors/visualeditor/ui/widgets/mw.flow.ve.ui.MentionTargetInputWidget.js
M modules/flow/ui/widgets/mw.flow.ui.CategoriesWidget.js
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git 
a/modules/editor/editors/visualeditor/ui/widgets/mw.flow.ve.ui.MentionTargetInputWidget.js
 
b/modules/editor/editors/visualeditor/ui/widgets/mw.flow.ve.ui.MentionTargetInputWidget.js
index 55b9c6c..afcadee 100644
--- 
a/modules/editor/editors/visualeditor/ui/widgets/mw.flow.ve.ui.MentionTargetInputWidget.js
+++ 
b/modules/editor/editors/visualeditor/ui/widgets/mw.flow.ve.ui.MentionTargetInputWidget.js
@@ -133,7 +133,7 @@

mw.flow.ve.ui.MentionTargetInputWidget.prototype.initializeLookupMenuSelection 
= function () {
var item;
if ( this.username ) {
-   this.lookupMenu.selectItem( 
this.lookupMenu.getItemFromData( this.username ) );
+   this.lookupMenu.selectItem( 
this.lookupMenu.findItemFromData( this.username ) );
}
 
item = this.lookupMenu.getSelectedItem();
diff --git a/modules/flow/ui/widgets/mw.flow.ui.CategoriesWidget.js 
b/modules/flow/ui/widgets/mw.flow.ui.CategoriesWidget.js
index d53ac8a..dd60f66 100644
--- a/modules/flow/ui/widgets/mw.flow.ui.CategoriesWidget.js
+++ b/modules/flow/ui/widgets/mw.flow.ui.CategoriesWidget.js
@@ -87,7 +87,7 @@
widgets = [];
 
for ( i = 0, len = categories.length; i < len; i++ ) {
-   widgets.push( this.getItemFromData( categories[ i 
].getId() ) );
+   widgets.push( this.findItemFromData( categories[ i 
].getId() ) );
}
 
this.removeItems( widgets );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I076b28c0cd11c4fd47ebe1a68cefa8c8ad9000c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: utils.py: Use more descriptive variable names in detailed_sh...

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

Change subject: utils.py: Use more descriptive variable names in 
detailed_show_warning
..


utils.py: Use more descriptive variable names in detailed_show_warning

Also in DeprecationTestCase use source_adjustment_skips instead of skip_list
which could be easily confused with a mechanism to prevent warnings from
being shown.

Change-Id: I1d6ebacfe4f4062017c5a217a0a0a91d6d2b1f4e
---
M tests/aspects.py
M tests/utils.py
2 files changed, 33 insertions(+), 23 deletions(-)

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



diff --git a/tests/aspects.py b/tests/aspects.py
index d132ad2..077d2c1 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -1492,7 +1492,7 @@
 
 _generic_match = re.compile(r'.* is deprecated(; use .* instead)?\.')
 
-skip_list = [
+source_adjustment_skips = [
 unittest.case._AssertRaisesContext,
 TestCase.assertRaises,
 TestCase.assertRaisesRegex,
@@ -1506,7 +1506,7 @@
 
 # Python 3 component in the call stack of _AssertRaisesContext
 if hasattr(unittest.case, '_AssertRaisesBaseContext'):
-skip_list.append(unittest.case._AssertRaisesBaseContext)
+source_adjustment_skips.append(unittest.case._AssertRaisesBaseContext)
 
 def __init__(self, *args, **kwargs):
 """Constructor."""
@@ -1520,7 +1520,8 @@
 self._do_test_warning_filename = True
 self._ignore_unknown_warning_packages = False
 
-self.context_manager = WarningSourceSkipContextManager(self.skip_list)
+self.context_manager = WarningSourceSkipContextManager(
+self.source_adjustment_skips)
 
 def _reset_messages(self):
 """Reset captured deprecation warnings."""
@@ -1667,7 +1668,7 @@
 assertion, *args, **kwargs)
 self.assertOneDeprecation()
 
-skip_list = DeprecationTestCase.skip_list + [
+source_adjustment_skips = DeprecationTestCase.source_adjustment_skips + [
 CapturingTestCase.process_assert,
 CapturingTestCase.patch_assert,
 ]
diff --git a/tests/utils.py b/tests/utils.py
index f73f48e..240cda8 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -182,7 +182,8 @@
 """
 Constructor.
 
-@param skip_list: List of objects to be skipped
+@param skip_list: List of objects to be skipped. The source of any
+warning that matches the skip_list won't be adjusted.
 @type skip_list: list of object or (obj, str, int, int)
 """
 super(WarningSourceSkipContextManager, self).__init__(record=True)
@@ -220,40 +221,48 @@
 """Enter the context manager."""
 def detailed_show_warning(*args, **kwargs):
 """Replacement handler for warnings.showwarning."""
-entry = warnings.WarningMessage(*args, **kwargs)
+warn_msg = warnings.WarningMessage(*args, **kwargs)
 
-skip_lines = 0
-entry_line_found = False
+skip_frames = 0
+a_frame_has_matched_warn_msg = False
 
-for (_, filename, fileno, _, line, _) in inspect.stack():
-if any(start <= fileno <= end
+# The following for-loop will adjust the warn_msg only if the
+# warning does not match the skip_list.
+for (_, frame_filename, frame_lineno, _, _, _) in inspect.stack():
+if any(start <= frame_lineno <= end
for (_, skip_filename, start, end) in self.skip_list
-   if skip_filename == filename):
-if entry_line_found:
+   if skip_filename == frame_filename):
+# this frame matches to one of the items in the skip_list
+if a_frame_has_matched_warn_msg:
 continue
 else:
-skip_lines += 1
+skip_frames += 1
 
-if (filename, fileno) == (entry.filename, entry.lineno):
-if not skip_lines:
+if (
+frame_filename == warn_msg.filename
+and frame_lineno == warn_msg.lineno
+):
+if not skip_frames:
 break
-entry_line_found = True
+a_frame_has_matched_warn_msg = True
 
-if entry_line_found:
-if not skip_lines:
-(entry.filename, entry.lineno) = (filename, fileno)
+if a_frame_has_matched_warn_msg:
+if not skip_frames:
+# adjust the warn_msg
+warn_msg.filename = frame_filename
+warn_msg.lineno = frame_lineno
 break
 else:
-  

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Creating daemonize_tests.py

2017-12-27 Thread Eisenhaus335 (Code Review)
Eisenhaus335 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400465 )

Change subject: Creating daemonize_tests.py
..

Creating daemonize_tests.py

Change-Id: I1b57963c65d69d7ea5fbe9651e5c45c7ea4f0261
---
M tests/daemonize_tests.py
1 file changed, 14 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/65/400465/1

diff --git a/tests/daemonize_tests.py b/tests/daemonize_tests.py
index 051d8ea..a83491f 100644
--- a/tests/daemonize_tests.py
+++ b/tests/daemonize_tests.py
@@ -2,25 +2,24 @@
 from pywikibot import daemonize
 import os
 
-class TestCase1:
-   def test_daemonize_os_exit():
-  os.fork()
-  daemonize.daemonize()
-   def test_daemonize_closedstream_true():
-  daemonize.daemonize(True, True, False, None)
+def test_daemonize_os_exit():
+   os.fork()
+   daemonize.daemonize()
+def test_daemonize_closedstream_true():
+   daemonize.daemonize(True, True, False, None)
 
-   def test_daemonize_closedstream_false():
-  daemonize.daemonize(False, True, False, None)
+def test_daemonize_closedstream_false():
+   daemonize.daemonize(False, True, False, None)
 
-   def test_daemonize_changedirectory_true():
-  daemonize.daemonize(True, True, False, None)
+def test_daemonize_changedirectory_true():
+   daemonize.daemonize(True, True, False, None)
 
-   def test_daemonize_changeddirectory_false():
-  daemonize.daemonize(True, False, False, None)
+def test_daemonize_changeddirectory_false():
+   daemonize.daemonize(True, False, False, None)
 
-   def test_daemonize_writepid_True():
-  os.fork()
-  """cannot be tested because spaghetti code"""
+def test_daemonize_writepid_True():
+   os.fork()
+   """cannot be tested because spaghetti code"""
 
 def load_tests(loader, tests, pattern):
test_daemonize_os_exit()

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Publisher add/remove functions now take user ids array

2017-12-27 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400464 )

Change subject: Publisher add/remove functions now take user ids array
..

Publisher add/remove functions now take user ids array

Bug: T183658
Change-Id: Iec336c09248ed68dbb6f65e7cf29c416fc017844
---
M includes/NewsletterDb.php
M includes/NewsletterEditPage.php
M includes/NewsletterStore.php
M includes/content/NewsletterDataUpdate.php
M tests/NewsletterDbTest.php
5 files changed, 36 insertions(+), 39 deletions(-)


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

diff --git a/includes/NewsletterDb.php b/includes/NewsletterDb.php
index 90e3d8d..46d40bc 100644
--- a/includes/NewsletterDb.php
+++ b/includes/NewsletterDb.php
@@ -88,15 +88,19 @@
 
/**
 * @param Newsletter $newsletter
-* @param User $user
+* @param array $userIds
 *
 * @return bool success of the action
 */
-   public function addPublisher( Newsletter $newsletter, User $user ) {
-   $rowData = [
-   'nlp_newsletter_id' => $newsletter->getId(),
-   'nlp_publisher_id' => $user->getId(),
-   ];
+   public function addPublisher( Newsletter $newsletter, $userIds ) {
+   $newsletterId = $newsletter->getId();
+   $rowData = [];
+   foreach ( $userIds as $userId ) {
+   $rowData[] = [
+   'nlp_newsletter_id' => $newsletterId,
+   'nlp_publisher_id' => $userId
+   ];
+   }
 
$dbw = $this->lb->getConnection( DB_MASTER );
$dbw->insert( 'nl_publishers', $rowData, __METHOD__, [ 'IGNORE' 
] );
@@ -109,14 +113,14 @@
 
/**
 * @param Newsletter $newsletter
-* @param User $user
+* @param array $userIds
 *
 * @return bool success of the action
 */
-   public function removePublisher( Newsletter $newsletter, User $user ) {
+   public function removePublisher( Newsletter $newsletter, $userIds ) {
$rowData = [
'nlp_newsletter_id' => $newsletter->getId(),
-   'nlp_publisher_id' => $user->getId(),
+   'nlp_publisher_id' => $userIds
];
 
$dbw = $this->lb->getConnection( DB_MASTER );
diff --git a/includes/NewsletterEditPage.php b/includes/NewsletterEditPage.php
index 4c0a14f..88480a7 100644
--- a/includes/NewsletterEditPage.php
+++ b/includes/NewsletterEditPage.php
@@ -317,7 +317,8 @@
);
if ( $result->isGood() ) {
$this->newsletter->subscribe( $this->user );
-   
NewsletterStore::getDefaultInstance()->addPublisher( $this->newsletter, 
$this->user );
+   $store = NewsletterStore::getDefaultInstance();
+   $store->addPublisher( $this->newsletter, [ 
$this->user->getId() ] );
$this->out->addWikiMsg( 
'newsletter-create-confirmation', $this->newsletter->getName() );
return Status::newGood();
} else {
@@ -413,10 +414,7 @@
 
// Check if people has been added
if ( $added ) {
-   // @todo Do this in a batch..
-   foreach ( $added as $auId ) {
-   $store->addPublisher( $this->newsletter, 
User::newFromId( $auId ) );
-   }
+   $store->addPublisher( $this->newsletter, $added );
// Adds the new publishers to subscription list
$store->addSubscription( $this->newsletter, $added );
$this->newsletter->notifyPublishers(
@@ -424,11 +422,9 @@
);
}
 
-   // Check if people has been removed
+   // Check if people have been removed
if ( $removed ) {
-   foreach ( $removed as $ruId ) {
-   $store->removePublisher( $this->newsletter, 
User::newFromId( $ruId ) );
-   }
+   $store->removePublisher( $this->newsletter, $removed );
$this->newsletter->notifyPublishers(
$removed, $user, 
Newsletter::NEWSLETTER_PUBLISHERS_REMOVED
);
diff --git a/includes/NewsletterStore.php b/includes/NewsletterStore.php
index c76221d..ecedf22 100644
--- a/includes/NewsletterStore.php
+++ b/includes/NewsletterStore.php
@@ -65,28 +65,32 @@
 
/**
 * @param Newsletter $newsletter
-* @param User $user
+* @param 

[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Replace class_exists with ExtensionRegistry checks

2017-12-27 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400463 )

Change subject: Replace class_exists with ExtensionRegistry checks
..

Replace class_exists with ExtensionRegistry checks

class_exists calls with a string are dangerous, because they violate
the separation between extensions and do not reflect changes that
have been made elsewhere.

Bug: T183096
Change-Id: I8cf99e9d77f4978fe3e88d1c781c77f8b17a42e6
---
M includes/Score.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score 
refs/changes/63/400463/1

diff --git a/includes/Score.php b/includes/Score.php
index e6df438..d7f1381 100644
--- a/includes/Score.php
+++ b/includes/Score.php
@@ -266,7 +266,7 @@
$options['generate_ogg'] = array_key_exists( 'vorbis', 
$args );
 
if ( $options['generate_ogg']
-   && !class_exists( 'TimedMediaTransformOutput' )
+   && !ExtensionRegistry::getInstance()->isLoaded( 
'TimedMediaHandler' )
) {
throw new ScoreException( wfMessage( 
'score-nomediahandler' ) );
}
@@ -896,7 +896,7 @@
 */
private static function getLength( $path ) {
// File_Ogg is packaged in TimedMediaHandler
-   if ( !class_exists( 'File_Ogg' ) ) {
+   if ( !ExtensionRegistry::getInstance()->isLoaded( 
'TimedMediaHandler' ) ) {
require 'File/Ogg.php';
}
$f = new File_Ogg( $path );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cf99e9d77f4978fe3e88d1c781c77f8b17a42e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Ebe123 

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


[MediaWiki-commits] [Gerrit] mediawiki...ApprovedRevs[master]: Add methods to retrieve log and latest entry

2017-12-27 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400462 )

Change subject: Add methods to retrieve log and latest entry
..

Add methods to retrieve log and latest entry

* Need to cache instead of using multiple db queries
* Add maint script for showing log.

Change-Id: Ife3d4c1544acbd34bff27cadc6de5377ef555f68
---
M ApprovedRevs_body.php
A maintenance/ShowLog.php
2 files changed, 162 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ApprovedRevs 
refs/changes/62/400462/1

diff --git a/ApprovedRevs_body.php b/ApprovedRevs_body.php
index 9d46c68..21f0338 100644
--- a/ApprovedRevs_body.php
+++ b/ApprovedRevs_body.php
@@ -35,6 +35,63 @@
return $revID;
}
 
+/**
+ * Get the person who made the last approval (or un-approval) for this page
+ *
+ * @param Title $title page
+ * @return User
+ */
+public static function getLastApprovalUser( Title $title ) {
+$log = self::getApprovalLog( $title );
+return User::newFromID( $log->current()->user_id );
+}
+
+/**
+ * Get the date of the last entry in the approval log for this page
+ *
+ * @param Title $title page
+ * @return Timestamp
+ */
+public static function getLastApprovalDate( Title $title ) {
+$log = self::getApprovalLog( $title );
+return new MWTimestamp( $log->current()->log_timestamp );
+}
+
+/**
+ * Get the status of the last entry in the approval log for this page
+ *
+ * @param Title $title page
+ * @return Timestamp
+ */
+public static function getLastApprovalStatus( Title $title ) {
+$log = self::getApprovalLog( $title );
+return $log->current()->log_action;
+}
+
+/**
+ * Get the approval log for this page
+ *
+ * @param Title $title page
+ * @return array of elements where [ 'ts' => timestamp, 'user' => user id ]
+ */
+public static function getApprovalLog( Title $title ) {
+$dbr = wfGetDB( DB_SLAVE );
+$query = DatabaseLogEntry::getSelectQueryData();
+
+$query['conds'] = [
+'log_type' => 'approval',
+'log_title' => $title->getDBKey()
+];
+$query['options'] = [ 'ORDER BY' => 'log_timestamp desc' ];
+
+$res = $dbr->select(
+$query['tables'], $query['fields'], $query['conds'],
+__METHOD__, $query['options'], $query['join_conds']
+);
+
+return $res;
+}
+
/**
 * Returns whether or not this page has a revision ID.
 */
diff --git a/maintenance/ShowLog.php b/maintenance/ShowLog.php
new file mode 100644
index 000..75fbd78
--- /dev/null
+++ b/maintenance/ShowLog.php
@@ -0,0 +1,105 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @author Jeroen De Dauw
+ * @author Yaron Koren
+ * @ingroup Maintenance
+ */
+
+// Allow people to have different layouts.
+if ( ! isset( $IP ) ) {
+   $IP = getenv( "MW_INSTALL_PATH" )
+   ? getenv( "MW_INSTALL_PATH" )
+   : __DIR__ . '/../../../';
+}
+if ( !is_readable( "$IP/maintenance/Maintenance.php" ) ) {
+   die( "Please set MW_INSTALL_PATH to the MediaWiki installation." );
+}
+require_once "$IP/maintenance/Maintenance.php";
+
+class ShowLog extends Maintenance {
+
+   public function __construct() {
+   parent::__construct();
+
+   $this->mDescription = "Show the approval log for a page.";
+   $this->addOption( "title", "Target page.", true, true, "t" );
+   }
+
+   /**
+* Where the magic happens.
+*/
+   public function execute() {
+   $this->title = Title::newFromText( $this->getOption( "title" ) 
);
+   if ( !$this->title->exists() ) {
+   $this->error( "Title does not exist!", 1 );
+   }
+
+   $log = ApprovedRevs::getApprovalLog( $this->title );
+   if ( $log->numRows() === 0 ) {
+   $this->error(
+   "No entries in the approval log for 
[[$this->title]].", 1
+   );
+   }
+
+   $this->printHeader();
+   foreach ( $log as $row ) {
+   $this->print( $row );
+   }
+   }
+
+   protected function printHeader() {
+   $this->output(
+   "Most Recently by: "
+   . ApprovedRevs::getLastApprovalUser( $this->title )
+   . "\n"
+   );
+   $this->output(
+   "Most Recently on: "
+   . ApprovedRevs::getLastApprovalDate( $this->title )
+   . "\n"
+   );
+   $this->output(
+   "Most Recently set to: "
+   . 

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Implement basic keyboard accessibility for Query.Wikidata.org

2017-12-27 Thread Eflyjason (Code Review)
Eflyjason has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400461 )

Change subject: Implement basic keyboard accessibility for Query.Wikidata.org
..

Implement basic keyboard accessibility for Query.Wikidata.org

Ctrl/Command+Enter: Run query
Esc: Leave current input field/textarea
Alt+F: Click "Fliter" button in Query Helper
Alt+S: Click "Show" button in Query Helper
Alt+L: Click "Limit" button in Query Helper
Alt+D: Clear query
Alt+R: Restore previous query
?: Toggle Help menu
E: Show examples
F: Focus on "Fliter" button in Query Helper
S: Focus on "Show" button in Query Helper
` or ~: Focus on query textarea
l: Show language menu

Known problems: see T173213

Bug: T173213
Change-Id: I6a4315992c6509b043b8f522fb15f037b68b699f
---
M index.html
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/queryHelper/QueryHelper.js
3 files changed, 76 insertions(+), 15 deletions(-)


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

diff --git a/index.html b/index.html
index e2170ab..3065117 100644
--- a/index.html
+++ b/index.html
@@ -60,7 +60,7 @@



-   
+   
 


@@ -69,7 +69,7 @@
https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/Wikidata_Query_Help;
 target="_blank" class="btn btn-default">
 

-   
+   



@@ -102,7 +102,7 @@



-   
+   



@@ -115,14 +115,14 @@



-
+


-
+



- 

@@ -134,15 +134,15 @@



-
+



-
+



-
+



@@ -159,7 +159,7 @@


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Remove rawAndMidi from cache options

2017-12-27 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400460 )

Change subject: Remove rawAndMidi from cache options
..

Remove rawAndMidi from cache options

This was an unnecessary addition from I6a0a239b6. It is un-needed as
whenever the `midi` block is included in a ` self::CACHE_VERSION,
'LyVersion' => self::getLilypondVersion(),
];
-   // Doing this separately to not invalidate too many 
existing keys.
-   if ( $options['raw'] && ( $options['generate_ogg']
-   || ( $options['link_midi'] && 
!$options['override_midi'] )
-   ) ) {
-   $cacheOptions['rawAndMidi'] = true;
-   }
 
/* image file path and URL prefixes */
$imageCacheName = Wikimedia\base_convert( sha1( 
serialize( $cacheOptions ) ), 16, 36, 31 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56c6034834a5b706c2f897362212e0ad62314b0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Ebe123 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Unit test NewsletterDb::updateDescription

2017-12-27 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400459 )

Change subject: Unit test NewsletterDb::updateDescription
..

Unit test NewsletterDb::updateDescription

Bug: T183618
Change-Id: I295674754581bea963973083092d8d00c332e77d
---
M tests/NewsletterDbTest.php
1 file changed, 23 insertions(+), 0 deletions(-)


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

diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index 7c996aa..78c80a6 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -191,6 +191,29 @@
}
 
/**
+* @covers NewsletterDb::updateDescription
+*/
+   public function testUpdateDescription() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+   $newsletterId = $newsletter->getId();
+
+   $newDescription = 'Lorem ipsum dolor sit amet, consectetur 
adipiscing elit,'
+   . 'sed do eiusmod tempor incididunt ut labore 
et dolore magna aliqua.';
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'update' )
+   ->with(
+   'nl_newsletters',
+   [ 'nl_desc' => $newDescription ], [ 'nl_id' => 
$newsletterId ]
+   );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+   $table->updateDescription( $newsletterId, $newDescription );
+   }
+
+   /**
 * @covers NewsletterDb::deleteNewsletter
 */
public function testDeleteNewsletter() {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SyntaxHighlight_GeSHi[master]: Run Pygments using Python 3

2017-12-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400457 )

Change subject: Run Pygments using Python 3
..

Run Pygments using Python 3

Python 2 is dying, , it's time to move on.

The create_pygmentize_bundle script now requires Python 3 to run, and will
generate a bundle with a python3 shebang. Technically the bundle is still
compatible with Python 2 as long as the shebang is modified.

Bug: T182851
Change-Id: Ifb9d0abf092e2c08d9a638a7dda3bda0bc808789
---
M pygments/create_pygmentize_bundle
M pygments/pygmentize
2 files changed, 9 insertions(+), 13 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SyntaxHighlight_GeSHi 
refs/changes/57/400457/1

diff --git a/pygments/create_pygmentize_bundle 
b/pygments/create_pygmentize_bundle
index c6366a2..d69fa69 100755
--- a/pygments/create_pygmentize_bundle
+++ b/pygments/create_pygmentize_bundle
@@ -1,26 +1,22 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 """
   Create a standalone, executable 'pygmentize' bundle.
   Author: Ori Livneh
 
 """
-import sys
-reload(sys)
-sys.setdefaultencoding('utf-8')
-
 import hashlib
 import io
 import os
 import stat
 import textwrap
-import urllib2
-import xmlrpclib
+import urllib.request
+import xmlrpc.client
 import zipfile
 
 
-PYGMENTIZE_LAUNCHER = textwrap.dedent(b'''\
-  #!/usr/bin/env python
+PYGMENTIZE_LAUNCHER = textwrap.dedent('''\
+  #!/usr/bin/env python3
 
   import sys
   import pygments.cmdline
@@ -32,7 +28,7 @@
 
 
 print('Querying PyPI for the latest Pygments release...')
-pypi = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
+pypi = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
 latest_version = pypi.package_releases('Pygments')[0]
 for release in pypi.release_urls('Pygments', latest_version):
 if (release['packagetype'] == 'bdist_wheel' and
@@ -44,7 +40,7 @@
 raise RuntimeError('No suitable package found.')
 
 print('Retrieving version %s (%s)...' % (latest_version, url))
-req = urllib2.urlopen(url)
+req = urllib.request.urlopen(url)
 buf = io.BytesIO(req.read())
 
 print('Verifying...')
@@ -58,8 +54,8 @@
 data = buf.getvalue()
 script_dir = os.path.dirname(os.path.abspath(__file__))
 file_path = os.path.join(script_dir, 'pygmentize')
-with open(file_path, 'w') as f:
-f.write('#!/usr/bin/env python\n')
+with open(file_path, 'wb') as f:
+f.write(b'#!/usr/bin/env python3\n')
 f.write(data)
 
 file_st = os.stat(file_path)
diff --git a/pygments/pygmentize b/pygments/pygmentize
index 8b1e9da..b02e4c7 100755
--- a/pygments/pygmentize
+++ b/pygments/pygmentize
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb9d0abf092e2c08d9a638a7dda3bda0bc808789
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
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] operations/puppet[production]: mediawiki: Ensure Python 3 is available for Pygments

2017-12-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400458 )

Change subject: mediawiki: Ensure Python 3 is available for Pygments
..

mediawiki: Ensure Python 3 is available for Pygments

MediaWiki doesn't use the python-pygments package, it bundles its own
copy. It will soon use Python 3, so explicitly make sure it is available
on all appservers.

Bug: T182851
Change-Id: Iae4ba1a699dc1d74810efd4d7918abeb0205d4e9
---
M modules/mediawiki/manifests/packages.pp
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/400458/1

diff --git a/modules/mediawiki/manifests/packages.pp 
b/modules/mediawiki/manifests/packages.pp
index 1136abb..bb1c694 100644
--- a/modules/mediawiki/manifests/packages.pp
+++ b/modules/mediawiki/manifests/packages.pp
@@ -14,12 +14,17 @@
 
 package { [
 'python-imaging',
-'python-pygments',
 'tidy',
 ]:
 ensure => present,
 }
 
+# Pygments uses Python 3, and bundles
+# its own copy of the library.
+package { 'python3':
+  ensure => present,
+}
+
 # Pear
 package { [
 'php-pear',

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

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

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


[MediaWiki-commits] [Gerrit] labs/codesearch[master]: Set open search description in the right place

2017-12-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400456 )

Change subject: Set open search description in the right place
..

Set open search description in the right place

Whoops.

Change-Id: Idf9e55272dfdf3eb626bf29f4a630f0fcb6f18ae
---
M app.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/codesearch 
refs/changes/56/400456/1

diff --git a/app.py b/app.py
index 3888262..b7cac9e 100644
--- a/app.py
+++ b/app.py
@@ -107,7 +107,7 @@
 
-""" % url_for('opensearch', backend=backend, description=DESCRIPTIONS[backend])
+""" % url_for('opensearch', backend=backend)
 
 def mangle(text):
 text = text.replace('', '' + header)
@@ -122,7 +122,8 @@
 def opensearch(backend):
 if backend not in BACKENDS:
 return 'invalid backend'
-temp = render_template('open_search.xml', backend=backend)
+temp = render_template('open_search.xml', backend=backend,
+   description=DESCRIPTIONS[backend])
 return Response(temp, content_type='text/xml')
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf9e55272dfdf3eb626bf29f4a630f0fcb6f18ae
Gerrit-PatchSet: 1
Gerrit-Project: labs/codesearch
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] labs/codesearch[master]: Set open search description in the right place

2017-12-27 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400456 )

Change subject: Set open search description in the right place
..


Set open search description in the right place

Whoops.

Change-Id: Idf9e55272dfdf3eb626bf29f4a630f0fcb6f18ae
---
M app.py
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/app.py b/app.py
index 3888262..b7cac9e 100644
--- a/app.py
+++ b/app.py
@@ -107,7 +107,7 @@
 
-""" % url_for('opensearch', backend=backend, description=DESCRIPTIONS[backend])
+""" % url_for('opensearch', backend=backend)
 
 def mangle(text):
 text = text.replace('', '' + header)
@@ -122,7 +122,8 @@
 def opensearch(backend):
 if backend not in BACKENDS:
 return 'invalid backend'
-temp = render_template('open_search.xml', backend=backend)
+temp = render_template('open_search.xml', backend=backend,
+   description=DESCRIPTIONS[backend])
 return Response(temp, content_type='text/xml')
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf9e55272dfdf3eb626bf29f4a630f0fcb6f18ae
Gerrit-PatchSet: 1
Gerrit-Project: labs/codesearch
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] labs/codesearch[master]: Fix broken open search links

2017-12-27 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400455 )

Change subject: Fix broken open search links
..


Fix broken open search links

We need to rewrite the URLs and names in open_search.xml, and since it's
a small XML file we might as well just replace it with our own entirely.

Each backend will have its own open_search.xml endpoint, with identical
 but unique .

Bug: T183728
Change-Id: I1b84db58d0c28f5305ae0d376bef707a63ebf87b
---
M app.py
A templates/open_search.xml
2 files changed, 43 insertions(+), 7 deletions(-)

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



diff --git a/app.py b/app.py
index 029b9bd..3888262 100644
--- a/app.py
+++ b/app.py
@@ -18,9 +18,10 @@
 """
 
 from flask import Flask, Response, request, redirect, url_for, \
-send_from_directory
+send_from_directory, render_template
 
 import os
+import re
 import requests
 import traceback
 
@@ -33,6 +34,15 @@
 'things': 6083,
 'core': 6084,
 }
+DESCRIPTIONS = {
+'search': 'Everything',
+'core': 'MediaWiki core',
+'extensions': 'Extensions',
+'skins': 'Skins',
+'things': 'Extensions & skins',
+}
+
+LINK_OPENSEARCH = re.compile('', flags=re.DOTALL)
 
 
 @app.route('/favicon.ico')
@@ -44,7 +54,8 @@
 mimetype='image/vnd.microsoft.icon')
 
 
-def index_url(target, text, current):
+def index_url(target, current):
+text = DESCRIPTIONS[target]
 if target == current:
 return '%s' % text
 else:
@@ -74,11 +85,11 @@
 {things}
 
 """.format(
-search=index_url('search', 'Everything', backend),
-core=index_url('core', 'MediaWiki core', backend),
-ext=index_url('extensions', 'Extensions', backend),
-skins=index_url('skins', 'Skins', backend),
-things=index_url('things', 'Extensions & skins', backend)
+search=index_url('search', backend),
+core=index_url('core', backend),
+ext=index_url('extensions', backend),
+skins=index_url('skins', backend),
+things=index_url('things', backend)
 )
 title = 'MediaWiki code search'
 
@@ -92,14 +103,29 @@
 
 """
 
+opensearch_link = """
+
+""" % url_for('opensearch', backend=backend, description=DESCRIPTIONS[backend])
+
 def mangle(text):
 text = text.replace('', '' + header)
 text = text.replace('', footer + '')
 text = text.replace('Hound', title)
+text = LINK_OPENSEARCH.sub(opensearch_link, text)
 return text
 return proxy(backend, mangle=mangle)
 
 
+@app.route('//open_search.xml')
+def opensearch(backend):
+if backend not in BACKENDS:
+return 'invalid backend'
+temp = render_template('open_search.xml', backend=backend)
+return Response(temp, content_type='text/xml')
+
+
 @app.route('//')
 def proxy(backend, path='', mangle=False):
 if backend not in BACKENDS:
diff --git a/templates/open_search.xml b/templates/open_search.xml
new file mode 100644
index 000..b8b16e8
--- /dev/null
+++ b/templates/open_search.xml
@@ -0,0 +1,10 @@
+
+
+http://a9.com/-/spec/opensearch/1.1/;>
+MediaWiki code search
+Search MediaWiki code ({{description}})
+mediawiki
+https://codesearch.wmflabs.org/{{ backend 
}}/?q={searchTerms}" />
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b84db58d0c28f5305ae0d376bef707a63ebf87b
Gerrit-PatchSet: 1
Gerrit-Project: labs/codesearch
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] labs/codesearch[master]: Add tox configuration, fix flake8 issues

2017-12-27 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/400454 )

Change subject: Add tox configuration, fix flake8 issues
..


Add tox configuration, fix flake8 issues

Change-Id: I0cac5e3df742c0004c21cb069d083e68f81e3ad2
---
M app.py
A tox.ini
2 files changed, 20 insertions(+), 2 deletions(-)

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



diff --git a/app.py b/app.py
index 9a32637..029b9bd 100644
--- a/app.py
+++ b/app.py
@@ -17,7 +17,8 @@
 along with this program.  If not, see .
 """
 
-from flask import Flask, Response, request, redirect, url_for, 
send_from_directory
+from flask import Flask, Response, request, redirect, url_for, \
+send_from_directory
 
 import os
 import requests
@@ -118,7 +119,9 @@
 """
 resp += traceback.format_exc()
 return Response(resp, 503, mimetype='text/plain')
-excluded_headers = ['content-encoding', 'content-length', 
'transfer-encoding', 'connection']
+excluded_headers = [
+'content-encoding', 'content-length', 'transfer-encoding', 'connection'
+]
 headers = [(name, value) for (name, value) in r.raw.headers.items()
if name.lower() not in excluded_headers]
 if mangle:
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..93683f8
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,15 @@
+[tox]
+
+# Ensure 1.6+ is used to support 'skipsdist'
+minversion = 1.6
+
+# Do not run install command
+skipsdist = True
+
+# Environements to execute when invoking 'tox'
+envlist = flake8
+
+[testenv:flake8]
+commands = flake8
+deps = flake8
+basepython = python3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cac5e3df742c0004c21cb069d083e68f81e3ad2
Gerrit-PatchSet: 1
Gerrit-Project: labs/codesearch
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] labs/codesearch[master]: Add tox configuration, fix flake8 issues

2017-12-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400454 )

Change subject: Add tox configuration, fix flake8 issues
..

Add tox configuration, fix flake8 issues

Change-Id: I0cac5e3df742c0004c21cb069d083e68f81e3ad2
---
M app.py
A tox.ini
2 files changed, 20 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/codesearch 
refs/changes/54/400454/1

diff --git a/app.py b/app.py
index 9a32637..029b9bd 100644
--- a/app.py
+++ b/app.py
@@ -17,7 +17,8 @@
 along with this program.  If not, see .
 """
 
-from flask import Flask, Response, request, redirect, url_for, 
send_from_directory
+from flask import Flask, Response, request, redirect, url_for, \
+send_from_directory
 
 import os
 import requests
@@ -118,7 +119,9 @@
 """
 resp += traceback.format_exc()
 return Response(resp, 503, mimetype='text/plain')
-excluded_headers = ['content-encoding', 'content-length', 
'transfer-encoding', 'connection']
+excluded_headers = [
+'content-encoding', 'content-length', 'transfer-encoding', 'connection'
+]
 headers = [(name, value) for (name, value) in r.raw.headers.items()
if name.lower() not in excluded_headers]
 if mangle:
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000..93683f8
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,15 @@
+[tox]
+
+# Ensure 1.6+ is used to support 'skipsdist'
+minversion = 1.6
+
+# Do not run install command
+skipsdist = True
+
+# Environements to execute when invoking 'tox'
+envlist = flake8
+
+[testenv:flake8]
+commands = flake8
+deps = flake8
+basepython = python3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cac5e3df742c0004c21cb069d083e68f81e3ad2
Gerrit-PatchSet: 1
Gerrit-Project: labs/codesearch
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] labs/codesearch[master]: Fix broken open search links

2017-12-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400455 )

Change subject: Fix broken open search links
..

Fix broken open search links

We need to rewrite the URLs and names in open_search.xml, and since it's
a small XML file we might as well just replace it with our own entirely.

Each backend will have its own open_search.xml endpoint, with identical
 but unique .

Bug: T183728
Change-Id: I1b84db58d0c28f5305ae0d376bef707a63ebf87b
---
M app.py
A templates/open_search.xml
2 files changed, 43 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/codesearch 
refs/changes/55/400455/1

diff --git a/app.py b/app.py
index 029b9bd..3888262 100644
--- a/app.py
+++ b/app.py
@@ -18,9 +18,10 @@
 """
 
 from flask import Flask, Response, request, redirect, url_for, \
-send_from_directory
+send_from_directory, render_template
 
 import os
+import re
 import requests
 import traceback
 
@@ -33,6 +34,15 @@
 'things': 6083,
 'core': 6084,
 }
+DESCRIPTIONS = {
+'search': 'Everything',
+'core': 'MediaWiki core',
+'extensions': 'Extensions',
+'skins': 'Skins',
+'things': 'Extensions & skins',
+}
+
+LINK_OPENSEARCH = re.compile('', flags=re.DOTALL)
 
 
 @app.route('/favicon.ico')
@@ -44,7 +54,8 @@
 mimetype='image/vnd.microsoft.icon')
 
 
-def index_url(target, text, current):
+def index_url(target, current):
+text = DESCRIPTIONS[target]
 if target == current:
 return '%s' % text
 else:
@@ -74,11 +85,11 @@
 {things}
 
 """.format(
-search=index_url('search', 'Everything', backend),
-core=index_url('core', 'MediaWiki core', backend),
-ext=index_url('extensions', 'Extensions', backend),
-skins=index_url('skins', 'Skins', backend),
-things=index_url('things', 'Extensions & skins', backend)
+search=index_url('search', backend),
+core=index_url('core', backend),
+ext=index_url('extensions', backend),
+skins=index_url('skins', backend),
+things=index_url('things', backend)
 )
 title = 'MediaWiki code search'
 
@@ -92,14 +103,29 @@
 
 """
 
+opensearch_link = """
+
+""" % url_for('opensearch', backend=backend, description=DESCRIPTIONS[backend])
+
 def mangle(text):
 text = text.replace('', '' + header)
 text = text.replace('', footer + '')
 text = text.replace('Hound', title)
+text = LINK_OPENSEARCH.sub(opensearch_link, text)
 return text
 return proxy(backend, mangle=mangle)
 
 
+@app.route('//open_search.xml')
+def opensearch(backend):
+if backend not in BACKENDS:
+return 'invalid backend'
+temp = render_template('open_search.xml', backend=backend)
+return Response(temp, content_type='text/xml')
+
+
 @app.route('//')
 def proxy(backend, path='', mangle=False):
 if backend not in BACKENDS:
diff --git a/templates/open_search.xml b/templates/open_search.xml
new file mode 100644
index 000..b8b16e8
--- /dev/null
+++ b/templates/open_search.xml
@@ -0,0 +1,10 @@
+
+
+http://a9.com/-/spec/opensearch/1.1/;>
+MediaWiki code search
+Search MediaWiki code ({{description}})
+mediawiki
+https://codesearch.wmflabs.org/{{ backend 
}}/?q={searchTerms}" />
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b84db58d0c28f5305ae0d376bef707a63ebf87b
Gerrit-PatchSet: 1
Gerrit-Project: labs/codesearch
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...Auth_remoteuser[master]: Add a label to the logout link, which is otherwise presented...

2017-12-27 Thread Boboivancich (Code Review)
Boboivancich has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400453 )

Change subject: Add a label to the logout link, which is otherwise presented as 
<0> in MW 1.29 when UserSwitch is not allowed
..

Add a label to the logout link, which is otherwise presented as <0> in MW 1.29 
when UserSwitch is not allowed

Change-Id: If46f0b2a53322bd9d6f65683dd76b2e3d5e0e6b0
---
M src/UserNameSessionProvider.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Auth_remoteuser 
refs/changes/53/400453/1

diff --git a/src/UserNameSessionProvider.php b/src/UserNameSessionProvider.php
index b0be25e..3ab4787 100644
--- a/src/UserNameSessionProvider.php
+++ b/src/UserNameSessionProvider.php
@@ -519,6 +519,7 @@
$url = 
$internal->getLinkURL();
}
$personalurls[ 'logout' ][ 
'href' ] = $url;
+   $personalurls[ 'logout' ][ 
'text' ] = wfMessage( 'logout' )->text();
return true;
}
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If46f0b2a53322bd9d6f65683dd76b2e3d5e0e6b0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Auth_remoteuser
Gerrit-Branch: master
Gerrit-Owner: Boboivancich 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Support long titles in selected source page

2017-12-27 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400452 )

Change subject: Support long titles in selected source page
..

Support long titles in selected source page

- When the title is longer than 60, reduce the font size to 16px.
- Make sure there is padding around the selected page detail info.
- Don't use ellipsis to truncate language codes. Only truncate full,
autonym language names.
- Reduce smallest supported width for modal selected source page dialog,
from 375px to 320px. Make dialog width more uniform on 700px-1500px range.
- Hide discard button on selected source page for screens below 500px.
- Remove language filter duplicate code in ext.cx.lists.common.less

Bug: T181701
Change-Id: I69b8a541b32f4ccd81eef110086dc6cb43899d41
---
M modules/dashboard/styles/ext.cx.lists.common.less
M modules/source/ext.cx.SelectedSourcePage.js
M modules/source/styles/ext.cx.SelectedSourcePage.less
M modules/ui/styles/mw.cx.ui.LanguageFilter.less
4 files changed, 46 insertions(+), 111 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/52/400452/1

diff --git a/modules/dashboard/styles/ext.cx.lists.common.less 
b/modules/dashboard/styles/ext.cx.lists.common.less
index 1497887..9a40089 100644
--- a/modules/dashboard/styles/ext.cx.lists.common.less
+++ b/modules/dashboard/styles/ext.cx.lists.common.less
@@ -43,97 +43,14 @@
 
.flex-center-justify;
 
-   .translation-language-filter {
-   background-color: @colorGray15;
-   .box-sizing( border-box );
-   max-width: 33.33%;
-   max-height: 34px;
-   border: 1px solid @colorGray10;
-   border-radius: @borderRadius;
-   padding: 0;
+   > span {
+   min-width: 0;
+   overflow-wrap: break-word;
+   word-wrap: break-word;
+   }
 
-   .flex-display( box ); // Support 2009 syntax
-   .flex-display;
-
-   .translation-language-source-container,
-   .translation-language-target-container {
-   position: relative;
-   .box-sizing( border-box );
-   cursor: pointer;
-
-   .flex-item;
-   overflow: hidden;
-   }
-
-   .translation-language-source-container {
-   margin-right: -8px;
-   padding-right: 8px;
-   }
-
-   .translation-language-target-container {
-   margin-left: -8px;
-   padding-left: 8px;
-   }
-
-   .translation-source-language-filter,
-   .translation-target-language-filter {
-   background-color: @colorGray15;
-   color: @colorGray2;
-   font-size: 16px;
-   line-height: 1;
-
-   @media only screen and ( min-width: @narrow ) {
-   overflow: hidden;
-   text-overflow: ellipsis;
-   }
-   white-space: nowrap;
-   }
-
-   .translation-source-language-filter {
-   padding: 8px 12px 8px 16px;
-   }
-
-   .translation-target-language-filter {
-   padding: 8px 16px 8px 12px;
-   }
-
-   .translation-language-arrow {
-   position: relative;
-   width: 0;
-   height: 32px;
-   margin-right: 16px;
-   }
-
-   .translation-language-arrow:after,
-   .translation-language-arrow:before {
-   content: ' ';
-
-   position: absolute;
-   top: 50%;
-   left: 100%;
-
-   width: 0;
-   height: 0;
-   border: solid transparent;
-
-   pointer-events: none;
-   }
-
-   .translation-language-arrow:after {
-   margin-top: -16px;
-   border-color: rgba( 255, 255, 255, 0 );
-   border-left-color: @colorGray15;
-   border-width: 16px;
-   border-left-width: 12px;
-   }
-
-   .translation-language-arrow:before {
-   margin-top: -17px;
-   border-color: rgba( 157, 157, 157, 0 );
-   border-left-color: @colorGray10;
-   border-width: 17px;
-   border-left-width: 13px;
-   }
+   .cx-language-filter {
+   margin-left: 8px;
}
 }
 
diff 

[MediaWiki-commits] [Gerrit] mediawiki...Challenge[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I4a1fef16172e7c673eac5edef8d6e1e039cc01da
---
M includes/Challenge.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/Challenge.hooks.php b/includes/Challenge.hooks.php
index 0464d0c..ef7ebe5 100644
--- a/includes/Challenge.hooks.php
+++ b/includes/Challenge.hooks.php
@@ -24,9 +24,9 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 'challenge', 
"{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'challenge_rate', "{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'challenge_user_record', "{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'challenge', "{$dir}/{$filename}" 
);
+   $updater->addExtensionTable( 'challenge_rate', 
"{$dir}/{$filename}" );
+   $updater->addExtensionTable( 'challenge_user_record', 
"{$dir}/{$filename}" );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a1fef16172e7c673eac5edef8d6e1e039cc01da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Challenge
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...WikiForum[master]: Use newer DatabaseUpdater functions

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

Change subject: Use newer DatabaseUpdater functions
..


Use newer DatabaseUpdater functions

Change-Id: I4fc1eb956f78917ca6fd832c5c21a8fd5d3ec57e
---
M includes/WikiForum.hooks.php
1 file changed, 34 insertions(+), 34 deletions(-)

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



diff --git a/includes/WikiForum.hooks.php b/includes/WikiForum.hooks.php
index e622948..4f8c9ad 100644
--- a/includes/WikiForum.hooks.php
+++ b/includes/WikiForum.hooks.php
@@ -109,57 +109,57 @@
$dir = dirname( __FILE__ ) . '/../sql';
$file = "$dir/wikiforum.sql";
 
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_category', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_forums', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_threads', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_replies', $file, true ) );
+   $updater->addExtensionTable( 'wikiforum_category', $file );
+   $updater->addExtensionTable( 'wikiforum_forums', $file );
+   $updater->addExtensionTable( 'wikiforum_threads', $file );
+   $updater->addExtensionTable( 'wikiforum_replies', $file );
 
// upgrade from pre 1.3.0-SW
if ( !$updater->getDB()->fieldExists( 'wikiforum_category', 
'wfc_added_user_ip' ) ) {
$file = $dir . '/1.3.0-SW-new-fields.sql';
// wikiforum_category
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_category', 'wfc_added_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_category', 'wfc_edited_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_category', 
'wfc_added_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_category', 
'wfc_edited_user_ip', $file );
// wikiforum_forums
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_forums', 'wff_last_post_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_forums', 'wff_added_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_forums', 'wff_edited_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_forums', 
'wff_last_post_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_forums', 
'wff_added_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_forums', 
'wff_edited_user_ip', $file );
// wikiforum_threads
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_edit_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_closed_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_last_post_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_edit_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_closed_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_last_post_user_ip', $file );
// wikiforum_replies
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_replies', 'wfr_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_replies', 'wfr_edit_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_replies', 
'wfr_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_replies', 
'wfr_edit_user_ip', $file );
}
 
// Upgrade from post 1.3.0-SW and pre 2.0.0
else if ( $updater->getDB()->fieldExists( 'wikiforum_category', 
'wfc_added_user_user_text' ) ) {
$file = $dir . '/2.0.0-drop-fields.sql';
// wikiforum_category
-   $updater->addExtensionUpdate( array( 'dropField', 
'wikiforum_category', 'wfc_added_user_text', $file, true ) );
-   

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Fix handling of alternative if in IfElseStructureSniff

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

Change subject: Fix handling of alternative if in IfElseStructureSniff
..


Fix handling of alternative if in IfElseStructureSniff

Use scope opener to look for colon (:) or curly bracket ({) as opener.

This sniff can lead to invalid php when running "composer fix"
for a file using alternative syntax.

Bug: T178772
Change-Id: Ib851016c87dfbba4c2ddc310c67daa5ab4df2536
---
M MediaWiki/Sniffs/ControlStructures/IfElseStructureSniff.php
M MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
M MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
M MediaWiki/Tests/files/ControlStructures/if_else_structure.php
M MediaWiki/Tests/files/ControlStructures/if_else_structure.php.expect
M MediaWiki/Tests/files/ControlStructures/if_else_structure.php.fixed
6 files changed, 75 insertions(+), 9 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, but someone else must approve



diff --git a/MediaWiki/Sniffs/ControlStructures/IfElseStructureSniff.php 
b/MediaWiki/Sniffs/ControlStructures/IfElseStructureSniff.php
index db710d3..4a593f3 100644
--- a/MediaWiki/Sniffs/ControlStructures/IfElseStructureSniff.php
+++ b/MediaWiki/Sniffs/ControlStructures/IfElseStructureSniff.php
@@ -32,10 +32,14 @@
$tokens = $phpcsFile->getTokens();
$prevToken = $tokens[$stackPtr - 1];
$nextToken = $tokens[$stackPtr + 1];
+   $scopeOpener = $tokens[$stackPtr]['scope_opener'];
+   $isAlternativeIfSyntax = $tokens[$scopeOpener]['code'] === 
T_COLON;
 
// single space expected before else and elseif structure
-   if ( $prevToken['code'] !== T_WHITESPACE
-   || $prevToken['content'] !== " " ) {
+   if ( !$isAlternativeIfSyntax &&
+   ( $prevToken['code'] !== T_WHITESPACE
+   || $prevToken['content'] !== " " )
+   ) {
$fix = $phpcsFile->addFixableWarning(
'Single space expected before "%s"',
$stackPtr + 1,
@@ -59,8 +63,10 @@
return;
}
// single space expected after else structure
-   if ( $nextToken['code'] !== T_WHITESPACE
-   || $nextToken['content'] !== " " ) {
+   if ( !$isAlternativeIfSyntax &&
+   ( $nextToken['code'] !== T_WHITESPACE
+   || $nextToken['content'] !== " " )
+   ) {
$fix = $phpcsFile->addFixableWarning(
'Single space expected after "%s"',
$stackPtr + 1,
@@ -79,5 +85,23 @@
}
}
}
+   // no space expected after else structure, when it is 
alternative syntax
+   if ( $isAlternativeIfSyntax
+   && $nextToken['code'] === T_WHITESPACE
+   ) {
+   $fix = $phpcsFile->addFixableWarning(
+   'No space expected after "%s"',
+   $stackPtr + 1,
+   'SpaceAfterElse',
+   [ $tokens[$stackPtr]['content'] ]
+   );
+   if ( $fix === true ) {
+   // Replace all after whitespace with no space
+   $phpcsFile->fixer->replaceToken( $stackPtr + 1, 
'' );
+   for ( $i = 2; $tokens[$stackPtr + $i]['code'] 
=== T_WHITESPACE; $i++ ) {
+   $phpcsFile->fixer->replaceToken( 
$stackPtr + $i, '' );
+   }
+   }
+   }
}
 }
diff --git a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
index a957cfa..5b22aeb 100644
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
+++ b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php
@@ -21,6 +21,10 @@
 
if ( $x < 2 ):
echo $x;
+   elseif ( $x > 10 ):
+   echo $i;
+   else:
+   echo $x . $i;
endif;
 
switch ( $x ):
diff --git 
a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect 
b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
index c036217..0613a00 100644
--- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
+++ b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php.expect
@@ -7,11 +7,11 @@
  18 | WARNING | Alternative syntax such 

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Skip inner functions in FunctionCommentSniff::processReturn

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

Change subject: Skip inner functions in FunctionCommentSniff::processReturn
..


Skip inner functions in FunctionCommentSniff::processReturn

A return inside an inner function should not result
in need of @return doc for the outer function.
It still results in the need for a @return on
the doc comment of the inner function

Bug: T178243
Change-Id: If42238281c398cf14b834a40b972993f1c32f194
---
M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
M MediaWiki/Tests/files/Commenting/commenting_function.php
M MediaWiki/Tests/files/Commenting/commenting_function.php.expect
M MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
4 files changed, 88 insertions(+), 76 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, but someone else must approve



diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php 
b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
index b3c7802..e04f395 100644
--- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
+++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
@@ -193,9 +193,9 @@
$found = false;
for ( $i = $stackPtr + 1; $i < $endFunction; $i++ ) {
$token = $tokens[$i];
-   if ( $token['code'] === T_CLOSURE ) {
-   // Skip to the end of the closure and continue
-   $i = $tokens[$i]['scope_closer'];
+   if ( $token['code'] === T_CLOSURE || $token['code'] === 
T_FUNCTION ) {
+   // Skip to the end of the closure/inner 
function and continue
+   $i = $token['scope_closer'];
continue;
}
if ( $token['code'] === T_RETURN ) {
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php 
b/MediaWiki/Tests/files/Commenting/commenting_function.php
index b0a446d..f06a9e0 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php
@@ -52,6 +52,11 @@
$a = function () {
return '';
};
+   function b( $c ) {
+   return $c;
+   }
+
+   b( $a );
 
return $a();
}
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect 
b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
index 67d5a66..b7552aa 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect
@@ -19,162 +19,164 @@
  |   | (MediaWiki.Commenting.FunctionComment.NotShortIntReturn)
   50 | ERROR | [ ] Missing @return tag in function comment
  |   | (MediaWiki.Commenting.FunctionComment.MissingReturn)
-  60 | ERROR | [ ] Missing parameter comment
+  55 | ERROR | [ ] Missing function doc comment
+ |   | 
(MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic)
+  65 | ERROR | [ ] Missing parameter comment
  |   | (MediaWiki.Commenting.FunctionComment.MissingParamComment)
-  60 | ERROR | [x] Short type of "bool" should be used for @param tag
+  65 | ERROR | [x] Short type of "bool" should be used for @param tag
  |   | (MediaWiki.Commenting.FunctionComment.NotShortBoolParam)
-  61 | ERROR | [ ] Missing parameter comment
+  66 | ERROR | [ ] Missing parameter comment
  |   | (MediaWiki.Commenting.FunctionComment.MissingParamComment)
-  61 | ERROR | [x] Short type of "int" should be used for @param tag
+  66 | ERROR | [x] Short type of "int" should be used for @param tag
  |   | (MediaWiki.Commenting.FunctionComment.NotShortIntParam)
-  62 | ERROR | [x] Short type of "bool" should be used for @return
+  67 | ERROR | [x] Short type of "bool" should be used for @return
  |   | tag
  |   | (MediaWiki.Commenting.FunctionComment.NotShortBoolReturn)
-  69 | ERROR | [x] Short type of "bool[]" should be used for @param
+  74 | ERROR | [x] Short type of "bool[]" should be used for @param
  |   | tag
  |   | 
(MediaWiki.Commenting.FunctionComment.NotShortBoolArrayParam)
-  70 | ERROR | [x] Short type of "int[]" should be used for @param
+  75 | ERROR | [x] Short type of "int[]" should be used for @param
  |   | tag
  |   | (MediaWiki.Commenting.FunctionComment.NotShortIntArrayParam)
-  71 | ERROR | [x] Short type of "bool[]" should be used for @return
+  76 | ERROR | [x] Short type of "bool[]" should be used for @return
  |   | tag
  |   | 

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Improve visual hierarchy on Newsletter page

2017-12-27 Thread Albert221 (Code Review)
Albert221 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400451 )

Change subject: Improve visual hierarchy on Newsletter page
..

Improve visual hierarchy on Newsletter page

Bug: T180982
Change-Id: If9d895cac49c3a245997af370ddaa860a35ece4c
---
M extension.json
M i18n/en.json
M includes/content/NewsletterContent.php
A modules/ext.newsletter.newsletter.styles.css
4 files changed, 35 insertions(+), 48 deletions(-)


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

diff --git a/extension.json b/extension.json
index 484af1d..7216f5a 100644
--- a/extension.json
+++ b/extension.json
@@ -121,6 +121,10 @@
"ext.newsletter.newsletters.styles": {
"position": "top",
"styles": "ext.newsletter.newsletters.styles.css"
+   },
+   "ext.newsletter.newsletter.styles": {
+   "position": "top",
+   "styles": "ext.newsletter.newsletter.styles.css"
}
},
"ResourceFileModulePaths": {
diff --git a/i18n/en.json b/i18n/en.json
index 35df6a4..4cad01f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -40,7 +40,7 @@
"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-mainpage": "Main page:",
+   "newsletter-view-mainpage": "Newsletter main page:",
"newsletter-view-description": "Description:",
"newsletter-view-publishers": "{{PLURAL:$1|Publisher:|Publishers:}}",
"newsletter-view-subscriber-count": "Subscriber count:",
diff --git a/includes/content/NewsletterContent.php 
b/includes/content/NewsletterContent.php
index 831b337..54ae631 100644
--- a/includes/content/NewsletterContent.php
+++ b/includes/content/NewsletterContent.php
@@ -142,6 +142,8 @@
$generateHtml,
ParserOutput &$output
) {
+   $output->addModuleStyles( 'ext.newsletter.newsletter.styles' );
+
if ( $generateHtml ) {
$this->newsletter = Newsletter::newFromName( 
$title->getText() );
// Make sure things are decoded at this point
@@ -152,18 +154,20 @@
$mainTitle = $this->mainPage;
 
$fields = [
-   'mainpage' => [
-   'type' => 'info',
-   'label-message' => 
'newsletter-view-mainpage',
-   'default' => 
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink( $mainTitle ),
-   'raw' => true,
-   ],
'description' => [
'type' => 'info',
'label-message' => 
'newsletter-view-description',
'default' => $this->description,
+   'cssclass' => 
'newsletter-headered-element',
'rows' => 6,
'readonly' => true,
+   ],
+   'mainpage' => [
+   'type' => 'info',
+   'label-message' => 
'newsletter-view-mainpage',
+   'default' => 
MediaWikiServices::getInstance()->getLinkRenderer()->makeLink( $mainTitle ),
+   'cssclass' => 
'newsletter-headered-element',
+   'raw' => true,
],
'publishers' => [
'type' => 'info',
@@ -171,12 +175,14 @@
$options->getUserLangObj() )
->numParams( count( 
$this->publishers ) )
->text(),
+   'cssclass' => 
'newsletter-headered-element',
],
'subscribers' => [
'type' => 'info',
'label-message' => 
'newsletter-view-subscriber-count',
'default' => !$this->newsletter ? 0 : 
$options->getUserLangObj()->formatNum(

$this->newsletter->getSubscribersCount() ),
+ 

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Rework ExtendClassUageSniff to avoid private class member

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

Change subject: Rework ExtendClassUageSniff to avoid private class member
..


Rework ExtendClassUageSniff to avoid private class member

Class member are unreliable in PHPCS 3.0+ and should be avoided.

Instead of register individual token to process,
a loop was added to jump from token to the next token.
The private member are now local variables inside the process.

Bug: T179753
Change-Id: Ic5def61874c9d583aa213328df8156076ad55648
---
M MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
1 file changed, 45 insertions(+), 65 deletions(-)

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



diff --git a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php 
b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
index 6881351..f514811 100644
--- a/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
+++ b/MediaWiki/Sniffs/Usage/ExtendClassUsageSniff.php
@@ -13,10 +13,6 @@
 
 class ExtendClassUsageSniff implements Sniff {
 
-   private $eligableCls = null;
-
-   private $eligableFunc = null;
-
public static $msgMap = [
T_FUNCTION => 'function',
T_VARIABLE => 'variable'
@@ -65,11 +61,7 @@
 */
public function register() {
return [
-   T_CLASS,
-   T_EXTENDS,
-   T_FUNCTION,
-   T_VARIABLE,
-   T_STRING
+   T_CLASS
];
}
 
@@ -82,67 +74,58 @@
$tokens = $phpcsFile->getTokens();
$currToken = $tokens[$stackPtr];
 
-   if ( $currToken['code'] === T_CLASS ) {
-   $extendsPtr = $phpcsFile->findNext( T_EXTENDS, 
$stackPtr );
-   if ( $extendsPtr === false ) {
-   // No extends token found
-   return;
-   }
-   $baseClsPtr = $phpcsFile->findNext( T_STRING, 
$extendsPtr );
-   $extClsContent = $tokens[$baseClsPtr]['content'];
-   // Here should be replaced with a mechanism that check 
if
-   // the base class is in the list of restricted classes
-   if ( !isset( 
self::$checkConfig['extendsCls'][$extClsContent] ) ) {
-   return;
-   } else {
-   // Retrieve class name.
-   $classNamePtr = $phpcsFile->findNext( T_STRING, 
$stackPtr );
-   $this->eligableCls = [
-   'name' => 
$tokens[$classNamePtr]['content'],
-   'extendsCls' => $extClsContent,
-   'scope_start' => 
$currToken['scope_opener'],
-   'scope_end' => 
$currToken['scope_closer']
-   ];
-   }
+   $extendsPtr = $phpcsFile->findNext( T_EXTENDS, $stackPtr );
+   if ( $extendsPtr === false ) {
+   // No extends token found
+   return;
}
-
-   if ( !empty( $this->eligableCls )
-   && $stackPtr > $this->eligableCls['scope_start']
-   && $stackPtr < $this->eligableCls['scope_end']
-   ) {
-   if ( $currToken['code'] === T_FUNCTION ) {
+   $baseClsPtr = $phpcsFile->findNext( T_STRING, $extendsPtr );
+   $extClsContent = $tokens[$baseClsPtr]['content'];
+   // Here should be replaced with a mechanism that check if
+   // the base class is in the list of restricted classes
+   if ( !isset( self::$checkConfig['extendsCls'][$extClsContent] ) 
) {
+   return;
+   }
+   $extClsCheckList = self::$checkConfig['checkList'][ 
$extClsContent ];
+   // Loop over all tokens of the class to check each function
+   $i = $currToken['scope_opener'];
+   $end = $currToken['scope_closer'];
+   $eligableFunc = null;
+   while ( $i !== false && $i < $end ) {
+   $iToken = $tokens[$i];
+   if ( $iToken['code'] === T_FUNCTION ) {
+   $eligableFunc = null;
// If this is a function, make sure it's 
eligible
// (i.e. not static or abstract, and has a 
body).
-   $methodProps = $phpcsFile->getMethodProperties( 
$stackPtr );
+   $methodProps = $phpcsFile->getMethodProperties( 
$i );

[MediaWiki-commits] [Gerrit] mediawiki...Challenge[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400450 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I4a1fef16172e7c673eac5edef8d6e1e039cc01da
---
M includes/Challenge.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/Challenge.hooks.php b/includes/Challenge.hooks.php
index 0464d0c..ef7ebe5 100644
--- a/includes/Challenge.hooks.php
+++ b/includes/Challenge.hooks.php
@@ -24,9 +24,9 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 'challenge', 
"{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'challenge_rate', "{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'challenge_user_record', "{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'challenge', "{$dir}/{$filename}" 
);
+   $updater->addExtensionTable( 'challenge_rate', 
"{$dir}/{$filename}" );
+   $updater->addExtensionTable( 'challenge_user_record', 
"{$dir}/{$filename}" );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a1fef16172e7c673eac5edef8d6e1e039cc01da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Challenge
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Register QuestyCaptcha class ealier in unit tests

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

Change subject: Register QuestyCaptcha class ealier in unit tests
..


Register QuestyCaptcha class ealier in unit tests

The captchas in production are registered conditional, in tests the
class needs to be added to the autoloader.
Moved this register up to setUp to detect the existing @covers correctly
by the new testValidCovers from
I1d564bcae2bfbedb004c440b90db6341148ed4ba

Change-Id: I79f225126d7bbbfd436ab165bb98a0ed9517b8bc
---
M tests/phpunit/QuestyCaptchaTest.php
1 file changed, 10 insertions(+), 4 deletions(-)

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



diff --git a/tests/phpunit/QuestyCaptchaTest.php 
b/tests/phpunit/QuestyCaptchaTest.php
index dada668..5a9480a 100644
--- a/tests/phpunit/QuestyCaptchaTest.php
+++ b/tests/phpunit/QuestyCaptchaTest.php
@@ -1,6 +1,16 @@
 mergeMwGlobalArrayValue(
+   'wgAutoloadClasses',
+   [ 'QuestyCaptcha' => __DIR__ . 
'/../../QuestyCaptcha/QuestyCaptcha.class.php' ]
+   );
+   }
+
/**
 * @covers QuestyCaptcha::getCaptcha
 * @dataProvider provideGetCaptcha
@@ -11,10 +21,6 @@
$GLOBALS['wgCaptchaQuestions'] = [];
}
$this->setMwGlobals( 'wgCaptchaQuestions', $config );
-   $this->mergeMwGlobalArrayValue(
-   'wgAutoloadClasses',
-   [ 'QuestyCaptcha' => __DIR__ . 
'/../../QuestyCaptcha/QuestyCaptcha.class.php' ]
-   );
 
$qc = new QuestyCaptcha();
$this->assertEquals( $expected, $qc->getCaptcha() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79f225126d7bbbfd436ab165bb98a0ed9517b8bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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]: phpunit: Remove outdated comment about calling of LinkCache:...

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

Change subject: phpunit: Remove outdated comment about calling of 
LinkCache::clear()
..


phpunit: Remove outdated comment about calling of LinkCache::clear()

This is actually being called now, from resetDB() between tests.

Change-Id: I5aa15ce3fd57b6fc90b424fde8691ff33c7ddf45
---
M tests/phpunit/MediaWikiTestCase.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index 4d3c37b..9f2e5f9 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -1008,10 +1008,6 @@
$user = static::getTestSysop()->getUser();
$comment = __METHOD__ . ': Sample page for unit test.';
 
-   // Avoid memory leak...?
-   // LinkCache::singleton()->clear();
-   // Maybe.  But doing this absolutely breaks 
$title->isRedirect() when called during unit tests
-
$page = WikiPage::factory( $title );
$page->doEditContent( ContentHandler::makeContent( $text, 
$title ), $comment, 0, false, $user );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5aa15ce3fd57b6fc90b424fde8691ff33c7ddf45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 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...WikiForum[master]: Use newer DatabaseUpdater functions

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400449 )

Change subject: Use newer DatabaseUpdater functions
..

Use newer DatabaseUpdater functions

Change-Id: I4fc1eb956f78917ca6fd832c5c21a8fd5d3ec57e
---
M includes/WikiForum.hooks.php
1 file changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum 
refs/changes/49/400449/1

diff --git a/includes/WikiForum.hooks.php b/includes/WikiForum.hooks.php
index e622948..4f8c9ad 100644
--- a/includes/WikiForum.hooks.php
+++ b/includes/WikiForum.hooks.php
@@ -109,57 +109,57 @@
$dir = dirname( __FILE__ ) . '/../sql';
$file = "$dir/wikiforum.sql";
 
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_category', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_forums', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_threads', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'wikiforum_replies', $file, true ) );
+   $updater->addExtensionTable( 'wikiforum_category', $file );
+   $updater->addExtensionTable( 'wikiforum_forums', $file );
+   $updater->addExtensionTable( 'wikiforum_threads', $file );
+   $updater->addExtensionTable( 'wikiforum_replies', $file );
 
// upgrade from pre 1.3.0-SW
if ( !$updater->getDB()->fieldExists( 'wikiforum_category', 
'wfc_added_user_ip' ) ) {
$file = $dir . '/1.3.0-SW-new-fields.sql';
// wikiforum_category
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_category', 'wfc_added_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_category', 'wfc_edited_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_category', 
'wfc_added_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_category', 
'wfc_edited_user_ip', $file );
// wikiforum_forums
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_forums', 'wff_last_post_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_forums', 'wff_added_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_forums', 'wff_edited_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_forums', 
'wff_last_post_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_forums', 
'wff_added_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_forums', 
'wff_edited_user_ip', $file );
// wikiforum_threads
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_edit_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_closed_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_threads', 'wft_last_post_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_edit_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_closed_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_threads', 
'wft_last_post_user_ip', $file );
// wikiforum_replies
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_replies', 'wfr_user_ip', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addField', 
'wikiforum_replies', 'wfr_edit_user_ip', $file, true ) );
+   $updater->addExtensionField( 'wikiforum_replies', 
'wfr_user_ip', $file );
+   $updater->addExtensionField( 'wikiforum_replies', 
'wfr_edit_user_ip', $file );
}
 
// Upgrade from post 1.3.0-SW and pre 2.0.0
else if ( $updater->getDB()->fieldExists( 'wikiforum_category', 
'wfc_added_user_user_text' ) ) {
$file = $dir . '/2.0.0-drop-fields.sql';
// wikiforum_category
-   $updater->addExtensionUpdate( array( 'dropField', 
'wikiforum_category', 'wfc_added_user_text', $file, true ) );
-   

[MediaWiki-commits] [Gerrit] mediawiki...WhosOnline[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: Ib866489f33f963e87bd7073698a7ad4ce93c6427
---
M WhosOnlineHooks.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/WhosOnlineHooks.php b/WhosOnlineHooks.php
index 7e2c973..f8713b0 100644
--- a/WhosOnlineHooks.php
+++ b/WhosOnlineHooks.php
@@ -38,8 +38,7 @@
}
 
public static function onLoadExtensionSchemaUpdates( $updater ) {
-   $updater->addExtensionUpdate( array( 'addTable', 'online',
-   __DIR__ . '/whosonline.sql', true ) );
+   $updater->addExtensionTable( 'online', __DIR__ . 
'/whosonline.sql' );
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib866489f33f963e87bd7073698a7ad4ce93c6427
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhosOnline
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...WhosOnline[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400448 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: Ib866489f33f963e87bd7073698a7ad4ce93c6427
---
M WhosOnlineHooks.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/WhosOnlineHooks.php b/WhosOnlineHooks.php
index 7e2c973..f8713b0 100644
--- a/WhosOnlineHooks.php
+++ b/WhosOnlineHooks.php
@@ -38,8 +38,7 @@
}
 
public static function onLoadExtensionSchemaUpdates( $updater ) {
-   $updater->addExtensionUpdate( array( 'addTable', 'online',
-   __DIR__ . '/whosonline.sql', true ) );
+   $updater->addExtensionTable( 'online', __DIR__ . 
'/whosonline.sql' );
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib866489f33f963e87bd7073698a7ad4ce93c6427
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhosOnline
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Video[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I360f02d4c3a4abcc04b64f91310bf0b2d8a18074
---
M includes/Video.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/Video.hooks.php b/includes/Video.hooks.php
index 5120ae8..8a19fc3 100644
--- a/includes/Video.hooks.php
+++ b/includes/Video.hooks.php
@@ -295,8 +295,8 @@
public static function addTables( $updater ) {
$dir = __DIR__;
$file = "$dir/../sql/video.sql";
-   $updater->addExtensionUpdate( array( 'addTable', 'video', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'oldvideo', 
$file, true ) );
+   $updater->addExtensionTable( 'video', $file );
+   $updater->addExtensionTable( 'oldvideo', $file );
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I360f02d4c3a4abcc04b64f91310bf0b2d8a18074
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...Video[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400447 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I360f02d4c3a4abcc04b64f91310bf0b2d8a18074
---
M includes/Video.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/Video.hooks.php b/includes/Video.hooks.php
index 5120ae8..8a19fc3 100644
--- a/includes/Video.hooks.php
+++ b/includes/Video.hooks.php
@@ -295,8 +295,8 @@
public static function addTables( $updater ) {
$dir = __DIR__;
$file = "$dir/../sql/video.sql";
-   $updater->addExtensionUpdate( array( 'addTable', 'video', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'oldvideo', 
$file, true ) );
+   $updater->addExtensionTable( 'video', $file );
+   $updater->addExtensionTable( 'oldvideo', $file );
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I360f02d4c3a4abcc04b64f91310bf0b2d8a18074
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Video
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...UserStatus[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: Ie0765a294850e89798ae2711ef157a26c497d985
---
M includes/UserStatus.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/UserStatus.hooks.php b/includes/UserStatus.hooks.php
index a8e40cc..b7c6413 100644
--- a/includes/UserStatus.hooks.php
+++ b/includes/UserStatus.hooks.php
@@ -35,8 +35,8 @@
}
}
 
-   $updater->addExtensionUpdate( array( 'addTable', 'user_status', 
__DIR__ . "/../sql/user_status$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_status_vote', __DIR__ . "/../sql/user_status$dbExt.sql", true ) );
+   $updater->addExtensionTable( 'user_status', __DIR__ . 
"/../sql/user_status$dbExt.sql" );
+   $updater->addExtensionTable( 'user_status_vote', __DIR__ . 
"/../sql/user_status$dbExt.sql" );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0765a294850e89798ae2711ef157a26c497d985
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserStatus
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...SportsTeams[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I274786e04894b1630e5ba58d50222a47342968b2
---
M includes/SportsTeams.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/SportsTeams.hooks.php b/includes/SportsTeams.hooks.php
index c4cb242..d35d1c7 100644
--- a/includes/SportsTeams.hooks.php
+++ b/includes/SportsTeams.hooks.php
@@ -161,9 +161,9 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 'sport', 
__DIR__ . "/../sql/sportsteams$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'sport_favorite', __DIR__ . "/../sql/sportsteams$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'sport_team', 
__DIR__ . "/../sql/sportsteams$dbExt.sql", true ) );
+   $updater->addExtensionTable( 'sport', __DIR__ . 
"/../sql/sportsteams$dbExt.sql" );
+   $updater->addExtensionTable( 'sport_favorite', __DIR__ . 
"/../sql/sportsteams$dbExt.sql" );
+   $updater->addExtensionTable( 'sport_team', __DIR__ . 
"/../sql/sportsteams$dbExt.sql" );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I274786e04894b1630e5ba58d50222a47342968b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SportsTeams
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...SpamRegex[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: Ia94a43d5b4ef4b70c236d4b9b87373ae22080d5d
---
M backend/SpamRegexHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/backend/SpamRegexHooks.php b/backend/SpamRegexHooks.php
index 15342fc..72901a0 100644
--- a/backend/SpamRegexHooks.php
+++ b/backend/SpamRegexHooks.php
@@ -164,7 +164,7 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 'spam_regex', 
"{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'spam_regex', "{$dir}/{$filename}" 
);
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia94a43d5b4ef4b70c236d4b9b87373ae22080d5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamRegex
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...RegexBlock[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: If3aa592c9aacfca89fc3a90034537cf84391cdcd
---
M includes/RegexBlockHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/RegexBlockHooks.php b/includes/RegexBlockHooks.php
index 979a522..c492475 100644
--- a/includes/RegexBlockHooks.php
+++ b/includes/RegexBlockHooks.php
@@ -70,8 +70,8 @@
 */
public static function onLoadExtensionSchemaUpdates( $updater ) {
$file = __DIR__ . '/../sql/regexblock_schema.sql';
-   $updater->addExtensionUpdate( array( 'addTable', 'blockedby', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'stats_blockedby', $file, true ) );
+   $updater->addExtensionTable( 'blockedby', $file );
+   $updater->addExtensionTable( 'stats_blockedby', $file );
return true;
}
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3aa592c9aacfca89fc3a90034537cf84391cdcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexBlock
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...UserStatus[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400446 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: Ie0765a294850e89798ae2711ef157a26c497d985
---
M includes/UserStatus.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/UserStatus.hooks.php b/includes/UserStatus.hooks.php
index a8e40cc..b7c6413 100644
--- a/includes/UserStatus.hooks.php
+++ b/includes/UserStatus.hooks.php
@@ -35,8 +35,8 @@
}
}
 
-   $updater->addExtensionUpdate( array( 'addTable', 'user_status', 
__DIR__ . "/../sql/user_status$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_status_vote', __DIR__ . "/../sql/user_status$dbExt.sql", true ) );
+   $updater->addExtensionTable( 'user_status', __DIR__ . 
"/../sql/user_status$dbExt.sql" );
+   $updater->addExtensionTable( 'user_status_vote', __DIR__ . 
"/../sql/user_status$dbExt.sql" );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0765a294850e89798ae2711ef157a26c497d985
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserStatus
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...SportsTeams[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400445 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I274786e04894b1630e5ba58d50222a47342968b2
---
M includes/SportsTeams.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SportsTeams 
refs/changes/45/400445/1

diff --git a/includes/SportsTeams.hooks.php b/includes/SportsTeams.hooks.php
index c4cb242..d35d1c7 100644
--- a/includes/SportsTeams.hooks.php
+++ b/includes/SportsTeams.hooks.php
@@ -161,9 +161,9 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 'sport', 
__DIR__ . "/../sql/sportsteams$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'sport_favorite', __DIR__ . "/../sql/sportsteams$dbExt.sql", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'sport_team', 
__DIR__ . "/../sql/sportsteams$dbExt.sql", true ) );
+   $updater->addExtensionTable( 'sport', __DIR__ . 
"/../sql/sportsteams$dbExt.sql" );
+   $updater->addExtensionTable( 'sport_favorite', __DIR__ . 
"/../sql/sportsteams$dbExt.sql" );
+   $updater->addExtensionTable( 'sport_team', __DIR__ . 
"/../sql/sportsteams$dbExt.sql" );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I274786e04894b1630e5ba58d50222a47342968b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SportsTeams
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.rcfilters.ui.SaveFiltersPopupButtonWidget: Remove pointle...

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

Change subject: mw.rcfilters.ui.SaveFiltersPopupButtonWidget: Remove pointless 
option
..


mw.rcfilters.ui.SaveFiltersPopupButtonWidget: Remove pointless option

this.$overlay is undefined at this point; passing this does nothing.
An overlay is already being correctly passed when this widget is
constructed in mw.rcfilters.ui.FilterTagMultiselectWidget.

Change-Id: I958051e01d7d6a3065ad88f60bb8db4f5dc932d4
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
index bb837e0..f546d97 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
@@ -26,7 +26,6 @@
mw.rcfilters.ui.SaveFiltersPopupButtonWidget.parent.call( this, 
$.extend( {
framed: false,
icon: 'unClip',
-   $overlay: this.$overlay,
title: mw.msg( 'rcfilters-savedqueries-add-new-title' ),
popup: {
classes: [ 
'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I958051e01d7d6a3065ad88f60bb8db4f5dc932d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Petar.petkovic 
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...SpamRegex[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400444 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: Ia94a43d5b4ef4b70c236d4b9b87373ae22080d5d
---
M backend/SpamRegexHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SpamRegex 
refs/changes/44/400444/1

diff --git a/backend/SpamRegexHooks.php b/backend/SpamRegexHooks.php
index 15342fc..72901a0 100644
--- a/backend/SpamRegexHooks.php
+++ b/backend/SpamRegexHooks.php
@@ -164,7 +164,7 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 'spam_regex', 
"{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'spam_regex', "{$dir}/{$filename}" 
);
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia94a43d5b4ef4b70c236d4b9b87373ae22080d5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamRegex
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [L10N] Disable cleanUpSectionHeaders on en.wiktionary

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

Change subject: [L10N] Disable cleanUpSectionHeaders on en.wiktionary
..


[L10N] Disable cleanUpSectionHeaders on en.wiktionary

Bug: T169064
Change-Id: I3509e466216c2465ed6978b966f065c4368175f4
---
M pywikibot/cosmetic_changes.py
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 6631531..48db5f3 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -644,11 +644,11 @@
 Example: ==Section title== becomes == Section title ==
 
 NOTE: This space is recommended in the syntax help on the English and
-German Wikipedia. It is not wanted on Lojban Wiktionary (per T168399)
-and it might be that it is not wanted on other wikis. If there are any
-complaints, please file a bug report.
+German Wikipedia. It is not wanted on Lojban and English Wiktionary
+(T168399, T169064) and it might be that it is not wanted on other
+wikis. If there are any complaints, please file a bug report.
 """
-if self.site.sitename == 'wiktionary:jbo':
+if self.site.sitename in ['wiktionary:jbo', 'wiktionary:en']:
 return text
 return textlib.replaceExcept(
 text,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3509e466216c2465ed6978b966f065c4368175f4
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dvorapa 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: Zoranzoki21 
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...QuizGame[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: Ie2ce2f16e49384d587a7f2736f35d7e6b0fdab72
---
M includes/QuizGame.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/QuizGame.hooks.php b/includes/QuizGame.hooks.php
index c30f089..5315c0e 100644
--- a/includes/QuizGame.hooks.php
+++ b/includes/QuizGame.hooks.php
@@ -74,10 +74,10 @@
public static function addTables( $updater ) {
$dir = dirname( __FILE__ );
$file = "$dir/../sql/quizgame.sql";
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_questions', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_answers', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_choice', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_user_view', $file, true ) );
+   $updater->addExtensionTable( 'quizgame_questions', $file );
+   $updater->addExtensionTable( 'quizgame_answers', $file );
+   $updater->addExtensionTable( 'quizgame_choice', $file );
+   $updater->addExtensionTable( 'quizgame_user_view', $file );
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2ce2f16e49384d587a7f2736f35d7e6b0fdab72
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuizGame
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...RegexBlock[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400443 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: If3aa592c9aacfca89fc3a90034537cf84391cdcd
---
M includes/RegexBlockHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RegexBlock 
refs/changes/43/400443/1

diff --git a/includes/RegexBlockHooks.php b/includes/RegexBlockHooks.php
index 979a522..c492475 100644
--- a/includes/RegexBlockHooks.php
+++ b/includes/RegexBlockHooks.php
@@ -70,8 +70,8 @@
 */
public static function onLoadExtensionSchemaUpdates( $updater ) {
$file = __DIR__ . '/../sql/regexblock_schema.sql';
-   $updater->addExtensionUpdate( array( 'addTable', 'blockedby', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'stats_blockedby', $file, true ) );
+   $updater->addExtensionTable( 'blockedby', $file );
+   $updater->addExtensionTable( 'stats_blockedby', $file );
return true;
}
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3aa592c9aacfca89fc3a90034537cf84391cdcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexBlock
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...QuizGame[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400442 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: Ie2ce2f16e49384d587a7f2736f35d7e6b0fdab72
---
M includes/QuizGame.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/includes/QuizGame.hooks.php b/includes/QuizGame.hooks.php
index c30f089..5315c0e 100644
--- a/includes/QuizGame.hooks.php
+++ b/includes/QuizGame.hooks.php
@@ -74,10 +74,10 @@
public static function addTables( $updater ) {
$dir = dirname( __FILE__ );
$file = "$dir/../sql/quizgame.sql";
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_questions', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_answers', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_choice', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'quizgame_user_view', $file, true ) );
+   $updater->addExtensionTable( 'quizgame_questions', $file );
+   $updater->addExtensionTable( 'quizgame_answers', $file );
+   $updater->addExtensionTable( 'quizgame_choice', $file );
+   $updater->addExtensionTable( 'quizgame_user_view', $file );
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2ce2f16e49384d587a7f2736f35d7e6b0fdab72
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuizGame
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...PollNY[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I79cbd25267ff0b6680aedfe722c592393d7ae6ea
---
M includes/PollNY.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/PollNY.hooks.php b/includes/PollNY.hooks.php
index 7ae7f95..bb7e5b7 100644
--- a/includes/PollNY.hooks.php
+++ b/includes/PollNY.hooks.php
@@ -309,9 +309,9 @@
$dir = dirname( __FILE__ );
$file = "$dir/../sql/poll.sql";
 
-   $updater->addExtensionUpdate( array( 'addTable', 'poll_choice', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'poll_question', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'poll_user_vote', $file, true ) );
+   $updater->addExtensionTable( 'poll_choice', $file );
+   $updater->addExtensionTable( 'poll_question', $file );
+   $updater->addExtensionTable( 'poll_user_vote', $file );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79cbd25267ff0b6680aedfe722c592393d7ae6ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...LinkFilter[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I986434499be74c159b9a7d38754424ecdf730111
---
M includes/LinkFilter.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/LinkFilter.hooks.php b/includes/LinkFilter.hooks.php
index 6589319..5777a9b 100644
--- a/includes/LinkFilter.hooks.php
+++ b/includes/LinkFilter.hooks.php
@@ -235,7 +235,7 @@
 */
public static function applySchemaChanges( $updater ) {
$file = __DIR__ . '/../sql/link.sql';
-   $updater->addExtensionUpdate( array( 'addTable', 'link', $file, 
true ) );
+   $updater->addExtensionTable( 'link', $file );
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I986434499be74c159b9a7d38754424ecdf730111
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...MiniInvite[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I53ce651d57b3cf570aedbfd61333aa364e6c4cff
---
M includes/MiniInvite.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/MiniInvite.hooks.php b/includes/MiniInvite.hooks.php
index 34af2e1..38234bc 100644
--- a/includes/MiniInvite.hooks.php
+++ b/includes/MiniInvite.hooks.php
@@ -172,7 +172,7 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_email_track', "{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'user_email_track', 
"{$dir}/{$filename}" );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53ce651d57b3cf570aedbfd61333aa364e6c4cff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MiniInvite
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...PictureGame[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I20bee0628faf3677a9431237f7b86544068d86cb
---
M includes/PictureGame.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/PictureGame.hooks.php b/includes/PictureGame.hooks.php
index 374884e..7b3d5ca 100644
--- a/includes/PictureGame.hooks.php
+++ b/includes/PictureGame.hooks.php
@@ -64,8 +64,8 @@
 * @return Boolean
 */
public static function onLoadExtensionSchemaUpdates( $updater ) {
-   $updater->addExtensionUpdate( array( 'addTable', 
'picturegame_images', __DIR__ . '/../sql/picturegame.sql', true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'picturegame_votes', __DIR__ . '/../sql/picturegame.sql', true ) );
+   $updater->addExtensionTable( 'picturegame_images', __DIR__ . 
'/../sql/picturegame.sql' );
+   $updater->addExtensionTable( 'picturegame_votes', __DIR__ . 
'/../sql/picturegame.sql' );
$updater->addExtensionField( 'picturegame_images', 'comment', 
__DIR__ . '/../sql/picturegame-add-comment.sql' );
 
return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I20bee0628faf3677a9431237f7b86544068d86cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PictureGame
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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...Dusk[master]: Moved the $this references into variables

2017-12-27 Thread LukBukkit (Code Review)
LukBukkit has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400441 )

Change subject: Moved the $this references into variables
..

Moved the $this references into variables

This avoids warnings by PHP 7.1

Bug: T153505
Change-Id: I4dff3f65457682d87e2954f5b0f66b4ffc2f82b4
---
M includes/DuskTemplate.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Dusk 
refs/changes/41/400441/1

diff --git a/includes/DuskTemplate.php b/includes/DuskTemplate.php
index 430521f..2936ae9 100644
--- a/includes/DuskTemplate.php
+++ b/includes/DuskTemplate.php
@@ -189,7 +189,9 @@
echo $this->makeListItem( $key, $tbitem );
}
 
-   Hooks::run( 'SkinTemplateToolboxEnd', array( &$this, true ) );
+// Avoid PHP 7.1 warning of passing $this by reference
+$template = $this;
+   Hooks::run( 'SkinTemplateToolboxEnd', array( &$template, true ) 
);
 ?>



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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dff3f65457682d87e2954f5b0f66b4ffc2f82b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Dusk
Gerrit-Branch: master
Gerrit-Owner: LukBukkit 

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


[MediaWiki-commits] [Gerrit] mediawiki...Quantcast[master]: Use protocol-relative URLs to avoid mixed content warnings w...

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

Change subject: Use protocol-relative URLs to avoid mixed content warnings when 
using HTTPS
..


Use protocol-relative URLs to avoid mixed content warnings when using HTTPS

Bug: T183677
Change-Id: I5b0cf58e079d46dafe69e87c632d0e6f5402f60a
---
M QuantcastTracking.class.php
M extension.json
2 files changed, 5 insertions(+), 7 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  SamanthaNguyen: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Isarra: Looks good to me, but someone else must approve



diff --git a/QuantcastTracking.class.php b/QuantcastTracking.class.php
index a12a16b..f159df5 100644
--- a/QuantcastTracking.class.php
+++ b/QuantcastTracking.class.php
@@ -25,7 +25,7 @@
 
$groups = $skin->getUser()->getEffectiveGroups();
if ( !in_array( $wgQuantcastTrackingExcludedGroups, $groups ) ) 
{
-   $message = $skin->msg( 'quantcast-tracking-number' 
)->inContentLanguage();
+   $message = $skin->msg( 'quantcast-tracking-number' 
)->inContentLanguage();
// We have a custom tracking code, use it!
if ( !$message->isDisabled() ) {
$trackingCode = trim( $message->text() );
@@ -39,9 +39,9 @@
qacct: "' . $safeCode . '"
};
/*]]>*/
-   http://edge.quantserve.com/quant.js";>
+   

-   http://pixel.quantserve.com/pixel/' . $safeCode . 
'.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast" />
+   

' . "\n\n";
}
diff --git a/extension.json b/extension.json
index 2bc2bb4..fce32d5 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Quantcast Tracking",
-   "version": "0.4.0",
+   "version": "0.4.1",
"author": [
"Jack Phoenix"
],
@@ -19,9 +19,7 @@
"QuantcastTracking": "QuantcastTracking.class.php"
},
"Hooks": {
-   "SkinAfterBottomScripts": [
-   "QuantcastTracking::onSkinAfterBottomScripts"
-   ]
+   "SkinAfterBottomScripts": 
"QuantcastTracking::onSkinAfterBottomScripts"
},
"manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b0cf58e079d46dafe69e87c632d0e6f5402f60a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quantcast
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
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]: Add grep comment for js vars wgRestriction*

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

Change subject: Add grep comment for js vars wgRestriction*
..


Add grep comment for js vars wgRestriction*

Change-Id: I974841acf97e9426ed2338f210821e91d7f94286
---
M includes/OutputPage.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 9cf94d8..1c2c29d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3243,6 +3243,8 @@
&& ( $relevantTitle->exists() || 
$relevantTitle->quickUserCan( 'create', $user ) );
 
foreach ( $title->getRestrictionTypes() as $type ) {
+   // Following keys are set in $vars:
+   // wgRestrictionCreate, wgRestrictionEdit, 
wgRestrictionMove, wgRestrictionUpload
$vars['wgRestriction' . ucfirst( $type )] = 
$title->getRestrictions( $type );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I974841acf97e9426ed2338f210821e91d7f94286
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...PollNY[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400440 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I79cbd25267ff0b6680aedfe722c592393d7ae6ea
---
M includes/PollNY.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/PollNY.hooks.php b/includes/PollNY.hooks.php
index 7ae7f95..bb7e5b7 100644
--- a/includes/PollNY.hooks.php
+++ b/includes/PollNY.hooks.php
@@ -309,9 +309,9 @@
$dir = dirname( __FILE__ );
$file = "$dir/../sql/poll.sql";
 
-   $updater->addExtensionUpdate( array( 'addTable', 'poll_choice', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'poll_question', $file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'poll_user_vote', $file, true ) );
+   $updater->addExtensionTable( 'poll_choice', $file );
+   $updater->addExtensionTable( 'poll_question', $file );
+   $updater->addExtensionTable( 'poll_user_vote', $file );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79cbd25267ff0b6680aedfe722c592393d7ae6ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PollNY
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...PictureGame[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400439 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I20bee0628faf3677a9431237f7b86544068d86cb
---
M includes/PictureGame.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/PictureGame.hooks.php b/includes/PictureGame.hooks.php
index 374884e..7b3d5ca 100644
--- a/includes/PictureGame.hooks.php
+++ b/includes/PictureGame.hooks.php
@@ -64,8 +64,8 @@
 * @return Boolean
 */
public static function onLoadExtensionSchemaUpdates( $updater ) {
-   $updater->addExtensionUpdate( array( 'addTable', 
'picturegame_images', __DIR__ . '/../sql/picturegame.sql', true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'picturegame_votes', __DIR__ . '/../sql/picturegame.sql', true ) );
+   $updater->addExtensionTable( 'picturegame_images', __DIR__ . 
'/../sql/picturegame.sql' );
+   $updater->addExtensionTable( 'picturegame_votes', __DIR__ . 
'/../sql/picturegame.sql' );
$updater->addExtensionField( 'picturegame_images', 'comment', 
__DIR__ . '/../sql/picturegame-add-comment.sql' );
 
return true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20bee0628faf3677a9431237f7b86544068d86cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PictureGame
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Fix class name in @covers

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

Change subject: Fix class name in @covers
..


Fix class name in @covers

Change-Id: Ia8d11982ad2cd8c54268a93e9c2ce0745615931a
---
M tests/phpunit/QuizTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/phpunit/QuizTest.php b/tests/phpunit/QuizTest.php
index da5669d..e790756 100644
--- a/tests/phpunit/QuizTest.php
+++ b/tests/phpunit/QuizTest.php
@@ -77,7 +77,7 @@
 
/**
 * @dataProvider provideParseQuestion
-* @covers Question::parseQuestion
+* @covers Quiz::parseQuestion
 */
public function testParseQuestion( $input, $expected, $injectedValue, 
$expectedValue ) {
$this->quiz->mShuffleDiv = $injectedValue;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8d11982ad2cd8c54268a93e9c2ce0745615931a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Quiz
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Use absolute class name in @covers

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

Change subject: Use absolute class name in @covers
..


Use absolute class name in @covers

Namespaced classes need to be absolutely named.

Change-Id: Ic98e4e3b9fbc1b7cb3187cdbffcb973795a02a6b
---
M tests/phpunit/LinksUpdateHookHandlerTest.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/tests/phpunit/LinksUpdateHookHandlerTest.php 
b/tests/phpunit/LinksUpdateHookHandlerTest.php
index 4cd70c6..b639f41 100644
--- a/tests/phpunit/LinksUpdateHookHandlerTest.php
+++ b/tests/phpunit/LinksUpdateHookHandlerTest.php
@@ -12,7 +12,7 @@
 use Wikimedia\TestingAccessWrapper;
 
 /**
- * @covers PageImages\Hooks\LinksUpdateHookHandler
+ * @covers \PageImages\Hooks\LinksUpdateHookHandler
  *
  * @group PageImages
  *
@@ -115,7 +115,7 @@
 
/**
 * @dataProvider provideDoLinksUpdate
-* @covers LinksUpdateHookHandler::doLinksUpdate
+* @covers \PageImages\Hooks\LinksUpdateHookHandler::doLinksUpdate
 */
public function testDoLinksUpdate(
array $images,
@@ -203,7 +203,7 @@
}
 
/**
-* @covers LinksUpdateHookHandler::getPageImageCandidates
+* @covers 
\PageImages\Hooks\LinksUpdateHookHandler::getPageImageCandidates
 */
public function testGetPageImageCandidates() {
$candidates = [
@@ -288,7 +288,7 @@
 
/**
 * @dataProvider provideScoreFromTable
-* @covers LinksUpdateHookHandler::scoreFromTable
+* @covers \PageImages\Hooks\LinksUpdateHookHandler::scoreFromTable
 */
public function testScoreFromTable( $type, $value, $expected ) {
global $wgPageImagesScores;
@@ -327,7 +327,7 @@
 
/**
 * @dataProvider provideIsFreeImage
-* @covers LinksUpdateHookHandler::isImageFree
+* @covers \PageImages\Hooks\LinksUpdateHookHandler::isImageFree
 */
public function testIsFreeImage( $fileName, $metadata, $expected ) {
RepoGroup::setSingleton( $this->getRepoGroup() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic98e4e3b9fbc1b7cb3187cdbffcb973795a02a6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Fix typo in @covers

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

Change subject: Fix typo in @covers
..


Fix typo in @covers

Change-Id: I17e7a7e285b30cabbbc5e272221e6822f565bdea
---
M tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/phpunit/CentralAuthHooksUsingDatabaseTest.php 
b/tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
index 5d8f9bd..769b80e 100644
--- a/tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
+++ b/tests/phpunit/CentralAuthHooksUsingDatabaseTest.php
@@ -6,7 +6,7 @@
 class CentralAuthHooksUsingDatabaseTest extends 
CentralAuthTestCaseUsingDatabase {
 
/**
-* @covers CentralAuthHooks::onUserGetEmailAuthenticationTimestampp
+* @covers CentralAuthHooks::onUserGetEmailAuthenticationTimestamp
 */
public function testLockedEmailDisabled() {
$user = User::newFromName( 'GlobalLockedUser' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17e7a7e285b30cabbbc5e272221e6822f565bdea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...GWToolset[master]: Use absolute class name in @covers

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

Change subject: Use absolute class name in @covers
..


Use absolute class name in @covers

Namespaced classes need to be absolutely named.

Change-Id: I582efa2d720600057a3aee3c0c6a523e9167b3b1
---
M tests/phpunit/UtilsTest.php
1 file changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/tests/phpunit/UtilsTest.php b/tests/phpunit/UtilsTest.php
index a6fd516..ede3451 100644
--- a/tests/phpunit/UtilsTest.php
+++ b/tests/phpunit/UtilsTest.php
@@ -1,7 +1,7 @@
 assertEquals( $this->utils->getBytes( '1' ), 1 );
}
 
/**
-* @covers Utils::getBytes
+* @covers \GWToolset\Utils::getBytes
 */
public function test_getBytes_M() {
$this->assertEquals( $this->utils->getBytes( "1M" ), 1048576 );
}
 
/**
-* @covers Utils::getBytes
+* @covers \GWToolset\Utils::getBytes
 */
public function test_getBytes_K() {
$this->assertEquals( $this->utils->getBytes( "1K" ), 1024 );
}
 
/**
-* @covers Utils::getBytes
+* @covers \GWToolset\Utils::getBytes
 */
public function test_getBytes_G() {
$this->assertEquals( $this->utils->getBytes( "1G" ), 1073741824 
);
}
 
/**
-* @covers Utils::getNamespaceName
+* @covers \GWToolset\Utils::getNamespaceName
 */
public function test_getNamespaceName_empty() {
$this->assertEquals( $this->utils->getNamespaceName(), ':' );
}
 
/**
-* @covers Utils::getNamespaceName
+* @covers \GWToolset\Utils::getNamespaceName
 */
public function test_getNamespaceName_6() {
$this->assertEquals( $this->utils->getNamespaceName( 6 ), 
'File:' );
}
 
/**
-* @covers Utils::getNamespaceName
+* @covers \GWToolset\Utils::getNamespaceName
 */
public function test_getNamespaceName_not_string() {
$this->assertEquals( $this->utils->getNamespaceName( 
"Something" ), null );
}
 
/**
-* @covers Utils::normalizeSpace
+* @covers \GWToolset\Utils::normalizeSpace
 */
public function test_normalizeSpace() {
$this->assertEquals( $this->utils->normalizeSpace( "a b cd" ), 
"a_b_cd" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I582efa2d720600057a3aee3c0c6a523e9167b3b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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...Cognate[master]: Skip unit tests on 32 bit machine

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400438 )

Change subject: Skip unit tests on 32 bit machine
..

Skip unit tests on 32 bit machine

Created a CheckSystemReqsTrait to hold the new function to check
and use it in some tests

Change-Id: I62afa9349b166e19dd03f8f20f9c61980a69e244
---
M extension.json
A tests/phpunit/CheckSystemReqsTrait.php
M tests/phpunit/CognateIntegrationTest.php
M tests/phpunit/CognateStoreIntegrationTest.php
M tests/phpunit/CognateStoreUnitTest.php
M tests/phpunit/StringHasherUnitTest.php
6 files changed, 40 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cognate 
refs/changes/38/400438/1

diff --git a/extension.json b/extension.json
index 155b05e..9c048fb 100644
--- a/extension.json
+++ b/extension.json
@@ -23,7 +23,8 @@
"Cognate\\StringNormalizer": "src/StringNormalizer.php",
"Cognate\\StringHasher": "src/StringHasher.php",
"Cognate\\CognatePageHookHandler": 
"src/hooks/CognatePageHookHandler.php",
-   "Cognate\\CognateParseHookHandler": 
"src/hooks/CognateParseHookHandler.php"
+   "Cognate\\CognateParseHookHandler": 
"src/hooks/CognateParseHookHandler.php",
+   "Cognate\\Tests\\CheckSystemReqsTrait": 
"tests/phpunit/CheckSystemReqsTrait.php"
},
"JobClasses": {
"CognateLocalJobSubmitJob": "Cognate\\LocalJobSubmitJob",
diff --git a/tests/phpunit/CheckSystemReqsTrait.php 
b/tests/phpunit/CheckSystemReqsTrait.php
new file mode 100644
index 000..d0bb89e
--- /dev/null
+++ b/tests/phpunit/CheckSystemReqsTrait.php
@@ -0,0 +1,19 @@
+markTestSkipped( "Skip test, needs 64bit system" 
);
+   }
+   }
+}
diff --git a/tests/phpunit/CognateIntegrationTest.php 
b/tests/phpunit/CognateIntegrationTest.php
index 5a00123..f670a61 100644
--- a/tests/phpunit/CognateIntegrationTest.php
+++ b/tests/phpunit/CognateIntegrationTest.php
@@ -23,12 +23,16 @@
  */
 class CognateIntegrationTest extends MediaWikiTestCase {
 
+   use CheckSystemReqsTrait;
+
private $pageName;
private $dbName;
 
public function setUp() {
parent::setUp();
 
+   $this->markTestSkippedIfNo64bit();
+
$services = MediaWikiServices::getInstance();
$config = $services->getMainConfig();
$this->pageName = 'CognateIntegrationTest-pageName';
diff --git a/tests/phpunit/CognateStoreIntegrationTest.php 
b/tests/phpunit/CognateStoreIntegrationTest.php
index f07d70d..6a988de 100644
--- a/tests/phpunit/CognateStoreIntegrationTest.php
+++ b/tests/phpunit/CognateStoreIntegrationTest.php
@@ -18,6 +18,8 @@
  */
 class CognateStoreIntegrationTest extends \MediaWikiTestCase {
 
+   use CheckSystemReqsTrait;
+
/** @var CognateStore */
private $store;
 
@@ -29,6 +31,9 @@
 
protected function setUp() {
parent::setUp();
+
+   $this->markTestSkippedIfNo64bit();
+
$this->tablesUsed = [
CognateStore::PAGES_TABLE_NAME,
CognateStore::TITLES_TABLE_NAME,
diff --git a/tests/phpunit/CognateStoreUnitTest.php 
b/tests/phpunit/CognateStoreUnitTest.php
index 8265e58..09ef18a 100644
--- a/tests/phpunit/CognateStoreUnitTest.php
+++ b/tests/phpunit/CognateStoreUnitTest.php
@@ -16,6 +16,8 @@
  */
 class CognateStoreUnitTest extends \PHPUnit_Framework_TestCase {
 
+   use CheckSystemReqsTrait;
+
private function newReadOnlyCognateStore() {
/** @var ConnectionManager $connectionManager */
$connectionManager = $this->getMockBuilder( 
ConnectionManager::class )
@@ -31,6 +33,8 @@
}
 
public function testWhenInReadOnlyMode_insertPageThrowsException() {
+   $this->markTestSkippedIfNo64bit();
+
$store = $this->newReadOnlyCognateStore();
 
$this->setExpectedException( DBReadOnlyError::class );
@@ -39,6 +43,8 @@
}
 
public function testWhenInReadOnlyMode_deletePageThrowsException() {
+   $this->markTestSkippedIfNo64bit();
+
$store = $this->newReadOnlyCognateStore();
 
$this->setExpectedException( DBReadOnlyError::class );
diff --git a/tests/phpunit/StringHasherUnitTest.php 
b/tests/phpunit/StringHasherUnitTest.php
index e13f264..7b64a9f 100644
--- a/tests/phpunit/StringHasherUnitTest.php
+++ b/tests/phpunit/StringHasherUnitTest.php
@@ -13,6 +13,8 @@
  */
 class StringHasherTest extends \MediaWikiTestCase {
 
+   use CheckSystemReqsTrait;
+
public function provideHashes() {
return [
[ '', -2039914840885289964 ],
@@ -36,6 +38,8 @@
 * @dataProvider provideHashes
 */
public function testGoodHashes( $input, $expectedHash ) {
+   

[MediaWiki-commits] [Gerrit] mediawiki...MiniInvite[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400437 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I53ce651d57b3cf570aedbfd61333aa364e6c4cff
---
M includes/MiniInvite.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MiniInvite 
refs/changes/37/400437/1

diff --git a/includes/MiniInvite.hooks.php b/includes/MiniInvite.hooks.php
index 34af2e1..38234bc 100644
--- a/includes/MiniInvite.hooks.php
+++ b/includes/MiniInvite.hooks.php
@@ -172,7 +172,7 @@
}
*/
 
-   $updater->addExtensionUpdate( array( 'addTable', 
'user_email_track', "{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'user_email_track', 
"{$dir}/{$filename}" );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53ce651d57b3cf570aedbfd61333aa364e6c4cff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MiniInvite
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Use absolute class name in @covers

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

Change subject: Use absolute class name in @covers
..


Use absolute class name in @covers

Namespaced classes need to be absolutely named.

Fixed one @covers of testEventHandling
Change-Id: I92ae621ac35992c3dd6070528e255fafdaa1af76
---
M tests/phpunit/EventLogging/EventLoggerFactoryTest.php
M tests/phpunit/PopupsHooksTest.php
M tests/phpunit/UserPreferencesChangeHandlerTest.php
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/tests/phpunit/EventLogging/EventLoggerFactoryTest.php 
b/tests/phpunit/EventLogging/EventLoggerFactoryTest.php
index a255972..8716057 100644
--- a/tests/phpunit/EventLogging/EventLoggerFactoryTest.php
+++ b/tests/phpunit/EventLogging/EventLoggerFactoryTest.php
@@ -26,7 +26,7 @@
  * Integration tests for Page Preview hooks
  *
  * @group Popups
- * @coversDefaultClass  EventLoggerFactory
+ * @coversDefaultClass \Popups\EventLogging\EventLoggerFactory
  */
 class EventLoggerFactoryTest extends MediaWikiTestCase {
 
diff --git a/tests/phpunit/PopupsHooksTest.php 
b/tests/phpunit/PopupsHooksTest.php
index 3e49b5f..1d6772c 100644
--- a/tests/phpunit/PopupsHooksTest.php
+++ b/tests/phpunit/PopupsHooksTest.php
@@ -25,7 +25,7 @@
  * Integration tests for Page Preview hooks
  *
  * @group Popups
- * @coversDefaultClass  PopupsHooks
+ * @coversDefaultClass \Popups\PopupsHooks
  */
 class PopupsHooksTest extends MediaWikiTestCase {
 
@@ -194,7 +194,7 @@
}
 
/**
-* @covers PopupsHooks::onUserGetDefaultOptions
+* @covers ::onUserGetDefaultOptions
 */
public function testOnUserGetDefaultOptions() {
$userOptions = [
@@ -310,7 +310,7 @@
}
 
/**
-* @covers PopupsHooks::onMakeGlobalVariablesScript
+* @covers ::onMakeGlobalVariablesScript
 */
public function testOnMakeGlobalVariablesScript() {
$user = User::newFromId( 0 );
diff --git a/tests/phpunit/UserPreferencesChangeHandlerTest.php 
b/tests/phpunit/UserPreferencesChangeHandlerTest.php
index 58af8bd..fc86a10 100644
--- a/tests/phpunit/UserPreferencesChangeHandlerTest.php
+++ b/tests/phpunit/UserPreferencesChangeHandlerTest.php
@@ -25,12 +25,12 @@
  * Integration tests for Page Preview hooks
  *
  * @group Popups
- * @coversDefaultClass  UserPreferencesChangeHandlerTest
+ * @coversDefaultClass \Popups\UserPreferencesChangeHandler
  */
 class UserPreferencesChangeHandlerTest extends MediaWikiTestCase {
 
/**
-* @covers ::handle
+* @covers ::doPreferencesFormPreSave
 * @covers ::__construct
 * @dataProvider provideDataForEventHandling
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92ae621ac35992c3dd6070528e255fafdaa1af76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Pmiazga 
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...LinkFilter[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400436 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I986434499be74c159b9a7d38754424ecdf730111
---
M includes/LinkFilter.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkFilter 
refs/changes/36/400436/1

diff --git a/includes/LinkFilter.hooks.php b/includes/LinkFilter.hooks.php
index 6589319..5777a9b 100644
--- a/includes/LinkFilter.hooks.php
+++ b/includes/LinkFilter.hooks.php
@@ -235,7 +235,7 @@
 */
public static function applySchemaChanges( $updater ) {
$file = __DIR__ . '/../sql/link.sql';
-   $updater->addExtensionUpdate( array( 'addTable', 'link', $file, 
true ) );
+   $updater->addExtensionTable( 'link', $file );
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I986434499be74c159b9a7d38754424ecdf730111
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Register QuestyCaptcha class ealier in unit tests

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400435 )

Change subject: Register QuestyCaptcha class ealier in unit tests
..

Register QuestyCaptcha class ealier in unit tests

The captchas in production are registered conditional, in tests the
class needs to be added to the autoloader.
Moved this register up to setUp to detect the existing @covers correctly
by the new testValidCovers from
I1d564bcae2bfbedb004c440b90db6341148ed4ba

Change-Id: I79f225126d7bbbfd436ab165bb98a0ed9517b8bc
---
M tests/phpunit/QuestyCaptchaTest.php
1 file changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/35/400435/1

diff --git a/tests/phpunit/QuestyCaptchaTest.php 
b/tests/phpunit/QuestyCaptchaTest.php
index dada668..5a9480a 100644
--- a/tests/phpunit/QuestyCaptchaTest.php
+++ b/tests/phpunit/QuestyCaptchaTest.php
@@ -1,6 +1,16 @@
 mergeMwGlobalArrayValue(
+   'wgAutoloadClasses',
+   [ 'QuestyCaptcha' => __DIR__ . 
'/../../QuestyCaptcha/QuestyCaptcha.class.php' ]
+   );
+   }
+
/**
 * @covers QuestyCaptcha::getCaptcha
 * @dataProvider provideGetCaptcha
@@ -11,10 +21,6 @@
$GLOBALS['wgCaptchaQuestions'] = [];
}
$this->setMwGlobals( 'wgCaptchaQuestions', $config );
-   $this->mergeMwGlobalArrayValue(
-   'wgAutoloadClasses',
-   [ 'QuestyCaptcha' => __DIR__ . 
'/../../QuestyCaptcha/QuestyCaptcha.class.php' ]
-   );
 
$qc = new QuestyCaptcha();
$this->assertEquals( $expected, $qc->getCaptcha() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79f225126d7bbbfd436ab165bb98a0ed9517b8bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...FanBoxes[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: If1482c97374c45d9e15b5f3072fcf681d06b5d5f
---
M includes/FanBox.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/FanBox.hooks.php b/includes/FanBox.hooks.php
index 7c44408..93ab625 100644
--- a/includes/FanBox.hooks.php
+++ b/includes/FanBox.hooks.php
@@ -225,8 +225,8 @@
 */
public static function addTables( $updater ) {
$file = __DIR__ . '/../sql/fantag.sql';
-   $updater->addExtensionUpdate( array( 'addTable', 'fantag', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'user_fantag', 
$file, true ) );
+   $updater->addExtensionTable( 'fantag', $file );
+   $updater->addExtensionTable( 'user_fantag', $file );
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1482c97374c45d9e15b5f3072fcf681d06b5d5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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]: phpunit: Remove outdated comment about calling of LinkCache:...

2017-12-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400434 )

Change subject: phpunit: Remove outdated comment about calling of 
LinkCache::clear()
..

phpunit: Remove outdated comment about calling of LinkCache::clear()

This is actually being called now, from resetDB() between tests.

Change-Id: I5aa15ce3fd57b6fc90b424fde8691ff33c7ddf45
---
M tests/phpunit/MediaWikiTestCase.php
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/400434/1

diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index 4d3c37b..9f2e5f9 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -1008,10 +1008,6 @@
$user = static::getTestSysop()->getUser();
$comment = __METHOD__ . ': Sample page for unit test.';
 
-   // Avoid memory leak...?
-   // LinkCache::singleton()->clear();
-   // Maybe.  But doing this absolutely breaks 
$title->isRedirect() when called during unit tests
-
$page = WikiPage::factory( $title );
$page->doEditContent( ContentHandler::makeContent( $text, 
$title ), $comment, 0, false, $user );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...FanBoxes[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400433 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: If1482c97374c45d9e15b5f3072fcf681d06b5d5f
---
M includes/FanBox.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FanBoxes 
refs/changes/33/400433/1

diff --git a/includes/FanBox.hooks.php b/includes/FanBox.hooks.php
index 7c44408..93ab625 100644
--- a/includes/FanBox.hooks.php
+++ b/includes/FanBox.hooks.php
@@ -225,8 +225,8 @@
 */
public static function addTables( $updater ) {
$file = __DIR__ . '/../sql/fantag.sql';
-   $updater->addExtensionUpdate( array( 'addTable', 'fantag', 
$file, true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 'user_fantag', 
$file, true ) );
+   $updater->addExtensionTable( 'fantag', $file );
+   $updater->addExtensionTable( 'user_fantag', $file );
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1482c97374c45d9e15b5f3072fcf681d06b5d5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FanBoxes
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Add unit test for NewsletterDb::updateName

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

Change subject: Add unit test for NewsletterDb::updateName
..


Add unit test for NewsletterDb::updateName

Bug: T183619
Change-Id: I0150686751519b2a1599374a683b689523ac68d0
---
M tests/NewsletterDbTest.php
1 file changed, 22 insertions(+), 0 deletions(-)

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



diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php
index 65dc3e9..7c996aa 100644
--- a/tests/NewsletterDbTest.php
+++ b/tests/NewsletterDbTest.php
@@ -169,6 +169,28 @@
}
 
/**
+* @covers NewsletterDb::updateName
+*/
+   public function testUpdateName() {
+   $mockWriteDb = $this->getMockIDatabase();
+   $newsletter = $this->getTestNewsletter();
+   $newsletterId = $newsletter->getId();
+
+   $newName = 'Foobar name';
+
+   $mockWriteDb
+   ->expects( $this->once() )
+   ->method( 'update' )
+   ->with(
+   'nl_newsletters',
+   [ 'nl_name' => $newName ], [ 'nl_id' => 
$newsletterId ]
+   );
+
+   $table = new NewsletterDb( $this->getMockLoadBalancer( 
$mockWriteDb ) );
+   $table->updateName( $newsletterId, $newName );
+   }
+
+   /**
 * @covers NewsletterDb::deleteNewsletter
 */
public function testDeleteNewsletter() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0150686751519b2a1599374a683b689523ac68d0
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Albert221 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Phantom42 
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...Comments[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I8f7d9410bb25c8b82f9f35efb454af13b9f44a4b
---
M includes/Comments.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/Comments.hooks.php b/includes/Comments.hooks.php
index c3709c9..27bb187 100644
--- a/includes/Comments.hooks.php
+++ b/includes/Comments.hooks.php
@@ -48,9 +48,9 @@
$filename = 'comments.sql';
}
 
-   $updater->addExtensionUpdate( array( 'addTable', 'Comments', 
"{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'Comments_Vote', "{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'Comments_block', "{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'Comments', "{$dir}/{$filename}" );
+   $updater->addExtensionTable( 'Comments_Vote', 
"{$dir}/{$filename}" );
+   $updater->addExtensionTable( 'Comments_block', 
"{$dir}/{$filename}" );
 
return true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f7d9410bb25c8b82f9f35efb454af13b9f44a4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: UltrasonicNXT 
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...ArticleRatings[master]: Use newer DatabaseUpdater function

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

Change subject: Use newer DatabaseUpdater function
..


Use newer DatabaseUpdater function

Change-Id: I1ce771b3896a29ed5a6bc1f3b24a3a896f5b0199
---
M ArticleRatingsHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ArticleRatingsHooks.php b/ArticleRatingsHooks.php
index eb177e6..df8ee8e 100644
--- a/ArticleRatingsHooks.php
+++ b/ArticleRatingsHooks.php
@@ -206,7 +206,7 @@
 */
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
$file = __DIR__ . '/ratings.sql';
-   $updater->addExtensionUpdate( [ 'addTable', 'ratings', $file, 
true ] );
+   $updater->addExtensionTable( 'ratings', $file );
return true;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ce771b3896a29ed5a6bc1f3b24a3a896f5b0199
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleRatings
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Jack Phoenix 
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]: maintenance: Add unit test for Benchmarker class

2017-12-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400432 )

Change subject: maintenance: Add unit test for Benchmarker class
..

maintenance: Add unit test for Benchmarker class

Change-Id: I3f835fc07741fd42b8adb5b019f72589429cc14f
---
M maintenance/benchmarks/Benchmarker.php
A tests/phpunit/maintenance/BenchmarkerTest.php
2 files changed, 134 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/400432/1

diff --git a/maintenance/benchmarks/Benchmarker.php 
b/maintenance/benchmarks/Benchmarker.php
index 832da4d..ffb8cb3 100644
--- a/maintenance/benchmarks/Benchmarker.php
+++ b/maintenance/benchmarks/Benchmarker.php
@@ -26,7 +26,9 @@
  * @ingroup Benchmark
  */
 
+// @codeCoverageIgnoreStart
 require_once __DIR__ . '/../Maintenance.php';
+// @codeCoverageIgnoreEnd
 
 /**
  * Base class for benchmark scripts.
diff --git a/tests/phpunit/maintenance/BenchmarkerTest.php 
b/tests/phpunit/maintenance/BenchmarkerTest.php
new file mode 100644
index 000..81fd9b1
--- /dev/null
+++ b/tests/phpunit/maintenance/BenchmarkerTest.php
@@ -0,0 +1,132 @@
+getMockBuilder( Benchmarker::class )
+  ->setMethods( [ 'execute', 'output' ] )
+  ->getMock();
+$benchProxy = TestingAccessWrapper::newFromObject( $bench );
+$benchProxy->defaultCount = 3;
+
+$count = 0;
+$bench->bench( [
+  'test' => function () use ( &$count ) {
+  $count++;
+  }
+] );
+
+$this->assertSame( 3, $count );
+  }
+
+  public function testBenchSetup() {
+$bench = $this->getMockBuilder( Benchmarker::class )
+  ->setMethods( [ 'execute', 'output' ] )
+  ->getMock();
+$benchProxy = TestingAccessWrapper::newFromObject( $bench );
+$benchProxy->defaultCount = 2;
+
+$buffer = [];
+$bench->bench( [
+  'test' => [
+'setup' => function () use ( &$buffer ) {
+$buffer[] = 'setup';
+},
+'function' => function () use ( &$buffer ) {
+$buffer[] = 'run';
+}
+  ]
+] );
+
+$this->assertSame( [ 'setup', 'run', 'run' ], $buffer );
+  }
+
+  public function testBenchVerbose() {
+$bench = $this->getMockBuilder( Benchmarker::class )
+  ->setMethods( [ 'execute', 'output', 'hasOption', 'verboseRun' ] )
+  ->getMock();
+$benchProxy = TestingAccessWrapper::newFromObject( $bench );
+$benchProxy->defaultCount = 1;
+
+$bench->expects( $this->exactly( 2 ) )->method( 'hasOption' )
+  ->will( $this->returnValueMap( [
+  [ 'verbose', true ],
+  [ 'count', false ],
+] ) );
+
+$bench->expects( $this->once() )->method( 'verboseRun' )
+  ->with( 0 )
+  ->willReturn( null );
+
+$bench->bench( [
+  'test' => function () {}
+] );
+  }
+
+  public function noop() {}
+
+  public function testBenchName_method() {
+$bench = $this->getMockBuilder( Benchmarker::class )
+  ->setMethods( [ 'execute', 'output', 'addResult' ] )
+  ->getMock();
+$benchProxy = TestingAccessWrapper::newFromObject( $bench );
+$benchProxy->defaultCount = 1;
+
+$bench->expects( $this->once() )->method( 'addResult' )
+  ->with( $this->callback( function ( $res ) {
+return isset( $res['name'] ) && $res['name'] === __CLASS__ . 
'::noop()';
+  } ) );
+
+$bench->bench( [
+  [ 'function' => [ $this, 'noop' ] ]
+] );
+  }
+
+  public function testBenchName_string() {
+$bench = $this->getMockBuilder( Benchmarker::class )
+  ->setMethods( [ 'execute', 'output', 'addResult' ] )
+  ->getMock();
+$benchProxy = TestingAccessWrapper::newFromObject( $bench );
+$benchProxy->defaultCount = 1;
+
+$bench->expects( $this->once() )->method( 'addResult' )
+  ->with( $this->callback( function ( $res ) {
+return 'strtolower(A)';
+  } ) );
+
+$bench->bench( [ [
+  'function' => 'strtolower',
+  'args' => [ 'A' ],
+] ] );
+  }
+
+  /**
+   * @covers Benchmarker::verboseRun
+   */
+  public function testVerboseRun() {
+$bench = $this->getMockBuilder( Benchmarker::class )
+  ->setMethods( [ 'execute', 'output', 'hasOption', 'startBench', 
'addResult' ] )
+  ->getMock();
+$benchProxy = TestingAccessWrapper::newFromObject( $bench );
+$benchProxy->defaultCount = 1;
+
+$bench->expects( $this->exactly( 2 ) )->method( 'hasOption' )
+  ->will( $this->returnValueMap( [
+  [ 'verbose', true ],
+  [ 'count', false ],
+] ) );
+
+$bench->expects( $this->once() )->method( 'output' )
+  ->with( $this->callback( function ( $out ) {
+return preg_match( '/memory.+ peak/', $out ) === 1;
+  } ) );
+
+$bench->bench( [
+  'test' => function () {}
+] );
+  }
+}

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

Gerrit-MessageType: newchange

[MediaWiki-commits] [Gerrit] mediawiki...BlueSky[master]: Refactor BlueSkyTemplate

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

Change subject: Refactor BlueSkyTemplate
..


Refactor BlueSkyTemplate

Hopefully saner. More functions than before, as if there
weren't enough already.
Nothing seems more broken than was previously?

Change-Id: I0c9c59313a99583a85954173dc7f09b45a19bbac
---
M BlueSkyTemplate.php
1 file changed, 375 insertions(+), 371 deletions(-)

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



diff --git a/BlueSkyTemplate.php b/BlueSkyTemplate.php
index 4bdd4bd..6ef0c5a 100644
--- a/BlueSkyTemplate.php
+++ b/BlueSkyTemplate.php
@@ -22,12 +22,6 @@
 * Outputs the entire contents of the page
 */
public function execute() {
-   global $wgContLang, $wgHideInterlanguageLinks;
-
-   //get stupid tools pile; we'll dump these on the page throughout
-   $this->allTools = $this->getPageTools();
-
-   // All this so we know what view mode and stuff we're in...?
$skin = $this->getSkin();
$title = $skin->getTitle();
$request = $skin->getRequest();
@@ -35,387 +29,348 @@
if ( count( $request->getVal( 'diff' ) ) > 0 ) {
$action = 'diff';
}
+   $namespace = $title->getNamespace();
+   $user = $skin->getUser();
+   //get stupid tools pile; we'll dump these on the page throughout
+   $this->allTools = $this->getPageTools();
// We'll treat the mainpage like any other page if they're 
doing something besides looking at it
$this->isMainPage = ( $title->isMainPage() && $action == 'view' 
);
 
-   $namespace = $title->getNamespace();
-   $user = $skin->getUser();
+   // Variables out of the way; open html, body elements, etc
+   $html = $this->get( 'headelement' );
+   $html .= Html::openElement( 'div', [ 'id' => 'mw-wrapper' ] );
 
-   $this->html( 'headelement' );
-   ?>
-   
-   
-   
-'header-outer' ],
+   Html::rawElement( 'div', [ 'class' => 'wrapper-inner', 
'id' => 'header-inner' ],
// Logo block
-   echo $this->getBanner();
-   // Duh.
-   echo $this->getSearch();
+   $this->getBanner() .
+   $this->getSearch() .
// funky tabs
-   echo $this->getMiscNavigation( 'sidebar', 2, 
true );
-   $this->clear();
-   ?>
-   
-   
-   
-   data['sitenotice'] ) {
-   echo Html::rawElement(
+   $this->getMiscNavigation( 'sidebar', 2, true ) .
+   $this->getClear()
+   )
+   );
+
+   $html .= Html::openElement ( 'div', [ 'class' => 
'wrapper-inner', 'id' => 'main-outer' ] );
+
+   if ( $this->data['sitenotice'] ) {
+   $html .= Html::rawElement(
+   'div',
+   [ 'id' => 'siteNotice' ],
+   $this->get( 'sitenotice' )
+   );
+   }
+
+   // Content header
+   if ( $namespace != NS_SPECIAL && !$this->isMainPage ) {
+   $html .= Html::rawElement( 'div', [ 'id' => 
'content-nav' ],
+   Html::rawElement(
'div',
-   [ 'id' => 'siteNotice' ],
-   $this->get( 'sitenotice' )
+   [ 'id' => 'page-tools' ],
+   $this->getPageLinks()
+   ) .
+   Html::rawElement(
+   'div',
+   [ 'id' => 'page-categories' ],
+   $this->getCategoryBreadcrumbs()
+   )
+   );
+   $html .= $this->getClear();
+   $html .= Html::openElement( 'div', [ 'id' => 
'content-header' ] );
+   $html .= $this->getIndicators();
+   $html .= $this->getSpareEditLink();
+   $html .= Html::rawElement(
+   'h1',
+   [
+   'class' 

[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Fix class name in @covers

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400431 )

Change subject: Fix class name in @covers
..

Fix class name in @covers

Change-Id: Ia8d11982ad2cd8c54268a93e9c2ce0745615931a
---
M tests/phpunit/QuizTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/phpunit/QuizTest.php b/tests/phpunit/QuizTest.php
index da5669d..e790756 100644
--- a/tests/phpunit/QuizTest.php
+++ b/tests/phpunit/QuizTest.php
@@ -77,7 +77,7 @@
 
/**
 * @dataProvider provideParseQuestion
-* @covers Question::parseQuestion
+* @covers Quiz::parseQuestion
 */
public function testParseQuestion( $input, $expected, $injectedValue, 
$expectedValue ) {
$this->quiz->mShuffleDiv = $injectedValue;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Comments[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400430 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I8f7d9410bb25c8b82f9f35efb454af13b9f44a4b
---
M includes/Comments.hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Comments 
refs/changes/30/400430/1

diff --git a/includes/Comments.hooks.php b/includes/Comments.hooks.php
index c3709c9..27bb187 100644
--- a/includes/Comments.hooks.php
+++ b/includes/Comments.hooks.php
@@ -48,9 +48,9 @@
$filename = 'comments.sql';
}
 
-   $updater->addExtensionUpdate( array( 'addTable', 'Comments', 
"{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'Comments_Vote', "{$dir}/{$filename}", true ) );
-   $updater->addExtensionUpdate( array( 'addTable', 
'Comments_block', "{$dir}/{$filename}", true ) );
+   $updater->addExtensionTable( 'Comments', "{$dir}/{$filename}" );
+   $updater->addExtensionTable( 'Comments_Vote', 
"{$dir}/{$filename}" );
+   $updater->addExtensionTable( 'Comments_block', 
"{$dir}/{$filename}" );
 
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f7d9410bb25c8b82f9f35efb454af13b9f44a4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ArticleRatings[master]: Use newer DatabaseUpdater function

2017-12-27 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400429 )

Change subject: Use newer DatabaseUpdater function
..

Use newer DatabaseUpdater function

Change-Id: I1ce771b3896a29ed5a6bc1f3b24a3a896f5b0199
---
M ArticleRatingsHooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleRatings 
refs/changes/29/400429/1

diff --git a/ArticleRatingsHooks.php b/ArticleRatingsHooks.php
index eb177e6..df8ee8e 100644
--- a/ArticleRatingsHooks.php
+++ b/ArticleRatingsHooks.php
@@ -206,7 +206,7 @@
 */
public static function onLoadExtensionSchemaUpdates( DatabaseUpdater 
$updater ) {
$file = __DIR__ . '/ratings.sql';
-   $updater->addExtensionUpdate( [ 'addTable', 'ratings', $file, 
true ] );
+   $updater->addExtensionTable( 'ratings', $file );
return true;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ce771b3896a29ed5a6bc1f3b24a3a896f5b0199
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleRatings
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Fix class name in @covers

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

Change subject: Fix class name in @covers
..


Fix class name in @covers

Change-Id: I419095e5e57c686bcf11017f67e6e806060bc165
---
M tests/api/ApiNewsletterTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/api/ApiNewsletterTest.php b/tests/api/ApiNewsletterTest.php
index eb0d335..3c58c91 100644
--- a/tests/api/ApiNewsletterTest.php
+++ b/tests/api/ApiNewsletterTest.php
@@ -7,7 +7,7 @@
  * @group medium
  * @group Database
  *
- * @covers ApiNewsletter
+ * @covers ApiNewsletterSubscribe
  *
  * @author Tina Johnson
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I419095e5e57c686bcf11017f67e6e806060bc165
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
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]: [L10N] Disable cleanUpSectionHeaders on en.wiktionary

2017-12-27 Thread Dvorapa (Code Review)
Dvorapa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400428 )

Change subject: [L10N] Disable cleanUpSectionHeaders on en.wiktionary
..

[L10N] Disable cleanUpSectionHeaders on en.wiktionary

Bug: T169064
Change-Id: I3509e466216c2465ed6978b966f065c4368175f4
---
M pywikibot/cosmetic_changes.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/28/400428/1

diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 6631531..e52246b 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -648,7 +648,7 @@
 and it might be that it is not wanted on other wikis. If there are any
 complaints, please file a bug report.
 """
-if self.site.sitename == 'wiktionary:jbo':
+if self.site.sitename in ['wiktionary:jbo', 'wiktionary:en']:
 return text
 return textlib.replaceExcept(
 text,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Fix class name in @covers

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400427 )

Change subject: Fix class name in @covers
..

Fix class name in @covers

Change-Id: I419095e5e57c686bcf11017f67e6e806060bc165
---
M tests/api/ApiNewsletterTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/api/ApiNewsletterTest.php b/tests/api/ApiNewsletterTest.php
index eb0d335..3c58c91 100644
--- a/tests/api/ApiNewsletterTest.php
+++ b/tests/api/ApiNewsletterTest.php
@@ -7,7 +7,7 @@
  * @group medium
  * @group Database
  *
- * @covers ApiNewsletter
+ * @covers ApiNewsletterSubscribe
  *
  * @author Tina Johnson
  */

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: mw.echo.ui.MenuItemWidget: Override OOUI styles harder

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

Change subject: mw.echo.ui.MenuItemWidget: Override OOUI styles harder
..


mw.echo.ui.MenuItemWidget: Override OOUI styles harder

Bug: T183435
Change-Id: I949de77ac8221bdc4bb35ae7b75e3df91d861d07
---
M modules/styles/mw.echo.ui.MenuItemWidget.less
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.MenuItemWidget.less 
b/modules/styles/mw.echo.ui.MenuItemWidget.less
index 77ca9c5..799f8a3 100644
--- a/modules/styles/mw.echo.ui.MenuItemWidget.less
+++ b/modules/styles/mw.echo.ui.MenuItemWidget.less
@@ -1,15 +1,15 @@
 @import '../echo.variables';
 @import '../echo.mixins';
 
+/* stylelint-disable no-descending-specificity */
 .mw-echo-ui-menuItemWidget {
-   &-icon {
+   // Some extra CSS classes to override OOUI styles with a very specific 
selector
+   &.oo-ui-iconElement &-icon {
display: inline-block;
-   // We have to override oojs-ui's width/height, which uses
-   // a very specific selector
-   width: 1.5em !important;
-   height: 1.5em !important;
-   min-width: 1.5em !important;
-   min-height: 1.5em !important;
+   width: 1.5em;
+   height: 1.5em;
+   min-width: 1.5em;
+   min-height: 1.5em;
 
position: absolute;
top: 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I949de77ac8221bdc4bb35ae7b75e3df91d861d07
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski 
Gerrit-Reviewer: Mooeypoo 
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...Popups[master]: Use absolute class name in @covers

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400426 )

Change subject: Use absolute class name in @covers
..

Use absolute class name in @covers

Namespaced classes need to be absolutely named.

Fixed one @covers of testEventHandling
Change-Id: I92ae621ac35992c3dd6070528e255fafdaa1af76
---
M tests/phpunit/EventLogging/EventLoggerFactoryTest.php
M tests/phpunit/PopupsHooksTest.php
M tests/phpunit/UserPreferencesChangeHandlerTest.php
3 files changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/tests/phpunit/EventLogging/EventLoggerFactoryTest.php 
b/tests/phpunit/EventLogging/EventLoggerFactoryTest.php
index a255972..8716057 100644
--- a/tests/phpunit/EventLogging/EventLoggerFactoryTest.php
+++ b/tests/phpunit/EventLogging/EventLoggerFactoryTest.php
@@ -26,7 +26,7 @@
  * Integration tests for Page Preview hooks
  *
  * @group Popups
- * @coversDefaultClass  EventLoggerFactory
+ * @coversDefaultClass \Popups\EventLogging\EventLoggerFactory
  */
 class EventLoggerFactoryTest extends MediaWikiTestCase {
 
diff --git a/tests/phpunit/PopupsHooksTest.php 
b/tests/phpunit/PopupsHooksTest.php
index 3e49b5f..1d6772c 100644
--- a/tests/phpunit/PopupsHooksTest.php
+++ b/tests/phpunit/PopupsHooksTest.php
@@ -25,7 +25,7 @@
  * Integration tests for Page Preview hooks
  *
  * @group Popups
- * @coversDefaultClass  PopupsHooks
+ * @coversDefaultClass \Popups\PopupsHooks
  */
 class PopupsHooksTest extends MediaWikiTestCase {
 
@@ -194,7 +194,7 @@
}
 
/**
-* @covers PopupsHooks::onUserGetDefaultOptions
+* @covers ::onUserGetDefaultOptions
 */
public function testOnUserGetDefaultOptions() {
$userOptions = [
@@ -310,7 +310,7 @@
}
 
/**
-* @covers PopupsHooks::onMakeGlobalVariablesScript
+* @covers ::onMakeGlobalVariablesScript
 */
public function testOnMakeGlobalVariablesScript() {
$user = User::newFromId( 0 );
diff --git a/tests/phpunit/UserPreferencesChangeHandlerTest.php 
b/tests/phpunit/UserPreferencesChangeHandlerTest.php
index 58af8bd..fc86a10 100644
--- a/tests/phpunit/UserPreferencesChangeHandlerTest.php
+++ b/tests/phpunit/UserPreferencesChangeHandlerTest.php
@@ -25,12 +25,12 @@
  * Integration tests for Page Preview hooks
  *
  * @group Popups
- * @coversDefaultClass  UserPreferencesChangeHandlerTest
+ * @coversDefaultClass \Popups\UserPreferencesChangeHandler
  */
 class UserPreferencesChangeHandlerTest extends MediaWikiTestCase {
 
/**
-* @covers ::handle
+* @covers ::doPreferencesFormPreSave
 * @covers ::__construct
 * @dataProvider provideDataForEventHandling
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92ae621ac35992c3dd6070528e255fafdaa1af76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Remove @file and @ingroup annotations in comments

2017-12-27 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400425 )

Change subject: Remove @file and @ingroup annotations in comments
..

Remove @file and @ingroup annotations in comments

Change-Id: Ic718f3d1eeb9c4add622d6bcbc4429e0bea70fd1
---
M ContentTranslation.alias.php
M ContentTranslation.hooks.php
M api/ApiContentTranslationConfiguration.php
M api/ApiContentTranslationDelete.php
M api/ApiContentTranslationPublish.php
M api/ApiContentTranslationSave.php
M api/ApiContentTranslationSuggestionList.php
M api/ApiContentTranslationToken.php
M api/ApiQueryContentTranslation.php
M api/ApiQueryContentTranslationCorpora.php
M api/ApiQueryContentTranslationLanguageTrend.php
M api/ApiQueryContentTranslationStats.php
M api/ApiQueryContentTranslationSuggestions.php
M api/ApiQueryLangLinksCount.php
M api/ApiQueryPublishedTranslations.php
M api/ApiQueryTranslatorStats.php
M includes/AbuseFilterCheck.php
M includes/CorporaLookup.php
M includes/RestbaseClient.php
M includes/Stats.php
M includes/TranslationStorageManager.php
M includes/TranslationUnit.php
M modules/base/ext.cx.model.js
M modules/dashboard/ext.cx.recommendtool.client.js
M modules/editor/ext.cx.editor.js
M modules/entrypoint/ext.cx.betafeature.notification.js
M modules/entrypoint/ext.cx.entrypoint.js
M modules/entrypoint/ext.cx.interlanguagelink.js
M modules/eventlogging/ext.cx.eventlogging.js
M modules/publish/ext.cx.publish.dialog.js
M modules/publish/ext.cx.publish.js
M modules/publish/ext.cx.wikibase.link.js
M modules/source/ext.cx.source.js
M modules/stats/ext.cx.stats.js
M modules/tools/ext.cx.tools.categories.js
M modules/tools/ext.cx.tools.dictionary.js
M modules/tools/ext.cx.tools.formatter.js
M modules/tools/ext.cx.tools.gallery.js
M modules/tools/ext.cx.tools.images.js
M modules/tools/ext.cx.tools.instructions.js
M modules/tools/ext.cx.tools.js
M modules/tools/ext.cx.tools.link.js
M modules/tools/ext.cx.tools.manager.js
M modules/tools/ext.cx.tools.mt.card.js
M modules/tools/ext.cx.tools.mt.js
M modules/tools/ext.cx.tools.mtabuse.js
M modules/tools/ext.cx.tools.poem.js
M modules/tools/ext.cx.tools.reference.js
M modules/tools/ext.cx.tools.template.card.js
M modules/tools/ext.cx.tools.template.editor.js
M modules/tools/ext.cx.tools.template.js
M modules/tours/ext.cx.tours.publish.init.js
M modules/translation/ext.cx.translation.aligner.js
M modules/translation/ext.cx.translation.conflict.js
M modules/translation/ext.cx.translation.js
M modules/translation/ext.cx.translation.loader.js
M modules/translation/ext.cx.translation.progress.js
M modules/ui/legacy/mw.cx.ui.SourceColumn.js
M modules/ui/legacy/mw.cx.ui.ToolsColumn.js
M modules/ui/legacy/mw.cx.ui.TranslationColumn.js
M modules/ui/legacy/mw.cx.ui.TranslationView.js
M modules/ui/mw.cx.ui.js
M modules/ui/widgets/mw.cx.ui.PublishSettingsWidget.js
M modules/ui/widgets/mw.cx.ui.TitleOptionWidget.js
M modules/util/ext.cx.util.js
M modules/util/ext.cx.util.selection.js
M modules/widgets/feedback/ext.cx.feedback.js
M modules/widgets/progressbar/ext.cx.progressbar.js
M modules/widgets/spinner/ext.cx.spinner.js
M modules/widgets/templates/mw.cx.widgets.TemplateParamOptionWidget.js
M modules/widgets/translator/ext.cx.translator.js
M scripts/dump-corpora.php
M scripts/fix-stats.php
M scripts/manage-lists.php
M specials/SpecialContentTranslation.php
M specials/SpecialContentTranslationStats.php
M tests/qunit/publish/ext.cx.publish.prepare.test.js
M tests/qunit/tools/ext.cx.tools.mtabuse.test.js
M tests/qunit/tools/ext.cx.tools.template.test.js
M tests/qunit/ui/mw.cx.ui.Infobar.test.js
80 files changed, 0 insertions(+), 105 deletions(-)


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

diff --git a/ContentTranslation.alias.php b/ContentTranslation.alias.php
index 7f5e6e8..29258de 100644
--- a/ContentTranslation.alias.php
+++ b/ContentTranslation.alias.php
@@ -2,8 +2,6 @@
 /**
  * Special page aliases for extension ContentTranslation.
  *
- * @file
- * @ingroup Extensions
  * @copyright 2014 ContentTranslation Team and others; see AUTHORS.txt
  * @license GPL-2.0+; see LICENSE.txt
  */
diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 6d14daa..4d3b877 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -2,8 +2,6 @@
 /**
  * Hooks for ContentTranslation extension.
  *
- * @file
- * @ingroup Extensions
  * @copyright See AUTHORS.txt
  * @license GPL-2.0+
  */
diff --git a/api/ApiContentTranslationConfiguration.php 
b/api/ApiContentTranslationConfiguration.php
index dc23502..e2bf6c5 100644
--- a/api/ApiContentTranslationConfiguration.php
+++ b/api/ApiContentTranslationConfiguration.php
@@ -5,7 +5,6 @@
  * Configuration currently contains information about sections that should be 
ignored
  * and template name and parameter mappings for the most common templates.
  *
- * @file
  * @copyright 

[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Use absolute class name in @covers

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400424 )

Change subject: Use absolute class name in @covers
..

Use absolute class name in @covers

Namespaced classes need to be absolutely named.

Change-Id: Ic98e4e3b9fbc1b7cb3187cdbffcb973795a02a6b
---
M tests/phpunit/LinksUpdateHookHandlerTest.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/tests/phpunit/LinksUpdateHookHandlerTest.php 
b/tests/phpunit/LinksUpdateHookHandlerTest.php
index 4cd70c6..b639f41 100644
--- a/tests/phpunit/LinksUpdateHookHandlerTest.php
+++ b/tests/phpunit/LinksUpdateHookHandlerTest.php
@@ -12,7 +12,7 @@
 use Wikimedia\TestingAccessWrapper;
 
 /**
- * @covers PageImages\Hooks\LinksUpdateHookHandler
+ * @covers \PageImages\Hooks\LinksUpdateHookHandler
  *
  * @group PageImages
  *
@@ -115,7 +115,7 @@
 
/**
 * @dataProvider provideDoLinksUpdate
-* @covers LinksUpdateHookHandler::doLinksUpdate
+* @covers \PageImages\Hooks\LinksUpdateHookHandler::doLinksUpdate
 */
public function testDoLinksUpdate(
array $images,
@@ -203,7 +203,7 @@
}
 
/**
-* @covers LinksUpdateHookHandler::getPageImageCandidates
+* @covers 
\PageImages\Hooks\LinksUpdateHookHandler::getPageImageCandidates
 */
public function testGetPageImageCandidates() {
$candidates = [
@@ -288,7 +288,7 @@
 
/**
 * @dataProvider provideScoreFromTable
-* @covers LinksUpdateHookHandler::scoreFromTable
+* @covers \PageImages\Hooks\LinksUpdateHookHandler::scoreFromTable
 */
public function testScoreFromTable( $type, $value, $expected ) {
global $wgPageImagesScores;
@@ -327,7 +327,7 @@
 
/**
 * @dataProvider provideIsFreeImage
-* @covers LinksUpdateHookHandler::isImageFree
+* @covers \PageImages\Hooks\LinksUpdateHookHandler::isImageFree
 */
public function testIsFreeImage( $fileName, $metadata, $expected ) {
RepoGroup::setSingleton( $this->getRepoGroup() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic98e4e3b9fbc1b7cb3187cdbffcb973795a02a6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageImages
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...GWToolset[master]: Use absolute class name in @covers

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400423 )

Change subject: Use absolute class name in @covers
..

Use absolute class name in @covers

Namespaced classes need to be absolutely named.

Change-Id: I582efa2d720600057a3aee3c0c6a523e9167b3b1
---
M tests/phpunit/UtilsTest.php
1 file changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset 
refs/changes/23/400423/1

diff --git a/tests/phpunit/UtilsTest.php b/tests/phpunit/UtilsTest.php
index a6fd516..ede3451 100644
--- a/tests/phpunit/UtilsTest.php
+++ b/tests/phpunit/UtilsTest.php
@@ -1,7 +1,7 @@
 assertEquals( $this->utils->getBytes( '1' ), 1 );
}
 
/**
-* @covers Utils::getBytes
+* @covers \GWToolset\Utils::getBytes
 */
public function test_getBytes_M() {
$this->assertEquals( $this->utils->getBytes( "1M" ), 1048576 );
}
 
/**
-* @covers Utils::getBytes
+* @covers \GWToolset\Utils::getBytes
 */
public function test_getBytes_K() {
$this->assertEquals( $this->utils->getBytes( "1K" ), 1024 );
}
 
/**
-* @covers Utils::getBytes
+* @covers \GWToolset\Utils::getBytes
 */
public function test_getBytes_G() {
$this->assertEquals( $this->utils->getBytes( "1G" ), 1073741824 
);
}
 
/**
-* @covers Utils::getNamespaceName
+* @covers \GWToolset\Utils::getNamespaceName
 */
public function test_getNamespaceName_empty() {
$this->assertEquals( $this->utils->getNamespaceName(), ':' );
}
 
/**
-* @covers Utils::getNamespaceName
+* @covers \GWToolset\Utils::getNamespaceName
 */
public function test_getNamespaceName_6() {
$this->assertEquals( $this->utils->getNamespaceName( 6 ), 
'File:' );
}
 
/**
-* @covers Utils::getNamespaceName
+* @covers \GWToolset\Utils::getNamespaceName
 */
public function test_getNamespaceName_not_string() {
$this->assertEquals( $this->utils->getNamespaceName( 
"Something" ), null );
}
 
/**
-* @covers Utils::normalizeSpace
+* @covers \GWToolset\Utils::normalizeSpace
 */
public function test_normalizeSpace() {
$this->assertEquals( $this->utils->normalizeSpace( "a b cd" ), 
"a_b_cd" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I582efa2d720600057a3aee3c0c6a523e9167b3b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...MultiLanguageManager[master]: Add AvailableRights in extension.json

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400422 )

Change subject: Add AvailableRights in extension.json
..

Add AvailableRights in extension.json

1) AvailableRightsTest::testAvailableRights
Additional user rights need to be added to $wgAvailableRights or via the
"UserGetAllRights" hook. See the instructions at:
https://www.mediawiki.org/wiki/Manual:User_rights#Adding_new_rights
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
+0 => 'language'
 )

Change-Id: I9d415c23bc15fccda74dd131bf9b784b91487e59
---
M extension.json
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiLanguageManager 
refs/changes/22/400422/1

diff --git a/extension.json b/extension.json
index d18530b..e290295 100644
--- a/extension.json
+++ b/extension.json
@@ -24,6 +24,9 @@
"ExtensionFunctions": [
"MultiLanguageManager\\Setup::init"
],
+   "AvailableRights": [
+   "language"
+   ],
"GroupPermissions": {
"*": {
"language": false

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d415c23bc15fccda74dd131bf9b784b91487e59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultiLanguageManager
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...ZeroBanner[master]: Move ApiRawJsonPrinter to own file

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

Change subject: Move ApiRawJsonPrinter to own file
..


Move ApiRawJsonPrinter to own file

Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I039fcaa4330e4a4127b63e713f79c478a8968ee2
---
M .phpcs.xml
M extension.json
A includes/ApiRawJsonPrinter.php
M includes/ApiZeroBanner.php
4 files changed, 48 insertions(+), 46 deletions(-)

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



diff --git a/.phpcs.xml b/.phpcs.xml
index a2d9742..64418a1 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -3,8 +3,6 @@



-   
-   



diff --git a/extension.json b/extension.json
index 0517a69..c83d1a5 100644
--- a/extension.json
+++ b/extension.json
@@ -25,7 +25,7 @@
"ZeroBannerAlias": "ZeroBanner.alias.notranslate.php"
},
"AutoloadClasses": {
-   "ZeroBanner\\ApiRawJsonPrinter": "includes/ApiZeroBanner.php",
+   "ZeroBanner\\ApiRawJsonPrinter": 
"includes/ApiRawJsonPrinter.php",
"ZeroBanner\\ApiZeroBanner": "includes/ApiZeroBanner.php",
"ZeroBanner\\PageRendering": "includes/PageRendering.php",
"ZeroBanner\\PageRenderingHooks": 
"includes/PageRenderingHooks.php",
diff --git a/includes/ApiRawJsonPrinter.php b/includes/ApiRawJsonPrinter.php
new file mode 100644
index 000..880a62e
--- /dev/null
+++ b/includes/ApiRawJsonPrinter.php
@@ -0,0 +1,47 @@
+https://gerrit.wikimedia.org/r/#/c/102850/
+ * one goal was to reduce the likelihood that the netmapper job, see
+ * "https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/
+ * varnish/libvmod-netmapper", which parses JSON responses as part of
+ * a scheduled server job, would enter an unreliable state. Additionally,
+ * dr0ptp4kt's recollection is that another goal was to remove
+ * any Action API wrapping envelope material to reduce the need to traverse
+ * the JSON object properties, as well as to have a minor (albeit
+ * arguably negligible) reduction in response payload size.
+ * Class ApiRawJsonPrinter
+ * @package ZeroBanner
+ */
+class ApiRawJsonPrinter extends \ApiFormatJson {
+   private $moduleName;
+
+   public function __construct( $main, $format, $moduleName ) {
+   parent::__construct( $main, $format );
+   $this->moduleName = $moduleName;
+   }
+
+   public function execute() {
+   // Make sure we only output the data we
+   $res = $this->getResult();
+   if ( defined( 'ApiResult::META_CONTENT' ) ) {
+   $data = $res->getResultData();
+   } else {
+   $data = $res->getData();
+   }
+   $res->reset();
+   if ( array_key_exists( $this->moduleName, $data ) ) {
+   foreach ( $data[$this->moduleName] as $k => $v ) {
+   $res->addValue( null, $k, $v, 
ApiResult::NO_SIZE_CHECK );
+   }
+   }
+   parent::execute();
+   }
+}
diff --git a/includes/ApiZeroBanner.php b/includes/ApiZeroBanner.php
index b539672..31c1d45 100644
--- a/includes/ApiZeroBanner.php
+++ b/includes/ApiZeroBanner.php
@@ -4,49 +4,6 @@
 
 use ApiBase;
 use ApiFormatBase;
-use ApiResult;
-
-/**
- * Utility class to avoid any warnings or any other additions by the
- * API framework. This class extends ApiBase in order to shrink
- * responses for clients.
- * As mentioned in https://gerrit.wikimedia.org/r/#/c/102850/
- * one goal was to reduce the likelihood that the netmapper job, see
- * "https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/
- * varnish/libvmod-netmapper", which parses JSON responses as part of
- * a scheduled server job, would enter an unreliable state. Additionally,
- * dr0ptp4kt's recollection is that another goal was to remove
- * any Action API wrapping envelope material to reduce the need to traverse
- * the JSON object properties, as well as to have a minor (albeit
- * arguably negligible) reduction in response payload size.
- * Class ApiRawJsonPrinter
- * @package ZeroBanner
- */
-class ApiRawJsonPrinter extends \ApiFormatJson {
-   private $moduleName;
-
-   public function __construct( $main, $format, $moduleName ) {
-   parent::__construct( $main, $format );
-   $this->moduleName = $moduleName;
-   }
-
-   public function execute() {
-   // Make sure we only output the data we
-   $res = $this->getResult();
-   if ( defined( 'ApiResult::META_CONTENT' ) ) {
-   $data = $res->getResultData();
-   } else {
-   $data = $res->getData();
-   }
- 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add tests for TextboxBuilder

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

Change subject: Add tests for TextboxBuilder
..


Add tests for TextboxBuilder

Change-Id: I305e0bce902fb027bf02cc8a28e8846808f6437c
---
A tests/phpunit/includes/editpage/TextboxBuilderTest.php
1 file changed, 89 insertions(+), 0 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/tests/phpunit/includes/editpage/TextboxBuilderTest.php 
b/tests/phpunit/includes/editpage/TextboxBuilderTest.php
new file mode 100644
index 000..668badd
--- /dev/null
+++ b/tests/phpunit/includes/editpage/TextboxBuilderTest.php
@@ -0,0 +1,89 @@
+
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+namespace MediaWiki\Tests\EditPage;
+
+use Language;
+use MediaWiki\EditPage\TextboxBuilder;
+use MediaWikiTestCase;
+use Title;
+use User;
+
+/**
+ * @covers \MediaWiki\EditPage\TextboxBuilder
+ */
+class TextboxBuilderTest extends MediaWikiTestCase {
+
+   public function provideAddNewLineAtEnd() {
+   return [
+   [ '', '' ],
+   [ 'foo', "foo\n" ],
+   ];
+   }
+
+   /**
+* @dataProvider provideAddNewLineAtEnd
+*/
+   public function testAddNewLineAtEnd( $input, $expected ) {
+   $builder = new TextboxBuilder();
+   $this->assertSame( $expected, $builder->addNewLineAtEnd( $input 
) );
+   }
+
+   public function testBuildTextboxAttribs() {
+   $user = new User();
+   $user->setOption( 'editfont', 'monospace' );
+
+   $title = $this->getMockBuilder( Title::class )
+   ->disableOriginalConstructor()
+   ->getMock();
+   $title->expects( $this->any() )
+   ->method( 'getPageLanguage' )
+   ->will( $this->returnValue( Language::factory( 'en' ) ) 
);
+
+   $builder = new TextboxBuilder();
+   $attribs = $builder->buildTextboxAttribs(
+   'mw-textbox1',
+   [ 'class' => 'foo bar', 'data-foo' => '123', 'rows' => 
30 ],
+   $user,
+   $title
+   );
+
+   $this->assertInternalType( 'array', $attribs );
+   // custom attrib showed up
+   $this->assertArrayHasKey( 'data-foo', $attribs );
+   // classes merged properly (string)
+   $this->assertSame( 'foo bar mw-editfont-monospace', 
$attribs['class'] );
+   // overrides in custom attrib worked
+   $this->assertSame( 30, $attribs['rows'] );
+   $this->assertSame( 'en', $attribs['lang'] );
+
+   $attribs2 = $builder->buildTextboxAttribs(
+   'mw-textbox2', [ 'class' => [ 'foo', 'bar' ] ], $user, 
$title
+   );
+   // classes merged properly (array)
+   $this->assertSame( [ 'foo', 'bar', 'mw-editfont-monospace' ], 
$attribs2['class'] );
+
+   $attribs3 = $builder->buildTextboxAttribs(
+   'mw-textbox3', [], $user, $title
+   );
+   // classes ok when nothing to be merged
+   $this->assertSame( 'mw-editfont-monospace', $attribs3['class'] 
);
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I305e0bce902fb027bf02cc8a28e8846808f6437c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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]: Add @covers tags to ContentHandler tests

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

Change subject: Add @covers tags to ContentHandler tests
..


Add @covers tags to ContentHandler tests

Change-Id: I4d0994e91f63a0921343f34ef81a82463b4ab969
---
M tests/phpunit/includes/content/ContentHandlerTest.php
M tests/phpunit/includes/content/CssContentTest.php
M tests/phpunit/includes/content/FileContentHandlerTest.php
M tests/phpunit/includes/content/JavaScriptContentTest.php
M tests/phpunit/includes/content/TextContentHandlerTest.php
M tests/phpunit/includes/content/WikitextContentHandlerTest.php
M tests/phpunit/includes/content/WikitextStructureTest.php
7 files changed, 29 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php 
b/tests/phpunit/includes/content/ContentHandlerTest.php
index 1bd2eb0..1462c36 100644
--- a/tests/phpunit/includes/content/ContentHandlerTest.php
+++ b/tests/phpunit/includes/content/ContentHandlerTest.php
@@ -332,7 +332,9 @@
}
}
 
-   /*
+   /**
+* @covers ContentHandler::getAutosummary
+*
 * Test if we become a "Created blank page" summary from getAutoSummary 
if no Content added to
 * page.
 */
@@ -374,11 +376,17 @@
}
*/
 
+   /**
+* @covers ContentHandler::supportsCategories
+*/
public function testSupportsCategories() {
$handler = new DummyContentHandlerForTesting( 
CONTENT_MODEL_WIKITEXT );
$this->assertTrue( $handler->supportsCategories(), 'content 
model supports categories' );
}
 
+   /**
+* @covers ContentHandler::supportsDirectEditing
+*/
public function testSupportsDirectEditing() {
$handler = new DummyContentHandlerForTesting( 
CONTENT_MODEL_JSON );
$this->assertFalse( $handler->supportsDirectEditing(), 'direct 
editing is not supported' );
@@ -407,6 +415,7 @@
}
 
/**
+* @covers ContentHandler::getForModelID
 * @dataProvider provideGetModelForID
 */
public function testGetModelForID( $modelId, $handlerClass ) {
@@ -415,6 +424,9 @@
$this->assertInstanceOf( $handlerClass, $handler );
}
 
+   /**
+* @covers ContentHandler::getFieldsForSearchIndex
+*/
public function testGetFieldsForSearchIndex() {
$searchEngine = $this->newSearchEngine();
 
diff --git a/tests/phpunit/includes/content/CssContentTest.php 
b/tests/phpunit/includes/content/CssContentTest.php
index d2078d7..1e82fdd 100644
--- a/tests/phpunit/includes/content/CssContentTest.php
+++ b/tests/phpunit/includes/content/CssContentTest.php
@@ -83,6 +83,7 @@
}
 
/**
+* @covers CssContent::getRedirectTarget
 * @dataProvider provideGetRedirectTarget
 */
public function testGetRedirectTarget( $title, $text ) {
diff --git a/tests/phpunit/includes/content/FileContentHandlerTest.php 
b/tests/phpunit/includes/content/FileContentHandlerTest.php
index 65efcc9..ad9d419 100644
--- a/tests/phpunit/includes/content/FileContentHandlerTest.php
+++ b/tests/phpunit/includes/content/FileContentHandlerTest.php
@@ -2,6 +2,8 @@
 
 /**
  * @group ContentHandler
+ *
+ * @covers FileContentHandler
  */
 class FileContentHandlerTest extends MediaWikiLangTestCase {
/**
diff --git a/tests/phpunit/includes/content/JavaScriptContentTest.php 
b/tests/phpunit/includes/content/JavaScriptContentTest.php
index 1c746bc..434e17c 100644
--- a/tests/phpunit/includes/content/JavaScriptContentTest.php
+++ b/tests/phpunit/includes/content/JavaScriptContentTest.php
@@ -294,6 +294,7 @@
}
 
/**
+* @covers JavaScriptContent::getRedirectTarget
 * @dataProvider provideGetRedirectTarget
 */
public function testGetRedirectTarget( $title, $text ) {
diff --git a/tests/phpunit/includes/content/TextContentHandlerTest.php 
b/tests/phpunit/includes/content/TextContentHandlerTest.php
index 7d9f74e..a85215b 100644
--- a/tests/phpunit/includes/content/TextContentHandlerTest.php
+++ b/tests/phpunit/includes/content/TextContentHandlerTest.php
@@ -4,6 +4,9 @@
  * @group ContentHandler
  */
 class TextContentHandlerTest extends MediaWikiLangTestCase {
+   /**
+* @covers TextContentHandler::supportsDirectEditing
+*/
public function testSupportsDirectEditing() {
$handler = new TextContentHandler();
$this->assertTrue( $handler->supportsDirectEditing(), 'direct 
editing is supported' );
diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php 
b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
index 77cfb92..02f82f4 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add @covers tags to jobqueue tests

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

Change subject: Add @covers tags to jobqueue tests
..


Add @covers tags to jobqueue tests

Change-Id: I030634ac87139011e5b3d461064a8c10f10cea84
---
M tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php 
b/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
index 43d626d..f874f6d 100644
--- a/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
+++ b/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
@@ -16,6 +16,7 @@
 
/**
 * @dataProvider provider_backlinks
+* @covers BacklinkJobUtils::partitionBacklinkJob
 */
public function testRefreshLinks( $ns, $dbKey, $pages ) {
$title = Title::makeTitle( $ns, $dbKey );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I030634ac87139011e5b3d461064a8c10f10cea84
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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]: Add @covers tags to HTMLForm test

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

Change subject: Add @covers tags to HTMLForm test
..


Add @covers tags to HTMLForm test

Change-Id: I41cc4867b071ee9a58a43760fc4a8b301cda558e
---
M tests/phpunit/includes/htmlform/HTMLFormTest.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/tests/phpunit/includes/htmlform/HTMLFormTest.php 
b/tests/phpunit/includes/htmlform/HTMLFormTest.php
index b7e0053..98511ca 100644
--- a/tests/phpunit/includes/htmlform/HTMLFormTest.php
+++ b/tests/phpunit/includes/htmlform/HTMLFormTest.php
@@ -1,6 +1,8 @@
 https://gerrit.wikimedia.org/r/400151
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I41cc4867b071ee9a58a43760fc4a8b301cda558e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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]: Add @covers tags to filerepo tests

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

Change subject: Add @covers tags to filerepo tests
..


Add @covers tags to filerepo tests

Change-Id: I696e03f9ab3934b6cd04e88e1d611060846d32a4
---
M tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
M tests/phpunit/includes/filerepo/RepoGroupTest.php
M tests/phpunit/includes/filerepo/file/FileTest.php
3 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php 
b/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
index 800c2fc..205df9c 100644
--- a/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
+++ b/tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
@@ -1,5 +1,8 @@
 setMwGlobals( 'wgMaxAnimatedGifArea', 9000 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I696e03f9ab3934b6cd04e88e1d611060846d32a4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...ZeroBanner[master]: Move ApiRawJsonPrinter to own file

2017-12-27 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/400421 )

Change subject: Move ApiRawJsonPrinter to own file
..

Move ApiRawJsonPrinter to own file

Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I039fcaa4330e4a4127b63e713f79c478a8968ee2
---
M .phpcs.xml
M extension.json
A includes/ApiRawJsonPrinter.php
M includes/ApiZeroBanner.php
4 files changed, 48 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/21/400421/1

diff --git a/.phpcs.xml b/.phpcs.xml
index a2d9742..64418a1 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -3,8 +3,6 @@



-   
-   



diff --git a/extension.json b/extension.json
index 0517a69..c83d1a5 100644
--- a/extension.json
+++ b/extension.json
@@ -25,7 +25,7 @@
"ZeroBannerAlias": "ZeroBanner.alias.notranslate.php"
},
"AutoloadClasses": {
-   "ZeroBanner\\ApiRawJsonPrinter": "includes/ApiZeroBanner.php",
+   "ZeroBanner\\ApiRawJsonPrinter": 
"includes/ApiRawJsonPrinter.php",
"ZeroBanner\\ApiZeroBanner": "includes/ApiZeroBanner.php",
"ZeroBanner\\PageRendering": "includes/PageRendering.php",
"ZeroBanner\\PageRenderingHooks": 
"includes/PageRenderingHooks.php",
diff --git a/includes/ApiRawJsonPrinter.php b/includes/ApiRawJsonPrinter.php
new file mode 100644
index 000..880a62e
--- /dev/null
+++ b/includes/ApiRawJsonPrinter.php
@@ -0,0 +1,47 @@
+https://gerrit.wikimedia.org/r/#/c/102850/
+ * one goal was to reduce the likelihood that the netmapper job, see
+ * "https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/
+ * varnish/libvmod-netmapper", which parses JSON responses as part of
+ * a scheduled server job, would enter an unreliable state. Additionally,
+ * dr0ptp4kt's recollection is that another goal was to remove
+ * any Action API wrapping envelope material to reduce the need to traverse
+ * the JSON object properties, as well as to have a minor (albeit
+ * arguably negligible) reduction in response payload size.
+ * Class ApiRawJsonPrinter
+ * @package ZeroBanner
+ */
+class ApiRawJsonPrinter extends \ApiFormatJson {
+   private $moduleName;
+
+   public function __construct( $main, $format, $moduleName ) {
+   parent::__construct( $main, $format );
+   $this->moduleName = $moduleName;
+   }
+
+   public function execute() {
+   // Make sure we only output the data we
+   $res = $this->getResult();
+   if ( defined( 'ApiResult::META_CONTENT' ) ) {
+   $data = $res->getResultData();
+   } else {
+   $data = $res->getData();
+   }
+   $res->reset();
+   if ( array_key_exists( $this->moduleName, $data ) ) {
+   foreach ( $data[$this->moduleName] as $k => $v ) {
+   $res->addValue( null, $k, $v, 
ApiResult::NO_SIZE_CHECK );
+   }
+   }
+   parent::execute();
+   }
+}
diff --git a/includes/ApiZeroBanner.php b/includes/ApiZeroBanner.php
index b539672..31c1d45 100644
--- a/includes/ApiZeroBanner.php
+++ b/includes/ApiZeroBanner.php
@@ -4,49 +4,6 @@
 
 use ApiBase;
 use ApiFormatBase;
-use ApiResult;
-
-/**
- * Utility class to avoid any warnings or any other additions by the
- * API framework. This class extends ApiBase in order to shrink
- * responses for clients.
- * As mentioned in https://gerrit.wikimedia.org/r/#/c/102850/
- * one goal was to reduce the likelihood that the netmapper job, see
- * "https://gerrit.wikimedia.org/r/#/admin/projects/operations/software/
- * varnish/libvmod-netmapper", which parses JSON responses as part of
- * a scheduled server job, would enter an unreliable state. Additionally,
- * dr0ptp4kt's recollection is that another goal was to remove
- * any Action API wrapping envelope material to reduce the need to traverse
- * the JSON object properties, as well as to have a minor (albeit
- * arguably negligible) reduction in response payload size.
- * Class ApiRawJsonPrinter
- * @package ZeroBanner
- */
-class ApiRawJsonPrinter extends \ApiFormatJson {
-   private $moduleName;
-
-   public function __construct( $main, $format, $moduleName ) {
-   parent::__construct( $main, $format );
-   $this->moduleName = $moduleName;
-   }
-
-   public function execute() {
-   // Make sure we only output the data we
-   $res = $this->getResult();
-   if ( defined( 'ApiResult::META_CONTENT' ) ) {
-   $data = $res->getResultData();
-   } else {
-   $data = $res->getData();

  1   2   >