[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Move db1063 to s5

2017-04-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349378 )

Change subject: db-eqiad.php: Move db1063 to s5
..

db-eqiad.php: Move db1063 to s5

db1063 is going to get recloned so it can start replicating from s5 to
become its master at some point next week

Bug: T163109
Change-Id: Ia7c597dc42d27f2d059ad66f41ef4120b780c96c
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 6bded67..c22558e 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -112,7 +112,6 @@
'db1036' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1054' => 1,   # A3 2.8TB  96GB, api
'db1060' => 1,   # C2 2.8TB  96GB, api
-#  'db1063' => 0,   # D1 2.8TB 128GB
'db1074' => 500, # A2 3.6TB 512GB
'db1076' => 500, # B1 3.6TB 512GB
'db1090' => 500, # C3 3.6TB 512GB
@@ -139,6 +138,7 @@
],
's5' => [
'db1049' => 0,   # B1 2.8TB  64GB, master
+#  'db1063' => 0,   # D1 2.8TB 128GB #T163109
'db1026' => 1,   # B1 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1070' => 50,  # D1 2.8TB 160GB, vslow, dump #ROW based 
replication - master for db1095 #T137191

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7c597dc42d27f2d059ad66f41ef4120b780c96c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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...Wikibase[master]: Show supported data formats in Special:EntityData

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

Change subject: Show supported data formats in Special:EntityData
..


Show supported data formats in Special:EntityData

Bug: T162870
Change-Id: I1d1124611f0a95cc24473ed0d84fd8e7ebd2effe
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/Specials/SpecialEntityData.php
M repo/tests/phpunit/includes/Specials/SpecialEntityDataTest.php
4 files changed, 52 insertions(+), 11 deletions(-)

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



diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index eb628bc..39aa9d9 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -300,7 +300,7 @@
"wikibase-entitydata-unsupported-format": "The data format $1 is not 
supported by this interface.",
"wikibase-entitydata-storage-error": "Failed to load entity $1.",
"wikibase-entitydata-title": "Entity Data",
-   "wikibase-entitydata-text": "This page provides a linked data interface 
to entity values. Please provide the entity ID in the URL, using subpage 
syntax.\n* Content negotiation applies based on you client's Accept header. 
This means that the entity data will be provided in the format preferred by 
your client. For a web browser, this will be HTML, causing your browser to be 
redirected to the regular entity page.\n* You can explicitly request a specific 
data format by adding the appropriate file extension to the entity ID: Q23.json 
will return data in the JSON format, Q23.ttl will return RDF/Turtle, and so 
on.",
+   "wikibase-entitydata-text": "This page provides a linked data interface 
to entity values. Please provide the entity ID in the URL, using subpage 
syntax.\n* Content negotiation applies based on you client's Accept header. 
This means that the entity data will be provided in the format preferred by 
your client. For a web browser, this will be HTML, causing your browser to be 
redirected to the regular entity page.\n* You can explicitly request a specific 
data format by adding the appropriate file extension to the entity ID: Q23.json 
will return data in the JSON format, Q23.ttl will return RDF/Turtle, and so on. 
Supported formats are: $1.",
"special-entitypage": "Entity page",
"wikibase-entitypage-title": "Entity Page",
"wikibase-entitypage-text": "This page redirects to the entity page on 
the repository it belongs to. Please provide the entity ID in the URL, using 
subpage syntax.",
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index 8fb3d5c..308cc4e 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -332,7 +332,7 @@
"wikibase-entitydata-unsupported-format": "Error shown when the 
requested output format is not supported for entity data (HTTP error 
415).\n\nParameters:\n* $1 - the specified data format name",
"wikibase-entitydata-storage-error": "Error shown when the requested 
entity could not be loaded.\n\nParameters:\n* $1 - entity ID\n* $2 - (Unused) 
revision ID\nSee also:\n* {{msg-mw|Wikibase-entitydata-bad-revision}}",
"wikibase-entitydata-title": "Title shown on the special page when a 
form or text is presented",
-   "wikibase-entitydata-text": "Explanatory text shown on the special 
page.",
+   "wikibase-entitydata-text": "Explanatory text shown on the special 
page.\n* $1: List of supported formats",
"special-entitypage": "{{doc-special|EntityPage}}\nThis special page 
redirects to the actual entity page on the repository the entity belongs to.",
"wikibase-entitypage-title": "Title shown on Special:EntityPage when 
the explanatory text is presented",
"wikibase-entitypage-text": "Explanatory text shown on 
Special:EntityPage when no ID has been provided.",
diff --git a/repo/includes/Specials/SpecialEntityData.php 
b/repo/includes/Specials/SpecialEntityData.php
index 82f680e..fa2cdaf 100644
--- a/repo/includes/Specials/SpecialEntityData.php
+++ b/repo/includes/Specials/SpecialEntityData.php
@@ -30,8 +30,15 @@
 */
private $requestHandler = null;
 
+   /**
+* @var EntityDataFormatProvider|null
+*/
+   private $entityDataFormatProvider = null;
+
public function __construct() {
parent::__construct( 'EntityData' );
+
+   $this->entityDataFormatProvider = new 
EntityDataFormatProvider();
}
 
/**
@@ -75,8 +82,6 @@
$titleLookup = $wikibaseRepo->getEntityTitleLookup();
$entityIdParser = $wikibaseRepo->getEntityIdParser();
 
-   $entityDataFormatProvider = new EntityDataFormatProvider();
-
$serializerFactoryOptions = 
SerializerFactory::OPTION_SERIALIZE_MAIN_SNAKS_WITHOUT_HASH +

SerializerFactory::OPTION_SERIALIZE_REFERENCE_SNAKS_WITHOUT_HASH;
 
@@ -91,7 +96,7 @@
$wikibas

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Refactor foreign EntityId parsing in LinkBeginHookHandler

2017-04-20 Thread WMDE-leszek (Code Review)
WMDE-leszek has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/339654 )

Change subject: Refactor foreign EntityId parsing in LinkBeginHookHandler
..


Refactor foreign EntityId parsing in LinkBeginHookHandler

Main reason to touch this code was the fact that two methods implemented
the string "Special:EntityPage/".

I also removed the "lookup as a local ID using the $this->entityIdLookup
service" from the method, and moved this out. What's left is a method that
exclusively deals with foreign IDs.

This should not change any behavior, this is pure refactoring.

Bug: T157004
Change-Id: I26893ee1c0bc0cc26b5c38db5c56ec271e059c56
---
M repo/includes/Hooks/LinkBeginHookHandler.php
1 file changed, 26 insertions(+), 31 deletions(-)

Approvals:
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/repo/includes/Hooks/LinkBeginHookHandler.php 
b/repo/includes/Hooks/LinkBeginHookHandler.php
index 439bf26..9f45378 100644
--- a/repo/includes/Hooks/LinkBeginHookHandler.php
+++ b/repo/includes/Hooks/LinkBeginHookHandler.php
@@ -171,8 +171,8 @@
$out = $context->getOutput();
$outTitle = $out->getTitle();
 
-   $targetIsForeignEntityPage = $this->isForeignEntityPage( 
$target );
-   $isLocal = !$targetIsForeignEntityPage;
+   $foreignEntityId = $this->parseForeignEntityId( $target );
+   $isLocal = !$foreignEntityId;
 
if ( $isLocal
&& !$this->entityNamespaceLookup->isEntityNamespace( 
$target->getNamespace() )
@@ -215,7 +215,7 @@
return;
}
 
-   $entityId = $this->getEntityIdFromTarget( $target );
+   $entityId = $foreignEntityId ?: 
$this->entityIdLookup->getEntityIdForTitle( $target );
 
if ( !$entityId ) {
return;
@@ -252,38 +252,18 @@
/**
 * @param LinkTarget $target
 *
-* @return bool
+* @return EntityId|null
 */
-   private function isForeignEntityPage( LinkTarget $target ) {
+   private function parseForeignEntityId( LinkTarget $target ) {
$interwiki = $target->getInterwiki();
 
if ( $interwiki === '' || 
!$this->interwikiLookup->isValidInterwiki( $interwiki ) ) {
-   return false;
+   return null;
}
 
-   return $this->startsWith( $target->getText(), 
'Special:EntityPage/' );
-   }
+   $idPart = $this->extractForeignIdString( $target->getText() );
 
-   /**
-* @param string $haystack
-* @param string $needle
-*
-* @return bool
-*/
-   private function startsWith( $haystack, $needle ) {
-   return strncmp( $haystack, $needle, strlen( $needle ) ) === 0;
-   }
-
-   /**
-* @param Title $target
-*
-* @return null|EntityId
-*/
-   private function getEntityIdFromTarget( Title $target ) {
-   if ( $this->isForeignEntityPage( $target ) ) {
-   $interwiki = $target->getInterwiki();
-   $idPart = substr( $target->getText(), strlen( 
'Special:EntityPage/' ) );
-
+   if ( $idPart !== null ) {
try {
// FIXME: This assumes repository name is equal 
to interwiki. This assumption might
// become invalid
@@ -292,11 +272,26 @@
);
} catch ( EntityIdParsingException $ex ) {
}
-
-   return null;
}
 
-   return $this->entityIdLookup->getEntityIdForTitle( $target );
+   return null;
+   }
+
+   /**
+* @param string $pageName
+*
+* @return string|null
+*/
+   private function extractForeignIdString( $pageName ) {
+   // FIXME: This encodes knowledge from 
EntityContentFactory::getTitleForId
+   $prefix = 'Special:EntityPage/';
+   $prefixLength = 19;
+
+   if ( strncmp( $pageName, $prefix, $prefixLength ) === 0 ) {
+   return substr( $pageName, $prefixLength );
+   }
+
+   return null;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26893ee1c0bc0cc26b5c38db5c56ec271e059c56
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
G

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1067

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

Change subject: db-eqiad.php: Depool db1067
..


db-eqiad.php: Depool db1067

db1067 needs an ALTER table

Bug: T132416
Change-Id: Ia016a1b7050463d7cbe27235d6907f28d7d94bb7
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 1bf6991..6bded67 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -94,7 +94,7 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,   # D1 2.8TB 160GB, old master
+#  'db1067' => 0,   # D1 2.8TB 160GB, old master #T132416
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia016a1b7050463d7cbe27235d6907f28d7d94bb7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
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...ContentTranslation[master]: Improve CX draft saving logic

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

Change subject: Improve CX draft saving logic
..


Improve CX draft saving logic

* Increase retry delay after each failure
* Limit automatic retry attempts to 5, after which user action is
  needed to attempt saving again.
* If a save has failed, prevent other save requests other than the
  the retry attempt
* Throttle auto-saving: before it would save when a three second
  pause is detected. This could lead the worst case of a save
  happening every three seconds. Changed this to use throttle
  instead, which saves every 15 seconds (taking a very conservative
  value here on purpose) regardless whether there is a pause in
  the writing or not.
* Removed the unused mw.cx.translation.save hook while at it.
* More verbose debug logging to make debugging and testing easier.

These changes should reduce the amount of draft save requests
considerable both when 1) saving is failing quickly (e.g. read only)
2) save requests time out (e.g. database overloaded)

Bug: T163344
Change-Id: I37d8de3969700aa2013b74f54b976349632094ae
---
M hooks.md
M modules/translation/ext.cx.translation.storage.js
2 files changed, 49 insertions(+), 37 deletions(-)

Approvals:
  KartikMistry: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Nikerabbit: Looks good to me, but someone else must approve
  Santhosh: Looks good to me, approved



diff --git a/hooks.md b/hooks.md
index 6b336d3..ff858bb 100644
--- a/hooks.md
+++ b/hooks.md
@@ -145,11 +145,6 @@
 
 Fired when the title for the translation is changed. Check for existing title 
listens for this.
 
-## mw.cx.translation.save
-
-Fired to request saving a translation as a draft. It will check if there is 
something to save.
-If so, cxsave API call will be initiated.
-
 ## mw.cx.translation.save-started
 
 Fired when a cxsave API call is beginning. Can be used to indicate the 
progress of save.
diff --git a/modules/translation/ext.cx.translation.storage.js 
b/modules/translation/ext.cx.translation.storage.js
index 8ee04f7..808f3d8 100644
--- a/modules/translation/ext.cx.translation.storage.js
+++ b/modules/translation/ext.cx.translation.storage.js
@@ -7,7 +7,8 @@
 ( function ( $, mw ) {
'use strict';
 
-   var timer, saveRequest,
+   var saveRequest,
+   timer = null,
failCounter = 0;
 
/**
@@ -42,12 +43,12 @@
return $content[ 0 ].outerHTML;
};
 
-   ContentTranslationStorage.prototype.save = function () {
+   ContentTranslationStorage.prototype.save = function ( origin ) {
var sections;
 
sections = this.getSectionsToSave();
if ( sections && sections.length ) {
-   this.saveSections( sections );
+   this.saveSections( sections, origin );
}
 
};
@@ -77,15 +78,11 @@
self.markForSave( $targetSection );
} );
 
-   mw.hook( 'mw.cx.translation.change' ).add( $.debounce( 3000, 
function () {
-   // Reset fail counter so that autosave if stopped can 
be restarted.
-   failCounter = 0;
+   mw.hook( 'mw.cx.translation.change' ).add( $.throttle( 15000, 
function () {
// mw.cx.translation.change get fired for every changes 
in translation.
// We debounce the handler to reduce the excessive save 
API calls.
-   self.save();
+   self.save( 'change' );
} ) );
-
-   mw.hook( 'mw.cx.translation.save' ).add( $.proxy( this.save, 
this ) );
 
mw.hook( 'mw.cx.draft.restoring' ).add( function () {
// Do not save while restoring is being attempted
@@ -99,7 +96,7 @@
$( document ).on( 'keydown', function ( e ) {
// See 
https://medium.com/medium-eng/the-curious-case-of-disappearing-polish-s-fa398313d4df
if ( ( e.metaKey || e.ctrlKey && !e.altKey ) && e.which 
=== 83 ) {
-   self.save();
+   self.save( 'shortcut' );
return false;
}
} );
@@ -112,7 +109,7 @@
sections = this.getSectionsToSave();
if ( sections && sections.length ) {
// Trigger save anyway.
-   this.save();
+   this.save( 'navigation' );
// Inform about sections not saved.
return mw.msg( 'cx-warning-unsaved-translation' );
} else {
@@ -120,18 +117,31 @@
}
};
 
-   ContentTranslationStorage.prototype.saveSections = function ( sections 
) {

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1067

2017-04-20 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349377 )

Change subject: db-eqiad.php: Depool db1067
..

db-eqiad.php: Depool db1067

db1067 needs an ALTER table

Bug: T132416
Change-Id: Ia016a1b7050463d7cbe27235d6907f28d7d94bb7
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 1bf6991..6bded67 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -94,7 +94,7 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,   # D1 2.8TB 160GB, old master
+#  'db1067' => 0,   # D1 2.8TB 160GB, old master #T132416
'db1051' => 50,  # B3 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1055' => 50,  # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia016a1b7050463d7cbe27235d6907f28d7d94bb7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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...BlueSpiceExtensions[REL1_27]: BSStatebar: Better mobile integration

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

Change subject: BSStatebar: Better mobile integration
..


BSStatebar: Better mobile integration

Change-Id: I8b1bdfee032042814e77eb2b3590760d5ad94007
---
M StateBar/extension.json
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/StateBar/extension.json b/StateBar/extension.json
index b3c67ec..6070f27 100644
--- a/StateBar/extension.json
+++ b/StateBar/extension.json
@@ -37,11 +37,13 @@
"ResourceModules": {
"ext.bluespice.statebar.style": {
"styles": "bluespice.StateBar.css",
-   "position": "top"
+   "position": "top",
+   "targets": [ "desktop", "mobile" ]
},
"ext.bluespice.statebar": {
"scripts": "bluespice.StateBar.js",
-   "position": "bottom"
+   "position": "bottom",
+   "targets": [ "desktop", "mobile" ]
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b1bdfee032042814e77eb2b3590760d5ad94007
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
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...BlueSpiceExtensions[master]: BSStatebar: Better mobile integration

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

Change subject: BSStatebar: Better mobile integration
..


BSStatebar: Better mobile integration

Change-Id: I8b1bdfee032042814e77eb2b3590760d5ad94007
---
M StateBar/extension.json
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/StateBar/extension.json b/StateBar/extension.json
index b997c47..4dfb832 100644
--- a/StateBar/extension.json
+++ b/StateBar/extension.json
@@ -37,11 +37,13 @@
"ResourceModules": {
"ext.bluespice.statebar.style": {
"styles": "bluespice.StateBar.css",
-   "position": "top"
+   "position": "top",
+   "targets": [ "desktop", "mobile" ]
},
"ext.bluespice.statebar": {
"scripts": "bluespice.StateBar.js",
-   "position": "bottom"
+   "position": "bottom",
+   "targets": [ "desktop", "mobile" ]
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b1bdfee032042814e77eb2b3590760d5ad94007
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Robert Vogel 
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...BlueSpiceExtensions[REL1_27]: BSStatebar: Better mobile integration

2017-04-20 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349376 )

Change subject: BSStatebar: Better mobile integration
..

BSStatebar: Better mobile integration

Change-Id: I8b1bdfee032042814e77eb2b3590760d5ad94007
---
M StateBar/extension.json
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/76/349376/1

diff --git a/StateBar/extension.json b/StateBar/extension.json
index b3c67ec..6070f27 100644
--- a/StateBar/extension.json
+++ b/StateBar/extension.json
@@ -37,11 +37,13 @@
"ResourceModules": {
"ext.bluespice.statebar.style": {
"styles": "bluespice.StateBar.css",
-   "position": "top"
+   "position": "top",
+   "targets": [ "desktop", "mobile" ]
},
"ext.bluespice.statebar": {
"scripts": "bluespice.StateBar.js",
-   "position": "bottom"
+   "position": "bottom",
+   "targets": [ "desktop", "mobile" ]
}
},
"ResourceFileModulePaths": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b1bdfee032042814e77eb2b3590760d5ad94007
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Pwirth 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Flatten links inside section titles anchors

2017-04-20 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349375 )

Change subject: Flatten links inside section titles anchors
..

Flatten links inside section titles anchors

Anchor names of section titles don't have any HTML in MediaWiki.

Change-Id: Ib774f286e47e6b0a05272fd9cb56dbb8ab00efce
---
M lib/parsoid-access.js
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M test/lib/parsoid/parsoid-access-test.js
4 files changed, 41 insertions(+), 7 deletions(-)


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

diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js
index 9ef3f61..b1c790a 100644
--- a/lib/parsoid-access.js
+++ b/lib/parsoid-access.js
@@ -80,6 +80,23 @@
 }
 
 /**
+ * Replaces links inside a string with their inner HTML
+ * @param {!string} input string that may contain links
+ * @return {!string} string without links
+ */
+function flattenLinks(input) {
+if (/https://github.com/fgnass/domino/issues/73 seems to indicate it 
should
+return doc.querySelector('body').textContent;
+}
+return input;
+}
+
+/**
  * @param {!document} doc the parsed DOM Document of the Parsoid output
  * @return {!sections[]} an array of section JSON elements
  */
@@ -98,7 +115,7 @@
 const className = currentSectionDiv.className;
 currentSection.toclevel = 
parseInt(className.substring('toclevel_'.length), 10);
 currentSection.line = currentSectionDiv.title;
-currentSection.anchor = a.anchorencode(currentSection.line);
+currentSection.anchor = 
a.anchorencode(flattenLinks(currentSection.line));
 }
 
 sections.push(currentSection);
@@ -233,6 +250,7 @@
 getRevisionFromEtag,
 
 // VisibleForTesting
+_flattenLinks: flattenLinks,
 _addSectionDivs: addSectionDivs,
 _getSectionsText: getSectionsText,
 _getBaseUri: getBaseUri,
diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 1883aa9..68e468c 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -88,14 +88,14 @@
 "text": "\n\"WP:TPA\" redirects here. For talk 
page archiving, see Help:Archiving a talk 
page.\nA perfect Wikipedia 
article...\nIs on a notable 
topic.\nFills a gap not provided by existing or 
related articles.\nHas an appropriate 
structure.\n\n",
 "toclevel": 1,
 "line": "From Wikipedia:The perfect article",
-"anchor": 
"From_.3Ca_href.3D.22.2Fwiki.2FWikipedia:The_perfect_article.22_title.3D.22Wikipedia:The_perfect_article.22.3EWikipedia:The_perfect_article.3C.2Fa.3E"
+"anchor": "From_Wikipedia:The_perfect_article"
   },
   {
 "id": 11,
 "text": "\n\n",
 "toclevel": 1,
 "line": "From Wikipedia:Manual_of_Style/Layout",
-"anchor": 
"From_.3Ca_href.3D.22.2Fwiki.2FWikipedia:Manual_of_Style.2FLayout.22_title.3D.22Wikipedia:Manual_of_Style.2FLayout.22.3EWikipedia:Manual_of_Style.2FLayout.3C.2Fa.3E"
+"anchor": "From_Wikipedia:Manual_of_Style.2FLayout"
   },
   {
 "id": 12,
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index ad0f691..4155ed7 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -77,13 +77,13 @@
   {
 "id": 10,
 "toclevel": 1,
-"anchor": 
"From_.3Ca_href.3D.22.2Fwiki.2FWikipedia:The_perfect_article.22_title.3D.22Wikipedia:The_perfect_article.22.3EWikipedia:The_perfect_article.3C.2Fa.3E",
+"anchor": "From_Wikipedia:The_perfect_article",
 "line": "From Wikipedia:The perfect article"
   },
   {
 "id": 11,
 "toclevel": 1,
-"anchor": 
"From_.3Ca_href.3D.22.2Fwiki.2FWikipedia:Manual_of_Style.2FLayout.22_title.3D.22Wikipedia:Manual_of_Style.2FLayout.22.3EWikipedia:Manual_of_Style.2FLayout.3C.2Fa.3E",
+"anchor": "From_Wikipedia:Manual_of_Style.2FLayout",
 "line": "From Wikipedia:Manual_of_Style/Layout"
   },
   {
@@ -230,14 +230,14 @@
 "text": "\n\"WP:TPA\" redirects here. For talk 
page archiving, see Help:Archiving a talk 
page.\nA perfect Wikipedia 
article...\n

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix links inside section titles

2017-04-20 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349374 )

Change subject: Fix links inside section titles
..

Fix links inside section titles

Links inside section titles did not get the URL rewrite.
This patch moves the URL rewrite before the section splitting.

Bug: T163449
Change-Id: Ic2b0f68914092b6ff88f653a34824610fce8aadf
---
M lib/parsoid-access.js
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section21-text.html
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section8-text.html
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section9-text.html
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section21-text.html
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section8-text.html
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section9-text.html
9 files changed, 31 insertions(+), 31 deletions(-)


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

diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js
index fce42f8..9ef3f61 100644
--- a/lib/parsoid-access.js
+++ b/lib/parsoid-access.js
@@ -178,9 +178,9 @@
 if (legacy) {
 transforms.shortenPageInternalLinks(doc, 
getParsoidLinkTitle(doc));
 }
+transforms.addRequiredMarkup(doc);
 transforms.stripUnneededMarkup(doc, legacy);
 addSectionDivs(doc);
-transforms.addRequiredMarkup(doc);
 
 page.sections = getSectionsText(doc);
 return page;
diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 24bdf8a..1883aa9 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -71,14 +71,14 @@
   },
   {
 "id": 8,
-"text": "\n\n\n\nMultiple images:\nCautionEjectionTwo cards 
used by football referees\n\nImagemap:\n\nhttp://projects.vassar.edu/1896/democrats.html\"; 
class=\"plainlinks\" rel=\"nofollow\" title=\"1896 Democrats\">\n\n\n\n\n\n\nPanoramas:\n\nHelsinki has many 
buildings.\n\n\n",
+"text": "\n\n\n\nMultiple images:\nCautionEjectionTwo cards 
used by football referees\n\nImagemap:\n\nhttp://projects.vassar.edu/1896/democrats.html\"; 
class=\"plainlinks\" rel=\"nofollow\" title=\"1896 Democrats\">\n\n\n\n\n\n\nPanoramas:\n\nHelsinki has many 
buildings.\n\n\n",
 "toclevel": 1,
 "line": "Images",
 "anchor": "Images"
   },
   {
 "id": 9,
-"text": "\n\n\n\n",
+"text": "\n\n\n\n",
 "toclevel": 1,
 "line": "Video",
 "anchor": "Video"
@@ -87,15 +87,15 @@
 "id": 10,
 "text": "\n\"WP:TPA\" redirects here. For talk 
page archiving, see Help:Archiving a talk 
page.\nA perfect Wikipedia 
article...\nIs on a notable 
topic.\nFills a gap not provided by existing or 
related articles.\nHas an appropriate 
structure.\n\n",
 "toclevel": 1,
-"line": "From Wikipedia:The perfect article",
-"anchor": 
"From_.3Ca_href.3D.22..2FWikipedia:The_perfect_article.22_title.3D.22Wikipedia:The_perfect_article.22.3EWikipedia:The_perfect_article.3C.2Fa.3E"
+"line": "From Wikipedia:The perfect article",
+"anchor": 
"From_.3Ca_href.3D.22.2Fwiki.2FWikipedia:The_perfect_article.22_title.3D.22Wikipedia:The_perfect_article.22.3EWikipedia:The_perfect_article.3C.2Fa.3E"
   },
   {
 "id": 11,
 "text": "\n\n",
 "toclevel": 1,
-"line": "From Wikipedia:Manual_of_Style/Layout",
-"anchor": 
"From_.3Ca_href.3D.22..2FWikipedia:Manual_of_Style.2FLayout.22_title.3D.22Wikipedia:Manual_of_Style.2FLayout.22.3EWikipedia:Manual_of_Style.2FLayout.3C.2Fa.3E"
+"line": "From Wikipedia:Manual_of_Style/Layout",
+"anchor": 
"From_.3Ca_href.3D.22.2Fwiki.2FWikipedia:Manual_of_Style.2FLayout.22_title.3D.22Wikipedia:Manual_of_Style.2FLayout.22.3EWikipedia:Manual_of_Style.2FLayout.3C.2Fa.3E"
   },
   {
 "id": 12,
@@ -162,7 +162,7 @@
   },
   {
 "id": 21,
-"text": "\n\n\n\n\nWikimedia Commons has media related to https://commons.wikimedia.org/wiki/Category:Wikipedia%20logos\"; 
title=\"commons:Category:Wikipedia logos\" class=\"external

[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-04-20T10:00:01+0000

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

Change subject: New Wikidata Build - 2017-04-20T10:00:01+
..


New Wikidata Build - 2017-04-20T10:00:01+

Change-Id: Ibe118cd9591ea6d7324e7de235b7e50d6678256b
---
M composer.lock
M extensions/Constraints/extension.json
M extensions/Constraints/includes/ConstraintCheck/Checker/TypeChecker.php
M extensions/Constraints/includes/ConstraintCheck/Checker/ValueTypeChecker.php
M extensions/Constraints/includes/ConstraintCheck/Helper/TypeCheckerHelper.php
M extensions/Constraints/includes/ConstraintReportFactory.php
M 
extensions/Constraints/tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php
M extensions/Constraints/tests/phpunit/Checker/TypeChecker/TypeCheckerTest.php
M 
extensions/Constraints/tests/phpunit/Checker/TypeChecker/ValueTypeCheckerTest.php
M extensions/Constraints/tests/phpunit/DelegatingConstraintCheckerTest.php
M extensions/Wikibase/client/WikibaseClient.datatypes.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
M extensions/Wikibase/client/i18n/atj.json
M extensions/Wikibase/client/i18n/cs.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/includes/WikibaseClient.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/WikibaseLib.datatypes.php
M extensions/Wikibase/lib/i18n/de.json
M extensions/Wikibase/lib/i18n/en.json
M extensions/Wikibase/lib/i18n/fa.json
M extensions/Wikibase/lib/i18n/lv.json
M extensions/Wikibase/lib/i18n/qqq.json
M extensions/Wikibase/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
M 
extensions/Wikibase/lib/tests/phpunit/Formatters/WikibaseValueFormatterBuildersTest.php
M extensions/Wikibase/repo/Wikibase.i18n.alias.php
M extensions/Wikibase/repo/Wikibase.php
M extensions/Wikibase/repo/WikibaseRepo.datatypes.php
M extensions/Wikibase/repo/config/Wikibase.default.php
M extensions/Wikibase/repo/i18n/de.json
M extensions/Wikibase/repo/i18n/en.json
M extensions/Wikibase/repo/i18n/fa.json
M extensions/Wikibase/repo/i18n/qqq.json
M extensions/Wikibase/repo/includes/Content/ItemContent.php
M extensions/Wikibase/repo/includes/Content/ItemHandler.php
M extensions/Wikibase/repo/includes/Hooks/LinkBeginHookHandler.php
A extensions/Wikibase/repo/includes/Rdf/Values/TabularDataRdfBuilder.php
A extensions/Wikibase/repo/includes/Specials/SpecialAvailableBadges.php
M extensions/Wikibase/repo/includes/ValidatorBuilders.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
M extensions/Wikibase/repo/resources/Resources.php
M extensions/Wikibase/repo/resources/experts/getStore.js
M extensions/Wikibase/repo/resources/experts/resources.php
M extensions/Wikibase/repo/resources/parsers/getStore.js
M extensions/Wikibase/repo/resources/wikibase.ui.entityViewInit.js
M extensions/Wikibase/repo/tests/phpunit/includes/Content/ItemContentTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/Content/ItemHandlerTest.php
A 
extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialAvailableBadgesTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/ValidatorBuildersTest.php
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_static.php
M vendor/composer/installed.json
53 files changed, 800 insertions(+), 72 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 97b8027..a45082e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -935,7 +935,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints";,
-"reference": "75bf5aefb01f5b8eeda91931b86afcc79be0"
+"reference": "c2aa62f43030e3c57f7631f3e9cc4c750bd1de8e"
 },
 "require": {
 "php": ">=5.5.9",
@@ -988,7 +988,7 @@
 "support": {
 "issues": 
"https://phabricator.wikimedia.org/project/profile/1202/";
 },
-"time": "2017-04-18 14:34:44"
+"time": "2017-04-19 11:01:26"
 },
 {
 "name": "wikibase/data-model",
@@ -1558,12 +1558,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-"reference": "28fe263493776f3e2f5e46235dbfdd25a2f9ecc0"
+"reference": "9d0af6ab950d1fd60eea2f3b098cb2efba9b"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/28fe263493776f3e2f5e46235dbfdd25a2f9ecc0";,
-"reference": "28fe263493776f3e2f5e46235dbfdd25a2f9ecc0",
+"url": 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove mobile user modules

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

Change subject: Remove mobile user modules
..


Remove mobile user modules

These replicate functionality in core.
Use User common.js/minerva.js going forward.
Note this is inconsistent with how the site
module behaves - that still loads mobile.js
and mobile.css rather than common.css and
common.js

Bug: T156426
Change-Id: Ib61879a4c9b3e6c8f2bb7df4198e0cba67547817
---
M extension.json
D includes/modules/MobileUserModule.php
D includes/modules/MobileUserStylesModule.php
M includes/skins/SkinMinerva.php
4 files changed, 1 insertion(+), 72 deletions(-)

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



diff --git a/extension.json b/extension.json
index 59c40ac..d7a0705 100644
--- a/extension.json
+++ b/extension.json
@@ -67,8 +67,6 @@
"InlineDiffFormatter": "includes/diff/InlineDiffFormatter.php",
"InlineDifferenceEngine": 
"includes/diff/InlineDifferenceEngine.php",
"MobileSiteModule": "includes/modules/MobileSiteModule.php",
-   "MobileUserModule": "includes/modules/MobileUserModule.php",
-   "MobileUserStylesModule": 
"includes/modules/MobileUserStylesModule.php",
"SpecialUploads": "includes/specials/SpecialUploads.php",
"SpecialMobileHistory": 
"includes/specials/SpecialMobileHistory.php",
"SpecialMobileDiff": "includes/specials/SpecialMobileDiff.php",
@@ -1170,14 +1168,6 @@
"mobile.startup"
],
"class": "MobileSiteModule"
-   },
-   "mobile.usermodule.styles": {
-   "class": "MobileUserStylesModule",
-   "position": "top"
-   },
-   "mobile.usermodule": {
-   "class": "MobileUserModule",
-   "position": "bottom"
},
"mobile.special.mobilecite.styles": {
"targets": "mobile",
diff --git a/includes/modules/MobileUserModule.php 
b/includes/modules/MobileUserModule.php
deleted file mode 100644
index fc25ddb..000
--- a/includes/modules/MobileUserModule.php
+++ /dev/null
@@ -1,30 +0,0 @@
-getSkinOption( self::OPTION_PRINT_STYLES ) ) {
$styles[] = 'skins.minerva.print.styles';
}
 
$out->addModuleStyles( $styles );
-   $out->addModuleScripts( 'mobile.usermodule' );
$out->addJsConfigVars( $this->getSkinConfigVariables() );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib61879a4c9b3e6c8f2bb7df4198e0cba67547817
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jdlrobson 
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] operations/puppet[production]: nagios_common: add performance team members to contact group

2017-04-20 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349372 )

Change subject: nagios_common: add performance team members to contact group
..


nagios_common: add performance team members to contact group

There already was a contact group for the performance team
but it only had one generic member with the list email address
to send notifications there.

But for T163432, giving individual users permissions on the Icinga
web UI, we need to add real people into it.

These users have just been created in the private repo with email
addresses.

If it's an issue that there will be mail both to list
and individual accounts we can suppress it.

Ultimately this is for the permissions to ACK things and for that
Icinga must see users as contacts.

Bug: T163432
Change-Id: I3f8676fdf4a2f47d2494cae38c511be7bd2b76cd
---
M modules/nagios_common/files/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 5ccbaba..1474a45 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -98,6 +98,6 @@
 
 define contactgroup {
 contactgroup_name   team-performance
-members irc-performance,team-performance
+members 
irc-performance,team-performance,gilles,aaron,krinkle,phedenskog
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f8676fdf4a2f47d2494cae38c511be7bd2b76cd
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Phedenskog 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Consolidate collapse table CSS and JavaScript

2017-04-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349373 )

Change subject: Consolidate collapse table CSS and JavaScript
..

Consolidate collapse table CSS and JavaScript

Move collapse table to wikimedia-page-library.

https://github.com/wikimedia/wikimedia-page-library/pull/3
https://gerrit.wikimedia.org/r/#/c/349371/

Change-Id: I0e104eb74661daddbaf101bd4164ccce55ab9b5f
Depends-On: Ie1848e5543e7ae51431671ad0db189c1e9a42874
Bug: T158309
---
M app/src/main/assets/applib.css
M app/src/main/assets/bundle.js
M app/src/main/assets/preview.css
M app/src/main/assets/styles.css
M www/js/transforms/collapseTables.js
5 files changed, 568 insertions(+), 317 deletions(-)


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

diff --git a/app/src/main/assets/applib.css b/app/src/main/assets/applib.css
index 11b4edf..ec139f9 100644
--- a/app/src/main/assets/applib.css
+++ b/app/src/main/assets/applib.css
@@ -1,3 +1,143 @@
+/* Examples:
+  - Barack Obama's collapsed infobox:
+
+
+  
+Quick facts: 44th
+  President of the United States, Vice President ...
+  
+  
+
+  
+
+  Barack Obama
+
+  
+  ...
+
+  
+  
+Close
+  
+
+
+  - Frankenstein's monster's expanded infobox:
+
+
+  
+Quick facts: 
Created
+  by, Information …
+  
+  
+
+  
+
+  Frankenstein's monster
+
+  
+  ...
+
+  
+  
+Close
+  
+
+
+  - Dracula's collapsed notes and references:
+
+
+  
+Tap to expand
+  
+  
+  ...
+  
+  
+Close
+  
+
+*/
+
+.content table.infobox {
+  font-size: 100%;
+  border-style: none !important;
+}
+
+table.infobox caption {
+  text-align: center;
+  font-weight: bold;
+}
+
+/* The outermost table container. todo: rename. */
+.app_table_container {
+  width: 100%;
+  margin-top: 14px;
+  margin-bottom: 14px;
+  border-radius: 2px;
+  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.18);
+  clear: both;
+}
+
+/* The outermost table container's header. todo: rename. */
+.app_table_collapsed_container {
+  width: 100%;
+  padding: 12px 48px 12px 12px;
+  line-height: 120%;
+  background-color: #f8f8f8;
+  background-repeat: no-repeat;
+  background-position: 95% 50%;
+  background-size: 16px 16px;
+}
+
+/* The outermost table container header's subcaption text. todo: rename. */
+.app_span_collapse_text {
+  color: #808080;
+}
+
+/* The outermost table container's footer. todo: rename. */
+.app_table_collapsed_bottom {
+  width: 100%;
+  color: #808080;
+  padding: 12px 48px 12px 12px;
+  line-height: 120%;
+  border-radius: 0 0 2px 2px;
+  background-color: #f8f8f8;
+  background-repeat: no-repeat;
+  background-position: 95% 50%;
+  background-size: 16px 16px;
+}
+.app_table_collapse_icon {
+  background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgAAADAwCAYAAABXAvmHBGdBTUEAALGPC/xhBQlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUoBJREFUaEPtmE1uE0EQhW3Mzyk4iiU4AFn6BJbtvbfeIIQEAUEUCEnE/58ImCQCIRCSxVk4AGyyYwN5L+qOxuXXM90zthCiS/ricXV11avunhkrrWzZsmXLlu2fttlstjJGo9GN4XB4VY0tC+lcBhC+Dv6QwWBwTcUsA+lsCgTf9uI92I3rKrYp0tkECL1jxXt4pNScJkhnXSByw4oWrKu5dZHOOuDYbAqxEh4xlaMO0pkKjsZ9JbQMHjWVKxXpTKANMQ+suAQ2RM4kpDOSNlZxW4hK5Z7IHY10RsCV3zVCaoN7Yos5TY0opLOCNgo+VEIEn8EX45NwN5nb1KpEOkN0u90zKPRYCRB8Go/HFwivzViIXdRJakI6FRSPlX8iiio+gPN+Lq/BRzdWCncXc6KbkE6LW/lnqqDgoNfrnbM56MPYoYmVcJdZ0+ZQSGcRJkLSF7ZIgOlkMjmr8hDXxL6ZE+JpTBPS6UGSDrb0lUkcYq9MvIcxiH1n5kpQ+3lVE9JJkKADXhcTlsC4jsqjcE3sFeYHwXF6ic9gbunkBHT/ppioBB6vaPEezgGNF2jBwdVB129NghBR5zQE5nfcCqvcc7gFXWhi7kvK+QSPmoj3MEfsE44La++z0wsn/r2dFCD5hVOGayL2BTn3pDv54x5vByZQgq2s/bulgpSfKPv+XZP0gkGBTVN02bCJHVVbcEjtvJGmZkCCxHdFwVXAJraUBsGUDayBXwXnAjift0ShlcLdVloKUPOaD76CL0eFQc9vjK3sfzpVoPZNajCayBE1M+Y0uN/vX3TP5O/gJ/iGoMt+/G8BTZeg5Sv4QW3USK1+PFu2bNmyZcuW7f+1VusYzYvU+uNoBCAASUVORK5CYII=);
+}
+
+/* The outermost table container's collapsed header. todo: rename. */
+.app_table_collapsed_open {
+  border-radius: 2px;
+  background-image: 
url(data:image/png;base64,iVBORw0KGgoNSUhEUgAAADAwCAYAAABXAvmHBGdBTUEAALGPC/xhBQlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4zjOaXUoZJREFUaEPtmE1uE0EQhceEn1NwFEtwALL0CSzbe2+9QQgJAoKI8BeF8I8ImCQCIRCSxVk4QNhkxwZ4z+qOespvPNMzYxCiS/ricVVX1evpnukkWbJkyZIlS5Ys2f9ss9lsTr/fPz8ajV4Mh8Nv4Dv4OhgMLvr43wKaLkDLF3BEbdRIrT4+/wGhlxA8Br8MPxG74gf/adD7OjUYTeSYmjkmw5d18CMILoBZ37DFVw0E3lFaAqh5nROYBs5CUPC2arQCOuh1T2kQTLNer3cGF4cmIOFdEQ3bhOIfqt6CQ2qfJ7pJHJgBEt4dNgqatgXF76iegn1qZt5JgclkchqBd2ZgEdts6HOb0u12T+E52xV9FFNq9bm5Qm4Sb01CEY/YOMyvgxP/VNRfAOPehOJJrhjhAA5UBQRPmkwC+WvoxbNH1c6B7fUan2u2Ru6LhwNdgixmeA4WCpfBHPDK1SiD42SPBYeHCS5RFbQUNlC4rboX5BfiVqi

[MediaWiki-commits] [Gerrit] operations/puppet[production]: nagios_common: add performance team members to contact group

2017-04-20 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349372 )

Change subject: nagios_common: add performance team members to contact group
..

nagios_common: add performance team members to contact group

There already was a contact group for the performance team
but it only had one generic member with the list email address
to send notifications there.

But for T163432, giving individual users permissions on the Icinga
web UI, we need to add real people into it.

These users have just been created in the private repo with email
addresses.

If it's an issue that there will be mail both to list
and individual accounts we can suppress it.

Ultimately this is for the permissions to ACK things and for that
Icinga must see users as contacts.

Bug: T163432
Change-Id: I3f8676fdf4a2f47d2494cae38c511be7bd2b76cd
---
M modules/nagios_common/files/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/349372/1

diff --git a/modules/nagios_common/files/contactgroups.cfg 
b/modules/nagios_common/files/contactgroups.cfg
index 2517bd3..311516b 100644
--- a/modules/nagios_common/files/contactgroups.cfg
+++ b/modules/nagios_common/files/contactgroups.cfg
@@ -98,6 +98,6 @@
 
 define contactgroup {
 contactgroup_name   team-performance
-members irc-performance,team-performance
+members 
irc-performance,team-performance,gilles,aaron,krinkle,phedenskog
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileApp[master]: Consolidate collapse table CSS

2017-04-20 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349371 )

Change subject: Consolidate collapse table CSS
..

Consolidate collapse table CSS

Move collapse table to wikimedia-page-library.

https://github.com/wikimedia/wikimedia-page-library/pull/3

Bug: T158309
Change-Id: Ie1848e5543e7ae51431671ad0db189c1e9a42874
---
M extension.json
D styles/android/tables.less
2 files changed, 2 insertions(+), 59 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp 
refs/changes/71/349371/1

diff --git a/extension.json b/extension.json
index 32bb93b..f5dcdad 100644
--- a/extension.json
+++ b/extension.json
@@ -29,8 +29,7 @@
"styles/issues.less",
"styles/android/loading.less",
"styles/android/ipa.less",
-   "styles/android/parsoid.less",
-   "styles/android/tables.less"
+   "styles/android/parsoid.less"
]
},
"mobile.app.pagestyles.android.night": {
@@ -57,8 +56,7 @@
"mobile.app.preview.android": {
"styles": [
"styles/android/ipa.less",
-   "styles/android/parsoid.less",
-   "styles/android/tables.less"
+   "styles/android/parsoid.less"
]
}
},
diff --git a/styles/android/tables.less b/styles/android/tables.less
deleted file mode 100644
index 20f669e..000
--- a/styles/android/tables.less
+++ /dev/null
@@ -1,55 +0,0 @@
-.content table.infobox {
-   font-size: 100%;
-}
-
-table.infobox caption {
-   text-align: center;
-   font-weight: bold;
-}
-
-.app_table_container {
-   width: 100%;
-   margin-top: 14px;
-   margin-bottom: 14px;
-   border-radius: 2px;
-   box-shadow: 0 1px 4px 0 rgba( 0, 0, 0, 0.12 ), 0 0 1px 0 rgba( 0, 0, 0, 
0.18 );
-}
-
-.app_table_collapsed_container {
-   padding: 12px 48px 12px 12px;
-   line-height: 120%;
-   background-color: #f8f8f8;
-   background-repeat: no-repeat;
-   background-position: 95% 50%;
-   background-size: 16px 16px;
-}
-
-.app_table_collapsed_open {
-   border-radius: 2px;
-   /* @embed */
-   background-image: url( ../../images/table_expand.png );
-}
-
-.app_table_collapse_close {
-   border-radius: 2px 2px 0 0;
-}
-
-.app_table_collapse_icon {
-   /* @embed */
-   background-image: url( ../../images/table_collapse.png );
-}
-
-.app_span_collapse_text {
-   color: #808080;
-}
-
-.app_table_collapsed_bottom {
-   color: #808080;
-   padding: 12px 48px 12px 12px;
-   line-height: 120%;
-   border-radius: 0 0 2px 2px;
-   background-color: #f8f8f8;
-   background-repeat: no-repeat;
-   background-position: 95% 50%;
-   background-size: 16px 16px;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1848e5543e7ae51431671ad0db189c1e9a42874
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: MWTemplatePage: Show a different message if the template doe...

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349370 )

Change subject: MWTemplatePage: Show a different message if the template 
doesn't exist
..

MWTemplatePage: Show a different message if the template doesn't exist

Bug: T162694
Change-Id: Icad5abb240efd10fadbfdb287acb98afe2361719
---
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js
4 files changed, 14 insertions(+), 7 deletions(-)


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

diff --git a/extension.json b/extension.json
index e7d465e..f6a16ff 100644
--- a/extension.json
+++ b/extension.json
@@ -1709,6 +1709,7 @@

"visualeditor-dialog-transclusion-more-template-description",

"visualeditor-dialog-transclusion-multiple-mode",

"visualeditor-dialog-transclusion-no-template-description",
+   
"visualeditor-dialog-transclusion-absent-template",
"visualeditor-dialog-transclusion-options",

"visualeditor-dialog-transclusion-param-default",

"visualeditor-dialog-transclusion-param-example",
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 6904ab8..5433bfd 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -208,6 +208,7 @@
"visualeditor-dialog-transclusion-more-template-description": "There 
might be some additional information about the \"$1\" template on 
[[{{ns:template}}:$1|its page]].",
"visualeditor-dialog-transclusion-multiple-mode": "Show options",
"visualeditor-dialog-transclusion-no-template-description": "The \"$1\" 
template doesn't yet have a description, but there might be some information on 
the [[$1|template's page]].",
+   "visualeditor-dialog-transclusion-absent-template": "The \"$1\" 
template doesn't yet exist.",
"visualeditor-dialog-transclusion-options": "Options",
"visualeditor-dialog-transclusion-param-default": "Default: $1",
"visualeditor-dialog-transclusion-param-example": "e.g. $1",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 9a76fc9..1c442c5 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -221,6 +221,7 @@
"visualeditor-dialog-transclusion-more-template-description": "Message 
to user that additional template information might be available for a 
template.\n\nParameters:\n* $1 - the title of the template",
"visualeditor-dialog-transclusion-multiple-mode": "Label for button 
that shows advanced options in transclusion dialog",
"visualeditor-dialog-transclusion-no-template-description": "Message to 
user that no template information is available for the 
template.\n\nParameters:\n* $1 - the title of the template",
+   "visualeditor-dialog-transclusion-absent-template": "Message to user 
that the template they have selected does not exist on this 
wiki.\n\nParameters:\n* $1 - the title of the template",
"visualeditor-dialog-transclusion-options": "Label for section with 
options for templates, content or parameters.\n{{Identical|Options}}",
"visualeditor-dialog-transclusion-param-default": "Label for 
parameter's default value in the template dialog. $1 - Parameter's default 
value.\n{{Identical|Default}}",
"visualeditor-dialog-transclusion-param-example": "Label for 
parameter's example value in the template dialog. $1 - Parameter's example 
value.",
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js
index a0c11e0..571d519 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWTemplatePage.js
@@ -17,7 +17,8 @@
  * @param {Object} [config] Configuration options
  */
 ve.ui.MWTemplatePage = function VeUiMWTemplatePage( template, name, config ) {
-   var title = template.getTitle() ? mw.Title.newFromText( 
template.getTitle() ) : null;
+   var linkData, messageKey,
+   title = template.getTitle() ? mw.Title.newFromText( 
template.getTitle() ) : null;
 
// Configuration initialization
config = ve.extendObject( {
@@ -71,15 +72,18 @@
}
} else {
// The transcluded page may be dynamically generated or 
unspecified in the DOM
-   // for other reasons (bug 66724). In that case we can't tell 
the user what
-   // the template is called nor link to the template page.
+   // for other reasons (T68724). In that case we can't tell the 
user what the
+   // template is called, nor link to the template page. However, 
if we know for
+   // certain tha

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: MWTransclusionModel: Update for change in TemplateData

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349369 )

Change subject: MWTransclusionModel: Update for change in TemplateData
..

MWTransclusionModel: Update for change in TemplateData

Change-Id: I97a1bfc9f9ead082a673a91b9d2053630a90309c
Depends-On: I7905502d0c419a04e4487095214634f1513b461c
---
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
M modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
2 files changed, 36 insertions(+), 20 deletions(-)


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

diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index b5f0288..3cfc859 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -311,6 +311,8 @@
action: 'templatedata',
titles: titles,
lang: mw.config.get( 'wgUserLanguage' ),
+   format: 'json',
+   formatversion: '2',
redirects: '1'
} ).done( this.fetchRequestDone.bind( this, titles, specs ) );
xhr.always( this.fetchRequestAlways.bind( this, queue, xhr ) );
@@ -318,12 +320,25 @@
};
 
ve.dm.MWTransclusionModel.prototype.fetchRequestDone = function ( 
titles, specs, data ) {
-   var i, len, id, title, aliasMap = [];
+   var i, len, id, title, missingTitle, aliasMap = [];
 
if ( data && data.pages ) {
// Keep spec data on hand for future use
for ( id in data.pages ) {
-   specs[ data.pages[ id ].title ] = data.pages[ 
id ];
+   title = data.pages[ id ].title;
+
+   if ( data.pages[ id ].missing ) {
+   // Remmeber templates that don't exist 
in the link cache
+   // { title: { missing: true|false }
+   missingTitle = {};
+   missingTitle[ title ] = { missing: true 
};
+   ve.init.platform.linkCache.setMissing( 
missingTitle );
+   } else if ( data.pages[ id ].notemplatedata ) {
+   // Prevent asking again for templates 
that have no specs
+   specs[ title ] = null;
+   } else {
+   specs[ title ] = data.pages[ id ];
+   }
}
// Follow redirects
if ( data.redirects ) {
@@ -339,14 +354,6 @@
// we create a new property with an invalid 
"undefined" value.
if ( hasOwn.call( specs, aliasMap[ i ].to ) ) {
specs[ aliasMap[ i ].from ] = specs[ 
aliasMap[ i ].to ];
-   }
-   }
-
-   // Prevent asking again for templates that have no specs
-   for ( i = 0, len = titles.length; i < len; i++ ) {
-   title = titles[ i ];
-   if ( !specs[ title ] ) {
-   specs[ title ] = null;
}
}
 
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
index b4aa333..eaefa6e 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWTemplateTitleInputWidget.js
@@ -37,6 +37,7 @@
 
 /* Inheritance */
 
+// FIXME: This should extend mw.widgets.TitleSearchWidget instead
 OO.inheritClass( ve.ui.MWTemplateTitleInputWidget, mw.widgets.TitleInputWidget 
);
 
 /* Methods */
@@ -52,7 +53,7 @@
if ( this.showTemplateDescriptions ) {
return promise
.then( function ( response ) {
-   var xhr, pageId, index, params, redirIndex,
+   var xhr, pageId, index, redirIndex,
redirects = ( response.query && 
response.query.redirects ) || {},
origPages = ( response.query && 
response.query.pages ) || {},
newPages = [],
@@ -84,27 +85,35 @@
originalResponse = response; // lie!
 
// Also get descriptions
+   // FIXME: This should go through 
MWTra

[MediaWiki-commits] [Gerrit] mediawiki...TemplateData[master]: API: Identify missing and no-TemplateData pages in the response

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349368 )

Change subject: API: Identify missing and no-TemplateData pages in the response
..

API: Identify missing and no-TemplateData pages in the response

Change-Id: I7905502d0c419a04e4487095214634f1513b461c
---
M api/ApiTemplateData.php
1 file changed, 50 insertions(+), 45 deletions(-)


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

diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index d66ae1f..ce04bc9 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -52,56 +52,61 @@
$pageSet = $this->getPageSet();
$pageSet->execute();
$titles = $pageSet->getGoodTitles(); // page_id => Title object
-
-   if ( !count( $titles ) ) {
-   $result->addValue( null, 'pages', (object) [] );
-   return;
-   }
-
-   $db = $this->getDB();
-   $res = $db->select( 'page_props',
-   [ 'pp_page', 'pp_value' ], [
-   'pp_page' => array_keys( $titles ),
-   'pp_propname' => 'templatedata'
-   ],
-   __METHOD__,
-   [ 'ORDER BY', 'pp_page' ]
-   );
+   $missingTitles = $pageSet->getMissingTitles(); // page_id => 
Title object
 
$resp = [];
 
-   foreach ( $res as $row ) {
-   $rawData = $row->pp_value;
-   $tdb = TemplateDataBlob::newFromDatabase( $rawData );
-   $status = $tdb->getStatus();
+   foreach ( $missingTitles as $missingTitleId => $missingTitle) {
+   $resp[ $missingTitleId ] = [ 'title' => $missingTitle, 
'missing' => true ];
+   }
 
-   if ( !$status->isOK() ) {
-   $this->dieWithError(
-   [ 'apierror-templatedata-corrupt', 
intval( $row->pp_page ), $status->getMessage() ]
-   );
+   foreach ( $titles as $titleId => $title) {
+   $resp[ $titleId ] = [ 'title' => $title, 
'notemplatedata' => true ];
+   }
+
+   if ( count( $titles ) ) {
+   $db = $this->getDB();
+   $res = $db->select( 'page_props',
+   [ 'pp_page', 'pp_value' ], [
+   'pp_page' => array_keys( $titles ),
+   'pp_propname' => 'templatedata'
+   ],
+   __METHOD__,
+   [ 'ORDER BY', 'pp_page' ]
+   );
+
+   foreach ( $res as $row ) {
+   $rawData = $row->pp_value;
+   $tdb = TemplateDataBlob::newFromDatabase( 
$rawData );
+   $status = $tdb->getStatus();
+
+   if ( !$status->isOK() ) {
+   $this->dieWithError(
+   [ 
'apierror-templatedata-corrupt', intval( $row->pp_page ), $status->getMessage() 
]
+   );
+   }
+
+   if ( $langCode ) {
+   $data = $tdb->getDataInLanguage( 
$langCode );
+   } else {
+   $data = $tdb->getData();
+   }
+
+   // HACK: don't let ApiResult's formatversion=1 
compatibility layer mangle our booleans
+   // to empty strings / absent properties
+   foreach ( $data->params as &$param ) {
+   $param->{ApiResult::META_BC_BOOLS} = [ 
'required', 'suggested', 'deprecated' ];
+   }
+   unset( $param );
+
+   $data->params->{ApiResult::META_TYPE} = 'kvp';
+   $data->params->{ApiResult::META_KVP_KEY_NAME} = 
'key';
+   
$data->params->{ApiResult::META_INDEXED_TAG_NAME} = 'param';
+   ApiResult::setIndexedTagName( 
$data->paramOrder, 'p' );
+
+   unset ( $resp[$row->pp_page]['notemplatedata'] 
);
+   $resp[$row->pp_page] += (array) $data;
}
-
-   if ( $langCode ) {
-   $data = $tdb->getDataInLanguage( $langCode );
-   } else {
-

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix preference tab switching so it doesn't fight prevTab v u...

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

Change subject: Fix preference tab switching so it doesn't fight prevTab v url 
hash
..


Fix preference tab switching so it doesn't fight prevTab v url hash

There was a bug where, when loading the Preferences page, the tab
was initially set by the URL hash (correct behavior) but then later
the system asked for the 'previous tab' in session storage, and changed
it to that -- which overrode the URL hash placement. In most cases,
the previous tab and url hash seemed to have been correct because
the user would go to the Preferences section and expect whatever
was the most recent tab they saw to open - but in the case of
specifically hitting "Beta" link (or clicking a direct link with
a specific hash to one of the preferences tabs) the previous tab
and hash had a fight, where the url-hash was the loser.

This commit fixes that by deleting the 'previousTab' from session
when the hash is set. Also, as a bonus, made sure that when the
previousTab removes itself from session, it actually removes the
correct key (and not tries to remove the value, which it did up
until now, and would've resulted in the previousTab value never
actually being removed)

Bug: T162938
Change-Id: I95c809f41dec7d7120c73dffa4a107346d049f70
---
M resources/src/mediawiki.special/mediawiki.special.preferences.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js 
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 0fa6610..84a9a96 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -108,11 +108,13 @@
var hash = location.hash,
matchedElement, parentSection;
if ( hash.match( /^#mw-prefsection-[\w\-]+/ ) ) {
+   mw.storage.session.remove( 
'mwpreferences-prevTab' );
switchPrefTab( hash.replace( 
'#mw-prefsection-', '' ) );
} else if ( hash.match( /^#mw-[\w\-]+/ ) ) {
matchedElement = document.getElementById( 
hash.slice( 1 ) );
parentSection = $( matchedElement ).closest( 
'.prefsection' );
if ( parentSection.length ) {
+   mw.storage.session.remove( 
'mwpreferences-prevTab' );
// Switch to proper tab and scroll to 
selected item.
switchPrefTab( parentSection.attr( 'id' 
).replace( 'mw-prefsection-', '' ), 'noHash' );
matchedElement.scrollIntoView();
@@ -240,7 +242,7 @@
if ( previousTab ) {
switchPrefTab( previousTab, 'noHash' );
// Deleting the key, the tab states should be reset 
until we press Save
-   mw.storage.session.remove( previousTab );
+   mw.storage.session.remove( 'mwpreferences-prevTab' );
}
 
$( '#mw-prefs-form' ).on( 'submit', function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95c809f41dec7d7120c73dffa4a107346d049f70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: RCFilters Guided tour: Make the box wider

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

Change subject: RCFilters Guided tour: Make the box wider
..


RCFilters Guided tour: Make the box wider

Bug: T163245
Change-Id: I2f76241d427ba5ddf7437bf82020f422f30f4918
---
M modules/rcfilters-beta-tour.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/rcfilters-beta-tour.less b/modules/rcfilters-beta-tour.less
index ef0e33b..473804d 100644
--- a/modules/rcfilters-beta-tour.less
+++ b/modules/rcfilters-beta-tour.less
@@ -1,6 +1,6 @@
 .mw-guidedtour-tour-RcFiltersBeta {
padding: 40px;
-   width: 500px !important;
+   width: 600px !important;
.guider_content {
background: url( images/rc-beta-tour-welcome-ltr.gif ) 
no-repeat;
// Ensure the background image appears on the left in LTR and 
on the right in RTL

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f76241d427ba5ddf7437bf82020f422f30f4918
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
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]: RCFilters UI: Unify li bullets with and without highlights

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

Change subject: RCFilters UI: Unify li bullets with and without highlights
..


RCFilters UI: Unify li bullets with and without highlights

Make sure that the placement of the texts under the bullets is
the same whether the highlight is on or off. Otherwise, the list
is shifting a bit to the right to make room for highlight 'bullets'
when we press the highlight key.

Bonus: Make sure the highlight container is only appended to each
bullet once, even if the process is called for more than once on
the same content.

Bug: T163275
Bug: T163387
Change-Id: I4c2cf6176d5129dd2bc37d2f58ed84e85aca8560
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
2 files changed, 11 insertions(+), 3 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
index 402f0ad..3337a03 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
@@ -12,12 +12,15 @@
}
}
 
+   ul {
+   // Each li's margin-left should be the width of the highlights
+   // element + the margin
+   margin-left: ~'calc( ( @{result-circle-diameter} + 
@{result-circle-margin} ) * 5 + @{result-circle-general-margin} )';
+   }
+
&-highlighted {
ul {
list-style: none;
-   // Each li's margin-left should be the width of the 
highlights
-   // element + the margin
-   margin-left: ~'calc( ( @{result-circle-diameter} + 
@{result-circle-margin} ) * 5 + @{result-circle-general-margin} )';
 
li {
list-style: none;
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
index c7e6961..f4a1807 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
@@ -148,6 +148,11 @@
.prop( 'data-color', 'none' )
);
 
+   if ( $( '.mw-rcfilters-ui-changesListWrapperWidget-highlights' 
).length ) {
+   // Already set up
+   return;
+   }
+
mw.rcfilters.HighlightColors.forEach( function ( color ) {
$highlights.append(
$( '' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c2cf6176d5129dd2bc37d2f58ed84e85aca8560
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
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]: RCFilters UI: Change text for edit authorship group

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

Change subject: RCFilters UI: Change text for edit authorship group
..


RCFilters UI: Change text for edit authorship group

Bug: T149385
Change-Id: I96831b2a650eb0232013762675fb4c5bd325b6a9
---
M languages/i18n/en.json
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 6db8d10..95052a3 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1386,11 +1386,11 @@
"rcfilters-filter-unregistered-label": "Unregistered",
"rcfilters-filter-unregistered-description": "Editors who aren’t logged 
in.",
"rcfilters-filter-unregistered-conflicts-user-experience-level": "This 
filter conflicts with the following Experience {{PLURAL:$2|filter|filters}}, 
which {{PLURAL:$2|finds|find}} only registered users: $1",
-   "rcfilters-filtergroup-authorship": "Edit authorship",
-   "rcfilters-filter-editsbyself-label": "Your own edits",
-   "rcfilters-filter-editsbyself-description": "Edits by you.",
-   "rcfilters-filter-editsbyother-label": "Edits by others",
-   "rcfilters-filter-editsbyother-description": "Edits created by other 
users (not you).",
+   "rcfilters-filtergroup-authorship": "Contribution authorship",
+   "rcfilters-filter-editsbyself-label": "Changes by you",
+   "rcfilters-filter-editsbyself-description": "Your own contributions.",
+   "rcfilters-filter-editsbyother-label": "Changes by others",
+   "rcfilters-filter-editsbyother-description": "All changes except your 
own.",
"rcfilters-filtergroup-userExpLevel": "Experience level (for registered 
users only)",
"rcfilters-filtergroup-user-experience-level-conflicts-unregistered": 
"Experience filters find only registered users, so this filter conflicts with 
the “Unregistered” filter.",

"rcfilters-filtergroup-user-experience-level-conflicts-unregistered-global": 
"The \"Unregistered\" filter conflicts with one or more Experience filters, 
which find registered users only. The conflicting filters are marked in the 
Active Filters area, above.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96831b2a650eb0232013762675fb4c5bd325b6a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
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]: OutputPage: Move mediawiki.toc load from Parser to OutputPage

2017-04-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349367 )

Change subject: OutputPage: Move mediawiki.toc load from Parser to OutputPage
..

OutputPage: Move mediawiki.toc load from Parser to OutputPage

This was the only addModules() call ever to be inside Parser. Introduced in
a54ef1a203d. Prior to that it had always been loaded by OutputPage (via
mediawiki.util, and before that via wikibits).

This patch restores that, and also fixes T130632.

Bug: T130632
Change-Id: Idc41934eb89ec8f928bbea3b2135c3f246fe3925
---
M includes/OutputPage.php
M includes/parser/Parser.php
2 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/349367/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 5c59241..ca48901 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1850,6 +1850,16 @@
$outputPage = $this;
Hooks::run( 'LanguageLinks', [ $this->getTitle(), 
&$this->mLanguageLinks, &$linkFlags ] );
Hooks::run( 'OutputPageParserOutput', [ &$outputPage, 
$parserOutput ] );
+
+   // For back-compat with deprecated OutputPage::setTOCEnabled() 
usage from
+   // 'OutputPageParserOutput' hooks, perform mediawiki.toc 
addModules() here
+   // instead of higher up in this function. Extensions should use 
ParserOutputHooks
+   // instead.
+   // TODO: Once OutputPage::setTOCEnabled() is removed, move this 
up.
+   $parserOutput->setTOCEnabled( $this->mEnableTOC );
+   if ( $parserOutput->getTOCEnabled() && 
$parserOutput->getTOCHTML() ) {
+   $this->addModules( 'mediawiki.toc' );
+   }
}
 
/**
@@ -1890,7 +1900,6 @@
 */
function addParserOutput( $parserOutput ) {
$this->addParserOutputMetadata( $parserOutput );
-   $parserOutput->setTOCEnabled( $this->mEnableTOC );
 
// Touch section edit links only if not previously disabled
if ( $parserOutput->getEditSectionTokens() ) {
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 19f368a..f34dff8 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -4392,7 +4392,6 @@
$toc = Linker::tocList( $toc, 
$this->mOptions->getUserLangObj() );
$this->mOutput->setTOCHTML( $toc );
$toc = self::TOC_START . $toc . self::TOC_END;
-   $this->mOutput->addModules( 'mediawiki.toc' );
}
 
if ( $isMain ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc41934eb89ec8f928bbea3b2135c3f246fe3925
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/core[master]: Fix preference tab switching so it doesn't fight prevTab v u...

2017-04-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349366 )

Change subject: Fix preference tab switching so it doesn't fight prevTab v url 
hash
..

Fix preference tab switching so it doesn't fight prevTab v url hash

There was a bug where, when loading the Preferences page, the tab
was initially set by the URL hash (correct behavior) but then later
the system asked for the 'previous tab' in session storage, and changed
it to that -- which overrode the URL hash placement. In most cases,
the previous tab and url hash seemed to have been correct because
the user would go to the Preferences section and expect whatever
was the most recent tab they saw to open - but in the case of
specifically hitting "Beta" link (or clicking a direct link with
a specific hash to one of the preferences tabs) the previous tab
and hash had a fight, where the url-hash was the loser.

This commit fixes that by deleting the 'previousTab' from session
when the hash is set. Also, as a bonus, made sure that when the
previousTab removes itself from session, it actually removes the
correct key (and not tries to remove the value, which it did up
until now, and would've resulted in the previousTab value never
actually being removed)

Bug: T162938
Change-Id: I95c809f41dec7d7120c73dffa4a107346d049f70
---
M resources/src/mediawiki.special/mediawiki.special.preferences.js
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/349366/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js 
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 0fa6610..84a9a96 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -108,11 +108,13 @@
var hash = location.hash,
matchedElement, parentSection;
if ( hash.match( /^#mw-prefsection-[\w\-]+/ ) ) {
+   mw.storage.session.remove( 
'mwpreferences-prevTab' );
switchPrefTab( hash.replace( 
'#mw-prefsection-', '' ) );
} else if ( hash.match( /^#mw-[\w\-]+/ ) ) {
matchedElement = document.getElementById( 
hash.slice( 1 ) );
parentSection = $( matchedElement ).closest( 
'.prefsection' );
if ( parentSection.length ) {
+   mw.storage.session.remove( 
'mwpreferences-prevTab' );
// Switch to proper tab and scroll to 
selected item.
switchPrefTab( parentSection.attr( 'id' 
).replace( 'mw-prefsection-', '' ), 'noHash' );
matchedElement.scrollIntoView();
@@ -240,7 +242,7 @@
if ( previousTab ) {
switchPrefTab( previousTab, 'noHash' );
// Deleting the key, the tab states should be reset 
until we press Save
-   mw.storage.session.remove( previousTab );
+   mw.storage.session.remove( 'mwpreferences-prevTab' );
}
 
$( '#mw-prefs-form' ).on( 'submit', function () {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Deprecate OutputPage methods meant for changing ParserOutput

2017-04-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349365 )

Change subject: Deprecate OutputPage methods meant for changing ParserOutput
..

Deprecate OutputPage methods meant for changing ParserOutput

Deprecate methods introduced by 21c1c7d025365 in favour of encouraging a
more maintainable way of controlling ParserOutput, by using ParserOutput
for controlling the parser output instead of OutputPage.

Right now extension have to use 'OutputPageParserOutput', or some other
relatively late hook that runs *after* addParserOutputMetadata() but
*before* addParserOutputText() triggers ParserOutput::getText().

Due to these methods, ParserOutput meta data unexpectedly changes between
the first inspection in addParserOutputMetadata() and second inspection
for the filters in ParerOutput::getText().

This is better than nothing, but since 'ParserOutputHooks' was introduced
this is no longer necessary.

This problem can be seen more clearly when noticing that addParserOutput() very
carefully passes on setTOCEnabled *after* calling addParserOutputMetadata(),
which was probably done so that it runs after 'OutputPageParserOutput',
despite being against natural flow. OutputPageParserOutput is documented as:
> "after adding a parserOutput to $wgOut"

This is not true now, but will be again after we remove these methods.

* Deprecate these methods.
* Encourage extensions to use 'ParserOutputHooks' instead of
  'OutputPageParserOutput'. OutputPageParserOutput is explicitly documented
  as providing ParserOutput. This is an easy change for extensions and will
  work exactly as before.

This is in preparation for T130632.

Bug: T130632
Change-Id: I0d52d524b9fee19072a29835882855040e49ad9c
---
M includes/OutputPage.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/349365/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 5c05ad7..5c59241 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3929,6 +3929,8 @@
 
/**
 * Enables/disables TOC, doesn't override __NOTOC__
+*
+* @deprecated since 1.29 Use ParserOutput::setTOCEnabled() instead.
 * @param bool $flag
 * @since 1.22
 */
@@ -3937,6 +3939,7 @@
}
 
/**
+* @deprecated since 1.29 Use ParserOutput::getTOCEnabled() instead.
 * @return bool
 * @since 1.22
 */
@@ -3946,6 +3949,8 @@
 
/**
 * Enables/disables section edit links, doesn't override 
__NOEDITSECTION__
+*
+* @deprecated since 1.29 Use ParserOutput::setEditSectionTokens() 
instead.
 * @param bool $flag
 * @since 1.23
 */
@@ -3954,6 +3959,7 @@
}
 
/**
+* @deprecated since 1.29 Use ParserOutput::getEditSectionTokens() 
instead.
 * @return bool
 * @since 1.23
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d52d524b9fee19072a29835882855040e49ad9c
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] labs...lists[master]: Add new file list "File con titolo omonimo su Commons"

2017-04-20 Thread Mess (Code Review)
Mess has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349348 )

Change subject: Add new file list "File con titolo omonimo su Commons"
..

Add new file list "File con titolo omonimo su Commons"

Change-Id: I99668351ffed1941b7e8509c0fea08b2218eb843
---
A query/itwiki/File/File_con_titolo_omonimo_su_Commons.cnf
A query/itwiki/File/File_con_titolo_omonimo_su_Commons.sql
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/lists 
refs/changes/48/349348/2

diff --git a/query/itwiki/File/File_con_titolo_omonimo_su_Commons.cnf 
b/query/itwiki/File/File_con_titolo_omonimo_su_Commons.cnf
new file mode 100644
index 000..79172cd
--- /dev/null
+++ b/query/itwiki/File/File_con_titolo_omonimo_su_Commons.cnf
@@ -0,0 +1,5 @@
+[query]
+project = itwiki
+frequency = weekly
+author = Mess
+license = CC-BY-SA
\ No newline at end of file
diff --git a/query/itwiki/File/File_con_titolo_omonimo_su_Commons.sql 
b/query/itwiki/File/File_con_titolo_omonimo_su_Commons.sql
new file mode 100644
index 000..23a1685
--- /dev/null
+++ b/query/itwiki/File/File_con_titolo_omonimo_su_Commons.sql
@@ -0,0 +1,4 @@
+CONNECT itwiki_p itwiki.labsdb;
+SELECT CONCAT( "# [[:File:", img1.img_name, "]] - [[:commons:File:", 
img2.img_name, "]]" )
+FROM image AS img1
+JOIN commonswiki_p.image AS img2 ON img1.img_name = img2.img_name;
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99668351ffed1941b7e8509c0fea08b2218eb843
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/lists
Gerrit-Branch: master
Gerrit-Owner: Mess 
Gerrit-Reviewer: Incola 

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


[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: build: Explicitly depend on eslint-config-wikimedia, don't j...

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349363 )

Change subject: build: Explicitly depend on eslint-config-wikimedia, don't just 
hope it's there
..

build: Explicitly depend on eslint-config-wikimedia, don't just hope it's there

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


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

diff --git a/package.json b/package.json
index 9234a6f..0e0a428 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
},
"license": "GPLv2",
"devDependencies": {
+   "eslint-config-wikimedia": "0.3.0",
"grunt": "1.0.1",
"grunt-banana-checker": "0.6.0",
"grunt-eslint": "19.0.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95871f4180682e34c16f7e4fa1171380509816b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...jobrunner[master]: Limit how much work the Lua chron script can do at once

2017-04-20 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349364 )

Change subject: Limit how much work the Lua chron script can do at once
..

Limit how much work the Lua chron script can do at once

This limits the chance of tying up the redis server too long.

Change-Id: I7729c53ab5bd2059fdd513cf9ede41c1aefe260a
---
M redisJobChronService
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/jobrunner 
refs/changes/64/349364/1

diff --git a/redisJobChronService b/redisJobChronService
index c17cac8..c7e5f59 100755
--- a/redisJobChronService
+++ b/redisJobChronService
@@ -364,7 +364,7 @@
end
-- Get all non-dead jobs that have an expired claim on them.
-- The score for each item is the last claim timestamp (UNIX).
-   local staleClaims = 
redis.call('zRangeByScore',kClaimed,0,rClaimCutoff)
+   local staleClaims = 
redis.call('zRangeByScore',kClaimed,0,rClaimCutoff,'limit',0,100)
for k,id in ipairs(staleClaims) do
local timestamp = redis.call('zScore',kClaimed,id)
local attempts = 1*redis.call('hGet',kAttempts,id)
@@ -381,7 +381,7 @@
end
-- Get all of the dead jobs that have been marked as dead for 
too long.
-- The score for each item is the last claim timestamp (UNIX).
-   local deadClaims = 
redis.call('zRangeByScore',kAbandoned,0,rPruneCutoff)
+   local deadClaims = 
redis.call('zRangeByScore',kAbandoned,0,rPruneCutoff,'limit',0,100)
for k,id in ipairs(deadClaims) do
-- Stale and out of attempts: remove any traces of the 
job
redis.call('zRem',kAbandoned,id)
@@ -390,7 +390,7 @@
pruned = pruned + 1
end
-- Get the list of ready delayed jobs, sorted by readiness 
(UNIX timestamp)
-   local ids = redis.call('zRangeByScore',kDelayed,0,rTime)
+   local ids = 
redis.call('zRangeByScore',kDelayed,0,rTime,'limit',0,100)
-- Migrate the jobs from the "delayed" set to the "unclaimed" 
list
for k,id in ipairs(ids) do
redis.call('lPush',kUnclaimed,id)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7729c53ab5bd2059fdd513cf9ede41c1aefe260a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/jobrunner
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...Collection[master]: build: Bump grunt-banana-checker devDependency to latest

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349362 )

Change subject: build: Bump grunt-banana-checker devDependency to latest
..

build: Bump grunt-banana-checker devDependency to latest

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


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

diff --git a/package.json b/package.json
index 2730f5f..9234a6f 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
"license": "GPLv2",
"devDependencies": {
"grunt": "1.0.1",
-   "grunt-banana-checker": "0.5.0",
+   "grunt-banana-checker": "0.6.0",
"grunt-eslint": "19.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.7.0",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf12ca1f85073caeae8c2594e87d590920689742
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: RCFilters Guided tour: Make the box wider

2017-04-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349361 )

Change subject: RCFilters Guided tour: Make the box wider
..

RCFilters Guided tour: Make the box wider

Bug: T163245
Change-Id: I2f76241d427ba5ddf7437bf82020f422f30f4918
---
M modules/rcfilters-beta-tour.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages 
refs/changes/61/349361/1

diff --git a/modules/rcfilters-beta-tour.less b/modules/rcfilters-beta-tour.less
index ef0e33b..92318c9 100644
--- a/modules/rcfilters-beta-tour.less
+++ b/modules/rcfilters-beta-tour.less
@@ -1,6 +1,6 @@
 .mw-guidedtour-tour-RcFiltersBeta {
padding: 40px;
-   width: 500px !important;
+   width: 550px !important;
.guider_content {
background: url( images/rc-beta-tour-welcome-ltr.gif ) 
no-repeat;
// Ensure the background image appears on the left in LTR and 
on the right in RTL

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f76241d427ba5ddf7437bf82020f422f30f4918
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: tests: Drop unnecessary hints to qunit about the number of t...

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

Change subject: tests: Drop unnecessary hints to qunit about the number of tests
..


tests: Drop unnecessary hints to qunit about the number of tests

Change-Id: I621dc1a01d20d24411661c69f9c2b89a9d4df5a4
---
M tests/Element.test.js
M tests/Process.test.js
M tests/core.test.js
M tests/mixins/FlaggedElement.test.js
M tests/widgets/MenuTagMultiselectWidget.test.js
5 files changed, 19 insertions(+), 19 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  Krinkle: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  VolkerE: Looks good to me, approved



diff --git a/tests/Element.test.js b/tests/Element.test.js
index 535aaf3..723781e 100644
--- a/tests/Element.test.js
+++ b/tests/Element.test.js
@@ -15,7 +15,7 @@
}
 } );
 
-QUnit.test( 'static.infuse', 2, function ( assert ) {
+QUnit.test( 'static.infuse', function ( assert ) {
function infuse( data ) {
return OO.ui.Element.static.infuse(
$( '' ).attr( 'data-ooui', JSON.stringify( data ) )
@@ -27,7 +27,7 @@
}, Error );
 } );
 
-QUnit.test( 'static.getDocument', 10, function ( assert ) {
+QUnit.test( 'static.getDocument', function ( assert ) {
var frameDoc, frameEl, frameDiv,
el = this.fixture,
div = document.createElement( 'div' ),
@@ -55,7 +55,7 @@
assert.strictEqual( OO.ui.Element.static.getDocument( {} ), null, 
'Invalid' );
 } );
 
-QUnit.test( 'getElementDocument', 1, function ( assert ) {
+QUnit.test( 'getElementDocument', function ( assert ) {
var el, doc;
 
doc = document;
diff --git a/tests/Process.test.js b/tests/Process.test.js
index 00eef1a..13f3d40 100644
--- a/tests/Process.test.js
+++ b/tests/Process.test.js
@@ -2,7 +2,7 @@
 
 /* Tests */
 
-QUnit.test( 'next', 1, function ( assert ) {
+QUnit.test( 'next', function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
@@ -22,7 +22,7 @@
} );
 } );
 
-QUnit.test( 'first', 1, function ( assert ) {
+QUnit.test( 'first', function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
@@ -42,7 +42,7 @@
} );
 } );
 
-QUnit.test( 'execute (async)', 1, function ( assert ) {
+QUnit.test( 'execute (async)', function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
@@ -80,7 +80,7 @@
} );
 } );
 
-QUnit.test( 'execute (return false)', 1, function ( assert ) {
+QUnit.test( 'execute (return false)', function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
@@ -114,7 +114,7 @@
} );
 } );
 
-QUnit.test( 'execute (async reject)', 1, function ( assert ) {
+QUnit.test( 'execute (async reject)', function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
@@ -147,7 +147,7 @@
} );
 } );
 
-QUnit.test( 'execute (wait)', 1, function ( assert ) {
+QUnit.test( 'execute (wait)', function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
diff --git a/tests/core.test.js b/tests/core.test.js
index 83e521f..8624a72 100644
--- a/tests/core.test.js
+++ b/tests/core.test.js
@@ -3,7 +3,7 @@
 /**
  * @note: Keep tests in sync with phpunit/TagTest.php
  */
-QUnit.test( 'isSafeUrl', 13, function ( assert ) {
+QUnit.test( 'isSafeUrl', function ( assert ) {
// eslint-disable-next-line no-script-url
assert.notOk( OO.ui.isSafeUrl( 'javascript:evil();' ) );
assert.notOk( OO.ui.isSafeUrl( 'foo:bar' ) );
@@ -20,7 +20,7 @@
assert.ok( OO.ui.isSafeUrl( '/wiki/Extra:Colon' ) );
 } );
 
-QUnit.test( 'isFocusableElement', 10, function ( assert ) {
+QUnit.test( 'isFocusableElement', function ( assert ) {
var i, $html, result,
cases = [
{
@@ -94,7 +94,7 @@
}
 } );
 
-QUnit.test( 'debounce', 4, function ( assert ) {
+QUnit.test( 'debounce', function ( assert ) {
var f,
log = [],
testTimer = new OO.ui.TestTimer(),
@@ -178,7 +178,7 @@
}
 } );
 
-QUnit.test( 'throttle', 2, function ( assert ) {
+QUnit.test( 'throttle', function ( assert ) {
var f,
log = [],
testTimer = new OO.ui.TestTimer(),
diff --git a/tests/mixins/FlaggedElement.test.js 
b/tests/mixins/FlaggedElement.test.js
index 464819a..c7e1b7c 100644
--- a/tests/mixins/FlaggedElement.test.js
+++ b/tests/mixins/FlaggedElement.test.js
@@ -8,7 +8,7 @@
OO.inheritClass( TestElement, OO.ui.Widget );
OO.mixinClass( TestElement, OO.ui.mixin.FlaggedElement );
 
-   QUnit.test( 'constructor', 2, function ( assert ) {
+   QUnit.test( 'constructor', function ( assert

[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: build: Bump various devDependencies to latest

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349359 )

Change subject: build: Bump various devDependencies to latest
..

build: Bump various devDependencies to latest

 grunt  0.4.5  →  1.0.1
 grunt-banana-checker   0.4.0  →  0.6.0
 grunt-jsonlint 1.0.7  →  1.1.0

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


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

diff --git a/package.json b/package.json
index be07364..093239b 100644
--- a/package.json
+++ b/package.json
@@ -7,11 +7,10 @@
"test": "grunt test"
},
"devDependencies": {
-   "grunt": "0.4.5",
-   "grunt-cli": "0.1.13",
+   "grunt": "1.0.1",
"grunt-contrib-jshint": "0.11.3",
-   "grunt-banana-checker": "0.4.0",
+   "grunt-banana-checker": "0.6.0",
"grunt-jscs": "2.1.0",
-   "grunt-jsonlint": "1.0.7"
+   "grunt-jsonlint": "1.1.0"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb54647bde62af4d73a125371d392f699d0f13aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


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

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349360 )

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

build: Replace jshint and jscs with eslint

Bug: T118941
Change-Id: Ibb54647bde62af4d73a125371d392f699d0f13bb
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
M modules/ext.checkuser.cidr.js
M package.json
7 files changed, 31 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser 
refs/changes/60/349360/1

diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..c882b46
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,23 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mediaWiki": false
+   },
+   "rules": {
+   "comma-dangle": 0,
+   "computed-property-spacing": 0,
+   "indent": 0,
+   "no-multi-spaces": 0,
+   "no-undef": 0,
+   "no-use-before-define": 0,
+   "one-var": 0,
+   "space-infix-ops": 0,
+   "vars-on-top": 0,
+   "wrap-iife": 0
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 98b81db..000
--- a/.jscsrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "disallowQuotedKeysInObjects": null,
-   "requireSpacesInsideParentheses": null,
-   "requireSpacesInsideArrayBrackets": null
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 58875fd..000
--- a/.jshintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/vendor
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index d72c31d..000
--- a/.jshintrc
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "es3": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "laxbreak": true,
-   "multistr": true,
-
-   // Environment
-   "browser": true,
-
-   "globals": {
-   "mediaWiki": true,
-   "JSON": true,
-   "OO": true,
-   "jQuery": false,
-   "QUnit": false,
-   "sinon": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index d3a4f8f..093e368 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -4,25 +4,19 @@
  * @package CheckUser
  */
 
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
 
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
-   '*.js'
+   '*.js',
+   'modules/**/*.js'
]
-   },
-   jscs: {
-   src: '<%= jshint.all %>'
},
banana: conf.MessagesDirs,
jsonlint: {
@@ -34,6 +28,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ext.checkuser.cidr.js b/modules/ext.checkuser.cidr.js
index 6960a13..55a3448 100644
--- a/modules/ext.checkuser.cidr.js
+++ b/modules/ext.checkuser.cidr.js
@@ -1,6 +1,4 @@
 /* -- (c) Aaron Schulz 2009 */
-/*global mediaWiki*/
-
 ( function ( mw, $ ) {
 var showResults = function ( size, cidr ) {
$( '#mw-checkuser-cidr-res' ).val( cidr );
diff --git a/package.json b/package.json
index 093239b..14c16e2 100644
--- a/package.json
+++ b/package.json
@@ -7,10 +7,10 @@
"test": "grunt test"
},
"devDependencies": {
+   "eslint-config-wikimedia": "0.3.0",
"grunt": "1.0.1",
-   "grunt-contrib-jshint": "0.11.3",
"grunt-banana-checker": "0.6.0",
-   "grunt-jscs": "2.1.0",
+   "grunt-eslint": "19.0.0",
"grunt-jsonlint": "1.1.0"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Chang

[MediaWiki-commits] [Gerrit] mediawiki...GuidedTour[master]: Break-word for the title and content of the steps

2017-04-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349358 )

Change subject: Break-word for the title and content of the steps
..

Break-word for the title and content of the steps

This is so that any long words (like Bearbeitungsüberprüfung),
especially in the title, can break properly rather than have the
ending cut-off.

Bug: T163245
Change-Id: Id18f28fc613a4e5c9fb95f93e2fdfa60edebc867
---
M modules/ext.guidedTour.less
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour 
refs/changes/58/349358/1

diff --git a/modules/ext.guidedTour.less b/modules/ext.guidedTour.less
index 881b2d5..826529f 100644
--- a/modules/ext.guidedTour.less
+++ b/modules/ext.guidedTour.less
@@ -53,6 +53,7 @@
padding-top: 0.1em;
margin-bottom: 4px;
border-bottom: 0;
+   word-wrap: break-word;
}
 
p {
@@ -61,6 +62,7 @@
line-height: 1.3em;
color: #252525;
margin-bottom: 1.5em;
+   word-wrap: break-word;
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id18f28fc613a4e5c9fb95f93e2fdfa60edebc867
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: WIP: fix civibuild options for updated amp

2017-04-20 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349357 )

Change subject: WIP: fix civibuild options for updated amp
..

WIP: fix civibuild options for updated amp

Change-Id: I87d66b3bf8a28814b2f69bd7b52739fd2f7462ef
---
M bin/ci-populate-dbs.sh
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/57/349357/1

diff --git a/bin/ci-populate-dbs.sh b/bin/ci-populate-dbs.sh
index 7969422..8e3cdfc 100755
--- a/bin/ci-populate-dbs.sh
+++ b/bin/ci-populate-dbs.sh
@@ -13,7 +13,8 @@
 $WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit/bin/civi-download-tools
 
 $WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit/bin/amp config:set \
-   --mysql_type=precreated \
+   --mysql_type=dsn \
+   --mysql_dsn="${PRECREATED_DSN_PATTERN}" \
--httpd_type=none \
--perm_type=none
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...wikihiero[master]: build: Bump various devDependencies to latest

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349356 )

Change subject: build: Bump various devDependencies to latest
..

build: Bump various devDependencies to latest

 grunt-banana-checker  0.5.0  →  0.6.0
 grunt-jsonlint1.0.7  →  1.1.0

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero 
refs/changes/56/349356/1

diff --git a/package.json b/package.json
index baa0c7d..44de5c4 100644
--- a/package.json
+++ b/package.json
@@ -9,10 +9,10 @@
"devDependencies": {
"eslint-config-wikimedia": "0.3.0",
"grunt": "1.0.1",
-   "grunt-banana-checker": "0.5.0",
+   "grunt-banana-checker": "0.6.0",
"grunt-contrib-watch": "1.0.0",
"grunt-eslint": "19.0.0",
-   "grunt-jsonlint": "1.0.7",
+   "grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.7.0",
"stylelint-config-wikimedia": "0.4.1"
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86cfba1b4d3d8dc30df824126fbfc64ee478d9af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/wikihiero
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


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

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349355 )

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

build: Replace jshint and jscs with eslint

Bug: T118941
Change-Id: I4b73fb13f8f95f73714a6fc580e07ac320f937fc
---
A .eslintrc.json
D .jscsrc
D .jshintignore
D .jshintrc
M Gruntfile.js
D modules/ve-wikihiero/.jshintrc
M modules/ve-wikihiero/ve.ce.MWHieroNode.js
M modules/ve-wikihiero/ve.dm.MWHieroNode.js
M modules/ve-wikihiero/ve.ui.MWHieroInspector.js
M modules/ve-wikihiero/ve.ui.MWHieroInspectorTool.js
M package.json
11 files changed, 24 insertions(+), 92 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..56fb9cb
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,16 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mw": false,
+   "OO": false,
+   "ve": false
+   },
+   "rules": {
+   "dot-notation": [ "error", { "allowKeywords": true } ]
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 1959eea..000
--- a/.jscsrc
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-   "preset": "wikimedia",
-
-   "jsDoc": {
-   "checkAnnotations": {
-   "preset": "jsduck5",
-   "extra": {
-   "this": true,
-   "source": true,
-   "see": true
-   }
-   },
-   "checkTypes": "strictNativeCase",
-   "checkParamNames": true,
-   "checkRedundantAccess": true,
-   "checkRedundantReturns": true,
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-   }
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index ea26ebd..000
--- a/.jshintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Tooling
-node_modules/
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 032d01b..000
--- a/.jshintrc
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-   "es3": true,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mw": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
index c9c273f..c6b7934 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,35 +1,28 @@
-/*jshint node:true */
+/* eslint-env node */
 module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
 
grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
+   grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
 
grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
+   eslint: {
all: [
'*.js',
'modules/*.js',
'modules/ve-wikihiero/**/*.js'
]
},
-   jscs: {
-   src: '<%= jshint.all %>'
-   },
stylelint: {
all: 'modules/**/*.css'
},
watch: {
files: [
-   '.{jscsrc,jshintignore,jshintrc,csslintrc}',
-   '<%= jshint.all %>',
+   '.eslintrc.json',
+   '<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'lint'
@@ -43,7 +36,7 @@
}
} );
 
-   grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint', 
'jsonlint', 'banana' ] );
+   grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 
'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ve-wikihiero/.jshintrc b/modules/ve-wikihiero/.jshintrc
deleted file mode 100644
index 0c2332e..000
--- a/modules/ve-wikihiero/.jshintrc
+++ /dev/null
@@ -1,25 +0,0

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Make the preference for the "r" flag on the RC page also con...

2017-04-20 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349354 )

Change subject: Make the preference for the "r" flag on the RC page also 
control highlighting
..

Make the preference for the "r" flag on the RC page also control highlighting

And disable it when the RCFilters beta feature is enabled.

Bug: T163025
Change-Id: I988f6641773dcec27ff9bb01861c1491348d332f
---
M i18n/en.json
M includes/Hooks.php
2 files changed, 6 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/54/349354/1

diff --git a/i18n/en.json b/i18n/en.json
index e5012ec..65ad058 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,7 @@
"ores-help-damaging-pref": "Sets the level of probability at which the 
system flags edits with an \"{{int:ores-damaging-letter}}\" to indicate they 
\"need review\" on Recent Changes, Watchlist and Contributions. Also sets the 
threshold for \"Show only likely problem edits\".",
"ores-hide-nondamaging-filter": "Hide probably good edits",
"ores-pref-damaging": "ORES sensitivity",
-   "ores-pref-damaging-flag": "Mark likely problem edits with an 
\"{{int:ores-damaging-letter}}\" for \"needs review\" (to set the level at 
which edits are marked, use the \"{{int:ores-pref-damaging}}\" setting in the 
Watchlist preferences)",
+   "ores-pref-damaging-flag": "Highlight likely problem edits with colors 
and an \"{{int:ores-damaging-letter}}\" for \"needs review\" (to set the level 
at which edits are marked, use the \"{{int:ores-pref-damaging}}\" setting in 
the Watchlist preferences)",
"ores-rcfilters-whats-this-link-text": "Learn more",
"ores-rcfilters-ores-conflicts-logactions-global": "The \"Logged 
actions\" filter conflicts with one or more Contribution Quality or User Intent 
filters. Quality and Intent predictions are not available for logged actions. 
The conflicting filters are marked in the Active Filters area, above.",
"ores-rcfilters-logactions-conflicts-ores": "This filter conflicts with 
one or more Contribution Quality or User Intent filters. Quality and Intent 
predictions are not available for logged actions.",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index f017a38..69be77e 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -698,9 +698,10 @@
'section' => 'rc/advancedrc',
'label-message' => 'ores-pref-rc-hidenondamaging',
];
-   // Hide RC pref if enhanced filters are enabled
+   // Hide RC prefs if enhanced filters are enabled
if ( $user->getBoolOption( 'rcenhancedfilters' ) ) {
$wgHiddenPrefs[] = 'oresRCHideNonDamaging';
+   $wgHiddenPrefs[] = 'ores-damaging-flag-rc';
}
}
 
@@ -793,11 +794,9 @@
 * @return boolean Whether highlights should be shown
 */
private static function isHighlightEnabled( IContextSource $context ) {
-   global $wgOresExtensionStatus;
-   return $wgOresExtensionStatus === 'beta' || (
-   !self::isRCPage( $context ) &&
-   $context->getUser()->getBoolOption( 'oresHighlight' )
-   );
+   // Was previously controlled by different preferences than the 
"r", but they're currently
+   // the same.
+   return self::isDamagingFlagEnabled( $context );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I988f6641773dcec27ff9bb01861c1491348d332f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Drop SkinMinervaBeta

2017-04-20 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349353 )

Change subject: Drop SkinMinervaBeta
..

Drop SkinMinervaBeta

beta flag is now set as a skin option when the skin is created
The config value wgMFMode is set completely separately so all
this does is control the class on the body tag

Change-Id: If801b436fa8a1b7059238e3063321bfc4a299eb3
---
M extension.json
M includes/Minerva.hooks.php
M includes/skins/SkinMinerva.php
D includes/skins/SkinMinervaBeta.php
4 files changed, 8 insertions(+), 27 deletions(-)


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

diff --git a/extension.json b/extension.json
index 59c40ac..e734357 100644
--- a/extension.json
+++ b/extension.json
@@ -87,7 +87,6 @@
"MinervaTemplate": "includes/skins/MinervaTemplate.php",
"MFResourceLoaderParsedMessageModule": 
"includes/modules/MFResourceLoaderParsedMessageModule.php",
"SkinMinerva": "includes/skins/SkinMinerva.php",
-   "SkinMinervaBeta": "includes/skins/SkinMinervaBeta.php",
"ICustomizableSkin": "includes/skins/ICustomizableSkin.php",
"MobileFrontend\\MenuBuilder": "includes/MenuBuilder.php",
"MobileFrontend\\MenuEntry": "includes/MenuBuilder.php",
diff --git a/includes/Minerva.hooks.php b/includes/Minerva.hooks.php
index d74d02d..4ba1a96 100644
--- a/includes/Minerva.hooks.php
+++ b/includes/Minerva.hooks.php
@@ -70,6 +70,8 @@
// setSkinOptions is not available
if ( $skin instanceof SkinMinerva ) {
$skin->setSkinOptions( [
+   SkinMinerva::OPTIONS_MOBILE_BETA
+   => $mobileContext->isBetaGroupMember(),
SkinMinerva::OPTION_PRINT_STYLES
=> $mobileContext->getConfigVariable( 
'MinervaPrintStyles' ),
SkinMinerva::OPTION_CATEGORIES
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 690aa8e..5ef42a5 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -18,6 +18,7 @@
const OPTION_BACK_TO_TOP = 'backToTop';
const OPTION_TOGGLING = 'toggling';
const OPTION_PRINT_STYLES = 'printStyles';
+   const OPTIONS_MOBILE_BETA = 'beta';
 
/** @var string $skinname Name of this skin */
public $skinname = 'minerva';
@@ -25,8 +26,6 @@
public $template = 'MinervaTemplate';
/** @var boolean $useHeadElement Specify whether show head elements */
public $useHeadElement = true;
-   /** @var string $mode Describes 'stability' of the skin - beta, stable 
*/
-   protected $mode = 'stable';
/** @var bool whether the page is the user's page, i.e. User:Username */
public $isUserPage = false;
/** @var ContentHandler Content handler of page; only access through 
getContentHandler */
@@ -47,6 +46,7 @@
 
/** @var array skin specific options */
protected $skinOptions = [
+   self::OPTIONS_MOBILE_BETA => false,
/**
 * Whether the main menu should include a link to
 * Special:Preferences of Special:MobileOptions
@@ -257,7 +257,10 @@
 */
public function getPageClasses( $title ) {
$className = parent::getPageClasses( $title );
-   $className .= ' ' . $this->getMode();
+   if ( $this->getSkinOption( self::OPTIONS_MOBILE_BETA ) ) {
+   $className .= ' beta';
+   }
+
if ( $title->isMainPage() ) {
$className .= ' page-Main_Page ';
} elseif ( $title->isSpecialPage() ) {
@@ -268,14 +271,6 @@
$className .= ' is-authenticated';
}
return $className;
-   }
-
-   /**
-* Get the current mode of the skin [stable|beta] that is running
-* @return string
-*/
-   protected function getMode() {
-   return $this->mode;
}
 
/**
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
deleted file mode 100644
index 2e351a7..000
--- a/includes/skins/SkinMinervaBeta.php
+++ /dev/null
@@ -1,15 +0,0 @@
-https://gerrit.wikimedia.org/r/349353
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mwgrep: Add --etitle option

2017-04-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349352 )

Change subject: mwgrep: Add --etitle option
..

mwgrep: Add --etitle option

This allow users to override the default '.*\.(js|css)' pattern
with a custom pattern. Especially useful when looking for subpages
only with '.*\.js/' for 'Foo.js/en'. Or for anything for both
the main message and its translations (e.g. 'Cite ref error.*'
to match btoh 'Cite ref error' and 'Cite ref error/nl'.

Change-Id: Ie567a52c610b06c33a65ee62ed7b2eb35a061ca4
---
M modules/scap/files/mwgrep
1 file changed, 11 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/349352/1

diff --git a/modules/scap/files/mwgrep b/modules/scap/files/mwgrep
index 65f4f05..ebc4872 100755
--- a/modules/scap/files/mwgrep
+++ b/modules/scap/files/mwgrep
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 """
   usage: mwgrep [-h] [--max-results N] [--timeout N] [--user | --module]
-[--title TITLE] regex
+[--title TITLE] [--etitle regex] regex
 
   Grep for Lua or CSS and JS code fragments on (per default) MediaWiki wiki 
pages
 
@@ -15,7 +15,8 @@
 --timeout N  abort search after this many seconds (default: 30)
 --user   search NS_USER rather than NS_MEDIAWIKI
 --module search NS_MODULE rather than NS_MEDIAWIKI
---title TITLErestrict search to pages with this title
+--title TITLErestrict search to pages with this exact title
+--etitle regex   restrict search to pages with this title pattern
 
   mwgrep will grep the MediaWiki namespace across Wikimedia wikis. specify
   --user to search the user namespace instead. See the lucene documentation
@@ -71,7 +72,12 @@
 
 ap.add_argument(
 '--title',
-help='Restrict search to pages with this title (sans namespace)'
+help='Restrict search to pages with this exact title (sans namespace)'
+)
+
+ap.add_argument(
+'--etitle',
+help='Restrict search to pages with this title pattern (sans namespace)'
 )
 
 ns_group = ap.add_mutually_exclusive_group()
@@ -112,6 +118,8 @@
 
 if args.title is not None:
 filters.append( {'term': {'title.keyword': args.title}} )
+elif args.etitle is not None:
+filters.append( {'regexp': {'title.keyword': args.etitle}} )
 elif args.ns == NS_USER or args.ns == NS_MEDIAWIKI:
 filters.append( {'regexp': {'title.keyword': '.*\\.(js|css)'}} )
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: mwgrep: If --title is set, don't also require '*.js/.css'

2017-04-20 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349351 )

Change subject: mwgrep: If --title is set, don't also require '*.js/.css'
..

mwgrep: If --title is set, don't also require '*.js/.css'

This allows searching for contents in interface messages by
an exact name. There is no need to additionally require the
same regex to match. It's wasteful and makes mwgrep also harder
to use.

 mwgrep foo --title 'Something.js'

 mwgrep foo --title 'Something else'

Should both work. Currently the latter doesn't work because it
fights the AND condition for .js/css regex on title match.

Change-Id: I977ac24cbaacea9cbfcaefe4099018783c9d9b68
---
M modules/scap/files/mwgrep
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/scap/files/mwgrep b/modules/scap/files/mwgrep
index 08ffc84..65f4f05 100755
--- a/modules/scap/files/mwgrep
+++ b/modules/scap/files/mwgrep
@@ -109,11 +109,11 @@
 }},
 ]
 
-if args.ns == NS_USER or args.ns == NS_MEDIAWIKI:
-filters.append( {'regexp': {'title.keyword': '.*\\.(js|css)'}} )
 
 if args.title is not None:
 filters.append( {'term': {'title.keyword': args.title}} )
+elif args.ns == NS_USER or args.ns == NS_MEDIAWIKI:
+filters.append( {'regexp': {'title.keyword': '.*\\.(js|css)'}} )
 
 search = {
 'size': args.max_results,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: doc: Bump copyright year notice, 'team' name

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

Change subject: doc: Bump copyright year notice, 'team' name
..


doc: Bump copyright year notice, 'team' name

Change-Id: Ia090c417a1aa716b255613199b5e49616bf0517a
---
M MIT-LICENSE.txt
M includes/CiteCSSFileModule.php
M includes/CiteDataModule.php
M includes/CiteHooks.php
M modules/ve-cite/tests/ve.dm.Converter.test.js
M modules/ve-cite/tests/ve.dm.InternalList.test.js
M modules/ve-cite/tests/ve.dm.Transaction.test.js
M modules/ve-cite/tests/ve.dm.citeExample.js
M modules/ve-cite/tests/ve.ui.MWWikitextStringTransferHandler.test.js
M modules/ve-cite/ve.ce.MWReferenceNode.css
M modules/ve-cite/ve.ce.MWReferenceNode.js
M modules/ve-cite/ve.ce.MWReferencesListNode.css
M modules/ve-cite/ve.ce.MWReferencesListNode.js
M modules/ve-cite/ve.dm.MWReferenceModel.js
M modules/ve-cite/ve.dm.MWReferenceNode.js
M modules/ve-cite/ve.dm.MWReferencesListNode.js
M modules/ve-cite/ve.ui.MWCitationAction.js
M modules/ve-cite/ve.ui.MWCitationContextItem.js
M modules/ve-cite/ve.ui.MWCitationDialog.js
M modules/ve-cite/ve.ui.MWCitationDialogTool.js
M modules/ve-cite/ve.ui.MWReference.init.js
M modules/ve-cite/ve.ui.MWReferenceContextItem.css
M modules/ve-cite/ve.ui.MWReferenceContextItem.js
M modules/ve-cite/ve.ui.MWReferenceDialog.js
M modules/ve-cite/ve.ui.MWReferenceDialogTool.js
M modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.css
M modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js
M modules/ve-cite/ve.ui.MWReferenceIcons.css
M modules/ve-cite/ve.ui.MWReferenceResultWidget.css
M modules/ve-cite/ve.ui.MWReferenceResultWidget.js
M modules/ve-cite/ve.ui.MWReferenceSearchWidget.css
M modules/ve-cite/ve.ui.MWReferenceSearchWidget.js
M modules/ve-cite/ve.ui.MWReferencesListCommand.js
M modules/ve-cite/ve.ui.MWReferencesListContextItem.js
M modules/ve-cite/ve.ui.MWReferencesListDialog.js
M modules/ve-cite/ve.ui.MWUseExistingReferenceCommand.js
36 files changed, 49 insertions(+), 36 deletions(-)

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



diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt
index 5770215..a3be0d7 100644
--- a/MIT-LICENSE.txt
+++ b/MIT-LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2016 Cite VisualEditor Team and others under the terms
+Copyright (c) 2011-2017 Cite VisualEditor Team and others under the terms
 of The MIT License (MIT), as follows:
 
 This software consists of voluntary contributions made by many
diff --git a/includes/CiteCSSFileModule.php b/includes/CiteCSSFileModule.php
index caada37..ef945e2 100644
--- a/includes/CiteCSSFileModule.php
+++ b/includes/CiteCSSFileModule.php
@@ -4,8 +4,8 @@
  *
  * @file
  * @ingroup Extensions
- * @copyright 2011-2016 Cite VisualEditor Team and others; see AUTHORS.txt
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ * @copyright 2011-2017 Cite VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
  */
 
 class CiteCSSFileModule extends ResourceLoaderFileModule {
diff --git a/includes/CiteDataModule.php b/includes/CiteDataModule.php
index ce74ebf..1952ebf 100644
--- a/includes/CiteDataModule.php
+++ b/includes/CiteDataModule.php
@@ -6,7 +6,7 @@
  *
  * @file
  * @ingroup Extensions
- * @copyright 2011-2016 Cite VisualEditor Team and others; see AUTHORS.txt
+ * @copyright 2011-2017 Cite VisualEditor Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see MIT-LICENSE.txt
  */
 
diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php
index 1d2c7ea..b011178 100644
--- a/includes/CiteHooks.php
+++ b/includes/CiteHooks.php
@@ -4,7 +4,7 @@
  *
  * @file
  * @ingroup Extensions
- * @copyright 2011-2016 Cite VisualEditor Team and others; see AUTHORS.txt
+ * @copyright 2011-2017 Cite VisualEditor Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see MIT-LICENSE.txt
  */
 
diff --git a/modules/ve-cite/tests/ve.dm.Converter.test.js 
b/modules/ve-cite/tests/ve.dm.Converter.test.js
index 04b5bd6..8352c0a 100644
--- a/modules/ve-cite/tests/ve.dm.Converter.test.js
+++ b/modules/ve-cite/tests/ve.dm.Converter.test.js
@@ -1,7 +1,7 @@
 /*!
  * VisualEditor DataModel Cite-specific Converter tests.
  *
- * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @copyright 2011-2017 Cite VisualEditor Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
diff --git a/modules/ve-cite/tests/ve.dm.InternalList.test.js 
b/modules/ve-cite/tests/ve.dm.InternalList.test.js
index 6fd6b05..9e96527 100644
--- a/modules/ve-cite/tests/ve.dm.InternalList.test.js
+++ b/modules/ve-cite/tests/ve.dm.InternalList.test.js
@@ -1,7 +1,7 @@
 /*!
  * VisualEditor DataModel Cite-specific InternalList tests.
  *
- * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @copyright 2011-2017 Cite VisualEditor Team and other

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Force Labs to eqiad, since all the services are there.

2017-04-20 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349349 )

Change subject: Force Labs to eqiad, since all the services are there.
..

Force Labs to eqiad, since all the services are there.

The data center switchover was breaking at least Redis, and I assume
all Labs services.

Bug: T163514
Change-Id: I7b34bf8c402efe9ff5a8f75b41077814951dc0fe
---
M wmf-config/LabsServices.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php
index b596943..4476505 100644
--- a/wmf-config/LabsServices.php
+++ b/wmf-config/LabsServices.php
@@ -56,6 +56,6 @@
 
 
 # Shorthand when we have no master-slave situation to keep into account
-$wmfLocalServices = $wmfAllServices[$wmfDatacenter];
+$wmfLocalServices = $wmfAllServices['eqiad'];
 
-$wmfMasterServices = $wmfAllServices[$wmfMasterDatacenter];
+$wmfMasterServices = $wmfAllServices['eqiad'];

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: [completely experimental] Have the popup flip positions when...

2017-04-20 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349350 )

Change subject: [completely experimental] Have the popup flip positions when 
theres no room
..

[completely experimental] Have the popup flip positions when theres no room

Change-Id: Ib00ab60bc18c4c0f2971cffbc12c5264cc12c7a1
---
M src/widgets/PopupWidget.js
1 file changed, 27 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/50/349350/1

diff --git a/src/widgets/PopupWidget.js b/src/widgets/PopupWidget.js
index e5f8abe..70dde84 100644
--- a/src/widgets/PopupWidget.js
+++ b/src/widgets/PopupWidget.js
@@ -396,6 +396,13 @@
var direction, align, vertical, start, end, near, far, sizeProp, 
popupSize, anchorSize, anchorPos,
anchorOffset, anchorMargin, parentPosition, positionProp, 
positionAdjustment, floatablePos,
offsetParentPos, containerPos,
+   floatableContainerPos, floatableContainerHeight, 
containerHeight, distanceFromEdge,
+   oppositePositions = {
+   top: 'bottom',
+   bottom: 'top',
+   right: 'left',
+   left: 'right'
+   },
popupPos = {},
anchorCss = { left: '', right: '', top: '', bottom: '' },
alignMap = {
@@ -423,7 +430,8 @@
forwards: 'top',
center: 'center',
backwards: 'bottom'
-   };
+   },
+   popupPosition = this.popupPosition;
 
if ( !this.$container ) {
// Lazy-initialize $container if not specified in constructor
@@ -448,7 +456,24 @@
sizeProp = vertical ? 'Height' : 'Width';
popupSize = vertical ? ( this.height || this.$popup.height() ) : 
this.width;
 
-   this.setAnchorEdge( anchorEdgeMap[ this.popupPosition ] );
+
+   // Calculate space from the edge, to see if either horizontal or 
vertical position
+   // should be flipped. If there's not enough room, flip the position to 
the other
+   // side
+   floatableContainerPos = this.$floatableContainer.offset();
+   floatableContainerHeight = this.$floatableContainer.outerHeight();
+   containerHeight = this.$container.outerHeight();
+   anchorSize = this.$anchor[ 0 ][ 'scrollHeight' ];
+   distanceFromEdge = containerHeight - floatableContainerHeight - 
floatableContainerPos.top - 7;
+   if ( distanceFromEdge < ( this.$element.outerHeight() + anchorSize ) ) {
+   // Flip to the opposite direction
+   popupPosition = oppositePositions[ positionProp ];
+   }
+
+
+
+
+   this.setAnchorEdge( anchorEdgeMap[ popupPosition ] );
this.horizontalPosition = vertical ? this.popupPosition : hPosMap[ 
align ];
this.verticalPosition = vertical ? vPosMap[ align ] : 
this.popupPosition;
 
@@ -458,7 +483,6 @@
positionProp = vertical ?
( parentPosition.top !== '' ? 'top' : 'bottom' ) :
( parentPosition.left !== '' ? 'left' : 'right' );
-
// Figure out where the near and far edges of the popup and 
$floatableContainer are
floatablePos = this.$floatableContainer.offset();
floatablePos[ far ] = floatablePos[ near ] + this.$floatableContainer[ 
'outer' + sizeProp ]();

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove beta specific search behavioural changes

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

Change subject: Remove beta specific search behavioural changes
..


Remove beta specific search behavioural changes

With these changes the flicker free search optimisation
will ride the MediaWiki train.

Changes:
* Remove special handling for beta and make it the
default
* Adjustments to CSS to center spinner in search
display. Note the flicker free search change predates the
new header so was not compatible.

Bug: T153973
Change-Id: I740678fd5aa4228fc0378da2f915e92bd9a9c0a5
---
M resources/mobile.search/SearchOverlay.js
M resources/mobile.search/SearchOverlay.less
M resources/mobile.search/content.hogan
3 files changed, 36 insertions(+), 60 deletions(-)

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



diff --git a/resources/mobile.search/SearchOverlay.js 
b/resources/mobile.search/SearchOverlay.js
index 1d9d711..f81cd7d 100644
--- a/resources/mobile.search/SearchOverlay.js
+++ b/resources/mobile.search/SearchOverlay.js
@@ -6,9 +6,9 @@
Icon = M.require( 'mobile.startup/Icon' ),
WatchstarPageList = M.require( 
'mobile.pagelist.scripts/WatchstarPageList' ),
SEARCH_DELAY = 300,
+   SEARCH_SPINNER_DELAY = 2000,
$html = $( 'html' ),
-   feedbackLink = mw.config.get( 'wgCirrusSearchFeedbackLink' ),
-   isBeta = M.require( 'mobile.startup/context' 
).isBetaGroupMember();
+   feedbackLink = mw.config.get( 'wgCirrusSearchFeedbackLink' );
 
/**
 * Overlay displaying search results
@@ -89,8 +89,7 @@
href: feedbackLink
} ).options,
prompt: mw.msg( 
'mobile-frontend-search-feedback-prompt' )
-   },
-   isBeta: isBeta
+   }
} ),
/**
 * @inheritdoc
@@ -261,30 +260,17 @@
clearTimeout( timer );
}
 
-   if ( isBeta ) {
-   // Show a spinner on top of search results
-   this.$spinner = this.$( '.spinner-container' );
-   M.on( 'search-start', function ( searchData ) {
-   if ( timer ) {
-   clearSearch();
-   }
-   timer = setTimeout( function () {
-   self.$spinner.show();
-   }, 2000 - searchData.delay );
-   } );
-   M.on( 'search-results', clearSearch );
-   } else {
-   // Show a spinner in place search results
-   this.$spinner = this.$( '.spinner' );
-   M.on( 'search-start', function () {
-   self.resetSearch();
+   // Show a spinner on top of search results
+   this.$spinner = this.$( '.spinner-container' );
+   M.on( 'search-start', function ( searchData ) {
+   if ( timer ) {
+   clearSearch();
+   }
+   timer = setTimeout( function () {
self.$spinner.show();
-   } );
-   M.on( 'search-results', function () {
-   self.$searchFeedback.show();
-   self.$spinner.hide();
-   } );
-   }
+   }, SEARCH_SPINNER_DELAY - searchData.delay );
+   } );
+   M.on( 'search-results', clearSearch );
 
// Hide the clear button if the search input is empty
if ( self.$input.val() === '' ) {
diff --git a/resources/mobile.search/SearchOverlay.less 
b/resources/mobile.search/SearchOverlay.less
index 86aa4b7..8754195 100644
--- a/resources/mobile.search/SearchOverlay.less
+++ b/resources/mobile.search/SearchOverlay.less
@@ -13,8 +13,23 @@
 .search-overlay {
background: #fff;
 
-   .spinner {
+   .spinner-container {
+   background-color: @colorSpinnerOverlayBackground;
+   bottom: 0;
display: none;
+   left: 0;
+   opacity: 0.7;
+   right: 0;
+   top: @headerHeight;
+   z-index: @z-indexOverOverlay;
+
+ 

[MediaWiki-commits] [Gerrit] mediawiki...Cite[master]: Drop the pointless "AllowCiteGroups" config setting

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

Change subject: Drop the pointless "AllowCiteGroups" config setting
..


Drop the pointless "AllowCiteGroups" config setting

Bug: T161144
Change-Id: Ie1454926b8bfa108a62d088991e66b6dae9c9f10
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/Cite.php
4 files changed, 4 insertions(+), 16 deletions(-)

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



diff --git a/extension.json b/extension.json
index ac9cd43..fe11a5a 100644
--- a/extension.json
+++ b/extension.json
@@ -90,7 +90,6 @@
"cite": "GlobalVarConfig::newInstance"
},
"config": {
-   "AllowCiteGroups": true,
"CiteCacheReferences": false,
"CiteStoreReferencesData": false,
"CiteCacheReferencesDataOnParse": false,
diff --git a/i18n/en.json b/i18n/en.json
index fb497a3..10e5dce 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -25,8 +25,7 @@
"cite_error_ref_too_many_keys": "Invalid  
tag;\ninvalid names, e.g. too many",
"cite_error_ref_no_input": "Invalid  tag;\nrefs 
with no name must have content",
"cite_error_references_duplicate_key": "Invalid 
 tag; name \"$1\" defined multiple times with different 
content",
-   "cite_error_references_invalid_parameters": "Invalid 
 tag;\nno parameters are allowed.\nUse 
",
-   "cite_error_references_invalid_parameters_group": "Invalid parameter in 
 tag",
+   "cite_error_references_invalid_parameters": "Invalid parameter in 
 tag",
"cite_error_references_no_backlink_label": "Ran out of custom backlink 
labels.\nDefine more in the [[MediaWiki:Cite references link many 
format backlink labels]] message.",
"cite_error_no_link_label_group": "Ran out of custom link labels for 
group \"$1\".\nDefine more in the [[MediaWiki:$2]] message.",
"cite_error_references_no_text": "Invalid  
tag;\nno text was provided for refs named $1",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 230a5e2..1b7b4b1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -26,7 +26,6 @@
"cite_error_ref_no_input": "Cite extension. Error message shown when 
ref tags without names have no content. An example that cause this error is 
",
"cite_error_references_duplicate_key": "Cite extension. Error message 
shown when multiple refs with same name exist but with different content",
"cite_error_references_invalid_parameters": "Cite extension. Error 
message shown when parmeters are used in the references tag. An example that 
cause this error is ",
-   "cite_error_references_invalid_parameters_group": "Cite extension. 
Error message shown when unknown parameters are used in the references tag. An 
example that cause this error is ",
"cite_error_references_no_backlink_label": "Cite extension. Error 
message shown in the references tag when the same name is used for too many ref 
tags. Too many in this case is more than there are backlink labels defined in 
[[MediaWiki:Cite references link many format backlink labels]].\n\nIt is not 
possible to make a clickable link to this message. \"nowiki\" is mandatory 
around [[MediaWiki:Cite references link many format backlink labels]].",
"cite_error_no_link_label_group": "*'''$1''' is the name of a reference 
group.\n*'''$2''' is cite_link_label_group-groupname.",
"cite_error_references_no_text": "Cite extension. This error occurs 
when the tag  is used 
with the name-option specified and no other tag specifies a cite-text for this 
name.\n\nParameters:\n* $1 - key of the ref",
diff --git a/includes/Cite.php b/includes/Cite.php
index eca6a57..e44fd50 100644
--- a/includes/Cite.php
+++ b/includes/Cite.php
@@ -388,7 +388,6 @@
 *   input and null on no input
 */
private function refArg( array $argv ) {
-   global $wgAllowCiteGroups;
$cnt = count( $argv );
$group = null;
$key = null;
@@ -415,10 +414,6 @@
--$cnt;
}
if ( isset( $argv['group'] ) ) {
-   if ( !$wgAllowCiteGroups ) {
-   // remove when groups are fully tested.
-   return [ false ];
-   }
// Group given.
$group = $argv['group'];
unset( $argv['group'] );
@@ -650,11 +645,11 @@
Parser $parser,
$group = self::DEFAULT_GROUP
) {
-   global $wgAllowCiteGroups, $wgCiteResponsiveReferences;
+

[MediaWiki-commits] [Gerrit] oojs/ui[master]: ProcessDialog: Display error messages on top of footer actio...

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

Change subject: ProcessDialog: Display error messages on top of footer action 
buttons
..


ProcessDialog: Display error messages on top of footer action buttons

Change c8a4e49a31f909aa4a91db72751363cb0b4db263 raised the 'z-index'
for .oo-ui-window-foot (in Dialog.less) to 3. We have to beat that
value here.

Bug: T163504
Change-Id: I844a9116574f719ce99c6f069e6a155f28a5fa0f
---
M src/styles/dialogs/ProcessDialog.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/styles/dialogs/ProcessDialog.less 
b/src/styles/dialogs/ProcessDialog.less
index 379588a..57eca0b 100644
--- a/src/styles/dialogs/ProcessDialog.less
+++ b/src/styles/dialogs/ProcessDialog.less
@@ -43,7 +43,7 @@
left: 0;
right: 0;
bottom: 0;
-   z-index: 2;
+   z-index: 4;
overflow-x: hidden;
overflow-y: auto;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I844a9116574f719ce99c6f069e6a155f28a5fa0f
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove delete-stale-branch: use scap clean instead

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

Change subject: Remove delete-stale-branch: use scap clean instead
..


Remove delete-stale-branch: use scap clean instead

Change-Id: I7c28d69b031d44ae857d98ef9b9f165d4c7e2eb6
---
D bin/delete-stale-branch
1 file changed, 0 insertions(+), 57 deletions(-)

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



diff --git a/bin/delete-stale-branch b/bin/delete-stale-branch
deleted file mode 100755
index a7a0245..000
--- a/bin/delete-stale-branch
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-
-# Copyright © 2015 Mukunda Modell
-#
-# 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.
-# http://www.gnu.org/copyleft/gpl.html
-#
-
-# Delete a stale deployment branch, either by specifying the version number
-# or "auto" to automatically pick a branch older than 5 weeks.
-# This will stage symlink changes and run dsh to delete the branch remotely.
-
-export STALE_VERSION=$1
-cd /srv/mediawiki-staging
-if [ "$1" == "" ]; then
-   echo "Usage: $0 [version|auto]"
-   echo "To delete a specific version:"
-echo "delete-stale 1.25wmf22"
-   echo "To automatically pick a stale version, use:"
-echo "delete-stale auto"
-   exit 1;
-fi
-
-if [ "$STALE_VERSION" == "auto" ]; then
-   STALE_VERSION=`find php-* -maxdepth 0 -type d -mtime +35 | head -1`
-fi
-
-if [ "${STALE_VERSION:0:4}" == "php-" ]; then
-   export STALE_VERSION="${STALE_VERSION:4}"
-fi
-
-if [ "$STALE_VERSION" == "" ]; then
-   echo "Unable to determine a stale version to delete"
-   exit 1
-fi
-
-read -p "About to delete php-$STALE_VERSION. Continue? "
-
-multiversion/deleteMediaWiki php-$STALE_VERSION
-sudo -u l10nupdate rm -rf php-$STALE_VERSION/cache/l10n/*
-rm -rf php-$STALE_VERSION
-
-SSH_AUTH_SOCK=/run/keyholder/proxy.sock dsh -F 20 -M -g scap-masters -r ssh -o 
-oUser=mwdeploy -- rm -rf /srv/mediawiki/php-$STALE_VERSION
-SSH_AUTH_SOCK=/run/keyholder/proxy.sock dsh -F 20 -M -g scap-proxies -r ssh -o 
-oUser=mwdeploy -- rm -rf /srv/mediawiki/php-$STALE_VERSION
-SSH_AUTH_SOCK=/run/keyholder/proxy.sock dsh -F 20 -M -g mediawiki-installation 
-r ssh -o -oUser=mwdeploy -- rm -rf /srv/mediawiki/php-$STALE_VERSION

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c28d69b031d44ae857d98ef9b9f165d4c7e2eb6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Unpack built war directly

2017-04-20 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349347 )

Change subject: Unpack built war directly
..

Unpack built war directly

I see no reason why we need to pack the war twice. May be a leftover
from the time we did not have war atrifact as separate target.

Change-Id: I27d41f93f2db7a25d854fd84f8bf9a14335ae098
---
M tools/pom.xml
1 file changed, 3 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/47/349347/1

diff --git a/tools/pom.xml b/tools/pom.xml
index a55ea6d..1950703 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -135,35 +135,13 @@
 
   
 
-  com.blazegraph
-  bigdata-war
-  ${blazegraph.version}
+  org.wikidata.query.rdf
+  blazegraph-service
+  ${project.parent.version}
   war
 
   
   
${project.build.directory}/blazegraph
-
-  
-  
-drop-in-blazegraph-extension
-
-  copy
-
-pre-integration-test
-
-  
-
-  org.wikidata.query.rdf
-  common
-  ${project.parent.version}
-
-
-  org.wikidata.query.rdf
-  blazegraph
-  ${project.parent.version}
-
-  
-  
${project.build.directory}/blazegraph/WEB-INF/lib
 
   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27d41f93f2db7a25d854fd84f8bf9a14335ae098
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Remove usage of RequestContext::getStats()

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

Change subject: Remove usage of RequestContext::getStats()
..


Remove usage of RequestContext::getStats()

Bug: T156810
Change-Id: I985b22f8d0235e132c0c34a51da4bea992432209
---
M WikimediaEventsHooks.php
1 file changed, 8 insertions(+), 9 deletions(-)

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



diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 821077a..547657c 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -70,13 +70,13 @@
return;
}
 
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
if ( PHP_SAPI !== 'cli' ) {
-   DeferredUpdates::addCallableUpdate( function () {
-   $context = RequestContext::getMain();
-   $timing = $context->getTiming();
+   DeferredUpdates::addCallableUpdate( function () use ( 
$stats ) {
+   $timing = 
RequestContext::getMain()->getTiming();
$measure = $timing->measure( 
'editResponseTime', 'requestStart', 'requestShutdown' );
if ( $measure !== false ) {
-   $context->getStats()->timing( 
'timing.editResponseTime', $measure['duration'] * 1000 );
+   $stats->timing( 
'timing.editResponseTime', $measure['duration'] * 1000 );
}
} );
}
@@ -113,7 +113,6 @@
// are important indicators of community health.
if ( $editCount === 0 || preg_match( '/^9+$/' , "$editCount" ) 
) {
$milestone = $editCount + 1;
-   $stats = RequestContext::getMain()->getStats();
$stats->increment( "editor.milestones.{$milestone}" );
$stats->timing( 
"editor.milestones.timing.{$milestone}", $age );
}
@@ -147,7 +146,6 @@
 * @param array $flags
 */
public static function onRevisionInsertComplete( &$revision, $data, 
$flags ) {
-   $context = RequestContext::getMain();
$user = User::newFromId( $revision->getUser( Revision::RAW ) );
 
// Anonymous users and bots don't count (sorry!)
@@ -163,7 +161,7 @@
// Check if this is the user's fifth mainspace edit this month.
// If it is, then this editor has just made the cut as an active
// editor for this wiki for this month.
-   DeferredUpdates::addCallableUpdate( function () use ( $context, 
$user ) {
+   DeferredUpdates::addCallableUpdate( function () use ( $user ) {
$db = wfGetDB( DB_MASTER );
 
$since = date( 'Ym' ) . '';
@@ -182,7 +180,8 @@
 
if ( $numMainspaceEditsThisMonth === 5 ) {
$month = date( 'm-Y' );
-   $context->getStats()->increment( 
'editor.activation.' . $month );
+   MediaWikiServices::getInstance()
+   ->getStatsdDataFactory()->increment( 
'editor.activation.' . $month );
EventLogging::logEvent( 'EditorActivation', 
14208837, array(
'userId' => $user->getId(),
'month'  => $month,
@@ -519,7 +518,7 @@
 
$measure = $timing->measure( 'viewResponseTime', 
'requestStart', 'requestShutdown' );
if ( $measure !== false ) {
-   $context->getStats()->timing(
+   
MediaWikiServices::getInstance()->getStatsdDataFactory()->timing(
"timing.viewResponseTime.{$platform}", 
$measure['duration'] * 1000 );
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I985b22f8d0235e132c0c34a51da4bea992432209
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Florianschmidtwelzow 
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/core[master]: Fix bogus variable use in RefreshLinksJob::run()

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

Change subject: Fix bogus variable use in RefreshLinksJob::run()
..


Fix bogus variable use in RefreshLinksJob::run()

Also removed two unused loop variables.

Change-Id: I9a9e0a83bdaa13c031857bc20f977161cf85baff
---
M includes/jobqueue/jobs/RefreshLinksJob.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php 
b/includes/jobqueue/jobs/RefreshLinksJob.php
index 64d955a..02bb829 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -87,7 +87,7 @@
// When the base job branches, wait for the replica DBs 
to catch up to the master.
// From then on, we know that any template changes at 
the time the base job was
// enqueued will be reflected in backlink page parses 
when the leaf jobs run.
-   if ( !isset( $params['range'] ) ) {
+   if ( !isset( $this->params['range'] ) ) {
try {
$lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$lbFactory->waitForReplication( [
@@ -113,7 +113,7 @@
JobQueueGroup::singleton()->push( $jobs );
// Job to update link tables for a set of titles
} elseif ( isset( $this->params['pages'] ) ) {
-   foreach ( $this->params['pages'] as $pageId => 
$nsAndKey ) {
+   foreach ( $this->params['pages'] as $nsAndKey ) {
list( $ns, $dbKey ) = $nsAndKey;
$this->runForTitle( Title::makeTitleSafe( $ns, 
$dbKey ) );
}
@@ -253,7 +253,7 @@
// This avoids snapshot-clearing errors in 
LinksUpdate::acquirePageLock().
$lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
 
-   foreach ( $updates as $key => $update ) {
+   foreach ( $updates as $update ) {
// FIXME: This code probably shouldn't be here?
// Needed by things like Echo notifications which need
// to know which user caused the links update

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use makeKey() in BacklinkCache

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

Change subject: Use makeKey() in BacklinkCache
..


Use makeKey() in BacklinkCache

Change-Id: I23c000c8c2c77aa538fe258ea34eb764987eb52d
---
M includes/cache/BacklinkCache.php
1 file changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php
index e171bc7..3ee6330 100644
--- a/includes/cache/BacklinkCache.php
+++ b/includes/cache/BacklinkCache.php
@@ -339,7 +339,11 @@
return min( $max, 
$this->fullResultCache[$table]->numRows() );
}
 
-   $memcKey = wfMemcKey( 'numbacklinks', md5( 
$this->title->getPrefixedDBkey() ), $table );
+   $memcKey = $cache->makeKey(
+   'numbacklinks',
+   md5( $this->title->getPrefixedDBkey() ),
+   $table
+   );
 
// 3) ... fallback to memcached ...
$count = $cache->get( $memcKey );
@@ -393,7 +397,7 @@
return $cacheEntry['batches'];
}
 
-   $memcKey = wfMemcKey(
+   $memcKey = $cache->makeKey(
'backlinks',
md5( $this->title->getPrefixedDBkey() ),
$table,
@@ -436,7 +440,11 @@
$cache->set( $memcKey, $cacheEntry, self::CACHE_EXPIRY );
 
// Save backlink count to memcached
-   $memcKey = wfMemcKey( 'numbacklinks', md5( 
$this->title->getPrefixedDBkey() ), $table );
+   $memcKey = $cache->makeKey(
+   'numbacklinks',
+   md5( $this->title->getPrefixedDBkey() ),
+   $table
+   );
$cache->set( $memcKey, $cacheEntry['numRows'], 
self::CACHE_EXPIRY );
 
wfDebug( __METHOD__ . ": got from database\n" );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: CSS hack for ext.wikiEditor module no longer needed

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

Change subject: CSS hack for ext.wikiEditor module no longer needed
..


CSS hack for ext.wikiEditor module no longer needed

Change I7c7c3ba49 fixed the underlying bug.

Change-Id: Ida8a5dbd4e3602484f723d43bfa562389565e9d4
---
M resources/ext.CodeMirror.less
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/resources/ext.CodeMirror.less b/resources/ext.CodeMirror.less
index db3e59b..30a2f48 100644
--- a/resources/ext.CodeMirror.less
+++ b/resources/ext.CodeMirror.less
@@ -7,12 +7,6 @@
 
 .mw-codeMirror-classicToolbar {
border: 1px solid #a2a9b1;
-
-   // If WikiEditor is installed but disabled, the classic toolbar
-   // will still get wrapped in wikiEditor-ui
-   .wikiEditor-ui-text & {
-   border: 0;
-   }
 }
 
 .CodeMirror pre,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida8a5dbd4e3602484f723d43bfa562389565e9d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Pastakhov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: ProcessDialog: Display error messages on top of footer actio...

2017-04-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349346 )

Change subject: ProcessDialog: Display error messages on top of footer action 
buttons
..

ProcessDialog: Display error messages on top of footer action buttons

Change c8a4e49a31f909aa4a91db72751363cb0b4db263 raised the 'z-index'
for .oo-ui-window-foot (in Dialog.less) to 3. We have to beat that
value here.

Bug: T163504
Change-Id: I844a9116574f719ce99c6f069e6a155f28a5fa0f
---
M src/styles/dialogs/ProcessDialog.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/46/349346/1

diff --git a/src/styles/dialogs/ProcessDialog.less 
b/src/styles/dialogs/ProcessDialog.less
index 379588a..57eca0b 100644
--- a/src/styles/dialogs/ProcessDialog.less
+++ b/src/styles/dialogs/ProcessDialog.less
@@ -43,7 +43,7 @@
left: 0;
right: 0;
bottom: 0;
-   z-index: 2;
+   z-index: 4;
overflow-x: hidden;
overflow-y: auto;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I844a9116574f719ce99c6f069e6a155f28a5fa0f
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ve.init.mw.ArticleTarget: Use a simpler error message when s...

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

Change subject: ve.init.mw.ArticleTarget: Use a simpler error message when site 
is read-only
..


ve.init.mw.ArticleTarget: Use a simpler error message when site is read-only

Sites like to customize 'readonlywarning' with things that we can't parse.
Instead, use 'apierror-readonly'. The old message is still shown in edit
notices.

Bug: T163455
Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
---
M extension.json
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
2 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/extension.json b/extension.json
index 90f9d1f..36b3a89 100644
--- a/extension.json
+++ b/extension.json
@@ -389,7 +389,7 @@
"editing",
"lastmodifiedat",
"parentheses",
-   "readonlywarning",
+   "apierror-readonly",
"redirectpagesub",
"subject",
"visualeditor-loadwarning",
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 52204f4..597a136 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -614,7 +614,7 @@
this.saveErrorHookAborted();
return;
} else if ( data.error && data.error.code === 'readonly' ) {
-   this.saveErrorReadOnly( data.error.readonlyreason );
+   this.saveErrorReadOnly();
return;
}
 
@@ -912,11 +912,10 @@
  * Handle read only error
  *
  * @method
- * @param {string} reason The reason given by the system administrator.
  * @fires saveErrorReadOnly
  */
-ve.init.mw.ArticleTarget.prototype.saveErrorReadOnly = function ( reason ) {
-   this.showSaveError( $( $.parseHTML( mw.message( 'readonlywarning', 
reason ).parse() ) ), true, true );
+ve.init.mw.ArticleTarget.prototype.saveErrorReadOnly = function () {
+   this.showSaveError( $( $.parseHTML( mw.message( 'apierror-readonly' 
).parse() ) ), true, true );
this.emit( 'saveErrorReadOnly' );
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: wikiEditorToolbarEnabled: Rewrite if block as statement

2017-04-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349345 )

Change subject: wikiEditorToolbarEnabled: Rewrite if block as statement
..

wikiEditorToolbarEnabled: Rewrite if block as statement

Change-Id: I516a8e8f1bf53dc784a2ab3ff49bd20b172dc6e8
---
M resources/ext.CodeMirror.js
1 file changed, 4 insertions(+), 7 deletions(-)


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

diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index a1c682e..91e417d 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -1,5 +1,5 @@
 ( function ( mw, $ ) {
-   var origTextSelection, useCodeMirror, codeMirror, api, 
originHooksTextarea, wikiEditorToolbarEnabled = false;
+   var origTextSelection, useCodeMirror, codeMirror, api, 
originHooksTextarea, wikiEditorToolbarEnabled;
 
if ( mw.config.get( 'wgCodeEditorCurrentLanguage' ) ) { // If the 
CodeEditor is used then just exit;
return;
@@ -11,13 +11,10 @@
useCodeMirror = mw.user.options.get( 'usecodemirror' ) > 0;
api = new mw.Api();
originHooksTextarea = $.valHooks.textarea;
-
-   if ( mw.loader.getState( 'ext.wikiEditor' ) ) {  // The WikiEditor 
extension exists
+   // The WikiEditor extension exists the WikiEditor beta toolbar is used 
by the user
+   wikiEditorToolbarEnabled = !!mw.loader.getState( 'ext.wikiEditor' ) &&
// This can be the string "0" if the user disabled the 
preference - Bug T54542#555387
-   if ( mw.user.options.get( 'usebetatoolbar' ) > 0 ) { // And the 
WikiEditor beta toolbar is used by the user
-   wikiEditorToolbarEnabled = true;
-   }
-   }
+   mw.user.options.get( 'usebetatoolbar' ) > 0;
 
// function for a textselection function for CodeMirror
function cmTextSelection( command, options ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Generate cog icon via ResourceLoaderImage module

2017-04-20 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349344 )

Change subject: Generate cog icon via ResourceLoaderImage module
..

Generate cog icon via ResourceLoaderImage module

* Merge mwe-popups-icon with mwe-popups-settings-icon
* Remove PNG - now generated by the ResourceLoader module
* Footer width is no longer fixed

Change-Id: I14ccd7b6731e9ec49f9959411fd17f7c9fdf43be
---
M extension.json
M resources/dist/index.js
M resources/dist/index.js.map
R resources/ext.popups.images/cog.svg
D resources/ext.popups/images/cog.png
M resources/ext.popups/styles/ext.popups.core.less
M resources/ext.popups/templates/preview.mustache
M src/renderer.js
8 files changed, 20 insertions(+), 26 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Ensure symlink to enable mcrypt for CLI

2017-04-20 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349343 )

Change subject: Ensure symlink to enable mcrypt for CLI
..

Ensure symlink to enable mcrypt for CLI

All of the other extensions seem to get this link just by installing
the deb, but for some reason mcrypt isn't linked.

Change-Id: I033367172ae3ee28f266f5ca102bad4080b2dfa6
---
M modules/contint/manifests/packages/php.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/349343/1

diff --git a/modules/contint/manifests/packages/php.pp 
b/modules/contint/manifests/packages/php.pp
index 6ab6f2c..f9c31e7 100644
--- a/modules/contint/manifests/packages/php.pp
+++ b/modules/contint/manifests/packages/php.pp
@@ -73,4 +73,11 @@
 ensure => present,
 }
 
+# enable mcrypt for PHP CLI
+# FIXME: why is this needed for mcrypt and not other extensions?
+file { '/etc/php5/cli/conf.d/20-mcrypt.ini':
+ensure => 'link',
+target => '/etc/php5/mods-available/mcrypt.ini',
+}
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add 90.231.10.86 to phabbanlist, this crawler is causing out...

2017-04-20 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349342 )

Change subject: Add 90.231.10.86 to phabbanlist, this crawler is causing 
outages.
..

Add 90.231.10.86 to phabbanlist, this crawler is causing outages.

Change-Id: Ia9b2aac014d0b72fee12595af962ce5a9b3a6014
---
M modules/phabricator/files/apache/phabbanlist.conf
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/349342/1

diff --git a/modules/phabricator/files/apache/phabbanlist.conf 
b/modules/phabricator/files/apache/phabbanlist.conf
index 40abf46..6cbf2fe 100644
--- a/modules/phabricator/files/apache/phabbanlist.conf
+++ b/modules/phabricator/files/apache/phabbanlist.conf
@@ -22,6 +22,7 @@
 
 # aggressive bot, claims to be https://www.teorem.se/bot.html but url is 404
 Require not ip 90.227.4.251
+Require not ip 90.231.10.86
 
 # jice.ddns.net cloning the site for
 # nefarious purposes

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9b2aac014d0b72fee12595af962ce5a9b3a6014
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: novaproxy: Rename ferm rule

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349341 )

Change subject: novaproxy: Rename ferm rule
..


novaproxy: Rename ferm rule

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

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



diff --git a/modules/role/manifests/labs/novaproxy.pp 
b/modules/role/manifests/labs/novaproxy.pp
index fc7d27d..34ebe6d 100644
--- a/modules/role/manifests/labs/novaproxy.pp
+++ b/modules/role/manifests/labs/novaproxy.pp
@@ -35,7 +35,7 @@
 desc  => 'API for adding / removing proxies from dynamicproxy 
domainproxy'
 }
 
-ferm::service { 'dynamicproxy-api-http':
+ferm::service { 'dynamicproxy-api-http-readonly':
 port  => '5669',
 proto => 'tcp',
 desc  => 'read-only API for viewing proxies from dynamicproxy 
domainproxy'

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: novaproxy: Rename ferm rule

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349341 )

Change subject: novaproxy: Rename ferm rule
..

novaproxy: Rename ferm rule

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/349341/1

diff --git a/modules/role/manifests/labs/novaproxy.pp 
b/modules/role/manifests/labs/novaproxy.pp
index fc7d27d..34ebe6d 100644
--- a/modules/role/manifests/labs/novaproxy.pp
+++ b/modules/role/manifests/labs/novaproxy.pp
@@ -35,7 +35,7 @@
 desc  => 'API for adding / removing proxies from dynamicproxy 
domainproxy'
 }
 
-ferm::service { 'dynamicproxy-api-http':
+ferm::service { 'dynamicproxy-api-http-readonly':
 port  => '5669',
 proto => 'tcp',
 desc  => 'read-only API for viewing proxies from dynamicproxy 
domainproxy'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1700f190820f3aff977ebe7529df198263304e41
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ve.init.mw.ArticleTarget: Use a simpler error message when s...

2017-04-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349340 )

Change subject: ve.init.mw.ArticleTarget: Use a simpler error message when site 
is read-only
..

ve.init.mw.ArticleTarget: Use a simpler error message when site is read-only

Sites like to customize 'readonlywarning' with things that we can't parse.
Instead, use 'apierror-readonly'. The old message is still shown in edit
notices.

Bug: T163455
Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
---
M extension.json
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
2 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/extension.json b/extension.json
index 90f9d1f..36b3a89 100644
--- a/extension.json
+++ b/extension.json
@@ -389,7 +389,7 @@
"editing",
"lastmodifiedat",
"parentheses",
-   "readonlywarning",
+   "apierror-readonly",
"redirectpagesub",
"subject",
"visualeditor-loadwarning",
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 52204f4..597a136 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -614,7 +614,7 @@
this.saveErrorHookAborted();
return;
} else if ( data.error && data.error.code === 'readonly' ) {
-   this.saveErrorReadOnly( data.error.readonlyreason );
+   this.saveErrorReadOnly();
return;
}
 
@@ -912,11 +912,10 @@
  * Handle read only error
  *
  * @method
- * @param {string} reason The reason given by the system administrator.
  * @fires saveErrorReadOnly
  */
-ve.init.mw.ArticleTarget.prototype.saveErrorReadOnly = function ( reason ) {
-   this.showSaveError( $( $.parseHTML( mw.message( 'readonlywarning', 
reason ).parse() ) ), true, true );
+ve.init.mw.ArticleTarget.prototype.saveErrorReadOnly = function () {
+   this.showSaveError( $( $.parseHTML( mw.message( 'apierror-readonly' 
).parse() ) ), true, true );
this.emit( 'saveErrorReadOnly' );
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Revert "Temporarily half the transclusion update concurrency"

2017-04-20 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349336 )

Change subject: Revert "Temporarily half the transclusion update concurrency"
..


Revert "Temporarily half the transclusion update concurrency"

This reverts commit a19ebf83f7fae7526abcfb85fd7da74d6d8c5ab1.

Change-Id: I05b1d27f76fc70a688c4c3b36a2887883fca5694
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a6ed0ca..6167f90 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -286,7 +286,7 @@
   redirect: false
 
   on_transclusion_update:
-concurrency: <%= concurrency * 4 %>
+concurrency: <%= concurrency * 8 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05b1d27f76fc70a688c4c3b36a2887883fca5694
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Eevans 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: novaproxy: Open up port 5669 for quering the proxy API.

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349339 )

Change subject: novaproxy:  Open up port 5669 for quering the proxy API.
..


novaproxy:  Open up port 5669 for quering the proxy API.

Change-Id: I6a8dc88724f1a3479342c1bb32c0ea260a63e12c
---
M modules/role/manifests/labs/novaproxy.pp
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/labs/novaproxy.pp 
b/modules/role/manifests/labs/novaproxy.pp
index 550113f..fc7d27d 100644
--- a/modules/role/manifests/labs/novaproxy.pp
+++ b/modules/role/manifests/labs/novaproxy.pp
@@ -35,6 +35,12 @@
 desc  => 'API for adding / removing proxies from dynamicproxy 
domainproxy'
 }
 
+ferm::service { 'dynamicproxy-api-http':
+port  => '5669',
+proto => 'tcp',
+desc  => 'read-only API for viewing proxies from dynamicproxy 
domainproxy'
+}
+
 if $::hostname != $active_proxy {
 $redis_replication = {
 "${::hostname}" => $active_proxy

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: novaproxy: Open up port 5669 for quering the proxy API.

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349339 )

Change subject: novaproxy:  Open up port 5669 for quering the proxy API.
..

novaproxy:  Open up port 5669 for quering the proxy API.

Change-Id: I6a8dc88724f1a3479342c1bb32c0ea260a63e12c
---
M modules/role/manifests/labs/novaproxy.pp
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/349339/1

diff --git a/modules/role/manifests/labs/novaproxy.pp 
b/modules/role/manifests/labs/novaproxy.pp
index 550113f..fc7d27d 100644
--- a/modules/role/manifests/labs/novaproxy.pp
+++ b/modules/role/manifests/labs/novaproxy.pp
@@ -35,6 +35,12 @@
 desc  => 'API for adding / removing proxies from dynamicproxy 
domainproxy'
 }
 
+ferm::service { 'dynamicproxy-api-http':
+port  => '5669',
+proto => 'tcp',
+desc  => 'read-only API for viewing proxies from dynamicproxy 
domainproxy'
+}
+
 if $::hostname != $active_proxy {
 $redis_replication = {
 "${::hostname}" => $active_proxy

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a8dc88724f1a3479342c1bb32c0ea260a63e12c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: MWCategoryWidget: batch requests for category data

2017-04-20 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349338 )

Change subject: MWCategoryWidget: batch requests for category data
..

MWCategoryWidget: batch requests for category data

API query cuts off after 50 results.

Bug: T163406
Change-Id: I6e83843dd1a22334d9ddec7103ddf318fb181112
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
1 file changed, 41 insertions(+), 34 deletions(-)


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

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
index 6834726..1b23e9f 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryWidget.js
@@ -249,10 +249,11 @@
  */
 ve.ui.MWCategoryWidget.prototype.queryCategoryStatus = function ( 
categoryNames ) {
var widget = this,
+   promises = [], index = 0, batchSize = 50,
categoryNamesToQuery = [];
 
// Get rid of any we already know the hidden status of, or have an entry
-   // if noramlizedTitles (i.e. have been fetched before)
+   // if normalizedTitles (i.e. have been fetched before)
categoryNamesToQuery = categoryNames.filter( function ( name ) {
var cacheEntry;
if ( widget.normalizedTitles[ name ] ) {
@@ -271,41 +272,47 @@
return $.Deferred().resolve( {} ).promise();
}
 
-   return new mw.Api().get( {
-   action: 'query',
-   prop: 'pageprops',
-   titles: categoryNamesToQuery,
-   ppprop: 'hiddencat',
-   redirects: ''
-   } ).then( function ( result ) {
-   var linkCacheUpdate = {},
-   normalizedTitles = {};
-   if ( result && result.query && result.query.pages ) {
-   $.each( result.query.pages, function ( index, pageInfo 
) {
-   linkCacheUpdate[ pageInfo.title ] = {
-   missing: 
Object.prototype.hasOwnProperty.call( pageInfo, 'missing' ),
-   hidden: pageInfo.pageprops &&
-   
Object.prototype.hasOwnProperty.call( pageInfo.pageprops, 'hiddencat' )
-   };
-   } );
-   }
-   if ( result && result.query && result.query.redirects ) {
-   $.each( result.query.redirects, function ( index, 
redirectInfo ) {
-   widget.categoryRedirects[ redirectInfo.from ] = 
redirectInfo.to;
-   } );
-   }
-   ve.init.platform.linkCache.set( linkCacheUpdate );
+   // Batch this up into groups of 50
+   while ( index < categoryNamesToQuery.length ) {
+   promises.push( new mw.Api().get( {
+   action: 'query',
+   prop: 'pageprops',
+   titles: categoryNamesToQuery.slice( index, index + 
batchSize ),
+   ppprop: 'hiddencat',
+   redirects: ''
+   } ).then( function ( result ) {
+   var linkCacheUpdate = {},
+   normalizedTitles = {};
+   if ( result && result.query && result.query.pages ) {
+   $.each( result.query.pages, function ( index, 
pageInfo ) {
+   linkCacheUpdate[ pageInfo.title ] = {
+   missing: 
Object.prototype.hasOwnProperty.call( pageInfo, 'missing' ),
+   hidden: pageInfo.pageprops &&
+   
Object.prototype.hasOwnProperty.call( pageInfo.pageprops, 'hiddencat' )
+   };
+   } );
+   }
+   if ( result && result.query && result.query.redirects ) 
{
+   $.each( result.query.redirects, function ( 
index, redirectInfo ) {
+   widget.categoryRedirects[ 
redirectInfo.from ] = redirectInfo.to;
+   } );
+   }
+   ve.init.platform.linkCache.set( linkCacheUpdate );
 
-   if ( result.query && result.query.normalized ) {
-   $.each( result.query.normalized, function ( index, 
normalisation ) {
-   normalizedTitles[ normalisation.from ] = 
normalisation.to;
-   } );
-   }
+   if ( result.query && result.query.normalized ) {
+   $.each( result.query.normalize

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ArticleTarget: Load anew if RESTbase has forgotten it was de...

2017-04-20 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349337 )

Change subject: ArticleTarget: Load anew if RESTbase has forgotten it was 
deleted
..

ArticleTarget: Load anew if RESTbase has forgotten it was deleted

Bug: T163502
Change-Id: Id2d3d0bb7d5de897c8eabb28e3d265a1ed95dd2c
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 23 insertions(+), 15 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 52204f4..6638567 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -292,23 +292,31 @@
}
}
if ( docRevId && docRevId !== this.revid ) {
-   if ( this.retriedRevIdConflict ) {
-   // Retried already, just error the second time.
-   this.loadFail(
-   've-api',
-   'Revision IDs (doc=' + docRevId + 
',api=' + this.revid + ') ' +
-   'returned by server do not 
match'
-   );
-   } else {
-   this.retriedRevIdConflict = true;
-   // TODO this retries both requests, in RESTbase 
mode we should only retry
-   // the request that gave us the lower revid
-   this.loading = false;
-   // HACK: Load with explicit revid to hopefully 
prevent this from happening again
-   this.requestedRevId = Math.max( docRevId, 
this.revid );
+   if ( this.revid === 0 ) {
+   // We've retried but we still think we're 
creating and RESTbase disagrees
+   // which means it's probably their problem and 
not ours, so just continue
+   // as if everything was fine.
+   this.requestedRevId = 0;
this.load();
+   } else {
+   if ( this.retriedRevIdConflict ) {
+   // Retried already, just error the 
second time.
+   this.loadFail(
+   've-api',
+   'Revision IDs (doc=' + docRevId 
+ ',api=' + this.revid + ') ' +
+   'returned by server do 
not match'
+   );
+   } else {
+   this.retriedRevIdConflict = true;
+   // TODO this retries both requests, in 
RESTbase mode we should only retry
+   // the request that gave us the lower 
revid
+   this.loading = false;
+   // HACK: Load with explicit revid to 
hopefully prevent this from happening again
+   this.requestedRevId = Math.max( 
docRevId, this.revid );
+   this.load();
+   }
+   return;
}
-   return;
} else {
// Set this to false after a successful load, so we 
don't immediately give up
// if a subsequent load mismatches again

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Use upstream civicrm-buildkit

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

Change subject: Use upstream civicrm-buildkit
..


Use upstream civicrm-buildkit

Our fork is way behind, and we've got our special config upstreamed.

Note: we'll want to clear out the civicrm-buildkit dir before this
runs for the first time.

Change-Id: I46236769aaee887913010baec518558c0165599b
---
M jjb/wm-fundraising.yaml
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/jjb/wm-fundraising.yaml b/jjb/wm-fundraising.yaml
index ecf3451..02b034d 100644
--- a/jjb/wm-fundraising.yaml
+++ b/jjb/wm-fundraising.yaml
@@ -9,11 +9,15 @@
 builders:
   - zuul-cloner:
   projects: >
-wikimedia/fundraising/civicrm-buildkit
 wikimedia/fundraising/crm
 wikimedia/fundraising/crm/civicrm
 wikimedia/fundraising/crm/drupal
   - shell: |
+  if [[ -d $WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit ]]; 
then
+cd $WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit && git 
pull
+  else
+git clone https://github.com/civicrm/civicrm-buildkit.git 
$WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit
+  fi
   $WORKSPACE/src/wikimedia/fundraising/crm/bin/ci-create-dbs.sh
   $WORKSPACE/src/wikimedia/fundraising/crm/bin/ci-populate-dbs.sh
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46236769aaee887913010baec518558c0165599b
Gerrit-PatchSet: 7
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Revert "Temporarily half the transclusion update concurrency"

2017-04-20 Thread Ppchelko (Code Review)
Hello Eevans, Mobrovac,

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

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

to review the following change.


Change subject: Revert "Temporarily half the transclusion update concurrency"
..

Revert "Temporarily half the transclusion update concurrency"

This reverts commit a19ebf83f7fae7526abcfb85fd7da74d6d8c5ab1.

Change-Id: I05b1d27f76fc70a688c4c3b36a2887883fca5694
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/36/349336/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a6ed0ca..6167f90 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -286,7 +286,7 @@
   redirect: false
 
   on_transclusion_update:
-concurrency: <%= concurrency * 4 %>
+concurrency: <%= concurrency * 8 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05b1d27f76fc70a688c4c3b36a2887883fca5694
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Eevans 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] wikimedia...twilightsparql[master]: Annotate SPARQL endpoint recount

2017-04-20 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349335 )

Change subject: Annotate SPARQL endpoint recount
..


Annotate SPARQL endpoint recount

Bug: T163501
Change-Id: I648974b5f56a5905b6c0430e4694c09f6c347312
---
M server.R
M tab_documentation/wdqs_usage.md
M ui.R
3 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/server.R b/server.R
index 3001999..3bd3634 100644
--- a/server.R
+++ b/server.R
@@ -44,7 +44,8 @@
   dyEvent(as.Date("2015-09-07"), "A (Announcement)", labelLoc = "bottom") 
%>%
   dyEvent(as.Date("2015-11-05"), "B (Labs bot)", labelLoc = "bottom") %>%
   dyEvent(as.Date("2016-12-28"), "C (Bot ruleset)", labelLoc = "bottom") 
%>%
-  dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+  dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
+  dyEvent(as.Date("2017-02-18"), "E (Alias)", labelLoc = "bottom")
   )
 
   output$wdqs_visits_plot <- renderDygraph(
diff --git a/tab_documentation/wdqs_usage.md b/tab_documentation/wdqs_usage.md
index 158a6c6..627ac1d 100644
--- a/tab_documentation/wdqs_usage.md
+++ b/tab_documentation/wdqs_usage.md
@@ -10,6 +10,7 @@
 * '__B__': From 2015-11-04 to 2015-11-06 there was what we believe to be a 
broken bot responsible for 21+ million requests.
 * '__C__': As part of a refactoring to a new metric-generating framework (see 
[T150915](https://phabricator.wikimedia.org/T150915)), we revised the ruleset 
for determining when a request came from a bot/tool. For example, requests with 
URLs and email addresses in the UserAgent were classified as automata after 
2016-12-28.
 * '__D__': We started tracking LDF endpoint usage on 2017-01-01. See 
[T153936](https://phabricator.wikimedia.org/T153936) and 
[T136358](https://phabricator.wikimedia.org/T136358) for more details.
+* '__E__': We noticed that we were undercounting SPARQL usage because we were 
not including requests made to '/sparql' alias for 
'/bigdata/namespace/wdq/sparql'. We fixed the counting query on 2017-04-20 but 
could only recount from 2017-02-18. See 
[T163501](https://phabricator.wikimedia.org/T163501) for more details.
 * '__R__': on 2017-01-01 we started calculating all of Discovery's metrics 
using a new version of [our data retrieval and processing 
codebase](https://phabricator.wikimedia.org/diffusion/WDGO/) that we migrated 
to [Wikimedia Analytics](https://www.mediawiki.org/wiki/Analytics)' 
[Reportupdater 
infrastructure](https://wikitech.wikimedia.org/wiki/Analytics/Reportupdater). 
See [T150915](https://phabricator.wikimedia.org/T150915) for more details.
 
 Questions, bug reports, and feature suggestions
diff --git a/ui.R b/ui.R
index 7951773..c2c437c 100644
--- a/ui.R
+++ b/ui.R
@@ -18,7 +18,7 @@
   ),
   sidebarMenu(id = "tabs",
   menuItem(text = "Endpoint Usage", tabName = 
"endpoint_usage"),
-  menuItem(text = "WDQS Visits", tabName = "wdqs_visits"),
+  menuItem(text = "Homepage Traffic", tabName = "wdqs_visits"),
   menuItem(text = "Global Settings",
selectInput(inputId = "smoothing_global", label = 
"Smoothing", selectize = TRUE, selected = "day",
choices = c("No Smoothing" = "day", 
"Weekly Median" = "week", "Monthly Median" = "month", "Splines" = "gam")),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I648974b5f56a5905b6c0430e4694c09f6c347312
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/twilightsparql
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] wikimedia...twilightsparql[master]: Annotate SPARQL endpoint recount

2017-04-20 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349335 )

Change subject: Annotate SPARQL endpoint recount
..

Annotate SPARQL endpoint recount

Bug: T163501
Change-Id: I648974b5f56a5905b6c0430e4694c09f6c347312
---
M server.R
M tab_documentation/wdqs_usage.md
M ui.R
3 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/twilightsparql 
refs/changes/35/349335/1

diff --git a/server.R b/server.R
index 3001999..3bd3634 100644
--- a/server.R
+++ b/server.R
@@ -44,7 +44,8 @@
   dyEvent(as.Date("2015-09-07"), "A (Announcement)", labelLoc = "bottom") 
%>%
   dyEvent(as.Date("2015-11-05"), "B (Labs bot)", labelLoc = "bottom") %>%
   dyEvent(as.Date("2016-12-28"), "C (Bot ruleset)", labelLoc = "bottom") 
%>%
-  dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+  dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
+  dyEvent(as.Date("2017-02-18"), "E (Alias)", labelLoc = "bottom")
   )
 
   output$wdqs_visits_plot <- renderDygraph(
diff --git a/tab_documentation/wdqs_usage.md b/tab_documentation/wdqs_usage.md
index 158a6c6..627ac1d 100644
--- a/tab_documentation/wdqs_usage.md
+++ b/tab_documentation/wdqs_usage.md
@@ -10,6 +10,7 @@
 * '__B__': From 2015-11-04 to 2015-11-06 there was what we believe to be a 
broken bot responsible for 21+ million requests.
 * '__C__': As part of a refactoring to a new metric-generating framework (see 
[T150915](https://phabricator.wikimedia.org/T150915)), we revised the ruleset 
for determining when a request came from a bot/tool. For example, requests with 
URLs and email addresses in the UserAgent were classified as automata after 
2016-12-28.
 * '__D__': We started tracking LDF endpoint usage on 2017-01-01. See 
[T153936](https://phabricator.wikimedia.org/T153936) and 
[T136358](https://phabricator.wikimedia.org/T136358) for more details.
+* '__E__': We noticed that we were undercounting SPARQL usage because we were 
not including requests made to '/sparql' alias for 
'/bigdata/namespace/wdq/sparql'. We fixed the counting query on 2017-04-20 but 
could only recount from 2017-02-18. See 
[T163501](https://phabricator.wikimedia.org/T163501) for more details.
 * '__R__': on 2017-01-01 we started calculating all of Discovery's metrics 
using a new version of [our data retrieval and processing 
codebase](https://phabricator.wikimedia.org/diffusion/WDGO/) that we migrated 
to [Wikimedia Analytics](https://www.mediawiki.org/wiki/Analytics)' 
[Reportupdater 
infrastructure](https://wikitech.wikimedia.org/wiki/Analytics/Reportupdater). 
See [T150915](https://phabricator.wikimedia.org/T150915) for more details.
 
 Questions, bug reports, and feature suggestions
diff --git a/ui.R b/ui.R
index 7951773..c2c437c 100644
--- a/ui.R
+++ b/ui.R
@@ -18,7 +18,7 @@
   ),
   sidebarMenu(id = "tabs",
   menuItem(text = "Endpoint Usage", tabName = 
"endpoint_usage"),
-  menuItem(text = "WDQS Visits", tabName = "wdqs_visits"),
+  menuItem(text = "Homepage Traffic", tabName = "wdqs_visits"),
   menuItem(text = "Global Settings",
selectInput(inputId = "smoothing_global", label = 
"Smoothing", selectize = TRUE, selected = "day",
choices = c("No Smoothing" = "day", 
"Weekly Median" = "week", "Monthly Median" = "month", "Splines" = "gam")),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I648974b5f56a5905b6c0430e4694c09f6c347312
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/twilightsparql
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileApp[master]: Hygiene: consolidate image widening CSS in applib

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

Change subject: Hygiene: consolidate image widening CSS in applib
..


Hygiene: consolidate image widening CSS in applib

Move the common CSS between Android and iOS from MobileApp into applib.

https://github.com/wikimedia/wikimedia-page-library/pull/8
https://github.com/wikimedia/wikimedia-page-library/pull/17
https://github.com/wikimedia/wikipedia-ios/pull/1313
https://github.com/wikimedia/wikipedia-ios/pull/1305

Bug: T159194
Related: I04a8621ca1eca700351fa81a4096b889fd0bf9ca
Change-Id: Id0a0e04907129b3eb40c468468748eb787e838f2
---
M extension.json
D styles/android/widenImages.less
2 files changed, 2 insertions(+), 50 deletions(-)

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



diff --git a/extension.json b/extension.json
index a5289b2..32bb93b 100644
--- a/extension.json
+++ b/extension.json
@@ -30,8 +30,7 @@
"styles/android/loading.less",
"styles/android/ipa.less",
"styles/android/parsoid.less",
-   "styles/android/tables.less",
-   "styles/android/widenImages.less"
+   "styles/android/tables.less"
]
},
"mobile.app.pagestyles.android.night": {
@@ -59,8 +58,7 @@
"styles": [
"styles/android/ipa.less",
"styles/android/parsoid.less",
-   "styles/android/tables.less",
-   "styles/android/widenImages.less"
+   "styles/android/tables.less"
]
}
},
diff --git a/styles/android/widenImages.less b/styles/android/widenImages.less
deleted file mode 100644
index 749c517..000
--- a/styles/android/widenImages.less
+++ /dev/null
@@ -1,46 +0,0 @@
-.wideImageOverride {
-   /* Center images. */
-   display: block;
-   clear: both;
-   margin-left: auto;
-   margin-right: auto;
-}
-
-@media ( orientation: portrait ) {
-   .wideImageOverride {
-   width: 100% !important;
-   max-width: 100% !important;
-   height: auto !important;
-   }
-
-   @media ( min-device-width: 768px ) {
-   .wideImageOverride {
-   width: 60% !important;
-   max-width: 60% !important;
-   height: auto !important;
-   }
-
-   @media ( -webkit-min-device-pixel-ratio: 3 ) {
-   .wideImageOverride {
-   width: 100% !important;
-   max-width: 100% !important;
-   height: auto !important;
-   }
-   }
-   }
-}
-
-@media ( orientation: landscape ) {
-   .wideImageOverride {
-   width: 50% !important;
-   max-width: 50% !important;
-   height: auto !important;
-   }
-}
-
-/* Center text beneath images now that images are centered. */
-.thumbinner,
-.gallerytext,
-figcaption {
-   text-align: center;
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0a0e04907129b3eb40c468468748eb787e838f2
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Sniedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Fix regression from a9cfa9c9: templated template name can be...

2017-04-20 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349323 )

Change subject: Fix regression from a9cfa9c9: templated template name can be 
invalid
..

Fix regression from a9cfa9c9: templated template name can be invalid

* Fixes selser failures from that a9cfa9c9 -- which it looks like
  indicated a real failure.

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


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

diff --git a/lib/wt2html/tt/TemplateHandler.js 
b/lib/wt2html/tt/TemplateHandler.js
index 88db509..6e4497c 100644
--- a/lib/wt2html/tt/TemplateHandler.js
+++ b/lib/wt2html/tt/TemplateHandler.js
@@ -562,12 +562,19 @@
var tokens = ['{{'].concat(attribTokens, ['}}', new defines.EOFTk()]);
 
// Process exploded token in a new pipeline
+   var tplHandler = this;
var newTokens = [];
var endCB = function() {
-   // Assign the correct rank to the tokens
-   var finalTokens = newTokens;
-   finalTokens.rank = this.rank;
-   cb({ tokens: finalTokens });
+   var hasTemplatedTarget = !!(state.token.dataAttribs.tmp || 
{}).templatedAttribs;
+   if (hasTemplatedTarget) {
+   // Add encapsulation if we had a templated target
+   newTokens = tplHandler.getEncapsulationInfo(state, 
newTokens);
+   
newTokens.push(tplHandler.getEncapsulationInfoEndTag(state));
+   newTokens[0].dataAttribs.tmp.tplarginfo = 
JSON.stringify(tplHandler.getArgInfo(state));
+   }
+
+   newTokens.rank = tplHandler.rank; // Assign the correct rank to 
the tokens
+   cb({ tokens: newTokens });
};
Util.processContentInPipeline(
self.manager.env,
@@ -580,7 +587,7 @@
},
chunkCB: function(chunk) {
// SSS FIXME: This pattern of attempting to 
strip
-   // EOFTk from every chunk is a big ugly, but 
unavoidable
+   // EOFTk from every chunk is a bit ugly, but 
unavoidable
// since EOF token comes with the entire chunk 
rather
// than coming through the end event callback.
newTokens = 
newTokens.concat(Util.stripEOFTkfromTokens(chunk));
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index f895151..930b3df 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -107,7 +107,7 @@
 add("wt2html", "Template with invalid target containing wikilink", "{{Main Page}}");
 add("wt2html", "Template with complex arguments", "link This is a test template with parameter (test)");
 add("wt2html", "Template infinite loop", "");
-add("wt2html", "Template with targets containing wikilinks", "{{foo}}\n\n{{foo}}\n\n{{[[foo]]}}");
+add("wt2html", "Template with targets containing wikilinks", "{{foo}}\n\n{{foo}}\n\n{{[[foo]]}}");
 add("wt2html", "int keyword", "Parser function 
implementation for pf_int missing in Parsoid.");
 add("wt2html", "int keyword - non-existing message", "Parser
 function implementation for pf_int missing in Parsoid.");
 add("wt2html", "Self-closed noinclude, includeonly, onlyinclude tags", "\n\n");
@@ -297,7 +297,7 @@
 add("wt2wt", "Template with argument in separate line", "{{templateasargtest  
|\n templ = simple }}");
 add("wt2wt", "T2553: link with two variables in a piped link", 
"{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
 add("wt2wt", "Abort table cell attribute parsing on wikilink", "{|\n| testing 
[[one|two]] | three || four\n| testing one two | three || 
four\n| testing=\"[[one|two]]\" | three || four\n|}");
-add("wt2wt", "Template with targets containing wikilinks", 
"{{[[foo]]}}\n\n{{[[{{echo|foo}}]]}}\n\n{{[[foo]]}}\n");
+add("wt2wt", "Template with targets containing wikilinks", 
"{{[[foo]]}}\n\n{{[[{{echo|foo}}]]}}\n\necho|[[foo}}]]}}");
 add("wt2wt", "2. includeonly in html attr value", "v1v2\">bar\n"v1""v2"\">bar\n");
 add("wt2wt", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR", "{{echo|}}\n{| width=\"100%\"\n|foo\n|}");
 add("wt2wt", "Templates: HTML Tag: 2. Generation of HTML attr. value", "foo");
@@ -1573,22 +1573,19 @@
 add("selser", "Abort table cell attribute parsing on wikilink [[3,1]]", "{|\n| 
testing [[one|two]] | three || four\n| testing one two | three || four\n| 
testing=\"[[one|two]]\" | three || four\n|}");
 add("selser", "Abort table cell attribute parsing on wikilink [[0,2]]", 
"{|\n| testing [[one|two]] | three || four\n| testing one 
two | three || four\

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Config: Return the transcludes concurrency to normal

2017-04-20 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349322 )

Change subject: Config: Return the transcludes concurrency to normal
..

Config: Return the transcludes concurrency to normal

Revert of Ia228fc2aca02b1a12690afffaa7f88df47ed5eba

Bug: T163292
Change-Id: I0f7a5c6ae0677b7fea2a8ce77a6f0ab07dfadb42
---
M scap/templates/config.yaml.j2
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/22/349322/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index a6ed0ca..6167f90 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -286,7 +286,7 @@
   redirect: false
 
   on_transclusion_update:
-concurrency: <%= concurrency * 4 %>
+concurrency: <%= concurrency * 8 %>
 topic: change-prop.transcludes.resource-change
 cases:
   - match:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f7a5c6ae0677b7fea2a8ce77a6f0ab07dfadb42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Revert "Use $dbr->buildLike() instead of manual LIKE"

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

Change subject: Revert "Use $dbr->buildLike() instead of manual LIKE"
..


Revert "Use $dbr->buildLike() instead of manual LIKE"

This breaks SQL wildcards.

This reverts commit 2a63769238f19bc8d3533f31f4c226e9cce78856.

Bug: T123449
Change-Id: I473fcabf147b24b266ba6556d32a3990274da4ab
---
M Nuke_body.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Brian Wolff: Looks good to me, but someone else must approve
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Nuke_body.php b/Nuke_body.php
index 6cfe5ef..d86fcb9 100644
--- a/Nuke_body.php
+++ b/Nuke_body.php
@@ -268,7 +268,9 @@
 
$pattern = $this->getRequest()->getText( 'pattern' );
if ( !is_null( $pattern ) && trim( $pattern ) !== '' ) {
-   $where[] = 'rc_title ' . $dbr->buildLike( $pattern );
+   // $pattern is a SQL pattern supporting wildcards, so 
buildLike
+   // will not work.
+   $where[] = 'rc_title LIKE ' . $dbr->addQuotes( $pattern 
);
}
$group = implode( ', ', $what );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I473fcabf147b24b266ba6556d32a3990274da4ab
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Load notices when switching, just don't show them

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

Change subject: Load notices when switching, just don't show them
..


Load notices when switching, just don't show them

Previously we completely disabled the loading of notices
when switching, instead of just not showing them (so they
don't clash with the "switched" popup).

Bug: T162812
Change-Id: I3f8e787630e196cee1dbb1aa449b3558b74fcd04
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
2 files changed, 20 insertions(+), 15 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 9403616..d0bcc36 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -747,10 +747,12 @@
  * @inheritdoc
  */
 ve.init.mw.DesktopArticleTarget.prototype.surfaceReady = function () {
-   var surface = this.getSurface(),
+   var redirectMetaItems,
+   editNotices = this.getEditNotices(),
+   actionTools = this.actionsToolbar.tools,
+   surface = this.getSurface(),
surfaceReadyTime = ve.now(),
-   target = this,
-   redirectMetaItems;
+   target = this;
 
if ( !this.activating ) {
// Activation was aborted before we got here. Do nothing
@@ -797,6 +799,14 @@
this.setFakeRedirectInterface( redirectMetaItems[ 0 
].getAttribute( 'title' ) );
} else {
this.setFakeRedirectInterface( null );
+   }
+
+   // Set edit notices, will be shown after meta dialog.
+   if ( editNotices.length ) {
+   actionTools.notices.setNotices( this.getEditNotices() );
+   } else {
+   actionTools.notices.destroy();
+   actionTools.notices = null;
}
 
this.setupUnloadHandlers();
@@ -1543,19 +1553,21 @@
target = this;
 
if ( this.welcomeDialogPromise ) {
+   // Pop out the notices when the welcome dialog is closed
this.welcomeDialogPromise
.always( function () {
var popup;
-   // Pop out the notices when the welcome dialog 
is closed
if (
target.switched &&
!mw.user.options.get( 
'visualeditor-hidevisualswitchpopup' )
) {
+   // Show "switched" popup
popup = new 
mw.libs.ve.SwitchPopupWidget( 'visual' );

target.actionsToolbar.tools.editModeSource.toolGroup.$element.append( 
popup.$element );
popup.toggle( true );
-   } else {
-   
target.actionsToolbar.tools.notices.setNotices( target.getEditNotices() );
+   } else if ( target.actionsToolbar.tools.notices 
) {
+   // Show notices
+   
target.actionsToolbar.tools.notices.getPopup().toggle( true );
}
} );
}
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 7759cf9..71968d1 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -65,18 +65,13 @@
 /* Methods */
 
 /**
- * Set notices to display, and either destroy the tool (if none to display) or 
open the popup.
+ * Set notices to display
  *
- * @param {string[]} notices
+ * @param {string[]} notices A (non-empty) list of notices
  */
 ve.ui.MWNoticesPopupTool.prototype.setNotices = function ( notices ) {
var tool = this,
count = notices.length;
-
-   if ( !count ) {
-   this.destroy();
-   return;
-   }
 
this.popup.setLabel( ve.msg(
'visualeditor-editnotices-tool',
@@ -101,8 +96,6 @@
} );
 
this.popup.$body.append( this.$items );
-
-   this.popup.toggle( true );
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f8e787630e196cee1dbb1aa449b3558b74fcd04
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: jenkins-bot <>

_

[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Fix WDQS usage query typo

2017-04-20 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349316 )

Change subject: Fix WDQS usage query typo
..


Fix WDQS usage query typo

Change-Id: I69fe236b327490af7a1cdf56c87b6dcef4ee9203
---
M modules/metrics/wdqs/basic_usage
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/metrics/wdqs/basic_usage b/modules/metrics/wdqs/basic_usage
index b1c640a..2c6f954 100755
--- a/modules/metrics/wdqs/basic_usage
+++ b/modules/metrics/wdqs/basic_usage
@@ -30,7 +30,7 @@
   AND uri_path IN('/', '/bigdata/namespace/wdq/sparql', '/bigdata/ldf', 
'/sparql')
 GROUP BY
   '$1',
-  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path) AS path,
+  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path),
   UPPER(http_status IN('200','304')),
   CASE
 WHEN (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69fe236b327490af7a1cdf56c87b6dcef4ee9203
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Fix WDQS usage query typo

2017-04-20 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349316 )

Change subject: Fix WDQS usage query typo
..

Fix WDQS usage query typo

Change-Id: I69fe236b327490af7a1cdf56c87b6dcef4ee9203
---
M modules/metrics/wdqs/basic_usage
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/16/349316/1

diff --git a/modules/metrics/wdqs/basic_usage b/modules/metrics/wdqs/basic_usage
index b1c640a..2c6f954 100755
--- a/modules/metrics/wdqs/basic_usage
+++ b/modules/metrics/wdqs/basic_usage
@@ -30,7 +30,7 @@
   AND uri_path IN('/', '/bigdata/namespace/wdq/sparql', '/bigdata/ldf', 
'/sparql')
 GROUP BY
   '$1',
-  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path) AS path,
+  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path),
   UPPER(http_status IN('200','304')),
   CASE
 WHEN (

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69fe236b327490af7a1cdf56c87b6dcef4ee9203
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add default value for datatype selector in SpecialNewProperty

2017-04-20 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349315 )

Change subject: Add default value for datatype selector in SpecialNewProperty
..

Add default value for datatype selector in SpecialNewProperty

Bug: T138295
Change-Id: Ia91e96a6d9ebf88ae3df35944433412f5a2d2e65
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/Specials/SpecialNewProperty.php
M repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php
4 files changed, 19 insertions(+), 2 deletions(-)


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

diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 900a426..14a9818 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -186,6 +186,7 @@
"wikibase-newproperty-datatype": "Data type:",
"wikibase-newproperty-invalid-datatype": "Invalid data type specified.",
"wikibase-newproperty-insufficient-data": "You need to fill at least 
either label, description or aliases.",
+   "wikibase-newproperty-pick-data-type": "Pick a data type",
"wikibase-description-helppage": "Help:Description",
"wikibase-label-helppage": "Help:Label",
"special-newitem": "Create a new item",
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index aee69df..aa77477 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -218,6 +218,7 @@
"wikibase-newproperty-datatype": "Label for the data-type-dropdown 
holding the data type of the new property.\n{{Identical|Data type}}",
"wikibase-newproperty-invalid-datatype": "Error message shown when the 
page gets an invalid datatype",
"wikibase-newproperty-insufficient-data": "Error message shown when a 
user tries to create a property and didn't fill in enough data",
+   "wikibase-newproperty-pick-data-type": "Label for default value of data 
type selector asking user to pick a data type",
"wikibase-description-helppage": "{{doc-important|Do not change the 
Help: part.}}\nThe name of the local help page about using and 
editing labels.",
"wikibase-label-helppage": "{{doc-important|Do not change the 
Help: part.}}\nThe name of the local help page about using and 
editing descriptions.",
"special-newitem": "{{doc-special|NewItem}}\nThe special page is for 
creating new items.\n{{Identical|Create new item}}",
diff --git a/repo/includes/Specials/SpecialNewProperty.php 
b/repo/includes/Specials/SpecialNewProperty.php
index 8a2ca47..66deef5 100644
--- a/repo/includes/Specials/SpecialNewProperty.php
+++ b/repo/includes/Specials/SpecialNewProperty.php
@@ -115,13 +115,19 @@
$this->getLanguage()->getCode()
);
 
+   $options = [
+   $this->msg( 'wikibase-newproperty-pick-data-type' 
)->text() => ''
+   ];
$formFields[ self::FIELD_DATATYPE ] = [
'name' => self::FIELD_DATATYPE,
'type' => 'select',
-   'default' => isset( $this->parts[2] ) ? $this->parts[2] 
: 'string',
-   'options' => $selector->getOptionsArray(),
+   'default' => isset( $this->parts[2] ) ? $this->parts[2] 
: '',
+   'options' => array_merge( $options, 
$selector->getOptionsArray() ),
'id' => 'wb-newproperty-datatype',
'validation-callback' => function ( $dataType, 
$formData, $form ) {
+   if ( $dataType === '' ) {
+   return false;
+   }
if ( !$this->dataTypeExists( $dataType ) ) {
return [ $this->msg( 
'wikibase-newproperty-invalid-datatype' )->text() ];
}
diff --git a/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php 
b/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php
index b41beef..340923d 100644
--- a/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php
+++ b/repo/tests/phpunit/includes/Specials/SpecialNewPropertyTest.php
@@ -208,6 +208,15 @@
],
'you need to fill',
],
+   'empty datatype' => [
+   [
+   SpecialNewProperty::FIELD_LANG => 'en',
+   SpecialNewProperty::FIELD_LABEL => 
'empty datatype label',
+   SpecialNewProperty::FIELD_DESCRIPTION 
=> 'desc',
+   SpecialNewProperty::FIELD_ALIASES => 
'a1|a2',
+   SpecialNewProperty::FIELD_DATATYPE => 
'',
+   ],
+   ],
];
 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: CSS hack for ext.wikiEditor module no longer needed

2017-04-20 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349309 )

Change subject: CSS hack for ext.wikiEditor module no longer needed
..

CSS hack for ext.wikiEditor module no longer needed

Change I7c7c3ba49 fixed the underlying bug.

Change-Id: Ida8a5dbd4e3602484f723d43bfa562389565e9d4
---
M resources/ext.CodeMirror.less
1 file changed, 0 insertions(+), 6 deletions(-)


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

diff --git a/resources/ext.CodeMirror.less b/resources/ext.CodeMirror.less
index db3e59b..30a2f48 100644
--- a/resources/ext.CodeMirror.less
+++ b/resources/ext.CodeMirror.less
@@ -7,12 +7,6 @@
 
 .mw-codeMirror-classicToolbar {
border: 1px solid #a2a9b1;
-
-   // If WikiEditor is installed but disabled, the classic toolbar
-   // will still get wrapped in wikiEditor-ui
-   .wikiEditor-ui-text & {
-   border: 0;
-   }
 }
 
 .CodeMirror pre,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida8a5dbd4e3602484f723d43bfa562389565e9d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Finally changed over inputs to use getHtmlText(), not getHTML()

2017-04-20 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349293 )

Change subject: Finally changed over inputs to use getHtmlText(), not getHTML()
..


Finally changed over inputs to use getHtmlText(), not getHTML()

Change-Id: I8afb76f9ada955d0be97269c7fa32c9f0edf8d8d
---
M includes/PF_FormPrinter.php
M includes/forminputs/PF_FormInput.php
2 files changed, 44 insertions(+), 76 deletions(-)

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



diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php
index b1097ac..b410376 100644
--- a/includes/PF_FormPrinter.php
+++ b/includes/PF_FormPrinter.php
@@ -71,16 +71,16 @@
Hooks::run( 'PageForms::FormPrinterSetup', array( $this ) );
}
 
-   public function setSemanticTypeHook( $type, $is_list, $function_name, 
$default_args ) {
-   $this->mSemanticTypeHooks[$type][$is_list] = array( 
$function_name, $default_args );
+   public function setSemanticTypeHook( $type, $is_list, $class_name, 
$default_args ) {
+   $this->mSemanticTypeHooks[$type][$is_list] = array( 
$class_name, $default_args );
}
 
-   public function setCargoTypeHook( $type, $is_list, $function_name, 
$default_args ) {
-   $this->mCargoTypeHooks[$type][$is_list] = array( 
$function_name, $default_args );
+   public function setCargoTypeHook( $type, $is_list, $class_name, 
$default_args ) {
+   $this->mCargoTypeHooks[$type][$is_list] = array( $class_name, 
$default_args );
}
 
-   public function setInputTypeHook( $input_type, $function_name, 
$default_args ) {
-   $this->mInputTypeHooks[$input_type] = array( $function_name, 
$default_args );
+   public function setInputTypeHook( $input_type, $class_name, 
$default_args ) {
+   $this->mInputTypeHooks[$input_type] = array( $class_name, 
$default_args );
}
 
/**
@@ -92,27 +92,27 @@
public function registerInputType( $inputTypeClass ) {
$inputTypeName = call_user_func( array( $inputTypeClass, 
'getName' ) );
$this->mInputTypeClasses[$inputTypeName] = $inputTypeClass;
-   $this->setInputTypeHook( $inputTypeName, array( 
$inputTypeClass, 'getHTML' ), array() );
+   $this->setInputTypeHook( $inputTypeName, $inputTypeClass, 
array() );
 
$defaultProperties = call_user_func( array( $inputTypeClass, 
'getDefaultPropTypes' ) );
foreach ( $defaultProperties as $propertyType => 
$additionalValues ) {
-   $this->setSemanticTypeHook( $propertyType, false, 
array( $inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setSemanticTypeHook( $propertyType, false, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForPropType[$propertyType] = 
$inputTypeName;
}
$defaultPropertyLists = call_user_func( array( $inputTypeClass, 
'getDefaultPropTypeLists' ) );
foreach ( $defaultPropertyLists as $propertyType => 
$additionalValues ) {
-   $this->setSemanticTypeHook( $propertyType, true, array( 
$inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setSemanticTypeHook( $propertyType, true, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForPropTypeList[$propertyType] = 
$inputTypeName;
}
 
$defaultCargoTypes = call_user_func( array( $inputTypeClass, 
'getDefaultCargoTypes' ) );
foreach ( $defaultCargoTypes as $fieldType => $additionalValues 
) {
-   $this->setCargoTypeHook( $fieldType, false, array( 
$inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setCargoTypeHook( $fieldType, false, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForCargoType[$fieldType] = 
$inputTypeName;
}
$defaultCargoTypeLists = call_user_func( array( 
$inputTypeClass, 'getDefaultCargoTypeLists' ) );
foreach ( $defaultCargoTypeLists as $fieldType => 
$additionalValues ) {
-   $this->setCargoTypeHook( $fieldType, true, array( 
$inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setCargoTypeHook( $fieldType, true, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForCargoTypeList[$fieldType] = 
$inputTypeName;
}
 
@@ -983,7 +983,8 @@
} else {
$default_value 
= $cur_value;
}
-   $new_text = 
PFTextAreaInput::getHTML( 

[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Finally changed over inputs to use getHtmlText(), not getHTML()

2017-04-20 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349293 )

Change subject: Finally changed over inputs to use getHtmlText(), not getHTML()
..

Finally changed over inputs to use getHtmlText(), not getHTML()

Change-Id: I8afb76f9ada955d0be97269c7fa32c9f0edf8d8d
---
M includes/PF_FormPrinter.php
M includes/forminputs/PF_FormInput.php
2 files changed, 45 insertions(+), 77 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/93/349293/2

diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php
index b1097ac..afec139 100644
--- a/includes/PF_FormPrinter.php
+++ b/includes/PF_FormPrinter.php
@@ -71,16 +71,16 @@
Hooks::run( 'PageForms::FormPrinterSetup', array( $this ) );
}
 
-   public function setSemanticTypeHook( $type, $is_list, $function_name, 
$default_args ) {
-   $this->mSemanticTypeHooks[$type][$is_list] = array( 
$function_name, $default_args );
+   public function setSemanticTypeHook( $type, $is_list, $class_name, 
$default_args ) {
+   $this->mSemanticTypeHooks[$type][$is_list] = array( 
$class_name, $default_args );
}
 
-   public function setCargoTypeHook( $type, $is_list, $function_name, 
$default_args ) {
-   $this->mCargoTypeHooks[$type][$is_list] = array( 
$function_name, $default_args );
+   public function setCargoTypeHook( $type, $is_list, $class_name, 
$default_args ) {
+   $this->mCargoTypeHooks[$type][$is_list] = array( $class_name, 
$default_args );
}
 
-   public function setInputTypeHook( $input_type, $function_name, 
$default_args ) {
-   $this->mInputTypeHooks[$input_type] = array( $function_name, 
$default_args );
+   public function setInputTypeHook( $input_type, $class_name, 
$default_args ) {
+   $this->mInputTypeHooks[$input_type] = array( $class_name, 
$default_args );
}
 
/**
@@ -92,27 +92,27 @@
public function registerInputType( $inputTypeClass ) {
$inputTypeName = call_user_func( array( $inputTypeClass, 
'getName' ) );
$this->mInputTypeClasses[$inputTypeName] = $inputTypeClass;
-   $this->setInputTypeHook( $inputTypeName, array( 
$inputTypeClass, 'getHTML' ), array() );
+   $this->setInputTypeHook( $inputTypeName, $inputTypeClass, 
array() );
 
$defaultProperties = call_user_func( array( $inputTypeClass, 
'getDefaultPropTypes' ) );
foreach ( $defaultProperties as $propertyType => 
$additionalValues ) {
-   $this->setSemanticTypeHook( $propertyType, false, 
array( $inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setSemanticTypeHook( $propertyType, false, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForPropType[$propertyType] = 
$inputTypeName;
}
$defaultPropertyLists = call_user_func( array( $inputTypeClass, 
'getDefaultPropTypeLists' ) );
foreach ( $defaultPropertyLists as $propertyType => 
$additionalValues ) {
-   $this->setSemanticTypeHook( $propertyType, true, array( 
$inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setSemanticTypeHook( $propertyType, true, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForPropTypeList[$propertyType] = 
$inputTypeName;
}
 
$defaultCargoTypes = call_user_func( array( $inputTypeClass, 
'getDefaultCargoTypes' ) );
foreach ( $defaultCargoTypes as $fieldType => $additionalValues 
) {
-   $this->setCargoTypeHook( $fieldType, false, array( 
$inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setCargoTypeHook( $fieldType, false, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForCargoType[$fieldType] = 
$inputTypeName;
}
$defaultCargoTypeLists = call_user_func( array( 
$inputTypeClass, 'getDefaultCargoTypeLists' ) );
foreach ( $defaultCargoTypeLists as $fieldType => 
$additionalValues ) {
-   $this->setCargoTypeHook( $fieldType, true, array( 
$inputTypeClass, 'getHTML' ), $additionalValues );
+   $this->setCargoTypeHook( $fieldType, true, 
$inputTypeClass, $additionalValues );
$this->mDefaultInputForCargoTypeList[$fieldType] = 
$inputTypeName;
}
 
@@ -983,7 +983,8 @@
} else {
$default_value 
= $cur_value;
}
-   $new_text = 
PFTextAreaI

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Remove some outdated code

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

Change subject: Remove some outdated code
..


Remove some outdated code

Since WikiEditor uses wikiEditor-toolbar-doneInitialSections event
  we don't need to add it to ResourceLoader dependencies.

Bug: T161475
Change-Id: I7c7c3ba495c0292d2df052145e7930c86fcb48f5
---
M CodeMirror.hooks.php
M extension.json
M resources/ext.CodeMirror.js
3 files changed, 34 insertions(+), 38 deletions(-)

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



diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index f425499..1f8b369 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -39,11 +39,6 @@
'dependencies' => [ 'ext.CodeMirror.lib' => true ],
];
 
-   // Check if WikiEditor is installed and add it as a dependency
-   if ( \ExtensionRegistry::getInstance()->isLoaded( 'WikiEditor' 
) ) {
-   $extResources['dependencies']['ext.wikiEditor'] = true;
-   }
-
// enable other extensions to add additional resources and modes
Hooks::run( 'CodeMirrorGetAdditionalResources', [ 
&$extResources, &self::$extModes ] );
 
diff --git a/extension.json b/extension.json
index d81a116..042c1d6 100644
--- a/extension.json
+++ b/extension.json
@@ -22,10 +22,10 @@
"dependencies": [
"ext.CodeMirror.lib",
"ext.CodeMirror.other",
-   "mediawiki.api",
"jquery.textSelection",
-   "user.options",
-   "mediawiki.api.options"
+   "mediawiki.api",
+   "mediawiki.api.options",
+   "user.options"
],
"scripts": [
"ext.CodeMirror.js"
diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index 3d48d0b..a1c682e 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -1,5 +1,5 @@
 ( function ( mw, $ ) {
-   var origTextSelection, useCodeMirror, codeMirror, api, 
originHooksTextarea;
+   var origTextSelection, useCodeMirror, codeMirror, api, 
originHooksTextarea, wikiEditorToolbarEnabled = false;
 
if ( mw.config.get( 'wgCodeEditorCurrentLanguage' ) ) { // If the 
CodeEditor is used then just exit;
return;
@@ -11,6 +11,13 @@
useCodeMirror = mw.user.options.get( 'usecodemirror' ) > 0;
api = new mw.Api();
originHooksTextarea = $.valHooks.textarea;
+
+   if ( mw.loader.getState( 'ext.wikiEditor' ) ) {  // The WikiEditor 
extension exists
+   // This can be the string "0" if the user disabled the 
preference - Bug T54542#555387
+   if ( mw.user.options.get( 'usebetatoolbar' ) > 0 ) { // And the 
WikiEditor beta toolbar is used by the user
+   wikiEditorToolbarEnabled = true;
+   }
+   }
 
// function for a textselection function for CodeMirror
function cmTextSelection( command, options ) {
@@ -345,7 +352,7 @@
 
} else {
// eslint-disable-next-line no-use-before-define
-   enableCodeMirror( !!wikiEditor );
+   enableCodeMirror();
setCodeEditorPreference( true );
}
updateToolbarButton( wikiEditor );
@@ -353,10 +360,8 @@
 
/**
 * Replaces the default textarea with CodeMirror
-*
-* @param {boolean} [useWikiEditor]
 */
-   function enableCodeMirror( useWikiEditor ) {
+   function enableCodeMirror() {
var $codeMirror,
$textbox1 = $( '#wpTextbox1' );
 
@@ -386,7 +391,7 @@
'line-height': $textbox1.css( 'line-height' )
} );
 
-   if ( !useWikiEditor ) {
+   if ( !wikiEditorToolbarEnabled ) {
$codeMirror.addClass( 'mw-codeMirror-classicToolbar' );
}
 
@@ -398,36 +403,32 @@
 
/* Check if view is in edit mode and that the required modules are 
available. Then, customize the toolbar … */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== 
-1 ) {
-   // This function shouldn't be called without user.options is 
loaded, but it's not guaranteed
-   mw.loader.using( 'user.options', function () {
-   // This can be the string "0" if the user disabled the 
preference - Bug T54542#555387
-   if ( mw.loader.getState( 'ext.wikiEditor' ) && 
mw.user.options.get( 'usebetatoolbar' ) > 0 ) {
-   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Dynamicproxy: Syntax fixes to proxygetter nginx config

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349291 )

Change subject: Dynamicproxy:  Syntax fixes to proxygetter nginx config
..


Dynamicproxy:  Syntax fixes to proxygetter nginx config

Change-Id: I9a1131a7585c33b86fe04f383eed89fba13d4a98
---
M modules/dynamicproxy/files/proxygetter.conf
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/dynamicproxy/files/proxygetter.conf 
b/modules/dynamicproxy/files/proxygetter.conf
index 71c6f9e..96bea6f 100644
--- a/modules/dynamicproxy/files/proxygetter.conf
+++ b/modules/dynamicproxy/files/proxygetter.conf
@@ -2,8 +2,8 @@
 listen 5669;
 
 # Wrap the normal API but only allow GETs.
-location = / {
-proxy_pass http://127.0.0.1:5668
+location / {
+proxy_pass http://127.0.0.1:5668;
 
 limit_except GET {
 deny all;

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Add secondSPARQL endpoint

2017-04-20 Thread Chelsyx (Code Review)
Chelsyx has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349290 )

Change subject: Add secondSPARQL endpoint
..


Add secondSPARQL endpoint

Bug: T163501
Change-Id: Ifef4c91d66a87e0a8d33bf044d6d956b0e3b63e2
---
M modules/metrics/wdqs/basic_usage
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/metrics/wdqs/basic_usage b/modules/metrics/wdqs/basic_usage
index 5fd7a10..b1c640a 100755
--- a/modules/metrics/wdqs/basic_usage
+++ b/modules/metrics/wdqs/basic_usage
@@ -3,7 +3,7 @@
 hive -S -e "USE wmf;
 SELECT
   '$1' AS date,
-  uri_path AS path,
+  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path) AS path,
   UPPER(http_status IN('200','304')) as http_success,
   CASE
 WHEN (
@@ -27,10 +27,10 @@
   AND CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) >= '$1'
   AND CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) < '$2'
   AND uri_host = 'query.wikidata.org'
-  AND uri_path IN('/', '/bigdata/namespace/wdq/sparql', '/bigdata/ldf')
+  AND uri_path IN('/', '/bigdata/namespace/wdq/sparql', '/bigdata/ldf', 
'/sparql')
 GROUP BY
   '$1',
-  uri_path,
+  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path) AS path,
   UPPER(http_status IN('200','304')),
   CASE
 WHEN (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifef4c91d66a87e0a8d33bf044d6d956b0e3b63e2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Chelsyx 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Dynamicproxy: Syntax fixes to proxygetter nginx config

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349291 )

Change subject: Dynamicproxy:  Syntax fixes to proxygetter nginx config
..

Dynamicproxy:  Syntax fixes to proxygetter nginx config

Change-Id: I9a1131a7585c33b86fe04f383eed89fba13d4a98
---
M modules/dynamicproxy/files/proxygetter.conf
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/dynamicproxy/files/proxygetter.conf 
b/modules/dynamicproxy/files/proxygetter.conf
index 71c6f9e..96bea6f 100644
--- a/modules/dynamicproxy/files/proxygetter.conf
+++ b/modules/dynamicproxy/files/proxygetter.conf
@@ -2,8 +2,8 @@
 listen 5669;
 
 # Wrap the normal API but only allow GETs.
-location = / {
-proxy_pass http://127.0.0.1:5668
+location / {
+proxy_pass http://127.0.0.1:5668;
 
 limit_except GET {
 deny all;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a1131a7585c33b86fe04f383eed89fba13d4a98
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Add secondSPARQL endpoint

2017-04-20 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349290 )

Change subject: Add secondSPARQL endpoint
..

Add secondSPARQL endpoint

Bug: T163501
Change-Id: Ifef4c91d66a87e0a8d33bf044d6d956b0e3b63e2
---
M modules/metrics/wdqs/basic_usage
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/90/349290/1

diff --git a/modules/metrics/wdqs/basic_usage b/modules/metrics/wdqs/basic_usage
index 5fd7a10..b1c640a 100755
--- a/modules/metrics/wdqs/basic_usage
+++ b/modules/metrics/wdqs/basic_usage
@@ -3,7 +3,7 @@
 hive -S -e "USE wmf;
 SELECT
   '$1' AS date,
-  uri_path AS path,
+  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path) AS path,
   UPPER(http_status IN('200','304')) as http_success,
   CASE
 WHEN (
@@ -27,10 +27,10 @@
   AND CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) >= '$1'
   AND CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) < '$2'
   AND uri_host = 'query.wikidata.org'
-  AND uri_path IN('/', '/bigdata/namespace/wdq/sparql', '/bigdata/ldf')
+  AND uri_path IN('/', '/bigdata/namespace/wdq/sparql', '/bigdata/ldf', 
'/sparql')
 GROUP BY
   '$1',
-  uri_path,
+  IF(uri_path = '/sparql', '/bigdata/namespace/wdq/sparql', uri_path) AS path,
   UPPER(http_status IN('200','304')),
   CASE
 WHEN (

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifef4c91d66a87e0a8d33bf044d6d956b0e3b63e2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ve.init.mw.ArticleTarget: Only retry once after a 'badtoken'...

2017-04-20 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349289 )

Change subject: ve.init.mw.ArticleTarget: Only retry once after a 'badtoken' 
error
..

ve.init.mw.ArticleTarget: Only retry once after a 'badtoken' error

If we retry and get another 'badtoken' error, something is very wrong,
and trying again and again is probably pointless. This behavior also
matches how mw.Api#postWithToken handles bad tokens.

Bug: T163493
Change-Id: I488fd7e74e37922044491695d6c9025a45531281
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 10 insertions(+), 4 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 52204f4..3f0d586 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -554,11 +554,12 @@
  * @method
  * @param {HTMLDocument} doc HTML document we tried to save
  * @param {Object} saveData Options that were used
+ * @param {boolean} wasRetry Whether this was a retry after a 'badtoken' error
  * @param {Object} jqXHR
  * @param {string} status Text status message
  * @param {Object|null} data API response data
  */
-ve.init.mw.ArticleTarget.prototype.saveFail = function ( doc, saveData, jqXHR, 
status, data ) {
+ve.init.mw.ArticleTarget.prototype.saveFail = function ( doc, saveData, 
wasRetry, jqXHR, status, data ) {
var editApi,
target = this;
 
@@ -588,6 +589,10 @@
 
// Handle token errors
if ( data.error && data.error.code === 'badtoken' ) {
+   if ( wasRetry ) {
+   this.saveErrorBadToken( null, true );
+   return;
+   }
this.refreshEditToken().done( function ( userChanged ) {
// target.editToken has been refreshed
if ( userChanged ) {
@@ -595,7 +600,7 @@
} else {
// New session is the same user still; retry
target.emit( 'saveErrorBadToken', true );
-   target.save( doc, saveData );
+   target.save( doc, saveData, true );
}
} ).fail( function () {
target.saveErrorBadToken( null, true );
@@ -1633,9 +1638,10 @@
  *  - {string} summary Edit summary
  *  - {boolean} minor Edit is a minor edit
  *  - {boolean} watch Watch the page
+ * @param {boolean} [isRetry=false] Whether this is a retry after a 'badtoken' 
error
  * @return {boolean} Saving has been started
 */
-ve.init.mw.ArticleTarget.prototype.save = function ( doc, options ) {
+ve.init.mw.ArticleTarget.prototype.save = function ( doc, options, isRetry ) {
var data;
// Prevent duplicate requests
if ( this.saving ) {
@@ -1656,7 +1662,7 @@
 
this.saving = this.tryWithPreparedCacheKey( doc, data, 'save' )
.done( this.saveSuccess.bind( this, doc, data ) )
-   .fail( this.saveFail.bind( this, doc, data ) );
+   .fail( this.saveFail.bind( this, doc, data, !!isRetry ) );
 
return true;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I488fd7e74e37922044491695d6c9025a45531281
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Dynamicproxy: Set up a GET-only frontend

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/349287 )

Change subject: Dynamicproxy:  Set up a GET-only frontend
..


Dynamicproxy:  Set up a GET-only frontend

The normal API ('Invisible Unicorn') doesn't provide any security at all.
Still, it would be nice for external users to get info about what proxies
are setup.  This patch adds an additional service on 8089 that forwards
GETS to the API but refuses other requests.

Bug: T115752
Change-Id: I515154d9103c4a395c6f0723cebfadf8a7f67da3
---
A modules/dynamicproxy/files/proxygetter.conf
M modules/dynamicproxy/manifests/api.pp
2 files changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/modules/dynamicproxy/files/proxygetter.conf 
b/modules/dynamicproxy/files/proxygetter.conf
new file mode 100644
index 000..71c6f9e
--- /dev/null
+++ b/modules/dynamicproxy/files/proxygetter.conf
@@ -0,0 +1,12 @@
+server {
+listen 5669;
+
+# Wrap the normal API but only allow GETs.
+location = / {
+proxy_pass http://127.0.0.1:5668
+
+limit_except GET {
+deny all;
+}
+}
+}
diff --git a/modules/dynamicproxy/manifests/api.pp 
b/modules/dynamicproxy/manifests/api.pp
index 4b669f1..d265f08 100644
--- a/modules/dynamicproxy/manifests/api.pp
+++ b/modules/dynamicproxy/manifests/api.pp
@@ -71,4 +71,11 @@
 owner   => 'www-data',
 group   => 'www-data',
 }
+
+# This is a GET-only front end that sits on port 5669.  We can
+#  open this up to the public even though the actual API has no
+#  auth protections.
+nginx::site { 'proxygetter':
+source => 'puppet:///modules/dynamicproxy/proxygetter.conf',
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I515154d9103c4a395c6f0723cebfadf8a7f67da3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene/oops: Makes activities using WikiErrorView use it co...

2017-04-20 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349288 )

Change subject: Hygiene/oops: Makes activities using WikiErrorView use it 
consistently
..

Hygiene/oops: Makes activities using WikiErrorView use it consistently

Removes stray old-style error displays from activities now using
WikiErrorView.

Change-Id: Ie6e9805de811aa35bdf78312d3e3fb0bb711605b
---
M app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
2 files changed, 2 insertions(+), 5 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java 
b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
index 446493b..c999132 100644
--- a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
+++ b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
@@ -458,9 +458,8 @@
 }
 builder.show();
 } else {
-// an unknown error occurred, so just dismiss the progress dialog 
and show a message.
 progressDialog.dismiss();
-FeedbackUtil.showError(this, caught);
+showError(caught);
 }
 }
 
diff --git a/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
index b175bf1..37cac72 100644
--- a/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
+++ b/app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
@@ -361,10 +361,8 @@
 if (callback != null) {
 callback.getFunnel().searchError(true, timeToDisplay);
 }
+// if there's an error just log it and let the existing prefix 
search results be.
 updateProgressBar(false);
-
-// since this is a follow-up search just show a message
-FeedbackUtil.showError(getView(), caught);
 }
 }.execute();
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6e9805de811aa35bdf78312d3e3fb0bb711605b
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Delete old PP-specific normalization

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

Change subject: Delete old PP-specific normalization
..


Delete old PP-specific normalization

Now happens upstream.
Switch over all tests to use normalized messages.
Also improve test teardown.

Change-Id: I311643d40cb3503f95abb18291fbd871091c333e
---
M sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
M sites/all/modules/queue2civicrm/tests/data/recurring_payment.json
M sites/all/modules/queue2civicrm/tests/data/recurring_signup.json
D sites/all/modules/queue2civicrm/tests/data/subscr_payment_normalized.json
D sites/all/modules/queue2civicrm/tests/data/subscr_signup_normalized.json
M sites/all/modules/queue2civicrm/tests/includes/Message.php
M sites/all/modules/queue2civicrm/tests/phpunit/RecurringQueueTest.php
7 files changed, 104 insertions(+), 397 deletions(-)

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



diff --git 
a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php 
b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
index b37b404..851e40c 100644
--- a/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
+++ b/sites/all/modules/queue2civicrm/recurring/RecurringQueueConsumer.php
@@ -84,11 +84,6 @@
// should not require special normalization
} else if ( !isset( $msg[ 'contribution_tracking_id' ]) ) {
$msg_normalized[ 'contribution_tracking_id' ] = 
recurring_get_contribution_tracking_id( $msg );
-   // TODO: remove this after deploying audit and IPN 
updates to do message normalization there
-   if ( isset( $msg['payer_email'] ) ) {
-   // This is an old-school non-normalized PayPal 
message.
-   $msg = $this->normalizePaypalMessage( $msg );
-   }
} else {
$msg['contribution_tracking_update'] = false;
}
@@ -104,174 +99,6 @@
 
$msg = wmf_civicrm_normalize_msg( $msg );
return $msg;
-   }
-
-   /**
-* Normalize raw PayPal message
-*
-* It is possible that we'll get a raw message from PayPal.  If that is 
the
-* case, this will convert the raw PayPal message to our normalized 
format.
-*
-* This is large and unwieldy.
-*
-* FIXME: move this normalization into the paypal listener
-*
-* @param $msg
-* @return array
-*/
-   protected function normalizePaypalMessage( $msg ) {
-   $msg_normalized = array();
-
-   if ( isset( $msg['payment_date'] ) ) {
-   $msg_normalized['date'] = strtotime( 
$msg['payment_date'] );
-   }
-
-   // the subscription id
-   $msg_normalized[ 'subscr_id' ] = $msg[ 'subscr_id' ];
-   $msg_normalized[ 'txn_type' ] = $msg[ 'txn_type' ];
-   $msg_normalized[ 'email' ] = $msg[ 'payer_email' ];
-
-   // Premium info
-   if ( isset( $msg[ 'option_selection1' ] ) && !is_numeric( $msg[ 
'option_selection1' ] ) ) {
-   $msg_normalized[ 'size' ] = $msg[ 'option_selection1' ];
-   $msg_normalized[ 'premium_language' ] = $msg[ 
'option_selection2' ];
-   }
-
-   // Contact info
-   if ( $msg[ 'txn_type' ] == 'subscr_signup' || $msg[ 'txn_type' 
] == 'subscr_payment' || $msg[ 'txn_type' ] == 'subscr_modify' ) {
-   $msg_normalized[ 'first_name' ] = $msg[ 'first_name' ];
-   $msg_normalized[ 'middle_name' ] = '';
-   $msg_normalized[ 'last_name' ] = $msg[ 'last_name' ];
-
-   if ( isset( $msg['address_street'] ) ) {
-   $split = explode("\n", str_replace("\r", '', 
$msg[ 'address_street' ]));
-   $msg_normalized[ 'street_address' ] = $split[0];
-   if ( count( $split ) > 1 ) {
-   $msg_normalized[ 
'supplemental_address_1' ] = $split[1];
-   }
-   $msg_normalized[ 'city' ] = $msg[ 
'address_city' ];
-   $msg_normalized[ 'state_province' ] = $msg[ 
'address_state' ];
-   $msg_normalized[ 'country' ] = $msg[ 
'address_country_code' ];
-   $msg_normalized[ 'postal_code' ] = $msg[ 
'address_zip' ];
-
-   // Shipping info (address same as above since 
PayPal only passes 1 address)
-   $split = explode(" ", $msg[ 'address_name' ]);
-   $msg_norm

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add mention failure notifications to Flow

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

Change subject: Add mention failure notifications to Flow
..


Add mention failure notifications to Flow

Bug: T144614
Depends-On: Id3b55e15a0c1a8f3fee19cbe07983c6e373b309e
Change-Id: Ief4d145e2729a86b9e5f8590b66d7adf735dd346
---
M extension.json
M includes/Notifications/Controller.php
A includes/Notifications/MentionStatusPresentationModel.php
M includes/Notifications/Notifications.php
4 files changed, 140 insertions(+), 24 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7d63399..d0e7d19 100644
--- a/extension.json
+++ b/extension.json
@@ -1197,6 +1197,7 @@
"Flow\\Log\\LqtImportFormatter": 
"includes/Log/LqtImportFormatter.php",
"Flow\\Log\\ModerationLogger": 
"includes/Log/ModerationLogger.php",
"Flow\\MentionPresentationModel": 
"includes/Notifications/MentionPresentationModel.php",
+   "Flow\\MentionStatusPresentationModel": 
"includes/Notifications/MentionStatusPresentationModel.php",
"Flow\\Model\\AbstractRevision": 
"includes/Model/AbstractRevision.php",
"Flow\\Model\\AbstractSummary": 
"includes/Model/AbstractSummary.php",
"Flow\\Model\\Anchor": "includes/Model/Anchor.php",
diff --git a/includes/Notifications/Controller.php 
b/includes/Notifications/Controller.php
index 28351f5..0458b34 100644
--- a/includes/Notifications/Controller.php
+++ b/includes/Notifications/Controller.php
@@ -94,7 +94,7 @@
}
 
$user = $revision->getUser();
-   $mentionedUsers = $this->getMentionedUsers( $revision );
+   list( $mentionedUsers, $mentionsSkipped ) = 
$this->getMentionedUsersAndSkipState( $revision );
 
$extraData['content'] = Utils::htmlToPlaintext( 
$revision->getContent(), 200, $this->language );
$extraData['revision-id'] = $revision->getRevisionId();
@@ -120,7 +120,15 @@
$events[] = EchoEvent::create( array( 'type' => 
'flowusertalk-description-edited' ) + $info );
}
if ( $mentionedUsers ) {
-   $events[] = $this->generateMentionEvent( $revision, 
null, $boardWorkflow, $user, $mentionedUsers );
+   $mentionEvents = $this->generateMentionEvents(
+   $revision,
+   null,
+   $boardWorkflow,
+   $user,
+   $mentionedUsers,
+   $mentionsSkipped
+   );
+   $events = array_merge( $events, $mentionEvents );
}
 
return $events;
@@ -168,7 +176,7 @@
}
 
$user = $revision->getUser();
-   $mentionedUsers = $this->getMentionedUsers( $revision );
+   list( $mentionedUsers, $mentionsSkipped ) = 
$this->getMentionedUsersAndSkipState( $revision );
$title = $topicWorkflow->getOwnerTitle();
 
$extraData['revision-id'] = $revision->getRevisionId();
@@ -194,12 +202,21 @@
// that they weren't also mentioned in 
the topic title (in
// which case they would get 2 
notifications...)
if ( $mentionedUsers ) {
-   $mentionedInTitle = 
$this->getMentionedUsers( $topicRevision );
+   list( $mentionedInTitle, 
$mentionsSkippedInTitle ) =
+   
$this->getMentionedUsersAndSkipState( $topicRevision );
$mentionedUsers = 
array_diff_key( $mentionedUsers, $mentionedInTitle );
+   $mentionsSkipped = 
$mentionsSkipped || $mentionsSkippedInTitle;
$extraData['mentioned-users'] = 
$mentionedUsers;
}
 
-   return $this->generateMentionEvent( 
$revision, $topicRevision, $topicWorkflow, $user, $mentionedUsers );
+   return $this->generateMentionEvents(
+   $revision,
+   $topicRevision,
+   $topicWorkflow,
+   $user,
+   $mentionedUsers,
+   $mentionsSkipped
+   );
  

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: MentionStatus: prefer failure-type

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

Change subject: MentionStatus: prefer failure-type
..


MentionStatus: prefer failure-type

In MentionStatusPresentationModel, prefer
extra['failure-type'] to event-type to determine
why the mention was not sent.

Bug: T144614
Change-Id: Id3b55e15a0c1a8f3fee19cbe07983c6e373b309e
---
M includes/formatters/MentionStatusPresentationModel.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/formatters/MentionStatusPresentationModel.php 
b/includes/formatters/MentionStatusPresentationModel.php
index 5b9c808..b5417eb 100644
--- a/includes/formatters/MentionStatusPresentationModel.php
+++ b/includes/formatters/MentionStatusPresentationModel.php
@@ -120,7 +120,8 @@
}
 
private function isTooManyMentionsFailure() {
-   return $this->getType() === 'mention-failure-too-many';
+   return $this->getFailureType() === 'too-many' ||
+   $this->getType() === 'mention-failure-too-many';
}
 
private function getMaxMentions() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3b55e15a0c1a8f3fee19cbe07983c6e373b309e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Dynamicproxy: Set up a GET-only frontend

2017-04-20 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349287 )

Change subject: Dynamicproxy:  Set up a GET-only frontend
..

Dynamicproxy:  Set up a GET-only frontend

The normal API ('Invisible Unicorn') doesn't provide any security at all.
Still, it would be nice for external users to get info about what proxies
are setup.  This patch adds an additional service on 8089 that forwards
GETS to the API but refuses other requests.

Bug: T115752
Change-Id: I515154d9103c4a395c6f0723cebfadf8a7f67da3
---
A modules/dynamicproxy/files/proxygetter.conf
M modules/dynamicproxy/manifests/api.pp
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/349287/1

diff --git a/modules/dynamicproxy/files/proxygetter.conf 
b/modules/dynamicproxy/files/proxygetter.conf
new file mode 100644
index 000..64d2327
--- /dev/null
+++ b/modules/dynamicproxy/files/proxygetter.conf
@@ -0,0 +1,12 @@
+server {
+listen 8089;
+
+# Wrap the normal API but only allow GETs.
+location = / {
+proxy_pass http://127.0.0.1:5668
+
+limit_except GET {
+deny all;
+}
+}
+}
diff --git a/modules/dynamicproxy/manifests/api.pp 
b/modules/dynamicproxy/manifests/api.pp
index 4b669f1..c4e4ec1 100644
--- a/modules/dynamicproxy/manifests/api.pp
+++ b/modules/dynamicproxy/manifests/api.pp
@@ -71,4 +71,11 @@
 owner   => 'www-data',
 group   => 'www-data',
 }
+
+# This is a GET-only front end that sits on port 8089.  We can
+#  open this up to the public even though the actual API has no
+#  auth protections.
+nginx::site { 'proxygetter':
+source => 'puppet:///modules/dynamicproxy/proxygetter.conf',
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I515154d9103c4a395c6f0723cebfadf8a7f67da3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Example script of full training pipeline

2017-04-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349286 )

Change subject: Example script of full training pipeline
..

Example script of full training pipeline

This script gives a general overview of how the pieces of the
mjolnir library work together. It might also provide some area
to bikeshed about what the api's should look like.

In the long run there will be some more advanced version of this script
with various parameters for doing feature engineering, and there will
be python scripts in the discovery analytics repository called by oozie
that run pieces of the pipeline saving intermediate stages that are
potentially useful for feature engineering, and automating the process
of building a model from beginning to end.

Change-Id: If5e06ad51408687ccac9491edc7ea91ca2d57cf7
---
A mjolnir/cli/training_pipeline.py
1 file changed, 107 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/86/349286/1

diff --git a/mjolnir/cli/training_pipeline.py b/mjolnir/cli/training_pipeline.py
new file mode 100644
index 000..ad80f7a
--- /dev/null
+++ b/mjolnir/cli/training_pipeline.py
@@ -0,0 +1,107 @@
+"""
+Example script demonstrating the full LTR pipeline. It may
+not be desirable to run this all at once, but rather saving
+intermediate stages to HDFS for later analysis. This is mostly
+to demonstrate how everything ties together
+
+To run:
+PYSPARK_PYTHON=MJOLNIR/venv/bin/python spark-submit \
+--jars 
hdfs://analytics-hadoop/wmf/refinery/current/artifacts/refinery-hive.jar \
+--artifacts 'mjolnir_venv.zip#MJOLNIR' \
+path/to/training_pipeline.py
+"""
+
+import mjolnir.dbn
+import mjolnir.sampling
+import mjolnir.features
+import mjolnir.training
+import mjolnir.training.xgboost
+from pyspark import SparkContext
+from pyspark.sql import HiveContext
+from pyspark.sql import functions as F
+
+
+def main(sc, sqlContext):
+sqlContext.sql("CREATE TEMPORARY FUNCTION stemmer AS 
'org.wikimedia.analytics.refinery.hive.StemmerUDF'")
+
+# Load click data from HDFS
+df_clicks = (
+sqlContext.read.parquet(
+
'hdfs://analytics-hadoop/wmf/data/discovery/query_clicks/daily/year=*/month=*/day=*')
+# Clicks and hits contains a bunch of useful debugging data, but we 
don't
+# need any of that here. Save a bunch of memory by only working with
+# lists of page ids
+.withColumn('hit_page_ids', F.col('hits.pageid'))
+.drop('hits')
+.withColumn('click_page_ids', F.col('clicks.pageid'))
+.drop('clicks')
+# Normalize queries using the lucene stemmer
+.withColumn('norm_query', F.expr('stemmer(query, substring(wikiid, 1, 
2))')))
+
+# Sample to some subset of queries per wiki
+df_sampled = mjolnir.sampling.sample(
+df_clicks,
+wikis=['enwiki', 'dewiki', 'ruwiki', 'frwiki'],
+seed=54321,
+queries_per_wiki=1,
+min_sessions_per_query=10)
+df_sampled = df_sampled.cache()
+
+# Learn relevances
+df_rel = mjolnir.dbn.train(df_sampled, {
+'MAX_ITERATIONS': 40,
+'DEBUG': False,
+'PRETTY_LOG': True,
+'MIN_DOCS_PER_QUERY': 10,
+'MAX_DOCS_PER_QUERY': 20,
+'SERP_SIZE': 20,
+'QUERY_INDEPENDENT_PAGER': False,
+'DEFAULT_REL': 0.5})
+
+df_hits = (
+df_sampled
+# Explode source into a row per displayed hit, reduce to a row per
+# unique (wikiid, query, page_id) and add a count of the number of
+# duplicates removed.
+.withColumn('hit_page_id', F.explode('hit_page_ids'))
+.drop('hit_page_ids')
+.groupBy('wikiid', 'query', 'norm_query', 'hit_page_id')
+.agg(F.count(F.lit(1)).alias('weight'))
+# Join in the relevance labels
+.join(df_rel, how='inner', on=['wikiid', 'norm_query', 'hit_page_id']))
+
+# TODO: Nothing below here is implemented, and is only included
+# as a rough estimate of what will be implemented.
+
+# Collect features for all known queries. Note that this intentionally
+# uses query and NOT norm_query. Merge those back into the source hits.
+df_hits_with_features = df_hits.join(
+mjolnir.features.collect(df_hits,
+ 
url='https://search.svc.eqiad.wmnet:9243/_msearch',
+ indices={'enwiki': 'enwiki_content'},
+ 
feature_definitions=mjolnir.features.enwiki_features()),
+how='inner', on=['wikiid', 'query', 'hit_page_id'])
+
+# Generate test/train/validate splits
+split_names = ['x_train', 'x_test', 'x_vali', 'y_train', 'y_test', 
'y_vali']
+splits = mjolnir.training.split(
+df_hits_with_features, splits=(0.6, 0.2, 0.2))
+
+# Write out splits in a format suitable for a train

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: WikitextEditorWidget: Update toolbar state when switching back

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

Change subject: WikitextEditorWidget: Update toolbar state when switching back
..


WikitextEditorWidget: Update toolbar state when switching back

This prevents the mode switcher from having both the "Source mode"
and "Switch to visual mode" tools active. Otherwise there is nothing
that refreshes the tools' active states.

What's also confusing here is that the wikitext and visual editors
each have their own toolbars with their own mode switcher tools,
so the tool that initiates the switch to source mode is not the
one that's visible after the switch.

We should replace this with VE's support for wikitext surfaces
at some point.

Change-Id: I3ed368f0a0a01cd3bd9ee4bc232858583e1a981b
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
index 84b1427..00e4e48 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
@@ -182,6 +182,7 @@
mw.flow.ui.WikitextEditorWidget.prototype.afterAttach = function () {
if ( this.toolbar ) {
this.toolbar.initialize();
+   this.toolbar.emit( 'updateState' );
}
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ed368f0a0a01cd3bd9ee4bc232858583e1a981b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Crash fix: Remove reliance on a Context to detect a 404

2017-04-20 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349284 )

Change subject: Crash fix: Remove reliance on a Context to detect a 404
..

Crash fix: Remove reliance on a Context to detect a 404

This should fix the top crash from the 4/19 beta:

https://rink.hockeyapp.net/manage/apps/226650/app_versions/93/crash_reasons/165970817

Updates ThrowableUtil.is404 to drop its alternate branch which draws upon
ThrowableUtil.getAppError.  404s are only expected in the context of
missing pages or summaries for them, both of which we get with Retrofit,
not java-mwapi.  Retrofit throws HttpStatusExceptions, which we don't
need a Context to check.  If we get 404s from the MediaWiki API (as
opposed to the expected 200s with error messages), we've got bigger
problems, and in any case, java-mwapi will be gone Real Soon Now (TM).

Perhaps more controversially, deprecates getAppError and its supporting
methods as well as the AppError class itself.  Our philsophy around user
error messages has shifted since this code was written in favor of
standard, predefined error views. Using these legacy methods requires
passing in a Context, which can be hazardous.  Further, they're already
nearly unused.

Change-Id: I53c944b2b96ac2ca9e36191b582fb13d5f5c2455
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorType.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorView.java
M app/src/main/java/org/wikipedia/util/ThrowableUtil.java
M app/src/main/java/org/wikipedia/views/WikiErrorView.java
6 files changed, 19 insertions(+), 20 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index f166dc1..cfc2d6a 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -937,7 +937,7 @@
 
 disableActionTabs(caught);
 
-refreshView.setEnabled(!ThrowableUtil.is404(getContext(), caught));
+refreshView.setEnabled(!ThrowableUtil.is404(caught));
 errorState = true;
 if (callback() != null) {
 callback().onPageLoadError(getTitle());
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
index fab9599..b405117 100755
--- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
+++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
@@ -227,7 +227,7 @@
 errorContainer.setVisibility(View.VISIBLE);
 errorContainer.setError(caught);
 errorContainer.setCallback(this);
-LinkPreviewErrorType errorType = 
LinkPreviewErrorType.get(getContext(), caught);
+LinkPreviewErrorType errorType = LinkPreviewErrorType.get(caught);
 
overlayView.setPrimaryButtonText(getResources().getString(errorType.buttonText()));
 overlayView.setCallback(errorType.buttonAction(errorContainer));
 if (errorType != LinkPreviewErrorType.OFFLINE) {
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorType.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorType.java
index e80eeac..1339693 100644
--- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorType.java
+++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorType.java
@@ -1,6 +1,5 @@
 package org.wikipedia.page.linkpreview;
 
-import android.content.Context;
 import android.support.annotation.DrawableRes;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -61,8 +60,8 @@
 
 @NonNull abstract LinkPreviewOverlayView.Callback buttonAction(@NonNull 
LinkPreviewErrorView errorView);
 
-@NonNull public static LinkPreviewErrorType get(@NonNull Context context, 
@Nullable Throwable caught) {
-if (caught != null && ThrowableUtil.is404(context, caught)) {
+@NonNull public static LinkPreviewErrorType get(@Nullable Throwable 
caught) {
+if (caught != null && ThrowableUtil.is404(caught)) {
 return LinkPreviewErrorType.PAGE_MISSING;
 }
 if (caught != null && ThrowableUtil.isOffline(caught)) {
diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorView.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorView.java
index 46faa82..692f8f8 100644
--- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorView.java
+++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewErrorView.java
@@ -54,7 +54,7 @@
 }
 
 public void setError(@Nullable Thro

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: WikitextEditorWidget: Update toolbar state when switching back

2017-04-20 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349283 )

Change subject: WikitextEditorWidget: Update toolbar state when switching back
..

WikitextEditorWidget: Update toolbar state when switching back

This prevents the mode switcher from having both the "Source mode"
and "Switch to visual mode" tools active. Otherwise there is nothing
that refreshes the tools' active states.

What's also confusing here is that the wikitext and visual editors
each have their own toolbars with their own mode switcher tools,
so the tool that initiates the switch to source mode is not the
one that's visible after the switch.

We should replace this with VE's support for wikitext surfaces
at some point.

Change-Id: I3ed368f0a0a01cd3bd9ee4bc232858583e1a981b
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
index 84b1427..00e4e48 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
@@ -182,6 +182,7 @@
mw.flow.ui.WikitextEditorWidget.prototype.afterAttach = function () {
if ( this.toolbar ) {
this.toolbar.initialize();
+   this.toolbar.emit( 'updateState' );
}
};
 

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

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

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


  1   2   3   4   >